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.
Since: 1.0
gchar *
mm_bearer_dup_path (MMBearer *self
);
Gets a copy of the DBus path of the MMBearer object.
The DBus path of the MMBearer object. The returned
value should be freed with g_free()
.
[transfer full]
Since: 1.0
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.Since: 1.0
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.
The name of the interface, or NULL
if it couldn't
be retrieved. The returned value should be freed with g_free()
.
[transfer full]
Since: 1.0
gboolean
mm_bearer_get_connected (MMBearer *self
);
Checks whether or not the MMBearer is connected and thus whether packet data communication is possible.
Since: 1.0
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.
Since: 1.0
guint
mm_bearer_get_ip_timeout (MMBearer *self
);
Gets the maximum time to wait for the bearer to retrieve a valid IP address.
Since: 1.0
MMBearerType
mm_bearer_get_bearer_type (MMBearer *self
);
Gets the type of bearer.
Since: 1.0
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.Since: 1.0
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]
Since: 1.0
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.Since: 1.0
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]
Since: 1.0
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.Since: 1.0
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]
Since: 1.0
MMBearerStats *
mm_bearer_peek_stats (MMBearer *self
);
Gets a MMBearerStats object specifying the statistics of the current bearer connection.
self
was constructed. Use mm_bearer_get_stats()
if on another
thread.Since: 1.6
MMBearerStats *
mm_bearer_get_stats (MMBearer *self
);
Gets a MMBearerStats object specifying the statistics of the current bearer connection.
self
are not updated when the values in the
interface change. Instead, the client is expected to call
mm_bearer_get_stats()
again to get a new MMBearerStats with the
new values.A MMBearerStats that must be freed with
g_object_unref()
or NULL
if unknown.
[transfer full]
Since: 1.6
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
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 |
Since: 1.0
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 |
Since: 1.0
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 |
Since: 1.0
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
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 |
Since: 1.0
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 |
Since: 1.0
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 |
Since: 1.0
struct MMBearer;
The MMBearer structure contains private data and should only be accessed using the provided API.