MMModem3gppUssd

MMModem3gppUssd — The 3GPP USSD interface

Synopsis

struct              MMModem3gppUssd;

const gchar *       mm_modem_3gpp_ussd_get_path         (MMModem3gppUssd *self);
gchar *             mm_modem_3gpp_ussd_dup_path         (MMModem3gppUssd *self);
MMModem3gppUssdSessionState mm_modem_3gpp_ussd_get_state
                                                        (MMModem3gppUssd *self);
const gchar *       mm_modem_3gpp_ussd_get_network_request
                                                        (MMModem3gppUssd *self);
gchar *             mm_modem_3gpp_ussd_dup_network_request
                                                        (MMModem3gppUssd *self);
const gchar *       mm_modem_3gpp_ussd_get_network_notification
                                                        (MMModem3gppUssd *self);
gchar *             mm_modem_3gpp_ussd_dup_network_notification
                                                        (MMModem3gppUssd *self);

void                mm_modem_3gpp_ussd_initiate         (MMModem3gppUssd *self,
                                                         const gchar *command,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);
gchar *             mm_modem_3gpp_ussd_initiate_finish  (MMModem3gppUssd *self,
                                                         GAsyncResult *res,
                                                         GError **error);
gchar *             mm_modem_3gpp_ussd_initiate_sync    (MMModem3gppUssd *self,
                                                         const gchar *command,
                                                         GCancellable *cancellable,
                                                         GError **error);
void                mm_modem_3gpp_ussd_respond          (MMModem3gppUssd *self,
                                                         const gchar *response,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);
gchar *             mm_modem_3gpp_ussd_respond_finish   (MMModem3gppUssd *self,
                                                         GAsyncResult *res,
                                                         GError **error);
gchar *             mm_modem_3gpp_ussd_respond_sync     (MMModem3gppUssd *self,
                                                         const gchar *response,
                                                         GCancellable *cancellable,
                                                         GError **error);
void                mm_modem_3gpp_ussd_cancel           (MMModem3gppUssd *self,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);
gboolean            mm_modem_3gpp_ussd_cancel_finish    (MMModem3gppUssd *self,
                                                         GAsyncResult *res,
                                                         GError **error);
gboolean            mm_modem_3gpp_ussd_cancel_sync      (MMModem3gppUssd *self,
                                                         GCancellable *cancellable,
                                                         GError **error);

Object Hierarchy

  GObject
   +----GDBusProxy
         +----MmGdbusModem3gppUssdProxy
               +----MMModem3gppUssd

Implemented Interfaces

MMModem3gppUssd implements GDBusInterface, GInitable, GAsyncInitable and MmGdbusModem3gppUssd.

Description

The MMModem3gppUssd is an object providing access to the methods, signals and properties of the 3GPP USSD interface.

This interface is only exposed when the 3GPP modem is known to handle USSD operations.

Details

struct MMModem3gppUssd

struct MMModem3gppUssd;

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


mm_modem_3gpp_ussd_get_path ()

const gchar *       mm_modem_3gpp_ussd_get_path         (MMModem3gppUssd *self);

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

self :

A MMModem3gppUssd.

Returns :

The DBus path of the MMObject object. [transfer none]

mm_modem_3gpp_ussd_dup_path ()

gchar *             mm_modem_3gpp_ussd_dup_path         (MMModem3gppUssd *self);

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

self :

A MMModem3gppUssd.

Returns :

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

mm_modem_3gpp_ussd_get_state ()

MMModem3gppUssdSessionState mm_modem_3gpp_ussd_get_state
                                                        (MMModem3gppUssd *self);

Get the state of the ongoing USSD session, if any.

self :

A MMModem.

Returns :

A MMModem3gppUssdSessionState value, specifying the current state.

mm_modem_3gpp_ussd_get_network_request ()

const gchar *       mm_modem_3gpp_ussd_get_network_request
                                                        (MMModem3gppUssd *self);

Gets any pending network-initiated request.

Warning

The returned value is only valid until the property changes so it is only safe to use this function on the thread where self was constructed. Use mm_modem_3gpp_ussd_dup_network_request() if on another thread.

self :

A MMModem3gppUssd.

Returns :

The network request, or NULL if none available. [transfer none]

mm_modem_3gpp_ussd_dup_network_request ()

gchar *             mm_modem_3gpp_ussd_dup_network_request
                                                        (MMModem3gppUssd *self);

Gets a copy of any pending network-initiated request.

self :

A MMModem3gppUssd.

Returns :

The network request, or NULL if none available. The returned value should be freed with g_free(). [transfer full]

mm_modem_3gpp_ussd_get_network_notification ()

const gchar *       mm_modem_3gpp_ussd_get_network_notification
                                                        (MMModem3gppUssd *self);

Gets any pending network-initiated request to which no USSD response is required.

Warning

The returned value is only valid until the property changes so it is only safe to use this function on the thread where self was constructed. Use mm_modem_3gpp_ussd_dup_network_notification() if on another thread.

self :

A MMModem3gppUssd.

Returns :

The network notification, or NULL if none available. [transfer none]

mm_modem_3gpp_ussd_dup_network_notification ()

gchar *             mm_modem_3gpp_ussd_dup_network_notification
                                                        (MMModem3gppUssd *self);

Gets a copy of any pending network-initiated request to which no USSD response is required.

self :

A MMModem3gppUssd.

Returns :

The network notification, or NULL if none available. The returned value should be freed with g_free(). [transfer full]

mm_modem_3gpp_ussd_initiate ()

void                mm_modem_3gpp_ussd_initiate         (MMModem3gppUssd *self,
                                                         const gchar *command,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);

Asynchronously sends a USSD command string to the network initiating a USSD session.

When the request is handled by the network, the method returns the response or an appropriate error. The network may be awaiting further response from the ME after returning from this method and no new command.

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

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

self :

A MMModem3gppUssd.

command :

The command to start the USSD session with.

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.

mm_modem_3gpp_ussd_initiate_finish ()

gchar *             mm_modem_3gpp_ussd_initiate_finish  (MMModem3gppUssd *self,
                                                         GAsyncResult *res,
                                                         GError **error);

Finishes an operation started with mm_modem_3gpp_ussd_initiate().

self :

A MMModem3gppUssd.

res :

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

error :

Return location for error or NULL.

Returns :

The response from the network, if any. The returned value should be freed with g_free().

mm_modem_3gpp_ussd_initiate_sync ()

gchar *             mm_modem_3gpp_ussd_initiate_sync    (MMModem3gppUssd *self,
                                                         const gchar *command,
                                                         GCancellable *cancellable,
                                                         GError **error);

Synchronously sends a USSD command string to the network initiating a USSD session.

When the request is handled by the network, the method returns the response or an appropriate error. The network may be awaiting further response from the ME after returning from this method and no new command.

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

self :

A MMModem3gppUssd.

command :

The command to start the USSD session with.

cancellable :

A GCancellable or NULL. [allow-none]

error :

Return location for error or NULL.

Returns :

The response from the network, if any. The returned value should be freed with g_free().

mm_modem_3gpp_ussd_respond ()

void                mm_modem_3gpp_ussd_respond          (MMModem3gppUssd *self,
                                                         const gchar *response,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);

Asynchronously responds to a USSD request that is either initiated by the mobile network, or that is awaiting further input after a previous call to mm_modem_3gpp_ussd_initiate().

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

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

self :

A MMModem3gppUssd.

response :

The response to network-initiated USSD command, or a response to a request for further input.

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.

mm_modem_3gpp_ussd_respond_finish ()

gchar *             mm_modem_3gpp_ussd_respond_finish   (MMModem3gppUssd *self,
                                                         GAsyncResult *res,
                                                         GError **error);

Finishes an operation started with mm_modem_3gpp_ussd_respond().

self :

A MMModem3gppUssd.

res :

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

error :

Return location for error or NULL.

Returns :

The network reply to this response to the network-initiated USSD command. The reply may require further responses. The returned value should be freed with g_free().

mm_modem_3gpp_ussd_respond_sync ()

gchar *             mm_modem_3gpp_ussd_respond_sync     (MMModem3gppUssd *self,
                                                         const gchar *response,
                                                         GCancellable *cancellable,
                                                         GError **error);

Synchronously responds to a USSD request that is either initiated by the mobile network, or that is awaiting further input after a previous call to mm_modem_3gpp_ussd_initiate().

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

self :

A MMModem3gppUssd.

response :

The response to network-initiated USSD command, or a response to a request for further input.

cancellable :

A GCancellable or NULL. [allow-none]

error :

Return location for error or NULL.

Returns :

The network reply to this response to the network-initiated USSD command. The reply may require further responses. The returned value should be freed with g_free().

mm_modem_3gpp_ussd_cancel ()

void                mm_modem_3gpp_ussd_cancel           (MMModem3gppUssd *self,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);

Asynchronously cancels an ongoing USSD session, either mobile or network initiated.

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

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

self :

A MMModem3gppUssd.

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.

mm_modem_3gpp_ussd_cancel_finish ()

gboolean            mm_modem_3gpp_ussd_cancel_finish    (MMModem3gppUssd *self,
                                                         GAsyncResult *res,
                                                         GError **error);

Finishes an operation started with mm_modem_3gpp_ussd_cancel().

self :

A MMModem3gppUssd.

res :

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

error :

Return location for error or NULL.

Returns :

TRUE if the session was successfully cancelled, FALSE if error is set.

mm_modem_3gpp_ussd_cancel_sync ()

gboolean            mm_modem_3gpp_ussd_cancel_sync      (MMModem3gppUssd *self,
                                                         GCancellable *cancellable,
                                                         GError **error);

Synchronously cancels an ongoing USSD session, either mobile or network initiated.

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

self :

A MMModem3gppUssd.

cancellable :

A GCancellable or NULL. [allow-none]

error :

Return location for error or NULL.

Returns :

TRUE if the session was successfully cancelled, FALSE if error is set.