2010-04-27 03:10:32 +00:00
|
|
|
/*
|
2014-01-19 01:09:44 +00:00
|
|
|
* This file Copyright (C) 2012-2014 Mnemosyne LLC
|
2010-04-27 03:10:32 +00:00
|
|
|
*
|
2014-01-19 01:09:44 +00:00
|
|
|
* It may be used under the GNU Public License v2 or v3 licenses,
|
|
|
|
* or any future license endorsed by Mnemosyne LLC.
|
2010-04-27 03:10:32 +00:00
|
|
|
*
|
2010-10-01 13:33:39 +00:00
|
|
|
* $Id$
|
2010-04-27 03:10:32 +00:00
|
|
|
*/
|
|
|
|
|
2010-08-01 18:55:04 +00:00
|
|
|
#include "add-data.h"
|
2010-04-27 03:10:32 +00:00
|
|
|
#include "app.h"
|
|
|
|
#include "dbus-adaptor.h"
|
|
|
|
|
2014-12-12 23:05:10 +00:00
|
|
|
TrDBusAdaptor::TrDBusAdaptor (MyApp* app):
|
2013-09-14 22:45:04 +00:00
|
|
|
QDBusAbstractAdaptor (app),
|
|
|
|
myApp (app)
|
2010-04-27 03:10:32 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
bool
|
2014-12-12 23:05:10 +00:00
|
|
|
TrDBusAdaptor::PresentWindow ()
|
2010-04-27 03:10:32 +00:00
|
|
|
{
|
2013-09-14 22:45:04 +00:00
|
|
|
myApp->raise ();
|
|
|
|
return true;
|
2010-04-27 03:10:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
bool
|
2014-12-12 23:05:10 +00:00
|
|
|
TrDBusAdaptor::AddMetainfo (const QString& key)
|
2010-04-27 03:10:32 +00:00
|
|
|
{
|
2013-09-14 22:45:04 +00:00
|
|
|
AddData addme (key);
|
2010-08-01 18:55:04 +00:00
|
|
|
|
2013-09-14 22:45:04 +00:00
|
|
|
if (addme.type != addme.NONE)
|
|
|
|
myApp->addTorrent (addme);
|
2010-08-01 18:55:04 +00:00
|
|
|
|
2013-09-14 22:45:04 +00:00
|
|
|
return true;
|
2010-04-27 03:10:32 +00:00
|
|
|
}
|