transmission/qt/dbus-adaptor.cc

37 lines
591 B
C++
Raw Normal View History

/*
* This file Copyright (C) 2012-2014 Mnemosyne LLC
*
* It may be used under the GNU Public License v2 or v3 licenses,
* or any future license endorsed by Mnemosyne LLC.
*
* $Id$
*/
#include "add-data.h"
#include "app.h"
#include "dbus-adaptor.h"
2013-09-14 22:45:04 +00:00
TrDBusAdaptor :: TrDBusAdaptor (MyApp* app):
QDBusAbstractAdaptor (app),
myApp (app)
{
}
bool
2013-09-14 22:45:04 +00:00
TrDBusAdaptor :: PresentWindow ()
{
2013-09-14 22:45:04 +00:00
myApp->raise ();
return true;
}
bool
2013-09-14 22:45:04 +00:00
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;
}