linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Santiago Carot-Nemesio <sancane@gmail.com>
To: linux-bluetooth@vger.kernel.org
Cc: Santiago Carot-Nemesio <sancane@gmail.com>
Subject: [PATCH 13/16] Add functions for getting mdl properties
Date: Wed, 28 Jul 2010 10:07:30 +0200	[thread overview]
Message-ID: <1280304453-9328-1-git-send-email-sancane@gmail.com> (raw)
In-Reply-To: <1280304232-2939-6-git-send-email-santoscadenas@gmail.com>

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


  reply	other threads:[~2010-07-28  8:07 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-28  8:00 MCAP patches Santiago Carot-Nemesio
2010-07-28  8:00 ` [PATCH 01/16] Initial support for MCAP Santiago Carot-Nemesio
2010-07-28  8:00   ` [PATCH 02/16] Add MCAP instance management Santiago Carot-Nemesio
2010-07-28  8:00     ` [PATCH 03/16] Receive MCAP mcl connections from remote devices Santiago Carot-Nemesio
2010-07-28  8:00       ` [PATCH 04/16] Added function for MCAP control channel (MCL) management Santiago Carot-Nemesio
2010-07-28  8:00         ` [PATCH 05/16] Prepare FSM functions for processing comands Santiago Carot-Nemesio
2010-07-28  8:00           ` [PATCH 06/16] Send MCAP request mcap_md_create_mdl_req Santiago Carot-Nemesio
2010-07-28  8:03             ` [PATCH 07/16] Process " Jose Antonio Santos Cadenas
2010-07-28  8:03               ` [PATCH 08/16] Process MCAP response mcap_md_create_mdl_rsp Jose Antonio Santos Cadenas
2010-07-28  8:03                 ` [PATCH 09/16] Implement connection of MCAP data links (MDL's) Jose Antonio Santos Cadenas
2010-07-28  8:03                   ` [PATCH 10/16] Process MCAP process_md_abort_mdl request and response commands Jose Antonio Santos Cadenas
2010-07-28  8:03                     ` [PATCH 11/16] Process MCAP process_md_reconnect_mdl " Jose Antonio Santos Cadenas
2010-07-28  8:03                       ` [PATCH 12/16] Process MCAP process_md_delete_mdl " Jose Antonio Santos Cadenas
2010-07-28  8:07                         ` Santiago Carot-Nemesio [this message]
2010-07-28  8:07                           ` [PATCH 14/16] Response with invalid operation when an invalid request is received Santiago Carot-Nemesio
2010-07-28  8:07                             ` [PATCH 15/16] Add version and supported procedures values Santiago Carot-Nemesio
2010-07-28  8:07                               ` [PATCH 16/16] Add initial support for synchronization protocol Santiago Carot-Nemesio
2010-08-04  9:02 ` MCAP patches José Antonio Santos Cadenas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1280304453-9328-1-git-send-email-sancane@gmail.com \
    --to=sancane@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).