2 * hfdialer - Hands Free Voice Call Manager
3 * Copyright (c) 2012, Intel Corporation.
5 * This program is licensed under the terms and conditions of the
6 * Apache License, version 2.0. The full text of the Apache License is at
7 * http://www.apache.org/licenses/LICENSE-2.0
11 #ifndef DIALERCONTEXT_H
12 #define DIALERCONTEXT_H
14 // libofono-qt headers
15 #include <ofonomodemmanager.h>
16 #include <ofonocallvolume.h>
17 #include <ofonomessagewaiting.h>
20 #include "callmanager.h"
21 //#include "resourceproxy.h"
23 // Convienence Macro for access to Class instance
24 #define DC DialerContext::instance()
26 class DialerContext: public QObject
30 Q_PROPERTY(OfonoModemManager* modemManager READ modemManager)
31 Q_PROPERTY(OfonoCallVolume* volumeManager READ volumeManager)
32 Q_PROPERTY(OfonoMessageWaiting* voicemailManager READ voicemailManager)
33 Q_PROPERTY(CallManager* callManager READ callManager)
34 // Q_PROPERTY(ResourceProxy* policyManager READ policyManager)
35 Q_PROPERTY(QStringList modes READ modes WRITE setModes)
38 virtual ~DialerContext();
40 static DialerContext *instance();
42 OfonoModemManager* modemManager() const;
43 OfonoCallVolume* volumeManager() const;
44 OfonoMessageWaiting* voicemailManager() const;
45 CallManager* callManager() const;
46 //ResourceProxy* policyManager() const;
47 QStringList modes() const;
50 // Slot to set current mode at runtime
51 void setModes(const QStringList &modeList);
58 // Slots to handle signals from Manager oFono service
59 void onModemAdded(const QString &path);
60 void onModemRemoved(const QString &path);
62 // Slots to handle signals from CallVolume oFono service
63 void onCallVolumeValidityChanged(bool valid);
65 // Slots to handle signals from MessageWaiting oFono service
66 void onVoicemailValidityChanged(bool valid);
67 void onVoicemailWaitingChanged(bool waiting);
68 void onVoicemailCountChanged(int count);
70 // Slots to handle signals from CallManager oFono service
71 void onCallManagerValidityChanged(bool valid);
72 void onCallsChanged();
74 // Slot to handle runtime mode changes in GConf key
75 void onModesChanged();
78 DialerContext(QObject *parent = 0);
81 DialerContext(const DialerContext&);
82 DialerContext& operator= (DialerContext&);
84 class DialerContextPrivate *d;
86 static DialerContext *gContext;
89 #endif // DIALERCONTEXT_H