Commit 52b3dd11 authored by Corentin Noël's avatar Corentin Noël

AuthSession: async is the default way to use the API

parent f7d7b7ef
......@@ -494,7 +494,7 @@ signon_auth_session_query_available_mechanisms (SignonAuthSession *self,
}
/**
* signon_auth_session_process_async:
* signon_auth_session_process:
* @self: the #SignonAuthSession.
* @session_data: (transfer floating): a dictionary of parameters.
* @mechanism: the authentication mechanism to be used.
......@@ -513,12 +513,12 @@ signon_auth_session_query_available_mechanisms (SignonAuthSession *self,
* Since: 1.8
*/
void
signon_auth_session_process_async (SignonAuthSession *self,
GVariant *session_data,
const gchar *mechanism,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data)
signon_auth_session_process (SignonAuthSession *self,
GVariant *session_data,
const gchar *mechanism,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data)
{
SignonAuthSessionPrivate *priv;
AuthSessionProcessData *process_data;
......@@ -549,10 +549,10 @@ signon_auth_session_process_async (SignonAuthSession *self,
* signon_auth_session_process_finish:
* @self: the #SignonAuthSession.
* @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to
* signon_auth_session_process_async().
* signon_auth_session_process().
* @error: return location for error, or %NULL.
*
* Collect the result of the signon_auth_session_process_async() operation.
* Collect the result of the signon_auth_session_process() operation.
*
* Returns: a #GVariant of type %G_VARIANT_TYPE_VARDICT containing the
* authentication reply.
......
......@@ -163,12 +163,12 @@ void signon_auth_session_query_available_mechanisms(SignonAuthSession *self,
SignonAuthSessionQueryAvailableMechanismsCb cb,
gpointer user_data);
void signon_auth_session_process_async (SignonAuthSession *self,
GVariant *session_data,
const gchar *mechanism,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
void signon_auth_session_process (SignonAuthSession *self,
GVariant *session_data,
const gchar *mechanism,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
GVariant *signon_auth_session_process_finish (SignonAuthSession *self,
GAsyncResult *res,
GError **error);
......
......@@ -485,12 +485,12 @@ START_TEST(test_auth_session_process_async)
session_data = g_variant_builder_end (&builder);
signon_auth_session_process_async (auth_session,
session_data,
"mech1",
NULL,
test_auth_session_process_async_cb,
&reply);
signon_auth_session_process (auth_session,
session_data,
"mech1",
NULL,
test_auth_session_process_async_cb,
&reply);
main_loop = g_main_loop_new (NULL, FALSE);
g_main_loop_run (main_loop);
fail_unless (state_counter == 12, "Wrong numer of state change signals: %d", state_counter);
......@@ -550,12 +550,12 @@ START_TEST(test_auth_session_process_failure)
session_data = g_variant_builder_end (&builder);
signon_auth_session_process_async (auth_session,
session_data,
"mech1",
NULL,
test_auth_session_process_failure_cb,
&error);
signon_auth_session_process (auth_session,
session_data,
"mech1",
NULL,
test_auth_session_process_failure_cb,
&error);
main_loop = g_main_loop_new (NULL, FALSE);
g_main_loop_run (main_loop);
......@@ -634,12 +634,12 @@ test_auth_session_process_after_store_start_session(SignonIdentity *self,
session_data = g_variant_new (g_variant_type_peek_string (G_VARIANT_TYPE_VARDICT), NULL);
signon_auth_session_process_async (auth_session,
session_data,
"mech1",
NULL,
test_auth_session_process_after_store_cb,
NULL);
signon_auth_session_process (auth_session,
session_data,
"mech1",
NULL,
test_auth_session_process_after_store_cb,
NULL);
g_object_unref (session_data);
}
......@@ -1308,12 +1308,12 @@ START_TEST(test_unregistered_auth_session)
session_data = g_variant_builder_end (&builder);
signon_auth_session_process_async (as,
session_data,
"mech1",
NULL,
test_auth_session_process_async_cb,
&reply);
signon_auth_session_process (as,
session_data,
"mech1",
NULL,
test_auth_session_process_async_cb,
&reply);
g_main_loop_run (main_loop);
fail_unless (reply != NULL);
......@@ -1402,12 +1402,12 @@ START_TEST(test_regression_unref)
session_data = g_variant_builder_end (&builder);
signon_auth_session_process_async (auth_session,
session_data,
"mech1",
NULL,
test_regression_unref_process_cb,
"Hi there!");
signon_auth_session_process (auth_session,
session_data,
"mech1",
NULL,
test_regression_unref_process_cb,
"Hi there!");
g_object_unref (session_data);
g_main_loop_run (main_loop);
......
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