Commit e6c7b3db authored by Corentin Noël's avatar Corentin Noël

Identity: Make everything use the GTask API

parent e158e754
This diff is collapsed.
......@@ -64,117 +64,60 @@ struct _SignonIdentity
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;
SignonIdentity *signon_identity_new_from_db (guint32 id);
SignonIdentity *signon_identity_new ();
guint32 signon_identity_get_id (SignonIdentity *identity);
const GError *signon_identity_get_last_error (SignonIdentity *identity);
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_info().
*/
typedef void (*SignonIdentityStoreCredentialsCb) (SignonIdentity *self,
guint32 id,
const GError *error,
gpointer user_data);
void signon_identity_store_credentials_with_info(SignonIdentity *self,
const SignonIdentityInfo *info,
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,
gpointer user_data);
void signon_identity_verify_secret(SignonIdentity *self,
const gchar *secret,
SignonIdentityVerifyCb cb,
gpointer user_data);
/**
* SignonIdentityInfoCb:
* @self: the #SignonIdentity.
* @info: (transfer none): 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,
gpointer user_data);
void signon_identity_query_info(SignonIdentity *self,
SignonIdentityInfoCb cb,
void signon_identity_store_info (SignonIdentity *self,
const SignonIdentityInfo *info,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
gboolean signon_identity_store_info_finish (SignonIdentity *self,
GAsyncResult *res,
GError **error);
void signon_identity_verify_secret (SignonIdentity *self,
const gchar *secret,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
gboolean signon_identity_verify_secret_finish (SignonIdentity *self,
GAsyncResult *res,
GError **error);
void signon_identity_query_info (SignonIdentity *self,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
SignonIdentityInfo *signon_identity_query_info_finish (SignonIdentity *self,
GAsyncResult *res,
GError **error);
void signon_identity_remove (SignonIdentity *self,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
gboolean signon_identity_remove_finish (SignonIdentity *self,
GAsyncResult *res,
GError **error);
void signon_identity_sign_out (SignonIdentity *self,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
void signon_identity_remove(SignonIdentity *self,
SignonIdentityRemovedCb cb,
gpointer user_data);
void signon_identity_signout(SignonIdentity *self,
SignonIdentitySignedOutCb cb,
gpointer user_data);
gboolean signon_identity_sign_out_finish (SignonIdentity *self,
GAsyncResult *res,
GError **error);
G_END_DECLS
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment