Top |
MMBearer implements GDBusInterface, GInitable, GAsyncInitable and MmGdbusBearer.
The MMBearer is an object providing access to the methods, signals and properties of the Bearer interface.
When the bearer is exposed and available in the bus, it is ensured that at least this interface is also available.
const gchar *
mm_bearer_get_path (MMBearer *self
);
Gets the DBus path of the MMBearer object.
gchar *
mm_bearer_dup_path (MMBearer *self
);
Gets a copy of the DBus path of the MMBearer object.
const gchar *
mm_bearer_get_interface (MMBearer *self
);
Gets the operating system name for the network data interface that provides packet data using this MMBearer. This will only be available once the MMBearer is in connected state.
self
was constructed. Use mm_bearer_dup_interface()
if on another
thread.gchar *
mm_bearer_dup_interface (MMBearer *self
);
Gets a copy of the operating system name for the network data interface that provides packet data using this MMBearer. This will only be available once the MMBearer is in connected state.
gboolean
mm_bearer_get_connected (MMBearer *self
);
Checks whether or not the MMBearer is connected and thus whether packet data communication is possible.
gboolean
mm_bearer_get_suspended (MMBearer *self
);
Checks whether or not the MMBearer is suspended (but not deactivated) while the device is handling other communications, like a voice call.
guint
mm_bearer_get_ip_timeout (MMBearer *self
);
Gets the maximum time to wait for the bearer to retrieve a valid IP address.
MMBearerIpConfig *
mm_bearer_peek_ipv4_config (MMBearer *self
);
Gets a MMBearerIpConfig object specifying the IPv4 configuration to use in the bearer.
self
was constructed. Use mm_bearer_get_ipv4_config()
if on another
thread.MMBearerIpConfig *
mm_bearer_get_ipv4_config (MMBearer *self
);
Gets a MMBearerIpConfig object specifying the IPv4 configuration to use in the bearer.
self
are not updated when the values in the
interface change. Instead, the client is expected to call
mm_bearer_get_ipv4_config()
again to get a new MMBearerIpConfig with the
new values. A MMBearerIpConfig that must be freed with g_object_unref()
or NULL
if unknown.
[transfer full]
MMBearerIpConfig *
mm_bearer_peek_ipv6_config (MMBearer *self
);
Gets a MMBearerIpConfig object specifying the IPv6 configuration to use in the bearer.
self
was constructed. Use mm_bearer_get_ipv6_config()
if on another
thread.MMBearerIpConfig *
mm_bearer_get_ipv6_config (MMBearer *self
);
Gets a MMBearerIpConfig object specifying the IPv6 configuration to use in the bearer.
self
are not updated when the values in the
interface change. Instead, the client is expected to call
mm_bearer_get_ipv6_config()
again to get a new MMBearerIpConfig with the
new values. A MMBearerIpConfig that must be freed with g_object_unref()
or NULL
if unknown.
[transfer full]
MMBearerProperties *
mm_bearer_peek_properties (MMBearer *self
);
Gets a MMBearerProperties object specifying the properties which were used to create the bearer.
self
was constructed. Use mm_bearer_get_properties()
if on another
thread.MMBearerProperties *
mm_bearer_get_properties (MMBearer *self
);
Gets a MMBearerProperties object specifying the properties which were used to create the bearer.
self
are not updated when the values in the
interface change. Instead, the client is expected to call
mm_bearer_get_properties()
again to get a new MMBearerProperties with the
new values. A MMBearerProperties that must be freed with g_object_unref()
or NULL
if unknown.
[transfer full]
void mm_bearer_connect (MMBearer *self
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Asynchronously requests activation of a packet data connection with the network using this MMBearer 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 mm_bearer_connect_finish()
to get the result of the operation.
See mm_bearer_connect_sync()
for the synchronous, blocking version of this method.
self |
A MMBearer. |
|
cancellable |
A GCancellable or |
[allow-none] |
callback |
A GAsyncReadyCallback to call when the request is satisfied or |
|
user_data |
User data to pass to |
gboolean mm_bearer_connect_finish (MMBearer *self
,GAsyncResult *res
,GError **error
);
Finishes an operation started with mm_bearer_connect()
.
self |
A MMBearer. |
|
res |
The GAsyncResult obtained from the GAsyncReadyCallback passed to |
|
error |
Return location for error or |
gboolean mm_bearer_connect_sync (MMBearer *self
,GCancellable *cancellable
,GError **error
);
Synchronously requests activation of a packet data connection with the network using this MMBearer properties.
The calling thread is blocked until a reply is received.
See mm_bearer_connect()
for the asynchronous version of this method.
self |
A MMBearer. |
|
cancellable |
A GCancellable or |
[allow-none] |
error |
Return location for error or |
void mm_bearer_disconnect (MMBearer *self
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
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 mm_bearer_disconnect_finish()
to get the result of the operation.
See mm_bearer_disconnect_sync()
for the synchronous, blocking version of this method.
self |
A MMBearer. |
|
cancellable |
A GCancellable or |
[allow-none] |
callback |
A GAsyncReadyCallback to call when the request is satisfied or |
|
user_data |
User data to pass to |
gboolean mm_bearer_disconnect_finish (MMBearer *self
,GAsyncResult *res
,GError **error
);
Finishes an operation started with mm_bearer_disconnect()
.
self |
A MMBearer. |
|
res |
The GAsyncResult obtained from the GAsyncReadyCallback passed to |
|
error |
Return location for error or |
gboolean mm_bearer_disconnect_sync (MMBearer *self
,GCancellable *cancellable
,GError **error
);
Synchronously requests disconnection and deactivation of the packet data connection.
The calling thread is blocked until a reply is received.
See mm_bearer_disconnect()
for the asynchronous version of this method.
self |
A MMBearer. |
|
cancellable |
A GCancellable or |
[allow-none] |
error |
Return location for error or |
struct MMBearer;
The MMBearer structure contains private data and should only be accessed using the provided API.