ModemManager.SmsProperties

g GObject.Object GObject.Object ModemManager.SmsProperties ModemManager.SmsProperties GObject.Object->ModemManager.SmsProperties

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new ()

get_class ()

get_data ()

get_data_bytearray ()

get_delivery_report_request ()

get_number ()

get_service_category ()

get_smsc ()

get_teleservice_id ()

get_text ()

get_validity_relative ()

get_validity_type ()

peek_data_bytearray ()

set_class (message_class)

set_data (data, data_length)

set_data_bytearray (data)

set_delivery_report_request (request)

set_number (number)

set_service_category (service_category)

set_smsc (smsc)

set_teleservice_id (teleservice_id)

set_text (text)

set_validity_relative (validity)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

None

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent

GObject.Object

r

Class Details

class ModemManager.SmsProperties(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

ModemManager.SmsPropertiesClass

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

classmethod new()
Returns:

a ModemManager.SmsProperties. The returned value should be freed with GObject.Object.unref().

Return type:

ModemManager.SmsProperties

Creates a new empty ModemManager.SmsProperties.

New in version 1.0.

get_class()
Returns:

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

Return type:

int

Gets the 3GPP message class of the SMS.

New in version 1.0.

get_data()
Returns:

The message data, or None if it doesn’t contain any (e.g. contains text instead).

data_len:

Size of the output data, if any given.

Return type:

(int, data_len: int)

Gets the message data.

New in version 1.0.

get_data_bytearray()
Returns:

A GLib.ByteArray with the message data, or None if it doesn’t contain any (e.g. contains text instead). The returned value should be freed with GLib.ByteArray.unref().

Return type:

bytes

Gets the message data.

New in version 1.0.

get_delivery_report_request()
Returns:

True if delivery report is requested, False otherwise.

Return type:

bool

Checks whether delivery report is requested for the SMS.

New in version 1.0.

get_number()
Returns:

The number, or None if it couldn’t be retrieved. Do not free the returned value, it is owned by self.

Return type:

str

Gets the number to which the message is addressed.

New in version 1.0.

get_service_category()
Returns:

the CDMA service category.

Return type:

ModemManager.SmsCdmaServiceCategory

Gets the CDMA message service category of the SMS.

New in version 1.2.

get_smsc()
Returns:

The number of the SMSC, or None if it couldn’t be retrieved. Do not free the returned value, it is owned by self.

Return type:

str

Gets the SMS service center number.

New in version 1.0.

get_teleservice_id()
Returns:

the CDMA teleservice ID.

Return type:

ModemManager.SmsCdmaTeleserviceId

Gets the CDMA teleservice ID of the SMS.

New in version 1.2.

get_text()
Returns:

The message text, or None if it doesn’t contain any (e.g. contains data instead). Do not free the returned value, it is owned by self.

Return type:

str

Gets the message text, in UTF-8.

New in version 1.0.

get_validity_relative()
Returns:

the validity time or 0 if unknown.

Return type:

int

Gets the relative validity time of the SMS.

New in version 1.0.

get_validity_type()
Returns:

a ModemManager.SmsValidityType.

Return type:

ModemManager.SmsValidityType

Gets the relative validity type the SMS.

New in version 1.0.

peek_data_bytearray()
Returns:

A GLib.ByteArray with the message data, or None if it doesn’t contain any (e.g. contains text instead). Do not free the returned value, it is owned by self.

Return type:

bytes

Gets the message data.

New in version 1.0.

set_class(message_class)
Parameters:

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

Sets the 3GPP message class of the SMS.

New in version 1.0.

set_data(data, data_length)
Parameters:
  • data (int) – The data to set.

  • data_length (int) – Length of data.

Sets the message data.

New in version 1.0.

set_data_bytearray(data)
Parameters:

data (bytes) – A GLib.ByteArray with the data to set. This method takes a new reference of data.

Sets the message data.

New in version 1.0.

set_delivery_report_request(request)
Parameters:

request (bool) – True if delivery report is requested, False otherwise.

Sets whether delivery report is requested for the SMS.

New in version 1.0.

set_number(number)
Parameters:

number (str) – The number.

Sets the number to which the message is addressed.

New in version 1.0.

set_service_category(service_category)
Parameters:

service_category (ModemManager.SmsCdmaServiceCategory) – The CDMA service category.

Sets the CDMA service category of the SMS.

New in version 1.2.

set_smsc(smsc)
Parameters:

smsc (str) – The SMSC number.

Sets the SMS service center number.

New in version 1.0.

set_teleservice_id(teleservice_id)
Parameters:

teleservice_id (ModemManager.SmsCdmaTeleserviceId) – The CDMA teleservice ID.

Sets the CDMA teleservice ID of the SMS.

New in version 1.2.

set_text(text)
Parameters:

text (str) – The text to set, in UTF-8.

Sets the message text.

New in version 1.0.

set_validity_relative(validity)
Parameters:

validity (int) – The validity of ModemManager.SmsValidityType.RELATIVE type.

Sets the relative validity time of the SMS.

New in version 1.0.