MMModemOma

MMModemOma — The OMA interface

Functions

Types and Values

Object Hierarchy

    GObject
    ╰── GDBusProxy
        ╰── MmGdbusModemOmaProxy
            ╰── MMModemOma

Implemented Interfaces

MMModemOma implements GDBusInterface, GInitable, GAsyncInitable and MmGdbusModemOma.

Description

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

The OMA interface is exposed whenever a modem has OMA device management capabilities.

Functions

mm_modem_oma_get_path ()

const gchar *
mm_modem_oma_get_path (MMModemOma *self);

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

Parameters

self

A MMModemOma.

 

Returns

The DBus path of the MMObject object.

[transfer none]

Since: 1.2


mm_modem_oma_dup_path ()

gchar *
mm_modem_oma_dup_path (MMModemOma *self);

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

Parameters

self

A MMModemOma.

 

Returns

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

[transfer full]

Since: 1.2


mm_modem_oma_setup ()

void
mm_modem_oma_setup (MMModemOma *self,
                    MMOmaFeature features,
                    GCancellable *cancellable,
                    GAsyncReadyCallback callback,
                    gpointer user_data);

Asynchronously sets up the OMA device management service.

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

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

Parameters

self

A MMModemOma.

 

features

Mask of MMOmaFeature values to enable.

 

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


mm_modem_oma_setup_finish ()

gboolean
mm_modem_oma_setup_finish (MMModemOma *self,
                           GAsyncResult *res,
                           GError **error);

Finishes an operation started with mm_modem_oma_setup().

Parameters

self

A MMModemOma.

 

res

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

 

error

Return location for error or NULL.

 

Returns

TRUE if the setup was successful, FALSE if error is set.

Since: 1.2


mm_modem_oma_setup_sync ()

gboolean
mm_modem_oma_setup_sync (MMModemOma *self,
                         MMOmaFeature features,
                         GCancellable *cancellable,
                         GError **error);

Synchronously sets up the OMA device management service.

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

Parameters

self

A MMModemOma.

 

features

Mask of MMOmaFeature values to enable.

 

cancellable

A GCancellable or NULL.

[allow-none]

error

Return location for error or NULL.

 

Returns

TRUE if the setup was successful, FALSE if error is set.

Since: 1.2


mm_modem_oma_start_client_initiated_session ()

void
mm_modem_oma_start_client_initiated_session
                               (MMModemOma *self,
                                MMOmaSessionType session_type,
                                GCancellable *cancellable,
                                GAsyncReadyCallback callback,
                                gpointer user_data);

Asynchronously starts a client-initiated OMA device management session.

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

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

Parameters

self

A MMModemOma.

 

session_type

A MMOmaSessionType.

 

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


mm_modem_oma_start_client_initiated_session_finish ()

gboolean
mm_modem_oma_start_client_initiated_session_finish
                               (MMModemOma *self,
                                GAsyncResult *res,
                                GError **error);

Finishes an operation started with mm_modem_oma_start_client_initiated_session().

Parameters

self

A MMModemOma.

 

res

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

 

error

Return location for error or NULL.

 

Returns

TRUE if the session was started, FALSE if error is set.

Since: 1.2


mm_modem_oma_start_client_initiated_session_sync ()

gboolean
mm_modem_oma_start_client_initiated_session_sync
                               (MMModemOma *self,
                                MMOmaSessionType session_type,
                                GCancellable *cancellable,
                                GError **error);

Synchronously starts a client-initiated OMA device management session.

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

Parameters

self

A MMModemOma.

 

session_type

A MMOmaSessionType.

 

cancellable

A GCancellable or NULL.

[allow-none]

error

Return location for error or NULL.

 

Returns

TRUE if the session was started, FALSE if error is set.

Since: 1.2


mm_modem_oma_accept_network_initiated_session ()

void
mm_modem_oma_accept_network_initiated_session
                               (MMModemOma *self,
                                guint session_id,
                                gboolean accept,
                                GCancellable *cancellable,
                                GAsyncReadyCallback callback,
                                gpointer user_data);

Asynchronously accepts a nework-initiated OMA device management session.

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

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

Parameters

self

A MMModemOma.

 

session_id

The unique ID of the network-initiated session.

 

accept

TRUE if the session is to be accepted, FALSE otherwise.

 

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


mm_modem_oma_accept_network_initiated_session_finish ()

gboolean
mm_modem_oma_accept_network_initiated_session_finish
                               (MMModemOma *self,
                                GAsyncResult *res,
                                GError **error);

Finishes an operation started with mm_modem_oma_accept_network_initiated_session().

Parameters

self

A MMModemOma.

 

res

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

 

error

Return location for error or NULL.

 

Returns

TRUE if the session was started, FALSE if error is set.

Since: 1.2


mm_modem_oma_accept_network_initiated_session_sync ()

gboolean
mm_modem_oma_accept_network_initiated_session_sync
                               (MMModemOma *self,
                                guint session_id,
                                gboolean accept,
                                GCancellable *cancellable,
                                GError **error);

Synchronously accepts a nework-initiated OMA device management session.

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

Parameters

self

A MMModemOma.

 

session_id

The unique ID of the network-initiated session.

 

accept

TRUE if the session is to be accepted, FALSE otherwise.

 

cancellable

A GCancellable or NULL.

[allow-none]

error

Return location for error or NULL.

 

Returns

TRUE if the session was started, FALSE if error is set.

Since: 1.2


mm_modem_oma_cancel_session ()

void
mm_modem_oma_cancel_session (MMModemOma *self,
                             GCancellable *cancellable,
                             GAsyncReadyCallback callback,
                             gpointer user_data);

Asynchronously cancels the current OMA device management session.

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

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

Parameters

self

A MMModemOma.

 

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


mm_modem_oma_cancel_session_finish ()

gboolean
mm_modem_oma_cancel_session_finish (MMModemOma *self,
                                    GAsyncResult *res,
                                    GError **error);

Finishes an operation started with mm_modem_oma_cancel_session().

Parameters

self

A MMModemOma.

 

res

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

 

error

Return location for error or NULL.

 

Returns

TRUE if the session was started, FALSE if error is set.

Since: 1.2


mm_modem_oma_cancel_session_sync ()

gboolean
mm_modem_oma_cancel_session_sync (MMModemOma *self,
                                  GCancellable *cancellable,
                                  GError **error);

Synchronously cancels the current OMA device management session.

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

Parameters

self

A MMModemOma.

 

cancellable

A GCancellable or NULL.

[allow-none]

error

Return location for error or NULL.

 

Returns

TRUE if the session was started, FALSE if error is set.

Since: 1.2


mm_modem_oma_get_features ()

MMOmaFeature
mm_modem_oma_get_features (MMModemOma *self);

Gets the currently enabled OMA features.

Parameters

self

A MMModemOma.

 

Returns

a bitmask of MMOmaFeature values.

Since: 1.2


mm_modem_oma_get_session_type ()

MMOmaSessionType
mm_modem_oma_get_session_type (MMModemOma *self);

Gets the type of the current OMA device management session.

Parameters

self

A MMModemOma.

 

Returns

a MMOmaSessionType.

Since: 1.2


mm_modem_oma_get_session_state ()

MMOmaSessionState
mm_modem_oma_get_session_state (MMModemOma *self);

Gets the state of the current OMA device management session.

Parameters

self

A MMModemOma.

 

Returns

a MMOmaSessionState.

Since: 1.2


mm_modem_peek_pending_network_initiated_sessions ()

gboolean
mm_modem_peek_pending_network_initiated_sessions
                               (MMModemOma *self,
                                const MMOmaPendingNetworkInitiatedSession **sessions,
                                guint *n_sessions);

Gets the list of pending network-initiated OMA sessions.

Parameters

self

A MMModem.

 

sessions

Return location for the array of MMOmaPendingNetworkInitiatedSession values. Do not free the returned array, it is owned by self .

[out][array length=n_sessions]

n_sessions

Return location for the number of values in sessions .

[out]

Returns

TRUE if sessions and n_sessions are set, FALSE otherwise.

Since: 1.2


mm_modem_get_pending_network_initiated_sessions ()

gboolean
mm_modem_get_pending_network_initiated_sessions
                               (MMModemOma *self,
                                MMOmaPendingNetworkInitiatedSession **sessions,
                                guint *n_sessions);

Gets the list of pending network-initiated OMA sessions.

Parameters

self

A MMModem.

 

sessions

Return location for the array of MMOmaPendingNetworkInitiatedSession structs. The returned array should be freed with g_free() when no longer needed.

[out][array length=n_sessions]

n_sessions

Return location for the number of values in sessions .

[out]

Returns

TRUE if sessions and n_sessions are set, FALSE otherwise.

Since: 1.2

Types and Values

struct MMModemOma

struct MMModemOma;

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


struct MMOmaPendingNetworkInitiatedSession

struct MMOmaPendingNetworkInitiatedSession {
    MMOmaSessionType session_type;
    guint session_id;
};

MMOmaPendingNetworkInitiatedSession is a simple struct specifying the information available for a pending network-initiated OMA session.

Members

MMOmaSessionType session_type;

A MMOmaSessionType.

 

guint session_id;

Unique ID of the network-initiated OMA session.

 

Since: 1.2