libmm-glib Reference Manual | ||||
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces |
struct MMBearer; const gchar * mm_bearer_get_path (MMBearer *self
); gchar * mm_bearer_dup_path (MMBearer *self
); const gchar * mm_bearer_get_interface (MMBearer *self
); gchar * mm_bearer_dup_interface (MMBearer *self
); gboolean mm_bearer_get_connected (MMBearer *self
); gboolean mm_bearer_get_suspended (MMBearer *self
); guint mm_bearer_get_ip_timeout (MMBearer *self
); MMBearerIpConfig * mm_bearer_peek_ipv4_config (MMBearer *self
); MMBearerIpConfig * mm_bearer_get_ipv4_config (MMBearer *self
); MMBearerIpConfig * mm_bearer_peek_ipv6_config (MMBearer *self
); MMBearerIpConfig * mm_bearer_get_ipv6_config (MMBearer *self
); MMBearerProperties * mm_bearer_peek_properties (MMBearer *self
); MMBearerProperties * mm_bearer_get_properties (MMBearer *self
); void mm_bearer_connect (MMBearer *self
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
); gboolean mm_bearer_connect_finish (MMBearer *self
,GAsyncResult *res
,GError **error
); gboolean mm_bearer_connect_sync (MMBearer *self
,GCancellable *cancellable
,GError **error
); void mm_bearer_disconnect (MMBearer *self
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
); gboolean mm_bearer_disconnect_finish (MMBearer *self
,GAsyncResult *res
,GError **error
); gboolean mm_bearer_disconnect_sync (MMBearer *self
,GCancellable *cancellable
,GError **error
);
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.
struct MMBearer;
The MMBearer structure contains private data and should only be accessed using the provided API.
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.
|
A MMBearer. |
Returns : |
The IP timeout, or 0 if no specific one given. |
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.
|
A MMBearer. |
Returns : |
(transfer none) A MMBearerIpConfig. Do not free the returned value, it belongs to self . |
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 MMBearer. |
Returns : |
(transfer full) A MMBearerIpConfig that must be freed with g_object_unref() or NULL if unknown. |
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.
|
A MMBearer. |
Returns : |
(transfer none) A MMBearerIpConfig. Do not free the returned value, it belongs to self . |
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 MMBearer. |
Returns : |
(transfer full) A MMBearerIpConfig that must be freed with g_object_unref() or NULL if unknown. |
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.
|
A MMBearer. |
Returns : |
(transfer none) A MMBearerProperties. Do not free the returned value, it belongs to self . |
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 MMBearer. |
Returns : |
(transfer full) A MMBearerProperties that must be freed with g_object_unref() or NULL if unknown. |
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.
|
A MMBearer. |
|
A GCancellable or NULL . [allow-none]
|
|
A GAsyncReadyCallback to call when the request is satisfied or NULL . |
|
User data to pass to callback . |
gboolean mm_bearer_connect_finish (MMBearer *self
,GAsyncResult *res
,GError **error
);
Finishes an operation started with mm_bearer_connect()
.
|
A MMBearer. |
|
The GAsyncResult obtained from the GAsyncReadyCallback passed to mm_bearer_connect() . |
|
Return location for error or NULL . |
Returns : |
TRUE if the operation succeded, FALSE if error is set. |
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.
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.
|
A MMBearer. |
|
A GCancellable or NULL . [allow-none]
|
|
A GAsyncReadyCallback to call when the request is satisfied or NULL . |
|
User data to pass to callback . |
gboolean mm_bearer_disconnect_finish (MMBearer *self
,GAsyncResult *res
,GError **error
);
Finishes an operation started with mm_bearer_disconnect()
.
|
A MMBearer. |
|
The GAsyncResult obtained from the GAsyncReadyCallback passed to mm_bearer_disconnect() . |
|
Return location for error or NULL . |
Returns : |
TRUE if the operation succeded, FALSE if error is set. |
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.