diff options
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 |
