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:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
Properties¶
- Inherited:
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 |
r |
||
unused |
r |
Class Details¶
- class ModemManager.Sms(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
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 withGLib.free
().- Return type:
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 withGLib.free
().- Return type:
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 withGLib.free
().- Return type:
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 withGLib.free
().- Return type:
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 withGLib.free
().- Return type:
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 withGLib.free
().- Return type:
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 withGLib.free
().- Return type:
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
orModemManager.SmsPduType.STATUS_REPORT
.New in version 1.0.
- get_class()¶
- Returns:
the message class, or -1 for invalid/unset class.
- Return type:
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:
Gets the message data.
New in version 1.0.
- get_delivery_report_request()¶
-
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:
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()¶
-
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:
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()¶
-
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:
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:
Gets the PDU type on which this SMS is based.
New in version 1.0.
- get_service_category()¶
- Returns:
- Return type:
Gets the 3GPP2 Service Category.
New in version 1.2.
- get_smsc()¶
-
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:
Gets the state of this SMS.
New in version 1.0.
- get_storage()¶
- Returns:
A
ModemManager.SmsStorage
specifying the storage.- Return type:
Gets the storage in which this SMS is kept.
New in version 1.0.
- get_teleservice_id()¶
- Returns:
- Return type:
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:
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()¶
-
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
orModemManager.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:
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:
Gets the type of validity information in the SMS.
New in version 1.0.
- send(cancellable, callback, *user_data)¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – AGio.Cancellable
orNone
.callback (
Gio.AsyncReadyCallback
orNone
) – AGio.AsyncReadyCallback
to call when the request is satisfied orNone
.
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 callModemManager.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
) – TheGio.AsyncResult
obtained from theGio.AsyncReadyCallback
passed toModemManager.Sms.send
().- Raises:
- Returns:
- Return type:
Finishes an operation started with
ModemManager.Sms.send
().New in version 1.0.
- send_sync(cancellable)¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – AGio.Cancellable
orNone
.- Raises:
- Returns:
- Return type:
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:
storage (
ModemManager.SmsStorage
) – AModemManager.SmsStorage
specifying where to store the SMS, orModemManager.SmsStorage.UNKNOWN
to use the default.cancellable (
Gio.Cancellable
orNone
) – AGio.Cancellable
orNone
.callback (
Gio.AsyncReadyCallback
orNone
) – AGio.AsyncReadyCallback
to call when the request is satisfied orNone
.
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 callModemManager.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
) – TheGio.AsyncResult
obtained from theGio.AsyncReadyCallback
passed toModemManager.Sms.store
().- Raises:
- Returns:
- Return type:
Finishes an operation started with
ModemManager.Sms.store
().New in version 1.0.
- store_sync(storage, cancellable)¶
- Parameters:
storage (
ModemManager.SmsStorage
) – AModemManager.SmsStorage
specifying where to store the SMS, orModemManager.SmsStorage.UNKNOWN
to use the default.cancellable (
Gio.Cancellable
orNone
) – AGio.Cancellable
orNone
.
- Raises:
- Returns:
- Return type:
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.