ModemManager.Bearer¶
| Subclasses: | None |
|---|
Methods¶
connect (cancellable, callback, *user_data) |
|
connect_finish (res) |
|
connect_sync (cancellable) |
|
disconnect (cancellable, callback, *user_data) |
|
disconnect_finish (res) |
|
disconnect_sync (cancellable) |
|
dup_interface () |
|
dup_path () |
|
get_bearer_type () |
|
get_connected () |
|
get_interface () |
|
get_ip_timeout () |
|
get_ipv4_config () |
|
get_ipv6_config () |
|
get_path () |
|
get_properties () |
|
get_stats () |
|
get_suspended () |
|
peek_ipv4_config () |
|
peek_ipv6_config () |
|
peek_properties () |
|
peek_stats () |
Virtual Methods¶
| Inherited: | Gio.DBusProxy (2), GObject.Object (7), Gio.AsyncInitable (2), Gio.DBusInterface (3), Gio.Initable (1), ModemManager.GdbusBearer (2) |
|---|
Properties¶
| Inherited: | Gio.DBusProxy (9), ModemManager.GdbusBearer (9) |
|---|
Signals¶
| Inherited: | Gio.DBusProxy (2), GObject.Object (1), ModemManager.GdbusBearer (2) |
|---|
Fields¶
| Inherited: | Gio.DBusProxy (2), GObject.Object (1), ModemManager.GdbusBearer (2) |
|---|
| Name | Type | Access | Description |
|---|---|---|---|
| parent | ModemManager.GdbusBearerProxy |
r |
Class Details¶
-
class
ModemManager.Bearer(**kwargs)¶ Bases: ModemManager.GdbusBearerProxyAbstract: No Structure: ModemManager.BearerClassThe
ModemManager.Bearerstructure contains private data and should only be accessed using the provided API.-
connect(cancellable, callback, *user_data)¶ Parameters: - cancellable (
Gio.CancellableorNone) – AGio.CancellableorNone. - callback (
Gio.AsyncReadyCallbackorNone) – AGio.AsyncReadyCallbackto call when the request is satisfied orNone. - user_data (
objectorNone) – User data to pass to callback.
Asynchronously requests activation of a packet data connection with the network using this
ModemManager.Bearerproperties.When the operation is finished, callback will be invoked in the
thread-default main loopof the thread you are calling this method from. You can then callModemManager.Bearer.connect_finish() to get the result of the operation.See
ModemManager.Bearer.connect_sync() for the synchronous, blocking version of this method.New in version 1.0.
- cancellable (
-
connect_finish(res)¶ Parameters: res ( Gio.AsyncResult) – TheGio.AsyncResultobtained from theGio.AsyncReadyCallbackpassed toModemManager.Bearer.connect().Raises: GLib.ErrorReturns: Trueif the operation succeeded,Falseif error is set.Return type: boolFinishes an operation started with
ModemManager.Bearer.connect().New in version 1.0.
-
connect_sync(cancellable)¶ Parameters: cancellable ( Gio.CancellableorNone) – AGio.CancellableorNone.Raises: GLib.ErrorReturns: Trueif the operation succeeded,Falseif error is set.Return type: boolSynchronously requests activation of a packet data connection with the network using this
ModemManager.Bearerproperties.The calling thread is blocked until a reply is received. See
ModemManager.Bearer.connect() for the asynchronous version of this method.New in version 1.0.
-
disconnect(cancellable, callback, *user_data)¶ Parameters: - cancellable (
Gio.CancellableorNone) – AGio.CancellableorNone. - callback (
Gio.AsyncReadyCallbackorNone) – AGio.AsyncReadyCallbackto call when the request is satisfied orNone. - user_data (
objectorNone) – User data to pass to callback.
Synchronously requests disconnection and deactivation of the packet data connection.
When the operation is finished, callback will be invoked in the
thread-default main loopof the thread you are calling this method from. You can then callModemManager.Bearer.disconnect_finish() to get the result of the operation.See
ModemManager.Bearer.disconnect_sync() for the synchronous, blocking version of this method.New in version 1.0.
- cancellable (
-
disconnect_finish(res)¶ Parameters: res ( Gio.AsyncResult) – TheGio.AsyncResultobtained from theGio.AsyncReadyCallbackpassed toModemManager.Bearer.disconnect().Raises: GLib.ErrorReturns: Trueif the operation succeeded,Falseif error is set.Return type: boolFinishes an operation started with
ModemManager.Bearer.disconnect().New in version 1.0.
-
disconnect_sync(cancellable)¶ Parameters: cancellable ( Gio.CancellableorNone) – AGio.CancellableorNone.Raises: GLib.ErrorReturns: Trueif the operation succeeded,Falseif error is set.Return type: boolSynchronously requests disconnection and deactivation of the packet data connection.
The calling thread is blocked until a reply is received. See
ModemManager.Bearer.disconnect() for the asynchronous version of this method.New in version 1.0.
-
dup_interface()¶ Returns: The name of the interface, or Noneif it couldn’t be retrieved. The returned value should be freed withGLib.free().Return type: strGets a copy of the operating system name for the network data interface that provides packet data using this
ModemManager.Bearer. This will only be available once theModemManager.Beareris in connected state.New in version 1.0.
-
dup_path()¶ Returns: The DBus path of the ModemManager.Bearerobject. The returned value should be freed withGLib.free().Return type: strGets a copy of the DBus path of the
ModemManager.Bearerobject.New in version 1.0.
-
get_bearer_type()¶ Returns: a ModemManager.BearerType.Return type: ModemManager.BearerTypeGets the type of bearer.
New in version 1.0.
-
get_connected()¶ Returns: Trueif theModemManager.Beareris connected,Falseotherwise.Return type: boolChecks whether or not the
ModemManager.Beareris connected and thus whether packet data communication is possible.New in version 1.0.
-
get_interface()¶ Returns: The name of the interface, or Noneif it couldn’t be retrieved.Return type: strGets the operating system name for the network data interface that provides packet data using this
ModemManager.Bearer. This will only be available once theModemManager.Beareris in connected state.The returned value is only valid until the property changes so it is only safe to use this function on the thread where self was constructed. Use
ModemManager.Bearer.dup_interface() if on another thread.New in version 1.0.
-
get_ip_timeout()¶ Returns: The IP timeout, or 0 if no specific one given. Return type: intGets the maximum time to wait for the bearer to retrieve a valid IP address.
New in version 1.0.
-
get_ipv4_config()¶ Returns: A ModemManager.BearerIpConfigthat must be freed withGObject.Object.unref() orNoneif unknown.Return type: ModemManager.BearerIpConfigGets a
ModemManager.BearerIpConfigobject specifying the IPv4 configuration to use in the bearer.The values reported by self are not updated when the values in the interface change. Instead, the client is expected to call
ModemManager.Bearer.get_ipv4_config() again to get a newModemManager.BearerIpConfigwith the new values.New in version 1.0.
-
get_ipv6_config()¶ Returns: A ModemManager.BearerIpConfigthat must be freed withGObject.Object.unref() orNoneif unknown.Return type: ModemManager.BearerIpConfigGets a
ModemManager.BearerIpConfigobject specifying the IPv6 configuration to use in the bearer.The values reported by self are not updated when the values in the interface change. Instead, the client is expected to call
ModemManager.Bearer.get_ipv6_config() again to get a newModemManager.BearerIpConfigwith the new values.New in version 1.0.
-
get_path()¶ Returns: The DBus path of the ModemManager.Bearerobject.Return type: strGets the DBus path of the
ModemManager.Bearerobject.New in version 1.0.
-
get_properties()¶ Returns: A ModemManager.BearerPropertiesthat must be freed withGObject.Object.unref() orNoneif unknown.Return type: ModemManager.BearerPropertiesGets a
ModemManager.BearerPropertiesobject specifying the properties which were used to create the bearer.The values reported by self are not updated when the values in the interface change. Instead, the client is expected to call
ModemManager.Bearer.get_properties() again to get a newModemManager.BearerPropertieswith the new values.New in version 1.0.
-
get_stats()¶ Returns: A ModemManager.BearerStatsthat must be freed withGObject.Object.unref() orNoneif unknown.Return type: ModemManager.BearerStatsGets a
ModemManager.BearerStatsobject specifying the statistics of the current bearer connection.The values reported by self are not updated when the values in the interface change. Instead, the client is expected to call
ModemManager.Bearer.get_stats() again to get a newModemManager.BearerStatswith the new values.New in version 1.6.
-
get_suspended()¶ Returns: Trueif packet data service is suspended in theModemManager.Bearer,Falseotherwise.Return type: boolChecks whether or not the
ModemManager.Beareris suspended (but not deactivated) while the device is handling other communications, like a voice call.New in version 1.0.
-
peek_ipv4_config()¶ Returns: A ModemManager.BearerIpConfig. Do not free the returned value, it belongs to self.Return type: ModemManager.BearerIpConfigGets a
ModemManager.BearerIpConfigobject specifying the IPv4 configuration to use in the bearer.The returned value is only valid until the property changes so it is only safe to use this function on the thread where self was constructed. Use
ModemManager.Bearer.get_ipv4_config() if on another thread.New in version 1.0.
-
peek_ipv6_config()¶ Returns: A ModemManager.BearerIpConfig. Do not free the returned value, it belongs to self.Return type: ModemManager.BearerIpConfigGets a
ModemManager.BearerIpConfigobject specifying the IPv6 configuration to use in the bearer.The returned value is only valid until the property changes so it is only safe to use this function on the thread where self was constructed. Use
ModemManager.Bearer.get_ipv6_config() if on another thread.New in version 1.0.
-
peek_properties()¶ Returns: A ModemManager.BearerProperties. Do not free the returned value, it belongs to self.Return type: ModemManager.BearerPropertiesGets a
ModemManager.BearerPropertiesobject specifying the properties which were used to create the bearer.The returned value is only valid until the property changes so it is only safe to use this function on the thread where self was constructed. Use
ModemManager.Bearer.get_properties() if on another thread.New in version 1.0.
-
peek_stats()¶ Returns: A ModemManager.BearerStats. Do not free the returned value, it belongs to self.Return type: ModemManager.BearerStatsGets a
ModemManager.BearerStatsobject specifying the statistics of the current bearer connection.The returned value is only valid until the property changes so it is only safe to use this function on the thread where self was constructed. Use
ModemManager.Bearer.get_stats() if on another thread.New in version 1.6.
-