diff options
author | Aleksander Morgado <aleksander@aleksander.es> | 2018-12-07 16:12:35 +0100 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2019-01-03 21:05:58 +0100 |
commit | 2212d3e054fbe218c64fa76eeac8480f82d9f623 (patch) | |
tree | b654130c0e9bd7e74498d9a71a81ee3d141e7c13 /src/mm-device.h | |
parent | e3766aef5d93d6cfec27432c81da3548bdd18ea6 (diff) |
api,manager: new InhibitDevice() method
This new method allows users of the ModemManager API to take full
control of a given device.
Unlike other operations in the API, the inhibition is maintained as
long as the caller exists in the bus, or until the same caller
uninhibits the device.
https://gitlab.freedesktop.org/mobile-broadband/ModemManager/issues/98
Diffstat (limited to 'src/mm-device.h')
-rw-r--r-- | src/mm-device.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/mm-device.h b/src/mm-device.h index 6e6ff0bf..b00d1314 100644 --- a/src/mm-device.h +++ b/src/mm-device.h @@ -38,6 +38,7 @@ typedef struct _MMDevicePrivate MMDevicePrivate; #define MM_DEVICE_MODEM "modem" #define MM_DEVICE_HOTPLUGGED "hotplugged" #define MM_DEVICE_VIRTUAL "virtual" +#define MM_DEVICE_INHIBITED "inhibited" #define MM_DEVICE_PORT_GRABBED "port-grabbed" #define MM_DEVICE_PORT_RELEASED "port-released" @@ -77,6 +78,17 @@ gboolean mm_device_create_modem (MMDevice *self, GError **error); void mm_device_remove_modem (MMDevice *self); +void mm_device_inhibit (MMDevice *self, + GAsyncReadyCallback callback, + gpointer user_data); +gboolean mm_device_inhibit_finish (MMDevice *self, + GAsyncResult *res, + GError **error); +gboolean mm_device_uninhibit (MMDevice *self, + GDBusObjectManagerServer *object_manager, + GError **error); + + const gchar *mm_device_get_uid (MMDevice *self); const gchar **mm_device_get_drivers (MMDevice *self); guint16 mm_device_get_vendor (MMDevice *self); @@ -94,6 +106,7 @@ GObject *mm_device_get_port_probe (MMDevice *self, GList *mm_device_peek_port_probe_list (MMDevice *self); GList *mm_device_get_port_probe_list (MMDevice *self); gboolean mm_device_get_hotplugged (MMDevice *self); +gboolean mm_device_get_inhibited (MMDevice *self); /* For testing purposes */ void mm_device_virtual_grab_ports (MMDevice *self, |