MMSmsProperties

MMSmsProperties — Helper object to handle SMS properties.

Synopsis

struct              MMSmsProperties;

MMSmsProperties *   mm_sms_properties_new               (void);

const gchar *       mm_sms_properties_get_text          (MMSmsProperties *self);
void                mm_sms_properties_set_text          (MMSmsProperties *self,
                                                         const gchar *text);
const guint8 *      mm_sms_properties_get_data          (MMSmsProperties *self,
                                                         gsize *data_len);
void                mm_sms_properties_set_data          (MMSmsProperties *self,
                                                         const guint8 *data,
                                                         gsize data_length);
GByteArray *        mm_sms_properties_peek_data_bytearray
                                                        (MMSmsProperties *self);
GByteArray *        mm_sms_properties_get_data_bytearray
                                                        (MMSmsProperties *self);
void                mm_sms_properties_set_data_bytearray
                                                        (MMSmsProperties *self,
                                                         GByteArray *data);
const gchar *       mm_sms_properties_get_number        (MMSmsProperties *self);
void                mm_sms_properties_set_number        (MMSmsProperties *self,
                                                         const gchar *number);
const gchar *       mm_sms_properties_get_smsc          (MMSmsProperties *self);
void                mm_sms_properties_set_smsc          (MMSmsProperties *self,
                                                         const gchar *smsc);
MMSmsValidityType   mm_sms_properties_get_validity_type (MMSmsProperties *self);
guint               mm_sms_properties_get_validity_relative
                                                        (MMSmsProperties *self);
void                mm_sms_properties_set_validity_relative
                                                        (MMSmsProperties *self,
                                                         guint validity);
gint                mm_sms_properties_get_class         (MMSmsProperties *self);
void                mm_sms_properties_set_class         (MMSmsProperties *self,
                                                         gint class);
gboolean            mm_sms_properties_get_delivery_report_request
                                                        (MMSmsProperties *self);
void                mm_sms_properties_set_delivery_report_request
                                                        (MMSmsProperties *self,
                                                         gboolean request);
MMSmsCdmaTeleserviceId mm_sms_properties_get_teleservice_id
                                                        (MMSmsProperties *self);
void                mm_sms_properties_set_teleservice_id
                                                        (MMSmsProperties *self,
                                                         MMSmsCdmaTeleserviceId teleservice_id);
MMSmsCdmaServiceCategory mm_sms_properties_get_service_category
                                                        (MMSmsProperties *self);
void                mm_sms_properties_set_service_category
                                                        (MMSmsProperties *self,
                                                         MMSmsCdmaServiceCategory service_category);

Object Hierarchy

  GObject
   +----MMSmsProperties

Description

The MMSmsProperties is an object handling the properties to be set in newly created SMS objects.

This object is created by the user and passed to ModemManager with either mm_modem_messaging_create() or mm_modem_messaging_create_sync().

Details

struct MMSmsProperties

struct MMSmsProperties;

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


mm_sms_properties_new ()

MMSmsProperties *   mm_sms_properties_new               (void);

Creates a new empty MMSmsProperties.

Returns :

a MMSmsProperties. The returned value should be freed with g_object_unref(). [transfer full]

mm_sms_properties_get_text ()

const gchar *       mm_sms_properties_get_text          (MMSmsProperties *self);

Gets the message text, in UTF-8.

self :

A MMSmsProperties.

Returns :

The message text, or NULL if it doesn't contain any (e.g. contains data instead). Do not free the returned value, it is owned by self. [transfer none]

mm_sms_properties_set_text ()

void                mm_sms_properties_set_text          (MMSmsProperties *self,
                                                         const gchar *text);

Sets the message text.

self :

A MMSmsProperties.

text :

The text to set, in UTF-8.

mm_sms_properties_get_data ()

const guint8 *      mm_sms_properties_get_data          (MMSmsProperties *self,
                                                         gsize *data_len);

Gets the message data.

self :

A MMSmsProperties.

data_len :

Size of the output data, if any given. [out]

Returns :

The message data, or NULL if it doesn't contain any (e.g. contains text instead). [transfer none]

mm_sms_properties_set_data ()

void                mm_sms_properties_set_data          (MMSmsProperties *self,
                                                         const guint8 *data,
                                                         gsize data_length);

Sets the message data.

self :

A MMSmsProperties.

data :

The data to set.

data_length :

Length of data.

mm_sms_properties_peek_data_bytearray ()

GByteArray *        mm_sms_properties_peek_data_bytearray
                                                        (MMSmsProperties *self);

Gets the message data.

self :

A MMSmsProperties.

Returns :

A GByteArray with the message data, or NULL if it doesn't contain any (e.g. contains text instead). Do not free the returned value, it is owned by self. [transfer none]

mm_sms_properties_get_data_bytearray ()

GByteArray *        mm_sms_properties_get_data_bytearray
                                                        (MMSmsProperties *self);

Gets the message data.

self :

A MMSmsProperties.

Returns :

A GByteArray with the message data, or NULL if it doesn't contain any (e.g. contains text instead). The returned value should be freed with g_byte_array_unref(). [transfer full]

mm_sms_properties_set_data_bytearray ()

void                mm_sms_properties_set_data_bytearray
                                                        (MMSmsProperties *self,
                                                         GByteArray *data);

Sets the message data.

self :

A MMSmsProperties.

data :

A GByteArray with the data to set. This method takes a new reference of data.

mm_sms_properties_get_number ()

const gchar *       mm_sms_properties_get_number        (MMSmsProperties *self);

Gets the number to which the message is addressed.

self :

A MMSmsProperties.

Returns :

The number, or NULL if it couldn't be retrieved. Do not free the returned value, it is owned by self. [transfer none]

mm_sms_properties_set_number ()

void                mm_sms_properties_set_number        (MMSmsProperties *self,
                                                         const gchar *number);

Sets the number to which the message is addressed.

self :

A MMSmsProperties.

number :

The number.

mm_sms_properties_get_smsc ()

const gchar *       mm_sms_properties_get_smsc          (MMSmsProperties *self);

Gets the SMS service center number.

self :

A MMSmsProperties.

Returns :

The number of the SMSC, or NULL if it couldn't be retrieved. Do not free the returned value, it is owned by self. [transfer none]

mm_sms_properties_set_smsc ()

void                mm_sms_properties_set_smsc          (MMSmsProperties *self,
                                                         const gchar *smsc);

Sets the SMS service center number.

self :

A MMSmsProperties.

smsc :

The SMSC number.

mm_sms_properties_get_validity_type ()

MMSmsValidityType   mm_sms_properties_get_validity_type (MMSmsProperties *self);

Gets the relative validity type the SMS.

self :

A MMSmsProperties.

Returns :

a MMSmsValidityType.

mm_sms_properties_get_validity_relative ()

guint               mm_sms_properties_get_validity_relative
                                                        (MMSmsProperties *self);

Gets the relative validity time of the SMS.

self :

A MMSmsProperties.

Returns :

the validity time or 0 if unknown.

mm_sms_properties_set_validity_relative ()

void                mm_sms_properties_set_validity_relative
                                                        (MMSmsProperties *self,
                                                         guint validity);

Sets the relative validity time of the SMS.

self :

A MMSmsProperties.

validity :

The validity of MM_SMS_VALIDITY_TYPE_RELATIVE type.

mm_sms_properties_get_class ()

gint                mm_sms_properties_get_class         (MMSmsProperties *self);

Gets the 3GPP message class of the SMS.

self :

A MMSmsProperties.

Returns :

the message class, or -1 for invalid/unset class.

mm_sms_properties_set_class ()

void                mm_sms_properties_set_class         (MMSmsProperties *self,
                                                         gint class);

Sets the 3GPP message class of the SMS.

self :

A MMSmsProperties.

class :

The message class (0..3), or -1 for invalid/unset class.

mm_sms_properties_get_delivery_report_request ()

gboolean            mm_sms_properties_get_delivery_report_request
                                                        (MMSmsProperties *self);

Checks whether delivery report is requested for the SMS.

self :

A MMSmsProperties.

Returns :

TRUE if delivery report is requested, FALSE otherwise.

mm_sms_properties_set_delivery_report_request ()

void                mm_sms_properties_set_delivery_report_request
                                                        (MMSmsProperties *self,
                                                         gboolean request);

Sets whether delivery report is requested for the SMS.

self :

A MMSmsProperties.

request :

TRUE if delivery report is requested, FALSE otherwise.

mm_sms_properties_get_teleservice_id ()

MMSmsCdmaTeleserviceId mm_sms_properties_get_teleservice_id
                                                        (MMSmsProperties *self);

Gets the CDMA teleservice ID of the SMS.

self :

A MMSmsProperties.

Returns :

the CDMA teleservice ID.

mm_sms_properties_set_teleservice_id ()

void                mm_sms_properties_set_teleservice_id
                                                        (MMSmsProperties *self,
                                                         MMSmsCdmaTeleserviceId teleservice_id);

Sets the CDMA teleservice ID of the SMS.

self :

A MMSmsProperties.

teleservice_id :

The CDMA teleservice ID.

mm_sms_properties_get_service_category ()

MMSmsCdmaServiceCategory mm_sms_properties_get_service_category
                                                        (MMSmsProperties *self);

Gets the CDMA message service category of the SMS.

self :

A MMSmsProperties.

Returns :

the CDMA service category.

mm_sms_properties_set_service_category ()

void                mm_sms_properties_set_service_category
                                                        (MMSmsProperties *self,
                                                         MMSmsCdmaServiceCategory service_category);

Sets the CDMA service category of the SMS.

self :

A MMSmsProperties.

service_category :

The CDMA service category.