diff options
| author | Andrew Branson <andrew.branson@cern.ch> | 2016-02-11 23:55:16 +0100 |
|---|---|---|
| committer | Andrew Branson <andrew.branson@cern.ch> | 2016-02-11 23:55:16 +0100 |
| commit | 29aaea2d80a9eb1715b6cddfac2d2aacf76358bd (patch) | |
| tree | 012795b6bec16c72f38d33cff46324c9a0225868 /rockworkd/libpebble/phonecallendpoint.h | |
launchpad ~mzanetti/rockwork/trunk r87
Diffstat (limited to 'rockworkd/libpebble/phonecallendpoint.h')
| -rw-r--r-- | rockworkd/libpebble/phonecallendpoint.h | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/rockworkd/libpebble/phonecallendpoint.h b/rockworkd/libpebble/phonecallendpoint.h new file mode 100644 index 0000000..994f8a6 --- /dev/null +++ b/rockworkd/libpebble/phonecallendpoint.h @@ -0,0 +1,47 @@ +#ifndef PHONECALLENDPOINT_H +#define PHONECALLENDPOINT_H + +#include <QObject> + +class Pebble; +class WatchConnection; + +class PhoneCallEndpoint : public QObject +{ + Q_OBJECT +public: + enum CallAction{ + CallActionAnswer = 1, + CallActionHangup = 2, + CallActionGetState = 3, + CallActionIncoming = 4, + CallActionOutgoing = 5, + CallActionMissed = 6, + CallActionRing = 7, + CallActionStart = 8, + CallActionEnd = 9 + }; + + explicit PhoneCallEndpoint(Pebble *pebble, WatchConnection *connection); + +public slots: + void incomingCall(uint cookie, const QString &number, const QString &name); + void callStarted(uint cookie); + void callEnded(uint cookie, bool missed); + +signals: + void hangupCall(uint cookie); + + +private: + void phoneControl(char act, uint cookie, QStringList datas); + +private slots: + void handlePhoneEvent(const QByteArray &data); + +private: + Pebble *m_pebble; + WatchConnection *m_connection; +}; + +#endif // PHONECALLENDPOINT_H |
