ModemManager.Bearer

g GObject.GInterface GObject.GInterface Gio.AsyncInitable Gio.AsyncInitable GObject.GInterface->Gio.AsyncInitable Gio.DBusInterface Gio.DBusInterface GObject.GInterface->Gio.DBusInterface Gio.Initable Gio.Initable GObject.GInterface->Gio.Initable ModemManager.GdbusBearer ModemManager.GdbusBearer GObject.GInterface->ModemManager.GdbusBearer GObject.Object GObject.Object Gio.DBusProxy Gio.DBusProxy GObject.Object->Gio.DBusProxy Gio.AsyncInitable->Gio.DBusProxy Gio.DBusInterface->Gio.DBusProxy ModemManager.GdbusBearerProxy ModemManager.GdbusBearerProxy Gio.DBusProxy->ModemManager.GdbusBearerProxy Gio.Initable->Gio.DBusProxy ModemManager.Bearer ModemManager.Bearer ModemManager.GdbusBearer->ModemManager.GdbusBearerProxy ModemManager.GdbusBearerProxy->ModemManager.Bearer

Subclasses:

None

Methods

Inherited:

ModemManager.GdbusBearerProxy (6), Gio.DBusProxy (25), GObject.Object (37), Gio.AsyncInitable (4), Gio.DBusInterface (3), Gio.Initable (2), ModemManager.GdbusBearer (10)

Structs:

GObject.ObjectClass (5)

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_connection_error ()

get_interface ()

get_ip_timeout ()

get_ipv4_config ()

get_ipv6_config ()

get_multiplexed ()

get_path ()

get_profile_id ()

get_properties ()

get_reload_stats_supported ()

get_stats ()

get_suspended ()

peek_connection_error ()

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 (13)

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.GdbusBearerProxy

Abstract:

No

Structure:

ModemManager.BearerClass

The ModemManager.Bearer structure contains private data and should only be accessed using the provided API.

connect(cancellable, callback, *user_data)
Parameters:

Asynchronously requests activation of a packet data connection with the network using this ModemManager.Bearer properties.

When the operation is finished, callback will be invoked in the

thread-default main loop of the thread you are calling this method from. You can then call ModemManager.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.

connect_finish(res)
Parameters:

res (Gio.AsyncResult) – The Gio.AsyncResult obtained from the Gio.AsyncReadyCallback passed to ModemManager.Bearer.connect().

Raises:

GLib.Error

Returns:

True if the operation succeeded, False if error is set.

Return type:

bool

Finishes an operation started with ModemManager.Bearer.connect().

New in version 1.0.

connect_sync(cancellable)
Parameters:

cancellable (Gio.Cancellable or None) – A Gio.Cancellable or None.

Raises:

GLib.Error

Returns:

True if the operation succeeded, False if error is set.

Return type:

bool

Synchronously requests activation of a packet data connection with the network using this ModemManager.Bearer properties.

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:

Synchronously requests disconnection and deactivation of the packet data connection.

When the operation is finished, callback will be invoked in the

thread-default main loop of the thread you are calling this method from. You can then call ModemManager.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.

disconnect_finish(res)
Parameters:

res (Gio.AsyncResult) – The Gio.AsyncResult obtained from the Gio.AsyncReadyCallback passed to ModemManager.Bearer.disconnect().

Raises:

GLib.Error

Returns:

True if the operation succeeded, False if error is set.

Return type:

bool

Finishes an operation started with ModemManager.Bearer.disconnect().

New in version 1.0.

disconnect_sync(cancellable)
Parameters:

cancellable (Gio.Cancellable or None) – A Gio.Cancellable or None.

Raises:

GLib.Error

Returns:

True if the operation succeeded, False if error is set.

Return type:

bool

Synchronously 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 None if it couldn’t be retrieved. The returned value should be freed with GLib.free().

Return type:

str

Gets 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 the ModemManager.Bearer is in connected state.

New in version 1.0.

dup_path()
Returns:

The DBus path of the ModemManager.Bearer object. The returned value should be freed with GLib.free().

Return type:

str

Gets a copy of the DBus path of the ModemManager.Bearer object.

New in version 1.0.

get_bearer_type()
Returns:

a ModemManager.BearerType.

Return type:

ModemManager.BearerType

Gets the type of bearer.

New in version 1.0.

get_connected()
Returns:

True if the ModemManager.Bearer is connected, False otherwise.

Return type:

bool

Checks whether or not the ModemManager.Bearer is connected and thus whether packet data communication is possible.

New in version 1.0.

get_connection_error()
Returns:

A GLib.Error that must be freed with GLib.Error.free() or None if none.

Return type:

GLib.Error

Gets a GLib.Error specifying the connection error details, if any.

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_connection_error() again to get a new GLib.Error with the new values.

New in version 1.18.

get_interface()
Returns:

The name of the interface, or None if it couldn’t be retrieved.

Return type:

str

Gets the operating system name for the network data interface that provides packet data using this ModemManager.Bearer. This will only be available once the ModemManager.Bearer is 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:

int

Gets 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.BearerIpConfig that must be freed with GObject.Object.unref() or None if unknown.

Return type:

ModemManager.BearerIpConfig

Gets a ModemManager.BearerIpConfig object 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 new ModemManager.BearerIpConfig with the new values.

New in version 1.0.

get_ipv6_config()
Returns:

A ModemManager.BearerIpConfig that must be freed with GObject.Object.unref() or None if unknown.

Return type:

ModemManager.BearerIpConfig

Gets a ModemManager.BearerIpConfig object 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 new ModemManager.BearerIpConfig with the new values.

New in version 1.0.

get_multiplexed()
Returns:

True if packet data service is connected via a multiplexed network link in the ModemManager.Bearer, False otherwise.

Return type:

bool

Checks whether or not the ModemManager.Bearer is connected through a multiplexed network likn.

New in version 1.18.

get_path()
Returns:

The DBus path of the ModemManager.Bearer object.

Return type:

str

Gets the DBus path of the ModemManager.Bearer object.

New in version 1.0.

get_profile_id()
Returns:

a profile id.

Return type:

int

Gets profile ID associated to the bearer connection, if known.

If the bearer is disconnected or the modem doesn’t support profile management features, ModemManager._3GPP_PROFILE_ID_UNKNOWN.

New in version 1.18.

get_properties()
Returns:

A ModemManager.BearerProperties that must be freed with GObject.Object.unref() or None if unknown.

Return type:

ModemManager.BearerProperties

Gets a ModemManager.BearerProperties object 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 new ModemManager.BearerProperties with the new values.

New in version 1.0.

get_reload_stats_supported()
Returns:

True if the ModemManager.Bearer supports these stats, False otherwise.

Return type:

bool

Checks whether or not the ModemManager.Bearer supporting stats reload (to have RX and TX bytes of the ongoing connection).

New in version 1.20.

get_stats()
Returns:

A ModemManager.BearerStats that must be freed with GObject.Object.unref() or None if unknown.

Return type:

ModemManager.BearerStats

Gets a ModemManager.BearerStats object 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 new ModemManager.BearerStats with the new values.

New in version 1.6.

get_suspended()
Returns:

True if packet data service is suspended in the ModemManager.Bearer, False otherwise.

Return type:

bool

Checks whether or not the ModemManager.Bearer is suspended (but not deactivated) while the device is handling other communications, like a voice call.

New in version 1.0.

peek_connection_error()
Returns:

A GLib.Error, or None if none. Do not free the returned value, it belongs to self.

Return type:

GLib.Error

Gets a GLib.Error specifying the connection error details, if any.

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_connection_error() if on another thread.

New in version 1.18.

peek_ipv4_config()
Returns:

A ModemManager.BearerIpConfig. Do not free the returned value, it belongs to self.

Return type:

ModemManager.BearerIpConfig

Gets a ModemManager.BearerIpConfig object 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.BearerIpConfig

Gets a ModemManager.BearerIpConfig object 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.BearerProperties

Gets a ModemManager.BearerProperties object 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.BearerStats

Gets a ModemManager.BearerStats object 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.