aboutsummaryrefslogtreecommitdiff
path: root/src/mm-auth-provider.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mm-auth-provider.c')
-rw-r--r--src/mm-auth-provider.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/mm-auth-provider.c b/src/mm-auth-provider.c
index 38ec04d3..2455da30 100644
--- a/src/mm-auth-provider.c
+++ b/src/mm-auth-provider.c
@@ -226,3 +226,40 @@ mm_auth_provider_class_init (MMAuthProviderClass *class)
}
MM_DEFINE_SINGLETON_GETTER (MMAuthProvider, mm_auth_provider_get, MM_TYPE_AUTH_PROVIDER)
+
+/*****************************************************************************/
+/* Auth interface */
+
+G_DEFINE_INTERFACE (MMIfaceAuth, mm_iface_auth, G_TYPE_OBJECT)
+
+void
+mm_iface_auth_authorize (MMIfaceAuth *self,
+ GDBusMethodInvocation *invocation,
+ const gchar *authorization,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
+{
+ g_assert (MM_IFACE_AUTH_GET_IFACE (self)->authorize != NULL);
+
+ MM_IFACE_AUTH_GET_IFACE (self)->authorize (self,
+ invocation,
+ authorization,
+ callback,
+ user_data);
+}
+
+gboolean
+mm_iface_auth_authorize_finish (MMIfaceAuth *self,
+ GAsyncResult *res,
+ GError **error)
+{
+ g_assert (MM_IFACE_AUTH_GET_IFACE (self)->authorize_finish != NULL);
+
+ return MM_IFACE_AUTH_GET_IFACE (self)->authorize_finish (self, res, error);
+}
+
+static void
+mm_iface_auth_default_init (MMIfaceAuthInterface *iface)
+{
+}
+