transmission/qt/dbus-adaptor.cc

37 lines
571 B
C++
Raw Normal View History

/*
* This file Copyright (C) 2012-2014 Mnemosyne LLC
*
* It may be used under the GNU GPL versions 2 or 3
* or any future license endorsed by Mnemosyne LLC.
*
* $Id$
*/
#include "add-data.h"
#include "app.h"
#include "dbus-adaptor.h"
TrDBusAdaptor::TrDBusAdaptor (MyApp* app):
2013-09-14 22:45:04 +00:00
QDBusAbstractAdaptor (app),
myApp (app)
{
}
bool
TrDBusAdaptor::PresentWindow ()
{
2013-09-14 22:45:04 +00:00
myApp->raise ();
return true;
}
bool
TrDBusAdaptor::AddMetainfo (const QString& key)
{
2013-09-14 22:45:04 +00:00
AddData addme (key);
2013-09-14 22:45:04 +00:00
if (addme.type != addme.NONE)
myApp->addTorrent (addme);
2013-09-14 22:45:04 +00:00
return true;
}