ModemManager.Sms

g GObject.GInterface GObject.GInterface Gio.AsyncInitable Gio.AsyncInitable GObject.GInterface->Gio.AsyncInitable Gio.DBusInterface Gio.DBusInterface GObject.GInterface->Gio.DBusInterface Gio.Initable Gio.Initable GObject.GInterface->Gio.Initable ModemManager.GdbusSms ModemManager.GdbusSms GObject.GInterface->ModemManager.GdbusSms GObject.Object GObject.Object Gio.DBusProxy Gio.DBusProxy GObject.Object->Gio.DBusProxy Gio.AsyncInitable->Gio.DBusProxy Gio.DBusInterface->Gio.DBusProxy ModemManager.GdbusSmsProxy ModemManager.GdbusSmsProxy Gio.DBusProxy->ModemManager.GdbusSmsProxy Gio.Initable->Gio.DBusProxy ModemManager.GdbusSms->ModemManager.GdbusSmsProxy ModemManager.Sms ModemManager.Sms ModemManager.GdbusSmsProxy->ModemManager.Sms

Subclasses:

None

Methods

Inherited:

ModemManager.GdbusSmsProxy (6), Gio.DBusProxy (25), GObject.Object (37), Gio.AsyncInitable (4), Gio.DBusInterface (3), Gio.Initable (2), ModemManager.GdbusSms (10)

Structs:

GObject.ObjectClass (5)

dup_data ()

dup_discharge_timestamp ()

dup_number ()

dup_path ()

dup_smsc ()

dup_text ()

dup_timestamp ()

get_class ()

get_data ()

get_delivery_report_request ()

get_delivery_state ()

get_discharge_timestamp ()

get_message_reference ()

get_number ()

get_path ()

get_pdu_type ()

get_service_category ()

get_smsc ()

get_state ()

get_storage ()

get_teleservice_id ()

get_text ()

get_timestamp ()

get_validity_relative ()

get_validity_type ()

send (cancellable, callback, *user_data)

send_finish (res)

send_sync (cancellable)

store (storage, cancellable, callback, *user_data)

store_finish (res)

store_sync (storage, cancellable)

Virtual Methods

Inherited:

Gio.DBusProxy (2), GObject.Object (7), Gio.AsyncInitable (2), Gio.DBusInterface (3), Gio.Initable (1), ModemManager.GdbusSms (2)

Properties

Inherited:

Gio.DBusProxy (9), ModemManager.GdbusSms (16)

Signals

Inherited:

Gio.DBusProxy (2), GObject.Object (1), ModemManager.GdbusSms (2)

Fields

Inherited:

Gio.DBusProxy (2), GObject.Object (1), ModemManager.GdbusSms (2)

Name

Type

Access

Description

parent

ModemManager.GdbusSmsProxy

r

unused

object

r

Class Details

class ModemManager.Sms(**kwargs)
Bases:

ModemManager.GdbusSmsProxy

Abstract:

No

Structure:

ModemManager.SmsClass

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

dup_data()
Returns:

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

Return type:

bytes

Gets the message data.

New in version 1.0.

dup_discharge_timestamp()
Returns:

The timestamp, or None if it couldn’t be retrieved. The returned value should be freed with GLib.free().

Return type:

str

Gets the time when the first PDU of the SMS message left the SMSC, in

ISO8601 format.

This field is only applicable if the PDU type is ModemManager.SmsPduType.STATUS_REPORT.

New in version 1.0.

dup_number()
Returns:

The number, or None if it couldn’t be retrieved. The returned value should be freed with GLib.free().

Return type:

str

Gets the number to which the message is addressed.

New in version 1.0.

dup_path()
Returns:

The DBus path of the ModemManager.Sms object. The returned value should be freed with GLib.free().

Return type:

str

Gets a copy of the DBus path of the ModemManager.Sms object.

New in version 1.0.

dup_smsc()
Returns:

The number of the SMSC, or None if it couldn’t be retrieved. The returned value should be freed with GLib.free().

Return type:

str

Gets the SMS service center number.

New in version 1.0.

dup_text()
Returns:

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

Return type:

str

Gets the message text, in UTF-8.

New in version 1.0.

dup_timestamp()
Returns:

The timestamp, or None if it couldn’t be retrieved. The returned value should be freed with GLib.free().

Return type:

str

Gets the time when the first PDU of the SMS message arrived the SMSC, in

ISO8601 format.

This field is only applicable if the PDU type is ModemManager.SmsPduType.DELIVER or ModemManager.SmsPduType.STATUS_REPORT.

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

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 this SMS.

New in version 1.0.

get_delivery_state()
Returns:

A ModemManager.SmsDeliveryState specifying the delivery state.

Return type:

int

Gets the delivery state of this SMS.

This field is only applicable if the PDU type is ModemManager.SmsPduType.STATUS_REPORT.

New in version 1.0.

get_discharge_timestamp()
Returns:

The timestamp, or None if it couldn’t be retrieved.

Return type:

str

Gets the time when the first PDU of the SMS message left the SMSC, in

ISO8601 format.

This field is only applicable if the PDU type is ModemManager.SmsPduType.STATUS_REPORT.

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 ModemManager.Sms.dup_discharge_timestamp() if on another thread.

New in version 1.0.

get_message_reference()
Returns:

The message reference.

Return type:

int

Gets the message reference of the last PDU sent/received within this SMS.

If the PDU type is ModemManager.SmsPduType.STATUS_REPORT, this field identifies the message reference of the PDU associated to the status report.

New in version 1.0.

get_number()
Returns:

The number, or None if it couldn’t be retrieved.

Return type:

str

Gets the number to which the message is addressed.

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 ModemManager.Sms.dup_number() if on another thread.

New in version 1.0.

get_path()
Returns:

The DBus path of the ModemManager.Sms object.

Return type:

str

Gets the DBus path of the ModemManager.Sms object.

New in version 1.0.

get_pdu_type()
Returns:

A ModemManager.SmsPduType specifying the PDU type.

Return type:

ModemManager.SmsPduType

Gets the PDU type on which this SMS is based.

New in version 1.0.

get_service_category()
Returns:

a ModemManager.SmsCdmaServiceCategory.

Return type:

ModemManager.SmsCdmaServiceCategory

Gets the 3GPP2 Service Category.

New in version 1.2.

get_smsc()
Returns:

The number of the SMSC, or None if it couldn’t be retrieved.

Return type:

str

Gets the SMS service center number.

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 ModemManager.Sms.dup_smsc() if on another thread.

New in version 1.0.

get_state()
Returns:

A ModemManager.SmsState specifying the state.

Return type:

ModemManager.SmsState

Gets the state of this SMS.

New in version 1.0.

get_storage()
Returns:

A ModemManager.SmsStorage specifying the storage.

Return type:

ModemManager.SmsStorage

Gets the storage in which this SMS is kept.

New in version 1.0.

get_teleservice_id()
Returns:

a ModemManager.SmsCdmaTeleserviceId.

Return type:

ModemManager.SmsCdmaTeleserviceId

Gets the 3GPP2 Teleservice ID.

New in version 1.2.

get_text()
Returns:

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

Return type:

str

Gets the message text, in UTF-8.

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 ModemManager.Sms.dup_text() if on another thread.

New in version 1.0.

get_timestamp()
Returns:

The timestamp, or None if it couldn’t be retrieved.

Return type:

str

Gets the time when the first PDU of the SMS message arrived the SMSC, in

ISO8601 format.

This field is only applicable if the PDU type is ModemManager.SmsPduType.DELIVER or ModemManager.SmsPduType.STATUS_REPORT.

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 ModemManager.Sms.dup_timestamp() if on another thread.

New in version 1.0.

get_validity_relative()
Returns:

the length of the validity period, or 0 if unknown.

Return type:

int

Gets the length of the validity period, in minutes.

Only applicable if the type of validity is ModemManager.SmsValidityType.RELATIVE.

New in version 1.0.

get_validity_type()
Returns:

the validity type or ModemManager.SmsValidityType.UNKNOWN.

Return type:

ModemManager.SmsValidityType

Gets the type of validity information in the SMS.

New in version 1.0.

send(cancellable, callback, *user_data)
Parameters:

Asynchronously requests to queue the message for delivery.

SMS objects can only be sent once.

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

See ModemManager.Sms.send_sync() for the synchronous, blocking version of this method.

New in version 1.0.

send_finish(res)
Parameters:

res (Gio.AsyncResult) – The Gio.AsyncResult obtained from the Gio.AsyncReadyCallback passed to ModemManager.Sms.send().

Raises:

GLib.Error

Returns:

True if the operation succeeded, False if error is set.

Return type:

bool

Finishes an operation started with ModemManager.Sms.send().

New in version 1.0.

send_sync(cancellable)
Parameters:

cancellable (Gio.Cancellable or None) – A Gio.Cancellable or None.

Raises:

GLib.Error

Returns:

True if the operation succeeded, False if error is set.

Return type:

bool

Synchronously requests to queue the message for delivery.

SMS objects can only be sent once.

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

New in version 1.0.

store(storage, cancellable, callback, *user_data)
Parameters:

Asynchronoulsy requests to store the message in the device if not already done.

SMS objects can only be stored once.

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

See ModemManager.Sms.store_sync() for the synchronous, blocking version of this method.

New in version 1.0.

store_finish(res)
Parameters:

res (Gio.AsyncResult) – The Gio.AsyncResult obtained from the Gio.AsyncReadyCallback passed to ModemManager.Sms.store().

Raises:

GLib.Error

Returns:

True if the operation succeeded, False if error is set.

Return type:

bool

Finishes an operation started with ModemManager.Sms.store().

New in version 1.0.

store_sync(storage, cancellable)
Parameters:
Raises:

GLib.Error

Returns:

True if the operation succeeded, False if error is set.

Return type:

bool

Synchronoulsy requests to store the message in the device if not already done.

SMS objects can only be stored once.

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

New in version 1.0.