MMModemSimple

MMModemSimple — The Simple interface

Functions

Types and Values

struct MMModemSimple

Object Hierarchy

    GObject
    ╰── GDBusProxy
        ╰── MmGdbusModemSimpleProxy
            ╰── MMModemSimple

Implemented Interfaces

MMModemSimple implements GDBusInterface, GInitable, GAsyncInitable and MmGdbusModemSimple.

Description

The MMModemSimple is an object providing access to the methods, signals and properties of the Simple interface.

The Simple interface is exposed on modems which are not in MM_MODEM_STATE_FAILED state.

Functions

mm_modem_simple_get_path ()

const gchar *
mm_modem_simple_get_path (MMModemSimple *self);

Gets the DBus path of the MMObject which implements this interface.

Parameters

self

A MMModemSimple.

 

Returns

The DBus path of the MMObject object.

[transfer none]

Since: 1.0


mm_modem_simple_dup_path ()

gchar *
mm_modem_simple_dup_path (MMModemSimple *self);

Gets a copy of the DBus path of the MMObject object which implements this interface.

Parameters

self

A MMModemSimple.

 

Returns

The DBus path of the MMObject. The returned value should be freed with g_free().

[transfer full]

Since: 1.0


mm_modem_simple_connect ()

void
mm_modem_simple_connect (MMModemSimple *self,
                         MMSimpleConnectProperties *properties,
                         GCancellable *cancellable,
                         GAsyncReadyCallback callback,
                         gpointer user_data);

Asynchronously requests to connect the modem using the given 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_modem_simple_connect_finish() to get the result of the operation.

See mm_modem_simple_connect_sync() for the synchronous, blocking version of this method.

Parameters

self

A MMModemSimple.

 

properties

A MMSimpleConnectProperties bundle.

[transfer none]

cancellable

A GCancellable or NULL.

[allow-none]

callback

A GAsyncReadyCallback to call when the request is satisfied or NULL.

 

user_data

User data to pass to callback .

 

Since: 1.0


mm_modem_simple_connect_finish ()

MMBearer *
mm_modem_simple_connect_finish (MMModemSimple *self,
                                GAsyncResult *res,
                                GError **error);

Finishes an operation started with mm_modem_simple_connect().

Parameters

self

A MMModemSimple.

 

res

The GAsyncResult obtained from the GAsyncReadyCallback passed to mm_modem_simple_connect().

 

error

Return location for error or NULL.

 

Returns

A MMBearer, or FALSE if error is set. The returned value must be freed with g_object_ref().

[transfer full]

Since: 1.0


mm_modem_simple_connect_sync ()

MMBearer *
mm_modem_simple_connect_sync (MMModemSimple *self,
                              MMSimpleConnectProperties *properties,
                              GCancellable *cancellable,
                              GError **error);

Synchronously requests to connect the modem using the given properties .

The calling thread is blocked until a reply is received. See mm_modem_simple_connect() for the asynchronous version of this method.

Parameters

self

A MMModemSimple.

 

properties

A MMSimpleConnectProperties bundle.

[transfer none]

cancellable

A GCancellable or NULL.

[allow-none]

error

Return location for error or NULL.

 

Returns

A MMBearer, or FALSE if error is set. The returned value must be freed with g_object_ref().

[transfer full]

Since: 1.0


mm_modem_simple_disconnect ()

void
mm_modem_simple_disconnect (MMModemSimple *self,
                            const gchar *bearer,
                            GCancellable *cancellable,
                            GAsyncReadyCallback callback,
                            gpointer user_data);

Asynchronously requests to disconnect the modem.

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_modem_simple_disconnect_finish() to get the result of the operation.

See mm_modem_simple_disconnect_sync() for the synchronous, blocking version of this method.

Parameters

self

A MMModemSimple.

 

bearer

Path of the bearer to disconnect, or NULL to disconnect all connected bearers.

[allow-none]

cancellable

A GCancellable or NULL.

[allow-none]

callback

A GAsyncReadyCallback to call when the request is satisfied or NULL.

 

user_data

User data to pass to callback .

 

Since: 1.0


mm_modem_simple_disconnect_finish ()

gboolean
mm_modem_simple_disconnect_finish (MMModemSimple *self,
                                   GAsyncResult *res,
                                   GError **error);

Finishes an operation started with mm_modem_simple_disconnect().

Parameters

self

A MMModemSimple.

 

res

The GAsyncResult obtained from the GAsyncReadyCallback passed to mm_modem_simple_disconnect().

 

error

Return location for error or NULL.

 

Returns

TRUE if the modem is successfully disconnected, FALSE if error is set.

Since: 1.0


mm_modem_simple_disconnect_sync ()

gboolean
mm_modem_simple_disconnect_sync (MMModemSimple *self,
                                 const gchar *bearer,
                                 GCancellable *cancellable,
                                 GError **error);

Synchronously requests to disconnect the modem.

The calling thread is blocked until a reply is received. See mm_modem_simple_disconnect() for the asynchronous version of this method.

Parameters

self

A MMModemSimple.

 

bearer

Path of the bearer to disconnect, or NULL to disconnect all connected bearers.

[allow-none]

cancellable

A GCancellable or NULL.

[allow-none]

error

Return location for error or NULL.

 

Returns

TRUE if the modem is successfully disconnected, FALSE if error is set.

Since: 1.0


mm_modem_simple_get_status ()

void
mm_modem_simple_get_status (MMModemSimple *self,
                            GCancellable *cancellable,
                            GAsyncReadyCallback callback,
                            gpointer user_data);

Asynchronously requests a compilation of the status of the modem.

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_modem_simple_get_status_finish() to get the result of the operation.

See mm_modem_simple_get_status_sync() for the synchronous, blocking version of this method.

Parameters

self

A MMModemSimple.

 

cancellable

A GCancellable or NULL.

[allow-none]

callback

A GAsyncReadyCallback to call when the request is satisfied or NULL.

 

user_data

User data to pass to callback .

 

Since: 1.0


mm_modem_simple_get_status_finish ()

MMSimpleStatus *
mm_modem_simple_get_status_finish (MMModemSimple *self,
                                   GAsyncResult *res,
                                   GError **error);

Finishes an operation started with mm_modem_simple_get_status().

Parameters

self

A MMModemSimple.

 

res

The GAsyncResult obtained from the GAsyncReadyCallback passed to mm_modem_simple_connect().

 

error

Return location for error or NULL.

 

Returns

A MMSimpleStatus, or FALSE if error is set. The returned value must be freed with g_object_ref().

[transfer full]

Since: 1.0


mm_modem_simple_get_status_sync ()

MMSimpleStatus *
mm_modem_simple_get_status_sync (MMModemSimple *self,
                                 GCancellable *cancellable,
                                 GError **error);

Synchronously requests a compilation of the status of the modem.

The calling thread is blocked until a reply is received. See mm_modem_simple_get_status() for the asynchronous version of this method.

Parameters

self

A MMModemSimple.

 

cancellable

A GCancellable or NULL.

[allow-none]

error

Return location for error or NULL.

 

Returns

A MMSimpleStatus, or FALSE if error is set. The returned value must be freed with g_object_ref().

[transfer full]

Since: 1.0

Types and Values

struct MMModemSimple

struct MMModemSimple;

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