gathdlc: Add public suspend function

This commit is contained in:
Guillaume Zajac 2011-05-04 17:38:59 +02:00 committed by Denis Kenzior
parent 6d426a19a6
commit 8a56acd549
2 changed files with 11 additions and 0 deletions

View File

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

View File

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