ModemManager.Sms¶
| Subclasses: | None | 
|---|
Methods¶
| 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.Smsstructure contains private data and should only be accessed using the provided API.- 
dup_data()¶
- Returns: - The message data, or - Noneif 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 - Noneif 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 - Noneif 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.Smsobject. The returned value should be freed with- GLib.free().- Return type: - str- Gets a copy of the DBus path of the - ModemManager.Smsobject.- New in version 1.0. 
 - 
dup_smsc()¶
- Returns: - The number of the SMSC, or - Noneif 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 - Noneif 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 - Noneif 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.DELIVERor- 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 - Noneif 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: - Trueif delivery report is requested,- Falseotherwise.- Return type: - bool- Checks whether delivery report is requested for this SMS. - New in version 1.0. 
 - 
get_delivery_state()¶
- Returns: - A - ModemManager.SmsDeliveryStatespecifying 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 - Noneif 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 - Noneif 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.Smsobject.- Return type: - str- Gets the DBus path of the - ModemManager.Smsobject.- New in version 1.0. 
 - 
get_pdu_type()¶
- Returns: - A - ModemManager.SmsPduTypespecifying 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 - Noneif 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.SmsStatespecifying the state.- Return type: - ModemManager.SmsState- Gets the state of this SMS. - New in version 1.0. 
 - 
get_storage()¶
- Returns: - A - ModemManager.SmsStoragespecifying 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 - Noneif 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 - Noneif 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.DELIVERor- 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: - cancellable (Gio.CancellableorNone) – AGio.CancellableorNone.
- callback (Gio.AsyncReadyCallbackorNone) – AGio.AsyncReadyCallbackto call when the request is satisfied orNone.
- user_data (objectorNone) – User data to pass to callback.
 - 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 loopof 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. 
- cancellable (
 - 
send_finish(res)¶
- Parameters: - res ( - Gio.AsyncResult) – The- Gio.AsyncResultobtained from the- Gio.AsyncReadyCallbackpassed to- ModemManager.Sms.send().- Raises: - GLib.Error- Returns: - Trueif the operation succeeded,- Falseif 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.Cancellableor- None) – A- Gio.Cancellableor- None.- Raises: - GLib.Error- Returns: - Trueif the operation succeeded,- Falseif 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: - storage (ModemManager.SmsStorage) – AModemManager.SmsStoragespecifying where to store the SMS, orModemManager.SmsStorage.UNKNOWNto use the default.
- cancellable (Gio.CancellableorNone) – AGio.CancellableorNone.
- callback (Gio.AsyncReadyCallbackorNone) – AGio.AsyncReadyCallbackto call when the request is satisfied orNone.
- user_data (objectorNone) – User data to pass to callback.
 - 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 loopof 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. 
- storage (
 - 
store_finish(res)¶
- Parameters: - res ( - Gio.AsyncResult) – The- Gio.AsyncResultobtained from the- Gio.AsyncReadyCallbackpassed to- ModemManager.Sms.store().- Raises: - GLib.Error- Returns: - Trueif the operation succeeded,- Falseif error is set.- Return type: - bool- Finishes an operation started with - ModemManager.Sms.store().- New in version 1.0. 
 - 
store_sync(storage, cancellable)¶
- Parameters: - storage (ModemManager.SmsStorage) – AModemManager.SmsStoragespecifying where to store the SMS, orModemManager.SmsStorage.UNKNOWNto use the default.
- cancellable (Gio.CancellableorNone) – AGio.CancellableorNone.
 - 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. 
- storage (
 
-