MMSmsProperties

MMSmsProperties — Helper object to handle SMS properties.

Functions

Types and Values

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

Functions

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]

Since: 1.0


mm_sms_properties_get_text ()

const gchar *
mm_sms_properties_get_text (MMSmsProperties *self);

Gets the message text, in UTF-8.

Parameters

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]

Since: 1.0


mm_sms_properties_set_text ()

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

Sets the message text.

Parameters

self

A MMSmsProperties.

 

text

The text to set, in UTF-8.

 

Since: 1.0


mm_sms_properties_get_data ()

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

Gets the message data.

Parameters

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]

Since: 1.0


mm_sms_properties_set_data ()

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

Sets the message data.

Parameters

self

A MMSmsProperties.

 

data

The data to set.

 

data_length

Length of data .

 

Since: 1.0


mm_sms_properties_peek_data_bytearray ()

GByteArray *
mm_sms_properties_peek_data_bytearray (MMSmsProperties *self);

Gets the message data.

Parameters

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]

Since: 1.0


mm_sms_properties_get_data_bytearray ()

GByteArray *
mm_sms_properties_get_data_bytearray (MMSmsProperties *self);

Gets the message data.

Parameters

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]

Since: 1.0


mm_sms_properties_set_data_bytearray ()

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

Sets the message data.

Parameters

self

A MMSmsProperties.

 

data

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

 

Since: 1.0


mm_sms_properties_get_number ()

const gchar *
mm_sms_properties_get_number (MMSmsProperties *self);

Gets the number to which the message is addressed.

Parameters

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]

Since: 1.0


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.

Parameters

self

A MMSmsProperties.

 

number

The number.

 

Since: 1.0


mm_sms_properties_get_smsc ()

const gchar *
mm_sms_properties_get_smsc (MMSmsProperties *self);

Gets the SMS service center number.

Parameters

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]

Since: 1.0


mm_sms_properties_set_smsc ()

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

Sets the SMS service center number.

Parameters

self

A MMSmsProperties.

 

smsc

The SMSC number.

 

Since: 1.0


mm_sms_properties_get_validity_type ()

MMSmsValidityType
mm_sms_properties_get_validity_type (MMSmsProperties *self);

Gets the relative validity type the SMS.

Parameters

self

A MMSmsProperties.

 

Returns

a MMSmsValidityType.

Since: 1.0


mm_sms_properties_get_validity_relative ()

guint
mm_sms_properties_get_validity_relative
                               (MMSmsProperties *self);

Gets the relative validity time of the SMS.

Parameters

self

A MMSmsProperties.

 

Returns

the validity time or 0 if unknown.

Since: 1.0


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.

Parameters

self

A MMSmsProperties.

 

validity

The validity of MM_SMS_VALIDITY_TYPE_RELATIVE type.

 

Since: 1.0


mm_sms_properties_get_class ()

gint
mm_sms_properties_get_class (MMSmsProperties *self);

Gets the 3GPP message class of the SMS.

Parameters

self

A MMSmsProperties.

 

Returns

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

Since: 1.0


mm_sms_properties_set_class ()

void
mm_sms_properties_set_class (MMSmsProperties *self,
                             gint message_class);

Sets the 3GPP message class of the SMS.

Parameters

self

A MMSmsProperties.

 

message_class

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

 

Since: 1.0


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.

Parameters

self

A MMSmsProperties.

 

Returns

TRUE if delivery report is requested, FALSE otherwise.

Since: 1.0


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.

Parameters

self

A MMSmsProperties.

 

request

TRUE if delivery report is requested, FALSE otherwise.

 

Since: 1.0


mm_sms_properties_get_teleservice_id ()

MMSmsCdmaTeleserviceId
mm_sms_properties_get_teleservice_id (MMSmsProperties *self);

Gets the CDMA teleservice ID of the SMS.

Parameters

self

A MMSmsProperties.

 

Returns

the CDMA teleservice ID.

Since: 1.2


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.

Parameters

self

A MMSmsProperties.

 

teleservice_id

The CDMA teleservice ID.

 

Since: 1.2


mm_sms_properties_get_service_category ()

MMSmsCdmaServiceCategory
mm_sms_properties_get_service_category
                               (MMSmsProperties *self);

Gets the CDMA message service category of the SMS.

Parameters

self

A MMSmsProperties.

 

Returns

the CDMA service category.

Since: 1.2


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.

Parameters

self

A MMSmsProperties.

 

service_category

The CDMA service category.

 

Since: 1.2

Types and Values

struct MMSmsProperties

struct MMSmsProperties;

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