aboutsummaryrefslogtreecommitdiff
path: root/src/mm-modem.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mm-modem.h')
-rw-r--r--src/mm-modem.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/mm-modem.h b/src/mm-modem.h
index ead2cca5..93915eb0 100644
--- a/src/mm-modem.h
+++ b/src/mm-modem.h
@@ -18,8 +18,10 @@
#define MM_MODEM_H
#include <glib-object.h>
+#include <dbus/dbus-glib-lowlevel.h>
#include "mm-port.h"
+#include "mm-auth-provider.h"
typedef enum {
MM_MODEM_STATE_UNKNOWN = 0,
@@ -156,6 +158,21 @@ struct _MMModem {
MMModemInfoFn callback,
gpointer user_data);
+ /* Normally implemented by the modem base class; plugins should
+ * never need to implement this.
+ */
+ gboolean (*auth_request) (MMModem *self,
+ const char *authorization,
+ DBusGMethodInvocation *context,
+ MMAuthRequestCb callback,
+ gpointer callback_data,
+ GDestroyNotify notify,
+ GError **error);
+
+ gboolean (*auth_finish) (MMModem *self,
+ MMAuthRequest *req,
+ GError **error);
+
/* Signals */
void (*state_changed) (MMModem *self,
MMModemState new_state,
@@ -217,5 +234,21 @@ void mm_modem_set_state (MMModem *self,
GError *mm_modem_check_removed (MMModem *self, const GError *error);
+/* Request authorization to perform an action. Used by D-Bus method
+ * handlers to ensure that the incoming request is authorized to perform
+ * the action it's requesting.
+ */
+gboolean mm_modem_auth_request (MMModem *self,
+ const char *authorization,
+ DBusGMethodInvocation *context,
+ MMAuthRequestCb callback,
+ gpointer callback_data,
+ GDestroyNotify notify,
+ GError **error);
+
+gboolean mm_modem_auth_finish (MMModem *self,
+ MMAuthRequest *req,
+ GError **error);
+
#endif /* MM_MODEM_H */