diff options
author | Arman Uguray <armansito@chromium.org> | 2014-12-15 07:29:05 -0800 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2014-12-15 17:24:14 -0200 |
commit | ebcbada186b2ec9f323064ae7a117baa0881b600 (patch) | |
tree | ca8be893986cfb2183e1d2966a295672ffc82b7e /attrib | |
parent | 0831238284de7dcf994bf9e2c350bb9acdc959e2 (diff) | |
download | bluez-ebcbada186b2ec9f323064ae7a117baa0881b600.tar.gz |
attrib/gattrib: Add g_attrib_get_att
Added the g_attrib_get_att function which returns the underlying bt_att
structure associated with a GAttrib.
Diffstat (limited to 'attrib')
-rw-r--r-- | attrib/gattrib.c | 8 | ||||
-rw-r--r-- | attrib/gattrib.h | 3 |
2 files changed, 11 insertions, 0 deletions
diff --git a/attrib/gattrib.c b/attrib/gattrib.c index 3ce67488a..ab43f849c 100644 --- a/attrib/gattrib.c +++ b/attrib/gattrib.c @@ -169,6 +169,14 @@ GIOChannel *g_attrib_get_channel(GAttrib *attrib) return attrib->io; } +struct bt_att *g_attrib_get_att(GAttrib *attrib) +{ + if (!attrib) + return NULL; + + return attrib->att; +} + gboolean g_attrib_set_destroy_function(GAttrib *attrib, GDestroyNotify destroy, gpointer user_data) { diff --git a/attrib/gattrib.h b/attrib/gattrib.h index 2ed57c12a..374bac2dd 100644 --- a/attrib/gattrib.h +++ b/attrib/gattrib.h @@ -31,6 +31,7 @@ extern "C" { #define GATTRIB_ALL_REQS 0xFE #define GATTRIB_ALL_HANDLES 0x0000 +struct bt_att; /* Forward declaration for compatibility */ struct _GAttrib; typedef struct _GAttrib GAttrib; @@ -47,6 +48,8 @@ void g_attrib_unref(GAttrib *attrib); GIOChannel *g_attrib_get_channel(GAttrib *attrib); +struct bt_att *g_attrib_get_att(GAttrib *attrib); + gboolean g_attrib_set_destroy_function(GAttrib *attrib, GDestroyNotify destroy, gpointer user_data); |