diff options
author | Tambet Ingo <tambet@gmail.com> | 2008-12-09 15:41:51 +0200 |
---|---|---|
committer | Tambet Ingo <tambet@gmail.com> | 2008-12-09 15:41:51 +0200 |
commit | d1d94de6a1235a36a6e40652efd4d86911eec3b2 (patch) | |
tree | 5a27d36291742ecb1b7923808a126dcf020a74f3 /src/mm-callback-info.h | |
parent | a504fb408aa2ba3bb495a08d948ae97bdcb1cdd6 (diff) |
Lots of random fixes:
Rework the MMCallbackInfo callback invocation.
Always use g_error_literal() where it makes sense.
Replace sleep() calls, with timeouts to not block the whole MM.
Diffstat (limited to 'src/mm-callback-info.h')
-rw-r--r-- | src/mm-callback-info.h | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/mm-callback-info.h b/src/mm-callback-info.h index 5c461c58..c6c6c73a 100644 --- a/src/mm-callback-info.h +++ b/src/mm-callback-info.h @@ -5,18 +5,26 @@ #include "mm-modem.h" -typedef struct { +typedef struct _MMCallbackInfo MMCallbackInfo; + +typedef void (*MMCallbackInfoInvokeFn) (MMCallbackInfo *info); + +struct _MMCallbackInfo { GData *qdata; MMModem *modem; - MMModemFn async_callback; - MMModemUIntFn uint_callback; - MMModemStringFn str_callback; + MMCallbackInfoInvokeFn invoke_fn; + GCallback callback; gpointer user_data; GError *error; guint pending_id; -} MMCallbackInfo; +}; + +MMCallbackInfo *mm_callback_info_new_full (MMModem *modem, + MMCallbackInfoInvokeFn invoke_fn, + GCallback callback, + gpointer user_data); MMCallbackInfo *mm_callback_info_new (MMModem *modem, MMModemFn callback, |