aboutsummaryrefslogtreecommitdiff
path: root/src/mm-auth-provider.h
diff options
context:
space:
mode:
authorDan Williams <dan@ioncontrol.co>2025-05-08 20:10:48 -0500
committerDan Williams <dan@ioncontrol.co>2025-05-08 20:10:48 -0500
commitefcc960b130356e6b05d05a915ff0f9646b00d5f (patch)
treecf209fc07098e68c65dca219fee38a826dbcbf1a /src/mm-auth-provider.h
parent02942a04f95f64cda36360c72961fe0e20459ad4 (diff)
parent1fa21fcc48b271a8dc2191104e35bf4e95fa2331 (diff)
Merge request !1344 from 'cbm-remove-modem'
Begin removing usage of MMBaseModem from leaf classes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1344
Diffstat (limited to 'src/mm-auth-provider.h')
-rw-r--r--src/mm-auth-provider.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/mm-auth-provider.h b/src/mm-auth-provider.h
index 6065c806..2167cd59 100644
--- a/src/mm-auth-provider.h
+++ b/src/mm-auth-provider.h
@@ -56,4 +56,39 @@ gboolean mm_auth_provider_authorize_finish (MMAuthProvider *self,
GAsyncResult *res,
GError **error);
+/*****************************************************************************/
+/* Auth interface
+ *
+ * Implemented by objects (mainly MMBaseModem) that provide authorization
+ * capability to other interfaces (MMIfaceModem) since GLib interfaces don't
+ * have private data to store the singletone.
+ */
+
+#define MM_TYPE_IFACE_AUTH mm_iface_auth_get_type ()
+G_DECLARE_INTERFACE (MMIfaceAuth, mm_iface_auth, MM, IFACE_AUTH, GObject)
+
+struct _MMIfaceAuthInterface {
+ GTypeInterface g_iface;
+
+ void (* authorize) (MMIfaceAuth *self,
+ GDBusMethodInvocation *invocation,
+ const gchar *authorization,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+
+ gboolean (* authorize_finish) (MMIfaceAuth *self,
+ GAsyncResult *res,
+ GError **error);
+};
+
+void mm_iface_auth_authorize (MMIfaceAuth *self,
+ GDBusMethodInvocation *invocation,
+ const gchar *authorization,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+
+gboolean mm_iface_auth_authorize_finish (MMIfaceAuth *self,
+ GAsyncResult *res,
+ GError **error);
+
#endif /* MM_AUTH_PROVIDER_H */