summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArun Jagadish <arun.jagadish@intel.com>2016-12-23 14:45:47 +0530
committerJohan Hedberg <johan.hedberg@intel.com>2017-01-28 08:43:41 +0200
commit1806804ad83237b76e61d5123235c63b260e8086 (patch)
tree690359c7876ac7b3fcb1b0e0aee6071878c621bb
parent71dbc19420a7921b7ffac96ac93018268167ede1 (diff)
Bluetooth: AVDTP: Add AVDTP Discover API Prototype
Added AVDTP Discover Request API Prototype. Change-Id: I661331634b64099e352efe12cacc9af5d4c7ce16 Signed-off-by: Arun Jagadish <arun.jagadish@intel.com>
-rw-r--r--subsys/bluetooth/host/avdtp.c11
-rw-r--r--subsys/bluetooth/host/avdtp_internal.h22
2 files changed, 33 insertions, 0 deletions
diff --git a/subsys/bluetooth/host/avdtp.c b/subsys/bluetooth/host/avdtp.c
index e950568a5..69530424c 100644
--- a/subsys/bluetooth/host/avdtp.c
+++ b/subsys/bluetooth/host/avdtp.c
@@ -213,3 +213,14 @@ int bt_avdtp_init(void)
return err;
}
+
+/* AVDTP Discover Request */
+int bt_avdtp_discover(struct bt_avdtp *session,
+ struct bt_avdtp_discover_params *param)
+{
+ BT_DBG("");
+ if (!param || !session) {
+ BT_DBG("Error: Callback/Session not valid");
+ }
+ return 0;
+}
diff --git a/subsys/bluetooth/host/avdtp_internal.h b/subsys/bluetooth/host/avdtp_internal.h
index 1d91b557b..86ad87421 100644
--- a/subsys/bluetooth/host/avdtp_internal.h
+++ b/subsys/bluetooth/host/avdtp_internal.h
@@ -113,6 +113,24 @@ struct bt_avdtp_ind_cb {
*/
};
+struct bt_avdtp_cap {
+ uint8_t cat;
+ uint8_t len;
+ uint8_t data[0];
+};
+
+struct bt_avdtp_sep {
+ uint8_t seid;
+ uint8_t len;
+ struct bt_avdtp_cap caps[0];
+};
+
+struct bt_avdtp_discover_params {
+ struct bt_avdtp_req *req;
+ uint8_t status;
+ struct bt_avdtp_sep *caps;
+};
+
/** @brief Global AVDTP session structure. */
struct bt_avdtp {
struct bt_l2cap_br_chan br_chan;
@@ -140,3 +158,7 @@ int bt_avdtp_disconnect(struct bt_avdtp *session);
/* AVDTP SEP register function */
int bt_avdtp_register_sep(uint8_t media_type, uint8_t role,
struct bt_avdtp_seid_lsep *sep);
+
+/* AVDTP Discover Request */
+int bt_avdtp_discover(struct bt_avdtp *session,
+ struct bt_avdtp_discover_params *param);