summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Kenzior <denkenz@gmail.com>2009-07-15 13:47:46 -0500
committerMarcel Holtmann <marcel@holtmann.org>2009-07-16 02:48:54 +0200
commit5bb57c1847253edb8af4d43a9faab7b35b820051 (patch)
tree8cc8b9046dc8fc3abd5829e099988d5ef19d0543
parent1d378f14bafba8124bd498af985ada52e4797c3e (diff)
downloadconnman-5bb57c1847253edb8af4d43a9faab7b35b820051.tar.gz
connman-5bb57c1847253edb8af4d43a9faab7b35b820051.tar.bz2
connman-5bb57c1847253edb8af4d43a9faab7b35b820051.zip
Add set / get flags for GAtChat
-rw-r--r--gatchat/gatchat.c16
-rw-r--r--gatchat/gatchat.h3
2 files changed, 19 insertions, 0 deletions
diff --git a/gatchat/gatchat.c b/gatchat/gatchat.c
index dfd60d5f..3c21e068 100644
--- a/gatchat/gatchat.c
+++ b/gatchat/gatchat.c
@@ -958,6 +958,22 @@ error:
return NULL;
}
+int g_at_chat_get_flags(GAtChat *chat)
+{
+ if (chat == NULL)
+ return 0;
+
+ return chat->flags;
+}
+
+void g_at_chat_set_flags(GAtChat *chat, int flags)
+{
+ if (chat == NULL)
+ return;
+
+ chat->flags = flags;
+}
+
static int open_device(const char *device)
{
struct termios ti;
diff --git a/gatchat/gatchat.h b/gatchat/gatchat.h
index 3c8a889f..ff0994b1 100644
--- a/gatchat/gatchat.h
+++ b/gatchat/gatchat.h
@@ -46,6 +46,9 @@ typedef enum _GAtChatFlags GAtChatFlags;
GAtChat *g_at_chat_new(GIOChannel *channel, int flags);
GAtChat *g_at_chat_new_from_tty(const char *device, int flags);
+int g_at_chat_get_flags(GAtChat *chat);
+void g_at_chat_set_flags(GAtChat *chat, int flags);
+
GAtChat *g_at_chat_ref(GAtChat *chat);
void g_at_chat_unref(GAtChat *chat);