Developer documentation improvements
authorDavid King <david.king@canonical.com>
Wed, 25 Jan 2012 10:55:02 +0000 (10:55 +0000)
committerDavid King <david.king@canonical.com>
Fri, 27 Jan 2012 10:24:27 +0000 (10:24 +0000)
Add many missing gtk-doc comments, to allow the gtk-doc check to pass
without any errors.

libsignon-glib/signon-auth-service.c
libsignon-glib/signon-auth-service.h
libsignon-glib/signon-auth-session.c
libsignon-glib/signon-auth-session.h
libsignon-glib/signon-errors.c
libsignon-glib/signon-errors.h
libsignon-glib/signon-identity-info.c
libsignon-glib/signon-identity-info.h
libsignon-glib/signon-identity.c
libsignon-glib/signon-identity.h

index 65033476c116467d9505ed99c787abfcca715bd1..66453758705cc92fe7db46a42287884d8e61e23e 100644 (file)
@@ -123,6 +123,8 @@ signon_auth_service_class_init (SignonAuthServiceClass *klass)
 /**
  * signon_auth_service_new:
  *
+ * Create a new #SignonAuthService.
+ *
  * Returns: an instance of an #SignonAuthService.
  */
 SignonAuthService *
@@ -182,6 +184,8 @@ auth_query_mechanisms_cb (DBusGProxy *proxy, char **value,
  * @methods: (transfer full) (type GStrv): list of available methods.
  * @error: a #GError if an error occurred, %NULL otherwise.
  * @user_data: the user data that was passed when installing this callback.
+ *
+ * Callback to be passed to signon_auth_service_query_methods().
  */
 
 /**
@@ -221,6 +225,8 @@ signon_auth_service_query_methods (SignonAuthService *auth_service,
  * @mechanisms: (transfer full) (type GStrv): list of available mechanisms.
  * @error: a #GError if an error occurred, %NULL otherwise.
  * @user_data: the user data that was passed when installing this callback.
+ *
+ * Callback to be passed to signon_auth_service_query_mechanisms().
  */
 
 /**
index d0858ab19df6ccd57a1eb3dc41b765f0609c537c..aec948eec64e45ff69d93c54cdb3b4a8c6f0cd75 100644 (file)
@@ -40,11 +40,21 @@ typedef struct _SignonAuthServiceClass SignonAuthServiceClass;
 typedef struct _SignonAuthServicePrivate SignonAuthServicePrivate;
 typedef struct _SignonAuthService SignonAuthService;
 
+/**
+ * SignonAuthServiceClass:
+ *
+ * Opaque struct. Use the accessor functions below.
+ */
 struct _SignonAuthServiceClass
 {
     GObjectClass parent_class;
 };
 
+/**
+ * SignonAuthService:
+ *
+ * Opaque struct. Use the accessor functions below.
+ */
 struct _SignonAuthService
 {
     GObject parent_instance;
index b3a4b30f32ce83fddea9ef58fddff09b8aed966f..6f3f503ac8421bc93f5647cb8c4e5ba05e384bde 100644 (file)
@@ -243,6 +243,11 @@ signon_auth_session_class_init (SignonAuthSessionClass *klass)
 
     g_type_class_add_private (object_class, sizeof (SignonAuthSessionPrivate));
 
+    /**
+     * SignonAuthSession::state-changed:
+     *
+     * Emitted when the state of the #SignonAuthSession changes.
+     */
     auth_session_signals[STATE_CHANGED] =
             g_signal_new ("state-changed",
                           G_TYPE_FROM_CLASS (klass),
@@ -341,7 +346,9 @@ signon_auth_session_set_id(SignonAuthSession* self,
  * signon_auth_session_get_method:
  * @self: the #SignonAuthSession.
  *
- * Returns: the authentication method being used.
+ * Get the current authentication method.
+ *
+ * Returns: the authentication method being used, or %NULL on failure.
  */
 const gchar *
 signon_auth_session_get_method (SignonAuthSession *self)
@@ -360,6 +367,8 @@ signon_auth_session_get_method (SignonAuthSession *self)
  * @mechanisms: (transfer full) (type GStrv): list of available mechanisms.
  * @error: a #GError if an error occurred, %NULL otherwise.
  * @user_data: the user data that was passed when installing this callback.
+ *
+ * Callback to be passed to signon_auth_session_query_available_mechanisms().
  */
 
 /**
@@ -460,6 +469,12 @@ signon_auth_session_process (SignonAuthSession *self,
                                     operation_data);
 }
 
+/**
+ * signon_auth_session_cancel:
+ * @self: the #SignonAuthSession.
+ *
+ * Cancel the authentication session.
+ */
 void
 signon_auth_session_cancel (SignonAuthSession *self)
 {
index ad0f301a908963406f0d6d3a5c8157d2529ea60e..8024cce32d92e14f14de32a2f66a964a84371f67 100644 (file)
@@ -32,28 +32,77 @@ G_BEGIN_DECLS
 /*
  * Useful session data keys
  */
+/**
+ * SIGNON_SESSION_DATA_USERNAME:
+ *
+ * Username.
+ */
 #define SIGNON_SESSION_DATA_USERNAME      "UserName"
+/**
+ * SIGNON_SESSION_DATA_SECRET:
+ *
+ * Secret.
+ */
 #define SIGNON_SESSION_DATA_SECRET        "Secret"
+/**
+ * SIGNON_SESSION_DATA_REALM:
+ *
+ * Realm.
+ */
 #define SIGNON_SESSION_DATA_REALM         "Realm"
+/**
+ * SIGNON_SESSION_DATA_PROXY:
+ *
+ * Proxy.
+ */
 #define SIGNON_SESSION_DATA_PROXY         "NetworkProxy"
+
+/**
+ * SignonSessionDataUiPolicy:
+ * @SIGNON_POLICY_DEFAULT: The plugin can decide when to show UI.
+ * @SIGNON_POLICY_REQUEST_PASSWORD: Force the user to enter the password.
+ * @SIGNON_POLICY_NO_USER_INTERACTION: No UI elements will be shown to the user.
+ * @SIGNON_POLICY_VALIDATION: UI elements can be shown to the user only when
+ * CAPTCHA-like security measures are required.
+ *
+ * Policy for the signon process, passed to the UI plugin.
+ */
 typedef enum {
-    SIGNON_POLICY_DEFAULT = 0,         /**< Plugin can decide when to show ui. */
-    SIGNON_POLICY_REQUEST_PASSWORD,    /**< Force user to enter password. */
-    SIGNON_POLICY_NO_USER_INTERACTION, /**< No ui elements are shown to user. */
-    /**
-     * UI elements can be shown to the user only when captcha-like security
-     * measures are required.
-    */
+    SIGNON_POLICY_DEFAULT = 0,
+    SIGNON_POLICY_REQUEST_PASSWORD,
+    SIGNON_POLICY_NO_USER_INTERACTION,
     SIGNON_POLICY_VALIDATION,
 } SignonSessionDataUiPolicy;
+/**
+ * SIGNON_SESSION_DATA_UI_POLICY:
+ * @see_also: #SignonSessionDataUiPolicy
+ *
+ * Policy for the signon process.
+ */
 #define SIGNON_SESSION_DATA_UI_POLICY     "UiPolicy"
-/* Caption for the UI dialog. */
+/**
+ * SIGNON_SESSION_DATA_CAPTION:
+ *
+ * Caption for the UI dialog.
+ */
 #define SIGNON_SESSION_DATA_CAPTION       "Caption"
-/* Network timeout, in milliseconds (uint32). */
+/**
+ * SIGNON_SESSION_DATA_TIMEOUT:
+ *
+ * Network timeout, in milliseconds (uint32).
+ */
 #define SIGNON_SESSION_DATA_TIMEOUT       "NetworkTimeout"
-/* Platform-specific window id (for dialog transiency) - uint32. */
+/**
+ * SIGNON_SESSION_DATA_WINDOW_ID:
+ *
+ * Platform-specific window id (for dialog transiency) - uint32.
+ */
 #define SIGNON_SESSION_DATA_WINDOW_ID     "WindowId"
-/* Requests the signon plugin to obtain a new token (boolean) */
+/**
+ * SIGNON_SESSION_DATA_RENEW_TOKEN:
+ *
+ * Requests the signon plugin to obtain a new token (boolean).
+ */
 #define SIGNON_SESSION_DATA_RENEW_TOKEN   "RenewToken"
 
 
@@ -68,12 +117,22 @@ typedef struct _SignonAuthSession        SignonAuthSession;
 typedef struct _SignonAuthSessionPrivate SignonAuthSessionPrivate;
 typedef struct _SignonAuthSessionClass   SignonAuthSessionClass;
 
+/**
+ * SignonAuthSession:
+ *
+ * Opaque struct. Use the accessor functions below.
+ */
 struct _SignonAuthSession {
     GObject parent;
 
     SignonAuthSessionPrivate *priv;
 };
 
+/**
+ * SignonAuthSessionClass:
+ *
+ * Opaque struct. Use the accessor functions below.
+ */
 struct _SignonAuthSessionClass {
     GObjectClass parent;
 };
index 89ed5be6cc7f884867ef4c024f20a4d7b7b8a53a..bc5e4ae13fa5b43f80f12d9906a7ab4f74b58fc6 100644 (file)
 #include "signon-internals.h"
 #include <dbus/dbus-glib.h>
 
+/**
+ * SECTION:signon-errors
+ * @title: SignonError
+ * @short_description: Possible errors from Signon.
+ *
+ * An enumeration of errors that are possible from Signon.
+ */
 #define SIGNON_ERROR_PREFIX SIGNOND_SERVICE_PREFIX ".Error"
 
 GQuark signon_error_quark (void)
index a722c7a91110cce533d5746d024043c85e571660..2d0ff075fa08abfa2964b4b42a300d7e3957ebc1 100644 (file)
 
 #define SIGNON_ERROR (signon_error_quark())
 
+/**
+ * SignonError:
+ * @SIGNON_ERROR_UNKNOWN: Catch-all for errors not distinguished by another code.
+ * @SIGNON_ERROR_INTERNAL_SERVER: Signon daemon internal error.
+ * @SIGNON_ERROR_INTERNAL_COMMUNICATION: Error communicating with Sigon daemon.
+ * @SIGNON_ERROR_PERMISSION_DENIED: The operation cannot be performed due to
+ * insufficient client permissions.
+ * @SIGNON_ERROR_METHOD_NOT_KNOWN: The method with this name was not found.
+ * @SIGNON_ERROR_SERVICE_NOT_AVAILABLE: The service is temporarily unavailable.
+ * @SIGNON_ERROR_INVALID_QUERY: Parameters for the query are invalid.
+ * @SIGNON_ERROR_METHOD_NOT_AVAILABLE: The requested method is not available.
+ * @SIGNON_ERROR_IDENTITY_NOT_FOUND: The identity mathching the #SignonIdentity
+ * was not found on the service.
+ * @SIGNON_ERROR_STORE_FAILED: Storing credentials failed.
+ * @SIGNON_ERROR_REMOVE_FAILED: Removing credentials failed.
+ * @SIGNON_ERROR_SIGNOUT_FAILED: Signing out failed.
+ * @SIGNON_ERROR_IDENTITY_OPERATION_CANCELED: Identity operation was canceled
+ * by the user.
+ * @SIGNON_ERROR_CREDENTIALS_NOT_AVAILABLE: Query failed.
+ * @SIGNON_ERROR_REFERENCE_NOT_FOUND: Trying to remove non-existent reference.
+ * @SIGNON_ERROR_MECHANISM_NOT_AVAILABLE: The requested mechanism in not
+ * available.
+ * @SIGNON_ERROR_MISSING_DATA: The #SessionData does not contain the necessary
+ * information.
+ * @SIGNON_ERROR_INVALID_CREDENTIALS: The supplied credentials are invalid for
+ * the mechanism implementation.
+ * @SIGNON_ERROR_NOT_AUTHORIZED: Authorization failed.
+ * @SIGNON_ERROR_WRONG_STATE: An operation method has been called in an
+ * incorrect state.
+ * @SIGNON_ERROR_OPERATION_NOT_SUPPORTED: The operation is not supported by the
+ * mechanism implementation.
+ * @SIGNON_ERROR_NO_CONNECTION: No network connection.
+ * @SIGNON_ERROR_NETWORK: Network connection failed.
+ * @SIGNON_ERROR_SSL: SSL connection failed.
+ * @SIGNON_ERROR_RUNTIME: Casting #SessionData into subclass failed.
+ * @SIGNON_ERROR_SESSION_CANCELED: Challenge was canceled.
+ * @SIGNON_ERROR_TIMED_OUT: Challenge timed out.
+ * @SIGNON_ERROR_USER_INTERACTION: User interaction dialog failed.
+ * @SIGNON_ERROR_OPERATION_FAILED: Temporary failure in authentication.
+ * @SIGNON_ERROR_ENCRYPTION_FAILED: @deprecated: Failure during data
+ * encryption/decryption.
+ * @SIGNON_ERROR_TOS_NOT_ACCEPTED: User declined Terms of Service.
+ * @SIGNON_ERROR_FORGOT_PASSWORD: User requested password reset sequence.
+ * @SIGNON_ERROR_METHOD_OR_MECHANISM_NOT_ALLOWED: Method or mechanism not
+ * allowed for this identity.
+ * @SIGNON_ERROR_INCORRECT_DATE: Date/time incorrect on device.
+ * @SIGNON_ERROR_USER_ERROR: Placeholder to rearrange enumeration - userspace
+ * specific.
+ *
+ * Possible Signon errors.
+ */
 typedef enum {
-    SIGNON_ERROR_UNKNOWN = 1,                  /**< Catch-all for errors not distinguished
-                                                    by another code. */
-    SIGNON_ERROR_INTERNAL_SERVER = 2,          /**< Signon Daemon internal error. */
-    SIGNON_ERROR_INTERNAL_COMMUNICATION = 3,   /**< Communication with Signon Daemon error. */
-    SIGNON_ERROR_PERMISSION_DENIED = 4,        /**< The operation cannot be performed due to
-                                                    insufficient client permissions. */
+    SIGNON_ERROR_UNKNOWN = 1,
+    SIGNON_ERROR_INTERNAL_SERVER = 2,
+    SIGNON_ERROR_INTERNAL_COMMUNICATION = 3,
+    SIGNON_ERROR_PERMISSION_DENIED = 4,
 
-    SIGNON_ERROR_METHOD_NOT_KNOWN = 101,            /**< The method with this name is not found. */
-    SIGNON_ERROR_SERVICE_NOT_AVAILABLE,       /**< The service is temporarily unavailable. */
-    SIGNON_ERROR_INVALID_QUERY,               /**< Parameters for the query are invalid. */
+    SIGNON_ERROR_METHOD_NOT_KNOWN = 101,
+    SIGNON_ERROR_SERVICE_NOT_AVAILABLE,
+    SIGNON_ERROR_INVALID_QUERY,
 
-    SIGNON_ERROR_METHOD_NOT_AVAILABLE = 201,        /**< The requested method is not available. */
-    SIGNON_ERROR_IDENTITY_NOT_FOUND,          /**< The identity matching this Identity object
-                                                was not found on the service. */
-    SIGNON_ERROR_STORE_FAILED,                /**< Storing credentials failed. */
-    SIGNON_ERROR_REMOVE_FAILED,               /**< Removing credentials failed. */
-    SIGNON_ERROR_SIGNOUT_FAILED,              /**< SignOut failed. */
-    SIGNON_ERROR_IDENTITY_OPERATION_CANCELED, /**< Identity operation was canceled by user. */
-    SIGNON_ERROR_CREDENTIALS_NOT_AVAILABLE,   /**< Query fails. */
-    SIGNON_ERROR_REFERENCE_NOT_FOUND,         /**< Trying to remove nonexistent reference. */
+    SIGNON_ERROR_METHOD_NOT_AVAILABLE = 201,
+    SIGNON_ERROR_IDENTITY_NOT_FOUND,
+    SIGNON_ERROR_STORE_FAILED,
+    SIGNON_ERROR_REMOVE_FAILED,
+    SIGNON_ERROR_SIGNOUT_FAILED,
+    SIGNON_ERROR_IDENTITY_OPERATION_CANCELED,
+    SIGNON_ERROR_CREDENTIALS_NOT_AVAILABLE,
+    SIGNON_ERROR_REFERENCE_NOT_FOUND,
 
-    SIGNON_ERROR_MECHANISM_NOT_AVAILABLE = 301,     /**< The requested mechanism is not available. */
-    SIGNON_ERROR_MISSING_DATA,                /**< The SessionData object does not contain
-                                                      necessary information. */
-    SIGNON_ERROR_INVALID_CREDENTIALS,         /**< The supplied credentials are invalid for
-                                                      the mechanism implementation. */
-    SIGNON_ERROR_NOT_AUTHORIZED,             /**< Authorization failed. */
-    SIGNON_ERROR_WRONG_STATE,                 /**< An operation method has been called in
-                                                      a wrong state. */
-    SIGNON_ERROR_OPERATION_NOT_SUPPORTED,     /**< The operation is not supported by the
-                                                      mechanism implementation. */
-    SIGNON_ERROR_NO_CONNECTION,              /**< No Network connetion. */
-    SIGNON_ERROR_NETWORK,                    /**< Network connetion failed. */
-    SIGNON_ERROR_SSL,                        /**< Ssl connetion failed. */
-    SIGNON_ERROR_RUNTIME,                    /**< Casting SessionData into subclass failed */
-    SIGNON_ERROR_SESSION_CANCELED,           /**< Challenge was canceled. */
-    SIGNON_ERROR_TIMED_OUT,                  /**< Challenge was timed out. */
-    SIGNON_ERROR_USER_INTERACTION,           /**< User interaction dialog failed */
-    SIGNON_ERROR_OPERATION_FAILED,           /**< Temporary failure in authentication. */
-    SIGNON_ERROR_ENCRYPTION_FAILED,          /**< @deprecated Failure during data encryption/decryption. */
-    SIGNON_ERROR_TOS_NOT_ACCEPTED,           /**< User declined Terms of Service. */
-    SIGNON_ERROR_FORGOT_PASSWORD,            /**< User requested reset password sequence. */
-    SIGNON_ERROR_METHOD_OR_MECHANISM_NOT_ALLOWED, /**< Method or mechanism not allowed for this identity. */
-    SIGNON_ERROR_INCORRECT_DATE,             /**< Date time incorrect on device. */
-    SIGNON_ERROR_USER_ERROR = 400            /* Placeholder to rearrange enumeration
-                                                      - User space specific */
+    SIGNON_ERROR_MECHANISM_NOT_AVAILABLE = 301,
+    SIGNON_ERROR_MISSING_DATA,
+    SIGNON_ERROR_INVALID_CREDENTIALS,
+    SIGNON_ERROR_NOT_AUTHORIZED,
+    SIGNON_ERROR_WRONG_STATE,
+    SIGNON_ERROR_OPERATION_NOT_SUPPORTED,
+    SIGNON_ERROR_NO_CONNECTION,
+    SIGNON_ERROR_NETWORK,
+    SIGNON_ERROR_SSL,
+    SIGNON_ERROR_RUNTIME,
+    SIGNON_ERROR_SESSION_CANCELED,
+    SIGNON_ERROR_TIMED_OUT,
+    SIGNON_ERROR_USER_INTERACTION,
+    SIGNON_ERROR_OPERATION_FAILED,
+    SIGNON_ERROR_ENCRYPTION_FAILED,
+    SIGNON_ERROR_TOS_NOT_ACCEPTED,
+    SIGNON_ERROR_FORGOT_PASSWORD,
+    SIGNON_ERROR_METHOD_OR_MECHANISM_NOT_ALLOWED,
+    SIGNON_ERROR_INCORRECT_DATE,
+    SIGNON_ERROR_USER_ERROR = 400
 } SignonError;
 
 GQuark signon_error_quark (void);
index 4213bba7333e301f2b46bf57f7ed154203d216cc..40683c8e33a706d073f310d5b2c436d7162b67b9 100644 (file)
  */
 
 /**
- * SECTION:signon-identity
- * @title: SignonIdentity
- * @short_description: client side presentation of a credential.
+ * SECTION:signon-identity-info
+ * @title: SignonIdentityInfo
+ * @short_description: Extra data for a #SignonIdentity.
  *
- * The #SignonIdentity represents an database entry for a single identity.
+ * Extra data retreived from a #SignonIdentity.
  */
 
 #include "signon-identity-info.h"
@@ -169,7 +169,7 @@ identity_ptrarray_to_identity_info (const GPtrArray *identity_array)
 /**
  * signon_identity_info_new:
  *
- * Creates a new SignonIdentityInfo item.
+ * Creates a new #SignonIdentityInfo item.
  *
  * Returns: a new #SignonIdentityInfo item.
  */
@@ -209,7 +209,9 @@ void signon_identity_info_free (SignonIdentityInfo *info)
  * signon_identity_info_copy:
  * @other: the #SignonIdentityInfo.
  *
- * Returns: a copy of the given #SignonIdentityInfo.
+ * Get a newly-allocated copy of @info.
+ *
+ * Returns: a copy of the given #SignonIdentityInfo, or %NULL on failure.
  */
 SignonIdentityInfo *signon_identity_info_copy (const SignonIdentityInfo *other)
 {
@@ -242,6 +244,8 @@ SignonIdentityInfo *signon_identity_info_copy (const SignonIdentityInfo *other)
  * signon_identity_info_get_id:
  * @info: the #SignonIdentityInfo.
  *
+ * Get the numeric ID of @info.
+ *
  * Returns: the numeric ID of the identity.
  */
 gint signon_identity_info_get_id (const SignonIdentityInfo *info)
@@ -254,7 +258,9 @@ gint signon_identity_info_get_id (const SignonIdentityInfo *info)
  * signon_identity_info_get_username:
  * @info: the #SignonIdentityInfo.
  *
- * Returns: the username.
+ * Get the username of @info.
+ *
+ * Returns: the username, or %NULL.
  */
 const gchar *signon_identity_info_get_username (const SignonIdentityInfo *info)
 {
@@ -266,7 +272,9 @@ const gchar *signon_identity_info_get_username (const SignonIdentityInfo *info)
  * signon_identity_info_get_storing_secret:
  * @info: the #SignonIdentityInfo.
  *
- * Returns: %TRUE if Signon must store the secret.
+ * Get whether the secret of @info should be stored.
+ *
+ * Returns: %TRUE if Signon must store the secret, %FALSE otherwise.
  */
 gboolean signon_identity_info_get_storing_secret (const SignonIdentityInfo *info)
 {
@@ -278,6 +286,8 @@ gboolean signon_identity_info_get_storing_secret (const SignonIdentityInfo *info
  * signon_identity_info_get_caption:
  * @info: the #SignonIdentityInfo.
  *
+ * Get the display name of @info.
+ *
  * Returns: the display name for the identity.
  */
 const gchar *signon_identity_info_get_caption (const SignonIdentityInfo *info)
@@ -290,6 +300,8 @@ const gchar *signon_identity_info_get_caption (const SignonIdentityInfo *info)
  * signon_identity_info_get_methods:
  * @info: the #SignonIdentityInfo.
  *
+ * Get a hash table of the methods and mechanisms of @info.
+ *
  * Returns: (transfer none) (element-type utf8 GStrv): the table of allowed
  * methods and mechanisms.
  */
@@ -303,6 +315,8 @@ const GHashTable *signon_identity_info_get_methods (const SignonIdentityInfo *in
  * signon_identity_info_get_realms:
  * @info: the #SignonIdentityInfo.
  *
+ * Get an array of the realms of @info.
+ *
  * Returns: (transfer none): a %NULL terminated array of realms.
  */
 const gchar* const *signon_identity_info_get_realms (const SignonIdentityInfo *info)
@@ -315,6 +329,8 @@ const gchar* const *signon_identity_info_get_realms (const SignonIdentityInfo *i
  * signon_identity_info_get_access_control_list:
  * @info: the #SignonIdentityInfo.
  *
+ * Get an array of ACL statements of the identity.
+ *
  * Returns: (transfer none): a %NULL terminated array of ACL statements.
  */
 const gchar* const *signon_identity_info_get_access_control_list (const SignonIdentityInfo *info)
@@ -327,6 +343,8 @@ const gchar* const *signon_identity_info_get_access_control_list (const SignonId
  * signon_identity_info_get_identity_type:
  * @info: the #SignonIdentityInfo.
  *
+ * Get the type of the identity.
+ *
  * Returns: the type of the identity.
  */
 SignonIdentityType signon_identity_info_get_identity_type (const SignonIdentityInfo *info)
index e101a837eba03a3c0a2c796e6c37954ca0746c5c..a6dedfc8eb4716eab5c6b776e5a310153cfa8dd9 100644 (file)
 
 G_BEGIN_DECLS
 
+/**
+ * SignonIdentityInfo:
+ *
+ * Opaque struct. Use the accessor functions below.
+ */
 typedef struct _SignonIdentityInfo SignonIdentityInfo;
 
-/*
- * types used in SignonIdentityInfo
- * */
+/**
+ * SignonIdentityType:
+ * @SIGNON_IDENTITY_TYPE_OTHER: an identity that is not an app, web or network
+ * @SIGNON_IDENTITY_TYPE_APP: an application identity
+ * @SIGNON_IDENTITY_TYPE_WEB: a web identity
+ * @SIGNON_IDENTITY_TYPE_NETWORK: a network server identity
+ *
+ * Types used in #SignonIdentityInfo.
+ */
 typedef enum {
     SIGNON_IDENTITY_TYPE_OTHER = 0,
     SIGNON_IDENTITY_TYPE_APP = 1 << 0,
index 94e0426ffe6e643480c430beb28514b0514fd9fd..ff328380f11a693bdc84bd926774d62df3ce59f8 100644 (file)
@@ -25,9 +25,9 @@
 /**
  * SECTION:signon-identity
  * @title: SignonIdentity
- * @short_description: client side presentation of a credential.
+ * @short_description: Client side presentation of a credential.
  *
- * The #SignonIdentity represents an database entry for a single identity.
+ * The #SignonIdentity represents a database entry for a single identity.
  */
 
 #include "signon-identity.h"
@@ -310,6 +310,11 @@ signon_identity_class_init (SignonIdentityClass *klass)
 
     g_type_class_add_private (object_class, sizeof (SignonIdentityPrivate));
 
+    /**
+     * SignonIdentity::signout:
+     *
+     * Emitted when the identity was signed out.
+     */
     signals[SIGNEDOUT_SIGNAL] = g_signal_new("signout",
                                     G_TYPE_FROM_CLASS (klass),
                                     G_SIGNAL_RUN_LAST | G_SIGNAL_NO_RECURSE | G_SIGNAL_NO_HOOKS,
@@ -465,6 +470,14 @@ identity_registered (SignonIdentity *identity, DBusGProxy *proxy,
      * */
 }
 
+/**
+ * signon_identity_get_last_error:
+ * @identity: the #SignonIdentity.
+ *
+ * Get the most recent error that occurred on @identity.
+ *
+ * Returns: a #GError containing the most recent error, or %NULL on failure.
+ */
 const GError *
 signon_identity_get_last_error (SignonIdentity *identity)
 {
@@ -1324,10 +1337,10 @@ identity_void_operation(SignonIdentity *self,
 /**
  * signon_identity_remove:
  * @self: the #SignonIdentity.
- * @cb: (scope async): callback.
- * @user_data: user_data.
+ * @cb: (scope async): callback to be called when the operation has completed.
+ * @user_data: user_data to pass to the callback.
  *
- * Removes correspondent credentials record from teh DB.
+ * Removes the corresponding credentials record from the database.
  */
 void signon_identity_remove(SignonIdentity *self,
                            SignonIdentityRemovedCb cb,
@@ -1384,6 +1397,7 @@ void signon_identity_signout(SignonIdentity *self,
 
 /**
  * signon_identity_add_reference:
+ * @self: the #SignonIdentity.
  * @reference: reference to be added
  * @cb: callback
  * @user_data: user_data.
@@ -1408,6 +1422,7 @@ void signon_identity_add_reference(SignonIdentity *self,
 
 /**
  * signon_identity_remove_reference:
+ * @self: the #SignonIdentity.
  * @reference: reference to be removed
  * @cb: callback
  * @user_data: user_data.
index 2e0f3fc1047084ed74b1e0f72c8216ae306d50d8..ac4b38c0139d1710b1d42ff6c41801d9c007c41a 100644 (file)
@@ -42,24 +42,62 @@ typedef struct _SignonIdentityClass SignonIdentityClass;
 typedef struct _SignonIdentityPrivate SignonIdentityPrivate;
 typedef struct _SignonIdentity SignonIdentity;
 
+/**
+ * SignonIdentityClass:
+ *
+ * Opaque struct. Use the accessor functions below.
+ */
 struct _SignonIdentityClass
 {
     GObjectClass parent_class;
 };
 
+/**
+ * SignonIdentity:
+ *
+ * Opaque struct. Use the accessor functions below.
+ */
 struct _SignonIdentity
 {
     GObject parent_instance;
     SignonIdentityPrivate *priv;
 };
 
+/**
+ * SignonIdentityVoidCb:
+ * @self: the #SignonIdentity.
+ * @error: a #GError if an error occurred, or %NULL otherwise.
+ * @user_data: the user data that was passed when installing this callback.
+ *
+ * Generic callback to be passed to several #SignonIdentity methods.
+ */
 typedef void (*SignonIdentityVoidCb) (SignonIdentity *self,
                                       const GError *error,
                                       gpointer user_data);
 
+/**
+ * SignonIdentityRemovedCb:
+ *
+ * Callback to be passed to signon_identity_remove().
+ */
 typedef SignonIdentityVoidCb SignonIdentityRemovedCb;
+/**
+ * SignonIdentitySignedOutCb:
+ *
+ * Callback to be passed to signon_identity_signout().
+ */
 typedef SignonIdentityVoidCb SignonIdentitySignedOutCb;
+/**
+ * SignonIdentityReferenceAddedCb:
+ *
+ * Callback to be passed to signon_identity_add_reference().
+ */
 typedef SignonIdentityVoidCb SignonIdentityReferenceAddedCb;
+/**
+ * SignonIdentityReferenceRemovedCb:
+ *
+ * Callback to be passed to signon_identity_remove_reference().
+ */
 typedef SignonIdentityVoidCb SignonIdentityReferenceRemovedCb;
 
 GType signon_identity_get_type (void) G_GNUC_CONST;
@@ -73,6 +111,16 @@ SignonAuthSession *signon_identity_create_session(SignonIdentity *self,
                                                   const gchar *method,
                                                   GError **error);
 
+/**
+ * SignonIdentityStoreCredentialsCb:
+ * @self: the #SignonIdentity.
+ * @id: the numeric ID of the identity in the database.
+ * @error: a #GError if an error occurred, or %NULL otherwise.
+ * @user_data: the user data that was passed when installing this callback.
+ *
+ * Callback to be passed to signon_identity_store_credentials_with_args() or
+ * signon_identity_store_credentials_with_info().
+ */
 typedef void (*SignonIdentityStoreCredentialsCb) (SignonIdentity *self,
                                                   guint32 id,
                                                   const GError *error,
@@ -95,6 +143,15 @@ void signon_identity_store_credentials_with_args(SignonIdentity *self,
                                                  SignonIdentityStoreCredentialsCb cb,
                                                  gpointer user_data);
 
+/**
+ * SignonIdentityVerifyCb:
+ * @self: the #SignonIdentity.
+ * @valid: whether the secret is valid.
+ * @error: a #GError if an error occurred, or %NULL otherwise.
+ * @user_data: the user data that was passed when installing this callback.
+ *
+ * Callback to be passed to signon_identity_verify_secret().
+ */
 typedef void (*SignonIdentityVerifyCb) (SignonIdentity *self,
                                         gboolean valid,
                                         const GError *error,
@@ -105,6 +162,15 @@ void signon_identity_verify_secret(SignonIdentity *self,
                                   SignonIdentityVerifyCb cb,
                                   gpointer user_data);
 
+/**
+ * SignonIdentityInfoCb:
+ * @self: the #SignonIdentity.
+ * @info: the #SignonIdentityInfo for @self.
+ * @error: a #GError if an error occurred, or %NULL otherwise.
+ * @user_data: the user data that was passed when installing this callback.
+ *
+ * Callback to be passed to signon_identity_query_info().
+ */
 typedef void (*SignonIdentityInfoCb) (SignonIdentity *self,
                                       const SignonIdentityInfo *info,
                                       const GError *error,