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.
Since: 1.0
gchar *
mm_sms_dup_path (MMSms *self
);
Gets a copy of the DBus path of the MMSms object.
The DBus path of the MMSms object. The returned
value should be freed with g_free()
.
[transfer full]
Since: 1.0
MMSmsState
mm_sms_get_state (MMSms *self
);
Gets the state of this SMS.
Since: 1.0
MMSmsPduType
mm_sms_get_pdu_type (MMSms *self
);
Gets the PDU type on which this SMS is based.
Since: 1.0
MMSmsStorage
mm_sms_get_storage (MMSms *self
);
Gets the storage in which this SMS is kept.
Since: 1.0
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]
Since: 1.0
gchar *
mm_sms_dup_text (MMSms *self
);
Gets the message text, in UTF-8.
The message text, or NULL
if it doesn't contain
any (e.g. contains data instead). The returned value should be freed with
g_free()
.
[transfer full]
Since: 1.0
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]
Since: 1.0
guint8 * mm_sms_dup_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). The returned value should be freed with g_free()
.
[transfer full][array length=data_len][element-type guint8]
Since: 1.0
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.Since: 1.0
gchar *
mm_sms_dup_number (MMSms *self
);
Gets the number to which the message is addressed.
The number, or NULL
if it couldn't be retrieved.
The returned value should be freed with g_free()
.
[transfer full]
Since: 1.0
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.Since: 1.0
gchar *
mm_sms_dup_smsc (MMSms *self
);
Gets the SMS service center number.
The number of the SMSC, or NULL
if it couldn't be
retrieved. The returned value should be freed with g_free()
.
[transfer full]
Since: 1.0
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.
Since: 1.0
gint
mm_sms_get_class (MMSms *self
);
Gets the 3GPP message class of the SMS.
Since: 1.0
MMSmsCdmaTeleserviceId
mm_sms_get_teleservice_id (MMSms *self
);
Gets the 3GPP2 Teleservice ID.
Since: 1.2
MMSmsCdmaServiceCategory
mm_sms_get_service_category (MMSms *self
);
Gets the 3GPP2 Service Category.
Since: 1.2
MMSmsValidityType
mm_sms_get_validity_type (MMSms *self
);
Gets the type of validity information in the SMS.
Since: 1.0
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.
Since: 1.0
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.Since: 1.0
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
.
The timestamp, or NULL
if it couldn't be
retrieved. The returned value should be freed with g_free()
.
[transfer full]
Since: 1.0
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.Since: 1.0
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
.
The timestamp, or NULL
if it couldn't be
retrieved. The returned value should be freed with g_free()
.
[transfer full]
Since: 1.0
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
.
Since: 1.0
gboolean
mm_sms_get_delivery_report_request (MMSms *self
);
Checks whether delivery report is requested for this SMS.
Since: 1.0
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
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 |
Since: 1.0
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 |
Since: 1.0
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 |
Since: 1.0
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
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
|
|
cancellable |
A GCancellable or |
[allow-none] |
callback |
A GAsyncReadyCallback to call when the request is satisfied or
|
|
user_data |
User data to pass to |
Since: 1.0
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 |
Since: 1.0
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
|
|
cancellable |
A GCancellable or |
[allow-none] |
error |
Return location for error or |
Since: 1.0
struct MMSms;
The MMSms structure contains private data and should only be accessed using the provided API.