diff options
author | Guillaume Zajac <guillaume.zajac@linux.intel.com> | 2011-05-04 17:38:59 +0200 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2011-05-08 22:58:41 -0500 |
commit | 8a56acd549ef29c51bf38d5741c3c64e41a58774 (patch) | |
tree | 888dcfe48f2bc43a70d8ef6df639e9e40f4c560a | |
parent | 6d426a19a6e91444aafa9302e72e4d8f1510509d (diff) | |
download | ofono-8a56acd549ef29c51bf38d5741c3c64e41a58774.tar.bz2 |
gathdlc: Add public suspend function
-rw-r--r-- | gatchat/gathdlc.c | 9 | ||||
-rw-r--r-- | gatchat/gathdlc.h | 2 |
2 files changed, 11 insertions, 0 deletions
diff --git a/gatchat/gathdlc.c b/gatchat/gathdlc.c index e3ab7ec9..6b1f3432 100644 --- a/gatchat/gathdlc.c +++ b/gatchat/gathdlc.c @@ -610,3 +610,12 @@ void g_at_hdlc_set_no_carrier_detect(GAtHDLC *hdlc, gboolean detect) hdlc->no_carrier_detect = detect; } + +void g_at_hdlc_suspend(GAtHDLC *hdlc) +{ + if (hdlc == NULL) + return; + + g_at_io_set_write_handler(hdlc->io, NULL, NULL); + g_at_io_set_read_handler(hdlc->io, NULL, NULL); +} diff --git a/gatchat/gathdlc.h b/gatchat/gathdlc.h index 158f27f2..556e3838 100644 --- a/gatchat/gathdlc.h +++ b/gatchat/gathdlc.h @@ -60,6 +60,8 @@ void g_at_hdlc_set_no_carrier_detect(GAtHDLC *hdlc, gboolean detect); void g_at_hdlc_set_suspend_function(GAtHDLC *hdlc, GAtSuspendFunc func, gpointer user_data); +void g_at_hdlc_suspend(GAtHDLC *hdlc); + #ifdef __cplusplus } #endif |