transmission/qt/DBusAdaptor.cc

37 lines
575 B
C++
Raw Normal View History

/*
* This file Copyright (C) 2012-2015 Mnemosyne LLC
*
* It may be used under the GNU GPL versions 2 or 3
* or any future license endorsed by Mnemosyne LLC.
*
* $Id$
*/
#include "AddData.h"
#include "Application.h"
#include "DBusAdaptor.h"
DBusAdaptor::DBusAdaptor (Application* app):
2013-09-14 22:45:04 +00:00
QDBusAbstractAdaptor (app),
myApp (app)
{
}
bool
DBusAdaptor::PresentWindow ()
{
2013-09-14 22:45:04 +00:00
myApp->raise ();
return true;
}
bool
DBusAdaptor::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;
}