MMModemMessaging

MMModemMessaging — The Messaging interface

Synopsis

struct              MMModemMessaging;

const gchar *       mm_modem_messaging_get_path         (MMModemMessaging *self);
gchar *             mm_modem_messaging_dup_path         (MMModemMessaging *self);
gboolean            mm_modem_messaging_peek_supported_storages
                                                        (MMModemMessaging *self,
                                                         const MMSmsStorage **storages,
                                                         guint *n_storages);
gboolean            mm_modem_messaging_get_supported_storages
                                                        (MMModemMessaging *self,
                                                         MMSmsStorage **storages,
                                                         guint *n_storages);
MMSmsStorage        mm_modem_messaging_get_default_storage
                                                        (MMModemMessaging *self);

void                mm_modem_messaging_create           (MMModemMessaging *self,
                                                         MMSmsProperties *properties,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);
MMSms *             mm_modem_messaging_create_finish    (MMModemMessaging *self,
                                                         GAsyncResult *res,
                                                         GError **error);
MMSms *             mm_modem_messaging_create_sync      (MMModemMessaging *self,
                                                         MMSmsProperties *properties,
                                                         GCancellable *cancellable,
                                                         GError **error);
void                mm_modem_messaging_delete           (MMModemMessaging *self,
                                                         const gchar *sms,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);
gboolean            mm_modem_messaging_delete_finish    (MMModemMessaging *self,
                                                         GAsyncResult *res,
                                                         GError **error);
gboolean            mm_modem_messaging_delete_sync      (MMModemMessaging *self,
                                                         const gchar *sms,
                                                         GCancellable *cancellable,
                                                         GError **error);
void                mm_modem_messaging_list             (MMModemMessaging *self,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);
GList *             mm_modem_messaging_list_finish      (MMModemMessaging *self,
                                                         GAsyncResult *res,
                                                         GError **error);
GList *             mm_modem_messaging_list_sync        (MMModemMessaging *self,
                                                         GCancellable *cancellable,
                                                         GError **error);

Object Hierarchy

  GObject
   +----GDBusProxy
         +----MmGdbusModemMessagingProxy
               +----MMModemMessaging

Implemented Interfaces

MMModemMessaging implements GDBusInterface, GInitable, GAsyncInitable and MmGdbusModemMessaging.

Description

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

The Messaging interface is exposed whenever a modem has messaging capabilities.

Details

struct MMModemMessaging

struct MMModemMessaging;

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


mm_modem_messaging_get_path ()

const gchar *       mm_modem_messaging_get_path         (MMModemMessaging *self);

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

self :

A MMModemMessaging.

Returns :

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

mm_modem_messaging_dup_path ()

gchar *             mm_modem_messaging_dup_path         (MMModemMessaging *self);

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

self :

A MMModemMessaging.

Returns :

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

mm_modem_messaging_peek_supported_storages ()

gboolean            mm_modem_messaging_peek_supported_storages
                                                        (MMModemMessaging *self,
                                                         const MMSmsStorage **storages,
                                                         guint *n_storages);

Gets the list of SMS storages supported by the MMModem.

self :

A MMModem.

storages :

Return location for the array of MMSmsStorage values. Do not free the returned array, it is owned by self. [out]

n_storages :

Return location for the number of values in storages. [out]

Returns :

TRUE if storages and n_storages are set, FALSE otherwise.

mm_modem_messaging_get_supported_storages ()

gboolean            mm_modem_messaging_get_supported_storages
                                                        (MMModemMessaging *self,
                                                         MMSmsStorage **storages,
                                                         guint *n_storages);

Gets the list of SMS storages supported by the MMModem.

self :

A MMModem.

storages :

Return location for the array of MMSmsStorage values. The returned array should be freed with g_free() when no longer needed. [out][array length=n_storages]

n_storages :

Return location for the number of values in storages. [out]

Returns :

TRUE if storages and n_storages are set, FALSE otherwise.

mm_modem_messaging_get_default_storage ()

MMSmsStorage        mm_modem_messaging_get_default_storage
                                                        (MMModemMessaging *self);

Gets the default SMS storage used when storing or receiving SMS messages.

self :

A MMModem.

Returns :

the default MMSmsStorage.

mm_modem_messaging_create ()

void                mm_modem_messaging_create           (MMModemMessaging *self,
                                                         MMSmsProperties *properties,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);


mm_modem_messaging_create_finish ()

MMSms *             mm_modem_messaging_create_finish    (MMModemMessaging *self,
                                                         GAsyncResult *res,
                                                         GError **error);

Finishes an operation started with mm_modem_messaging_create().

self :

A MMModemMessaging.

res :

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

error :

Return location for error or NULL.

Returns :

A newly created MMSms, or NULL if error is set. The returned value should be freed with g_object_unref(). [transfer full]

mm_modem_messaging_create_sync ()

MMSms *             mm_modem_messaging_create_sync      (MMModemMessaging *self,
                                                         MMSmsProperties *properties,
                                                         GCancellable *cancellable,
                                                         GError **error);


mm_modem_messaging_delete ()

void                mm_modem_messaging_delete           (MMModemMessaging *self,
                                                         const gchar *sms,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);

Asynchronously deletes a given MMSms from 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_messaging_delete_finish() to get the result of the operation.

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

self :

A MMModemMessaging.

sms :

Path of the MMSms to delete.

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_messaging_delete_finish ()

gboolean            mm_modem_messaging_delete_finish    (MMModemMessaging *self,
                                                         GAsyncResult *res,
                                                         GError **error);

Finishes an operation started with mm_modem_messaging_delete().

self :

A MMModemMessaging.

res :

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

error :

Return location for error or NULL.

Returns :

TRUE if the sms was deleted, FALSE if error is set.

mm_modem_messaging_delete_sync ()

gboolean            mm_modem_messaging_delete_sync      (MMModemMessaging *self,
                                                         const gchar *sms,
                                                         GCancellable *cancellable,
                                                         GError **error);

Synchronously deletes a given MMSms from the modem.

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

self :

A MMModemMessaging.

sms :

Path of the MMSms to delete.

cancellable :

A GCancellable or NULL. [allow-none]

error :

Return location for error or NULL.

Returns :

TRUE if the SMS was deleted, FALSE if error is set.

mm_modem_messaging_list ()

void                mm_modem_messaging_list             (MMModemMessaging *self,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);

Asynchronously lists the MMSms objects in 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_messaging_list_finish() to get the result of the operation.

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

self :

A MMModemMessaging.

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_messaging_list_finish ()

GList *             mm_modem_messaging_list_finish      (MMModemMessaging *self,
                                                         GAsyncResult *res,
                                                         GError **error);

Finishes an operation started with mm_modem_messaging_list().

self :

A MMModem.

res :

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

error :

Return location for error or NULL.

Returns :

A list of MMSms objects, or NULL if either not found or error is set. The returned value should be freed with g_list_free_full() using g_object_unref() as GDestroyNotify function. [element-type MM.Sms][transfer full]

mm_modem_messaging_list_sync ()

GList *             mm_modem_messaging_list_sync        (MMModemMessaging *self,
                                                         GCancellable *cancellable,
                                                         GError **error);

Synchronously lists the MMSms objects in the modem.

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

self :

A MMModemMessaging.

cancellable :

A GCancellable or NULL. [allow-none]

error :

Return location for error or NULL.

Returns :

A list of MMSms objects, or NULL if either not found or error is set. The returned value should be freed with g_list_free_full() using g_object_unref() as GDestroyNotify function. [element-type MM.Sms][transfer full]