Rewrite serial device communications.
Instead of vague "send something, wait something" the responses are now analyzed by (overridable) parsers. Makes all the modem implementations much easier since each caller knows without any code whether the call succeeded or failed. Another thing that makes modem code simpler (and the whole thing more robust), is the queueing of sent commands. Each queued command has a command and a callback which is quaranteed to get called, even if sending failed. Define and implement error reporting.
This commit is contained in:
@@ -31,8 +31,6 @@ MMCallbackInfo *mm_callback_info_string_new (MMModem *modem,
|
||||
gpointer user_data);
|
||||
|
||||
void mm_callback_info_schedule (MMCallbackInfo *info);
|
||||
void mm_callback_info_cancel (MMCallbackInfo *info);
|
||||
|
||||
void mm_callback_info_set_result (MMCallbackInfo *info,
|
||||
gpointer data,
|
||||
GDestroyNotify destroy);
|
||||
|
Reference in New Issue
Block a user