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
14 #include "modem_interface.h"
18 #define OFONO_SERVICE "org.ofono"
19 #define OFONO_MANAGER_PATH "/"
21 class ModemProxy: public org::ofono::Modem
24 Q_PROPERTY(QStringList interfaces READ interfaces);
25 Q_PROPERTY(QString path READ path);
26 Q_PROPERTY(QString manufacturer READ manufacturer);
27 Q_PROPERTY(QString model READ model);
28 Q_PROPERTY(QString revision READ revision);
29 Q_PROPERTY(QString serial READ serial);
30 Q_PROPERTY(bool powered READ powered WRITE setPowered);
31 Q_PROPERTY(bool online READ online WRITE setOnline);
34 ModemProxy(const QString &objectPath);
35 virtual ~ModemProxy();
37 QStringList interfaces() const;
39 QString manufacturer() const;
40 QString model() const;
41 QString revision() const;
42 QString serial() const;
47 void setPowered(bool is_powered);
48 void setOnline(bool is_online);
50 void modemDBusGetPropDone(QDBusPendingCallWatcher *call);
53 void interfacesChanged(QStringList interfaces);
54 void poweredChanged(bool powered);
55 void onlineChanged(bool powered);
60 // Slots to handle DBus signals from ofono
61 void propertyChanged(const QString &in0, const QDBusVariant &in1);
64 QStringList m_properties; // raw return from GetProperties
65 QStringList m_interfaces;
67 QString m_manufacturer;
76 class VoicemailProxy: public org::ofono::MessageWaiting
80 Q_PROPERTY(bool isConnected READ isConnected NOTIFY connected);
81 Q_PROPERTY(bool waiting READ waiting);
82 Q_PROPERTY(int count READ count);
83 Q_PROPERTY(QString mailbox READ mailbox WRITE setMailbox);
86 VoicemailProxy(const QString &objectPath);
87 virtual ~VoicemailProxy();
89 bool isConnected() const;
94 QString mailbox() const;
97 void setMailbox(QString lineid);
100 void messagesWaitingChanged();
101 void mailboxChanged();
106 void voicemailDBusGetPropDone(QDBusPendingCallWatcher *call);
107 void voicemailPropertyChanged(const QString &in0, const QDBusVariant &in1);
110 QStringList m_properties; // raw return from GetProperties
118 class VolumeManager: public org::ofono::CallVolume
121 Q_PROPERTY(int speakerVolume READ speakerVolume WRITE setSpeakerVolume);
122 Q_PROPERTY(int micVolume READ micVolume WRITE setMicVolume);
123 Q_PROPERTY(bool muted READ muted WRITE setMuted);
124 Q_PROPERTY(bool isConnected READ isConnected);
127 VolumeManager(const QString &objectPath);
128 virtual ~VolumeManager();
130 QString path() const;
131 int speakerVolume() const;
132 int micVolume() const;
134 bool isConnected() const;
137 void setSpeakerVolume(int volume);
138 void setMicVolume(int volume);
139 void setMuted(bool is_muted);
140 void volumeDBusGetPropDone(QDBusPendingCallWatcher *call);
143 void speakerVolumeChanged(int volume);
144 void micVolumeChanged(int volume);
145 void muteChanged(bool muted);
150 QStringList m_properties; // raw return from GetProperties
160 /* Local Variables: */
162 /* c-basic-offset:4 */
163 /* indent-tabs-mode: nil */