X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;f=src%2Fvicar-daemon%2Fsrc%2Fcallrouter.h;fp=src%2Fvicar-daemon%2Fsrc%2Fcallrouter.h;h=44c2ed905f6c5619818ea7da4be77db00c88d57d;hb=40b1207a3eb33b54e8ac780cabd4a68f7931f248;hp=0000000000000000000000000000000000000000;hpb=f9b0ee0a7cc35f18c639b95795e684ccfd4749c0;p=vicar diff --git a/src/vicar-daemon/src/callrouter.h b/src/vicar-daemon/src/callrouter.h new file mode 100644 index 0000000..44c2ed9 --- /dev/null +++ b/src/vicar-daemon/src/callrouter.h @@ -0,0 +1,60 @@ +/* +@version: 0.2 +@author: Sudheer K. +@license: GNU General Public License +*/ + +#ifndef CALLROUTER_H +#define CALLROUTER_H + +#include +#include +#include + +#define APPLICATION_DBUS_PATH "/org/maemo/vicar" +#define APPLICATION_DBUS_INTERFACE "org.maemo.vicar" +#define APPLICATION_DBUS_SERVICE "org.maemo.vicar" +#define APPLICATION_FRIENDLY_NAME "VICaR" + +/* CSD CALL plugin D-Bus definitions */ +#define CSD_CALL_BUS_NAME "com.nokia.csd.Call" +#define CSD_CALL_INTERFACE "com.nokia.csd.Call" +#define CSD_CALL_INSTANCE_INTERFACE "com.nokia.csd.Call.Instance" +#define CSD_CALL_CONFERENCE "com.nokia.csd.Call.Conference" +#define CSD_CALL_PATH "/com/nokia/csd/call" +#define CSD_CALL_INSTANCE_PATH "/com/nokia/csd/call/1" +#define CSD_CALL_SERVICE "com.nokia.csd.Call" +#define CSD_SERVICE "com.nokia.csd" + +class CallRouter : public QObject +{ +Q_OBJECT +Q_CLASSINFO("D-Bus Interface", "org.maemo.vicar") + +public: + CallRouter(QObject *parent = 0); + ~CallRouter(); + void registerDBusService(); + void unregisterDBusService(); + + void startCallStatusMonitors(); + QString convertToDTMFCode(QString); + void connectToDBusSignals(); + void disconnectFromDBusSignals(); + bool isExcludedNumber(QString); + +public slots: + Q_SCRIPTABLE void startOutgoingCallMonitor(); + Q_SCRIPTABLE void stopOutgoingCallMonitor(); + Q_SCRIPTABLE void processOutgoingCall(const QDBusMessage& dbusMessage); + Q_SCRIPTABLE void callViaCallingCard(); + Q_SCRIPTABLE void sendNumberAsDTMFCode(const QDBusMessage& dbusMessage); + Q_SCRIPTABLE void stopCallStatusMonitors(); + + + +private: + GConfUtility *gconfUtility; +}; + +#endif // CALLROUTER_H