Add set / get flags for GAtChat

This commit is contained in:
Denis Kenzior 2009-07-15 13:47:46 -05:00
parent f574b5a075
commit 78a646797c
2 changed files with 19 additions and 0 deletions

View File

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

View File

@ -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);