aboutsummaryrefslogtreecommitdiff
path: root/src/mm-modem.h
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2010-03-01 09:07:05 -0800
committerDan Williams <dcbw@redhat.com>2010-03-01 09:07:05 -0800
commitf6c514897e40e768b180963f2782ed60527ffaa6 (patch)
tree3a0619829a4b1eaee11d7f196b30021e6b7d1127 /src/mm-modem.h
parent7a0373afee63eeb9e677f61ccd19fd4aed549ac9 (diff)
parent9d7cb0ddcf69993903c5bc51bbbfbd3a57f55413 (diff)
Merge remote branch 'origin/master' into qcdm
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 */