X-Git-Url: http://vcs.maemo.org/git/?a=blobdiff_plain;f=src%2Fvicar-lib%2Fcpp%2Fdbusutility.h;fp=src%2Fvicar-lib%2Fcpp%2Fdbusutility.h;h=f362b70fc5b665d8d5da16e9962cbef93a8038c0;hb=74800375ecf7f41e290cf7cc7fa9ee8b230be68e;hp=0000000000000000000000000000000000000000;hpb=89f0017e6a73945ea83247472a6fa07d6ee536b5;p=vicar diff --git a/src/vicar-lib/cpp/dbusutility.h b/src/vicar-lib/cpp/dbusutility.h new file mode 100755 index 0000000..f362b70 --- /dev/null +++ b/src/vicar-lib/cpp/dbusutility.h @@ -0,0 +1,35 @@ +/* +@version: 0.6 +@author: Sudheer K. +@license: GNU General Public License +*/ + +#ifndef DBUSUTILITY_H +#define DBUSUTILITY_H + +#include +#include + +#define NOTIFICATION_SERVICE "org.freedesktop.Notifications" +#define NOTIFICATION_PATH "/org/freedesktop/Notifications" +#define NOTIFICATION_INTERFACE "org.freedesktop.Notifications" + +class DbusUtility: public QObject +{ + Q_OBJECT +protected: + QDBusConnection connection; +public: + DbusUtility(QObject * parent = 0); + ~DbusUtility(); + QDBusConnection getConnection(bool systemBus = true); + void setConnection(QDBusConnection connection); + bool sendSignal(QString strPath,QString strInterface,QString strName,bool systemBus = true); + bool sendMethodCall(QString strService,QString strPath, + QString strInterface,QString strMethodName, + QList & arguments,bool systemBus = true); + bool displayNotification(QString strMessage); + QString getErrorMessage(); +}; + +#endif // DBUSUTILITY_H