summaryrefslogtreecommitdiffstats
path: root/bluetooth.h
diff options
context:
space:
mode:
authorMatt Ranostay <matt.ranostay@konsulko.com>2018-04-20 15:09:24 -0700
committerMatt Ranostay <matt.ranostay@konsulko.com>2018-05-08 19:04:26 -0700
commit6534c1b9b0c76883cb4bc21b7709b8572c45ab91 (patch)
treeef724aa55348741098adfa08b194cd4e20e1385b /bluetooth.h
parent54ab6c2a6475967523e2250c926cee61bc37f1b1 (diff)
libqtappfw: bluetooth: add initial avrcp controls
To allow the Mediaplayer application to control avrcp there needs to be a callable set_avrcp_controls() function Bug-AGL: SPEC-1385 Change-Id: I10d9cbaca5688548b8fb174754c19874e2357fab Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
Diffstat (limited to 'bluetooth.h')
-rw-r--r--bluetooth.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/bluetooth.h b/bluetooth.h
index 0bce40f..41e1719 100644
--- a/bluetooth.h
+++ b/bluetooth.h
@@ -49,6 +49,7 @@ class Bluetooth : public QObject
Q_INVOKABLE void disconnect(QString address);
Q_INVOKABLE void send_confirmation(void);
+ Q_INVOKABLE void set_avrcp_controls(QString address, QString cmd);
bool power() const { return m_power; };
bool discoverable() const { return m_discoverable; };
@@ -73,6 +74,7 @@ class Bluetooth : public QObject
void onDisconnected();
void onMessageReceived(MessageType, Message*);
+ QString process_uuid(QString uuid) { if (uuid.length() == 36) return uuid; return uuids.value(uuid); };
bool isDiscoveryListResponse(Message *tmsg) { return (tmsg->replyInfo() == "BT - Scan Result is Displayed"); };
bool isPowerResponse(Message *tmsg) { return (tmsg->replyInfo() == "Radio - Power set"); };
@@ -80,6 +82,8 @@ class Bluetooth : public QObject
bool m_power;
bool m_discoverable;
+ QMap<QString, QString> uuids;
+
const QStringList events {
"connection",
"request_confirmation",