[PATCH 13/16] Add functions for getting mdl properties

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 health/mcap.c     |   16 ++++++++++++++++
 health/mcap_lib.h |    3 +++
 2 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/health/mcap.c b/health/mcap.c
index 050a896..df75752 100644
--- a/health/mcap.c
+++ b/health/mcap.c
@@ -635,6 +635,22 @@ static struct mcap_mcl *find_mcl(GSList *list, const bdaddr_t *addr)
 	return NULL;
 }
 
+int mcap_mdl_get_fd(struct mcap_mdl *mdl)
+{
+	if (!mdl || mdl->state != MDL_CONNECTED)
+		return -ENOTCONN;
+
+	return g_io_channel_unix_get_fd(mdl->dc);
+}
+
+uint16_t mcap_mdl_get_mdlid(struct mcap_mdl *mdl)
+{
+	if (!mdl)
+		return MCAP_MDLID_RESERVED;
+
+	return mdl->mdlid;
+}
+
 static void mcap_free_mdls(struct mcap_mcl *mcl, gboolean save)
 {
 	GSList *l;
diff --git a/health/mcap_lib.h b/health/mcap_lib.h
index b9fc9a5..b6286a1 100644
--- a/health/mcap_lib.h
+++ b/health/mcap_lib.h
@@ -127,6 +127,9 @@ void mcap_mdl_abort(struct mcap_mdl *mdl,
 				gpointer user_data,
 				GError **err);
 
+int mcap_mdl_get_fd(struct mcap_mdl *mdl);
+uint16_t mcap_mdl_get_mdlid(struct mcap_mdl *mdl);
+
 /* Mcl operations*/
 
 void mcap_create_mcl(struct mcap_instance *ms,
-- 
1.6.3.3

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux