Add ability to retrieve the atchat IOChannel
authorDenis Kenzior <denkenz@gmail.com>
Fri, 9 Oct 2009 19:57:14 +0000 (14:57 -0500)
committerDenis Kenzior <denkenz@gmail.com>
Thu, 15 Oct 2009 21:15:16 +0000 (16:15 -0500)
gatchat/gatchat.c
gatchat/gatchat.h

index c4de147..e5b6ed7 100644 (file)
@@ -959,6 +959,14 @@ error:
        return NULL;
 }
 
+GIOChannel *g_at_chat_get_channel(GAtChat *chat)
+{
+       if (chat == NULL)
+               return NULL;
+
+       return chat->channel;
+}
+
 GAtChat *g_at_chat_ref(GAtChat *chat)
 {
        if (chat == NULL)
index 76116f3..fe5b97b 100644 (file)
@@ -41,6 +41,8 @@ typedef void (*GAtDebugFunc)(const char *str, gpointer user_data);
 
 GAtChat *g_at_chat_new(GIOChannel *channel, GAtSyntax *syntax);
 
+GIOChannel *g_at_chat_get_channel(GAtChat *chat);
+
 GAtChat *g_at_chat_ref(GAtChat *chat);
 void g_at_chat_unref(GAtChat *chat);