diff options
author | Aleksander Morgado <aleksander@lanedo.com> | 2012-10-03 13:17:12 +0200 |
---|---|---|
committer | Aleksander Morgado <aleksander@lanedo.com> | 2012-10-04 10:17:12 +0200 |
commit | 4f5dd8afaa79efecc1e7ffa56988d60f6e45c706 (patch) | |
tree | ae6296f1e8db8cd2202764ea4c1446db8dc0a62e /libmm-glib/mm-unlock-retries.h | |
parent | 433fdea6d4107dcbe7848a28aa492c44742a00c2 (diff) |
libmm-glib,unlock-retries: improve documentation
Diffstat (limited to 'libmm-glib/mm-unlock-retries.h')
-rw-r--r-- | libmm-glib/mm-unlock-retries.h | 50 |
1 files changed, 40 insertions, 10 deletions
diff --git a/libmm-glib/mm-unlock-retries.h b/libmm-glib/mm-unlock-retries.h index ea43cb6a..babdcbb3 100644 --- a/libmm-glib/mm-unlock-retries.h +++ b/libmm-glib/mm-unlock-retries.h @@ -32,36 +32,47 @@ G_BEGIN_DECLS #define MM_IS_UNLOCK_RETRIES_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MM_TYPE_UNLOCK_RETRIES)) #define MM_UNLOCK_RETRIES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MM_TYPE_UNLOCK_RETRIES, MMUnlockRetriesClass)) +/** + * MM_UNLOCK_RETRIES_UNKNOWN: + * + * Identifier for reporting unknown unlock retries. + */ #define MM_UNLOCK_RETRIES_UNKNOWN 999 typedef struct _MMUnlockRetries MMUnlockRetries; typedef struct _MMUnlockRetriesClass MMUnlockRetriesClass; typedef struct _MMUnlockRetriesPrivate MMUnlockRetriesPrivate; +/** + * MMUnlockRetries: + * + * The #MMUnlockRetries structure contains private data and should only be accessed + * using the provided API. + */ struct _MMUnlockRetries { + /*< private >*/ GObject parent; MMUnlockRetriesPrivate *priv; }; struct _MMUnlockRetriesClass { + /*< private >*/ GObjectClass parent; }; GType mm_unlock_retries_get_type (void); -MMUnlockRetries *mm_unlock_retries_new (void); -MMUnlockRetries *mm_unlock_retries_new_from_dictionary (GVariant *dictionary); - -void mm_unlock_retries_set (MMUnlockRetries *self, - MMModemLock lock, - guint retries); - -void mm_unlock_retries_unset (MMUnlockRetries *self, - MMModemLock lock); - guint mm_unlock_retries_get (MMUnlockRetries *self, MMModemLock lock); +/** + * MMUnlockRetriesForeachCb: + * @lock: a #MMModemLock. + * @count: the number of retries left for @lock. + * @user_data: data passed to the function. + * + * Specifies the type of function passed to mm_unlock_retries_foreach(). + */ typedef void (* MMUnlockRetriesForeachCb) (MMModemLock lock, guint count, gpointer user_data); @@ -70,6 +81,23 @@ void mm_unlock_retries_foreach (MMUnlockRetries *self, MMUnlockRetriesForeachCb callback, gpointer user_data); +/*****************************************************************************/ +/* ModemManager/libmm-glib/mmcli specific methods */ + +#if defined (_LIBMM_INSIDE_MM) || \ + defined (_LIBMM_INSIDE_MMCLI) || \ + defined (LIBMM_GLIB_COMPILATION) + +MMUnlockRetries *mm_unlock_retries_new (void); +MMUnlockRetries *mm_unlock_retries_new_from_dictionary (GVariant *dictionary); + +void mm_unlock_retries_set (MMUnlockRetries *self, + MMModemLock lock, + guint retries); + +void mm_unlock_retries_unset (MMUnlockRetries *self, + MMModemLock lock); + gboolean mm_unlock_retries_cmp (MMUnlockRetries *a, MMUnlockRetries *b); @@ -77,6 +105,8 @@ GVariant *mm_unlock_retries_get_dictionary (MMUnlockRetries *self); gchar *mm_unlock_retries_build_string (MMUnlockRetries *self); +#endif + G_END_DECLS #endif /* MM_UNLOCK_RETRIES_H */ |