Top |
The MMSms is an object providing access to the methods, signals and properties of the SMS interface.
When the SMS is exposed and available in the bus, it is ensured that at least this interface is also available.
const gchar *
mm_sms_get_path (MMSms *self
);
Gets the DBus path of the MMSms object.
gchar *
mm_sms_dup_path (MMSms *self
);
Gets a copy of the DBus path of the MMSms object.
MMSmsPduType
mm_sms_get_pdu_type (MMSms *self
);
Gets the PDU type on which this SMS is based.
MMSmsStorage
mm_sms_get_storage (MMSms *self
);
Gets the storage in which this SMS is kept.
const gchar *
mm_sms_get_text (MMSms *self
);
Gets the message text, in UTF-8.
self
was constructed. Use mm_sms_dup_text()
if on another
thread.The message text, or NULL
if it doesn't contain any (e.g. contains data instead).
[transfer none]
const guint8 * mm_sms_get_data (MMSms *self
,gsize *data_len
);
Gets the message data.
The message data, or NULL
if it doesn't contain any (e.g. contains text instead).
[transfer none][array length=data_len][element-type guint8]
const gchar *
mm_sms_get_number (MMSms *self
);
Gets the number to which the message is addressed.
self
was constructed. Use mm_sms_dup_number()
if on another
thread.gchar *
mm_sms_dup_number (MMSms *self
);
Gets the number to which the message is addressed.
const gchar *
mm_sms_get_smsc (MMSms *self
);
Gets the SMS service center number.
self
was constructed. Use mm_sms_dup_smsc()
if on another
thread.guint
mm_sms_get_message_reference (MMSms *self
);
Gets the message reference of the last PDU sent/received within this SMS.
If the PDU type is MM_SMS_PDU_TYPE_STATUS_REPORT
, this field identifies the
message reference of the PDU associated to the status report.
MMSmsCdmaTeleserviceId
mm_sms_get_teleservice_id (MMSms *self
);
Gets the 3GPP2 Teleservice ID.
MMSmsCdmaServiceCategory
mm_sms_get_service_category (MMSms *self
);
Gets the 3GPP2 Service Category.
MMSmsValidityType
mm_sms_get_validity_type (MMSms *self
);
Gets the type of validity information in the SMS.
guint
mm_sms_get_validity_relative (MMSms *self
);
Gets the length of the validity period, in minutes.
Only applicable if the type of validity is MM_SMS_VALIDITY_TYPE_RELATIVE.
const gchar *
mm_sms_get_timestamp (MMSms *self
);
Gets the time when the first PDU of the SMS message arrived the SMSC, in
ISO8601format.
This field is only applicable if the PDU type is MM_SMS_PDU_TYPE_DELIVER
or
MM_SMS_PDU_TYPE_STATUS_REPORT
.
self
was constructed. Use mm_sms_dup_timestamp()
if on another
thread.gchar *
mm_sms_dup_timestamp (MMSms *self
);
Gets the time when the first PDU of the SMS message arrived the SMSC, in
ISO8601format.
This field is only applicable if the PDU type is MM_SMS_PDU_TYPE_DELIVER
or
MM_SMS_PDU_TYPE_STATUS_REPORT
.
const gchar *
mm_sms_get_discharge_timestamp (MMSms *self
);
Gets the time when the first PDU of the SMS message left the SMSC, in
ISO8601format.
This field is only applicable if the PDU type is MM_SMS_PDU_TYPE_STATUS_REPORT
.
self
was constructed. Use mm_sms_dup_discharge_timestamp()
if on another
thread.gchar *
mm_sms_dup_discharge_timestamp (MMSms *self
);
Gets the time when the first PDU of the SMS message left the SMSC, in
ISO8601format.
This field is only applicable if the PDU type is MM_SMS_PDU_TYPE_STATUS_REPORT
.
guint
mm_sms_get_delivery_state (MMSms *self
);
Gets the delivery state of this SMS.
This field is only applicable if the PDU type is MM_SMS_PDU_TYPE_STATUS_REPORT
.
gboolean
mm_sms_get_delivery_report_request (MMSms *self
);
Checks whether delivery report is requested for this SMS.
void mm_sms_send (MMSms *self
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
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 mm_sms_send_finish()
to get the result of the operation.
See mm_sms_send_sync()
for the synchronous, blocking version of this method.
self |
A MMSms. |
|
cancellable |
A GCancellable or |
[allow-none] |
callback |
A GAsyncReadyCallback to call when the request is satisfied or |
|
user_data |
User data to pass to |
gboolean mm_sms_send_finish (MMSms *self
,GAsyncResult *res
,GError **error
);
Finishes an operation started with mm_sms_send()
.
self |
A MMSms. |
|
res |
The GAsyncResult obtained from the GAsyncReadyCallback passed to |
|
error |
Return location for error or |
gboolean mm_sms_send_sync (MMSms *self
,GCancellable *cancellable
,GError **error
);
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 mm_sms_send()
for the asynchronous version of this method.
self |
A MMSms. |
|
cancellable |
A GCancellable or |
[allow-none] |
error |
Return location for error or |
void mm_sms_store (MMSms *self
,MMSmsStorage storage
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
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 mm_sms_store_finish()
to get the result of the operation.
See mm_sms_store_sync()
for the synchronous, blocking version of this method.
self |
A MMSms. |
|
storage |
A MMSmsStorage specifying where to store the SMS, or MM_SMS_STORAGE_UNKNOWN to use the default. |
|
cancellable |
A GCancellable or |
[allow-none] |
callback |
A GAsyncReadyCallback to call when the request is satisfied or |
|
user_data |
User data to pass to |
gboolean mm_sms_store_finish (MMSms *self
,GAsyncResult *res
,GError **error
);
Finishes an operation started with mm_sms_store()
.
self |
A MMSms. |
|
res |
The GAsyncResult obtained from the GAsyncReadyCallback passed to |
|
error |
Return location for error or |
gboolean mm_sms_store_sync (MMSms *self
,MMSmsStorage storage
,GCancellable *cancellable
,GError **error
);
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 mm_sms_store()
for the asynchronous version of this method.
self |
A MMSms. |
|
storage |
A MMSmsStorage specifying where to store the SMS, or MM_SMS_STORAGE_UNKNOWN to use the default. |
|
cancellable |
A GCancellable or |
[allow-none] |
error |
Return location for error or |
struct MMSms;
The MMSms structure contains private data and should only be accessed using the provided API.