aboutsummaryrefslogtreecommitdiffstats
path: root/attrib/gatttool.c
diff options
context:
space:
mode:
authorBruna Moreira <bruna.moreira@openbossa.org>2010-08-06 11:34:15 -0400
committerAnderson Lizardo <anderson.lizardo@openbossa.org>2010-08-24 10:20:08 -0400
commita764906095e956b3c7b12622309aeb921d856da9 (patch)
tree20f82d3a59496ab42b1575395daf735280158b82 /attrib/gatttool.c
parentc6be8dcf9e52713b6a040c3be5e1b32e5fafe513 (diff)
downloadbluez-a764906095e956b3c7b12622309aeb921d856da9.tar.gz
bluez-a764906095e956b3c7b12622309aeb921d856da9.tar.xz
bluez-a764906095e956b3c7b12622309aeb921d856da9.zip
Add characteristics descriptor discovery option in gatttool
Only skeleton for new option was added (no callback).
Diffstat (limited to 'attrib/gatttool.c')
-rw-r--r--attrib/gatttool.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/attrib/gatttool.c b/attrib/gatttool.c
index 63311428..28d00a1a 100644
--- a/attrib/gatttool.c
+++ b/attrib/gatttool.c
@@ -58,6 +58,7 @@ static gboolean opt_characteristics = FALSE;
static gboolean opt_char_read = FALSE;
static gboolean opt_listen = FALSE;
static guint listen_watch = 0;
+static gboolean opt_char_desc = FALSE;
static GMainLoop *event_loop;
struct characteristic_data {
@@ -383,6 +384,11 @@ static gboolean characteristics_read(gpointer user_data)
return FALSE;
}
+static gboolean characteristics_desc(gpointer user_data)
+{
+ return FALSE;
+}
+
static GOptionEntry primary_char_options[] = {
{ "start", 's' , 0, G_OPTION_ARG_INT, &opt_start,
"Starting handle(optional)", "0x0001" },
@@ -404,6 +410,8 @@ static GOptionEntry gatt_options[] = {
"Characteristics Discovery", NULL },
{ "char-read", 0, 0, G_OPTION_ARG_NONE, &opt_char_read,
"Characteristics Value/Descriptor Read", NULL },
+ { "char-desc", 0, 0, G_OPTION_ARG_NONE, &opt_char_desc,
+ "Characteristics Descriptor Discovery", NULL },
{ "listen", 0, 0, G_OPTION_ARG_NONE, &opt_listen,
"Listen for notifications", NULL },
{ NULL },
@@ -465,6 +473,8 @@ int main(int argc, char *argv[])
callback = characteristics;
else if (opt_char_read)
callback = characteristics_read;
+ else if (opt_char_desc)
+ callback = characteristics_desc;
else {
gchar *help = g_option_context_get_help(context, TRUE, NULL);
g_print("%s\n", help);