Updated version number in files
[vicar] / src / vicar-daemon / cpp / callrouter.h
1 /*
2 @version: 0.7
3 @author: Sudheer K. <scifi1947 at gmail.com>
4 @license: GNU General Public License
5 */
6
7 #ifndef CALLROUTER_H
8 #define CALLROUTER_H
9
10 #include <QObject>
11 #include <QDBusMessage>
12 #include <dbusutility.h>
13 #include "vicardbusadaptor.h"
14
15 #define APPLICATION_DBUS_PATH "/org/maemo/vicar"
16 #define APPLICATION_DBUS_INTERFACE "org.maemo.vicar"
17 #define APPLICATION_DBUS_SERVICE "org.maemo.vicar"
18 #define APPLICATION_FRIENDLY_NAME "VICaR"
19
20 /* CSD CALL plugin D-Bus definitions */
21 #define CSD_CALL_BUS_NAME       "com.nokia.csd.Call"
22 #define CSD_CALL_INTERFACE      "com.nokia.csd.Call"
23 #define CSD_CALL_INSTANCE_INTERFACE     "com.nokia.csd.Call.Instance"
24 #define CSD_CALL_CONFERENCE     "com.nokia.csd.Call.Conference"
25 #define CSD_CALL_PATH           "/com/nokia/csd/call"
26 #define CSD_CALL_INSTANCE_PATH  "/com/nokia/csd/call/1"
27 #define CSD_CALL_SERVICE        "com.nokia.csd.Call"
28 #define CSD_SERVICE             "com.nokia.csd"
29
30 class CallRouterPrivate;
31
32 class CallRouter : public QObject
33 {
34 Q_OBJECT
35 Q_CLASSINFO("D-Bus Interface", "org.maemo.vicar")
36
37 public:
38     CallRouter(QObject *parent = 0);
39     ~CallRouter();
40     void registerDBusService();
41     void unregisterDBusService();
42     bool isValidPhoneNumber(QString);
43
44 protected:
45     void startCallStatusMonitors();
46     QString convertToDTMFCode(QString);
47     bool isExcludedNumber(QString);
48     bool placeCall(QString);
49
50 protected slots:
51     QString callViaCallingCard(QString);
52     void sendNumberAsDTMFCode(const QDBusMessage& dbusMessage);
53     void displayDTMFConfirmation();
54     void stopCallStatusMonitors();
55
56     //D-Bus Interface Methods
57 public slots:
58     bool isRunning();
59     QString callInternationalNumber(const QString& internationalNumber);
60
61 private:
62     CallRouterPrivate * const d;
63 };
64
65 #endif // CALLROUTER_H