libmm-glib Reference Manual | ||||
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces |
struct MMSms; const gchar * mm_sms_get_path (MMSms *self
); gchar * mm_sms_dup_path (MMSms *self
); MMSmsState mm_sms_get_state (MMSms *self
); MMSmsPduType mm_sms_get_pdu_type (MMSms *self
); MMSmsStorage mm_sms_get_storage (MMSms *self
); const gchar * mm_sms_get_text (MMSms *self
); gchar * mm_sms_dup_text (MMSms *self
); const guint8 * mm_sms_get_data (MMSms *self
,gsize *data_len
); guint8 * mm_sms_dup_data (MMSms *self
,gsize *data_len
); const gchar * mm_sms_get_number (MMSms *self
); gchar * mm_sms_dup_number (MMSms *self
); const gchar * mm_sms_get_smsc (MMSms *self
); gchar * mm_sms_dup_smsc (MMSms *self
); guint mm_sms_get_message_reference (MMSms *self
); gint mm_sms_get_class (MMSms *self
); MMSmsCdmaTeleserviceId mm_sms_get_teleservice_id (MMSms *self
); MMSmsCdmaServiceCategory mm_sms_get_service_category (MMSms *self
); MMSmsValidityType mm_sms_get_validity_type (MMSms *self
); guint mm_sms_get_validity_relative (MMSms *self
); const gchar * mm_sms_get_timestamp (MMSms *self
); gchar * mm_sms_dup_timestamp (MMSms *self
); const gchar * mm_sms_get_discharge_timestamp (MMSms *self
); gchar * mm_sms_dup_discharge_timestamp (MMSms *self
); guint mm_sms_get_delivery_state (MMSms *self
); gboolean mm_sms_get_delivery_report_request (MMSms *self
); void mm_sms_send (MMSms *self
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
); gboolean mm_sms_send_finish (MMSms *self
,GAsyncResult *res
,GError **error
); gboolean mm_sms_send_sync (MMSms *self
,GCancellable *cancellable
,GError **error
); void mm_sms_store (MMSms *self
,MMSmsStorage storage
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
); gboolean mm_sms_store_finish (MMSms *self
,GAsyncResult *res
,GError **error
); gboolean mm_sms_store_sync (MMSms *self
,MMSmsStorage storage
,GCancellable *cancellable
,GError **error
);
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.
struct MMSms;
The MMSms structure contains private data and should only be accessed using the provided API.
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.
MMSmsState mm_sms_get_state (MMSms *self
);
Gets the state of this SMS.
|
A MMSms. |
Returns : |
A MMSmsState specifying the state. |
MMSmsPduType mm_sms_get_pdu_type (MMSms *self
);
Gets the PDU type on which this SMS is based.
|
A MMSms. |
Returns : |
A MMSmsPduType specifying the PDU type. |
MMSmsStorage mm_sms_get_storage (MMSms *self
);
Gets the storage in which this SMS is kept.
|
A MMSms. |
Returns : |
A MMSmsStorage specifying the storage. |
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.
const guint8 * mm_sms_get_data (MMSms *self
,gsize *data_len
);
Gets the message data.
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.
|
A MMSms. |
Returns : |
The message reference. |
gint mm_sms_get_class (MMSms *self
);
Gets the 3GPP message class of the SMS.
|
A MMSms. |
Returns : |
the message class, or -1 for invalid/unset class. |
MMSmsCdmaTeleserviceId mm_sms_get_teleservice_id (MMSms *self
);
Gets the 3GPP2 Teleservice ID.
|
A MMSms. |
Returns : |
a MMSmsCdmaTeleserviceId. |
MMSmsCdmaServiceCategory mm_sms_get_service_category (MMSms *self
);
Gets the 3GPP2 Service Category.
|
A MMSms. |
Returns : |
a MMSmsCdmaServiceCategory. |
MMSmsValidityType mm_sms_get_validity_type (MMSms *self
);
Gets the type of validity information in the SMS.
|
A MMSms. |
Returns : |
the validity type or MM_SMS_VALIDITY_TYPE_UNKNOWN. |
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.
|
A MMSms. |
Returns : |
the length of the validity period, or 0 if unknown. |
const gchar * mm_sms_get_timestamp (MMSms *self
);
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 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 ISO8601 format.
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 ISO8601 format.
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 ISO8601 format.
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
.
|
A MMSms. |
Returns : |
A MMSmsDeliveryState specifying the delivery state. |
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.
|
A MMSms. |
|
A GCancellable or NULL . [allow-none]
|
|
A GAsyncReadyCallback to call when the request is satisfied or NULL . |
|
User data to pass to callback . |
gboolean mm_sms_send_finish (MMSms *self
,GAsyncResult *res
,GError **error
);
Finishes an operation started with mm_sms_send()
.
|
A MMSms. |
|
The GAsyncResult obtained from the GAsyncReadyCallback passed to mm_sms_send() . |
|
Return location for error or NULL . |
Returns : |
TRUE if the operation succeded, FALSE if error is set. |
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.
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.
|
A MMSms. |
|
A MMSmsStorage specifying where to store the SMS, or MM_SMS_STORAGE_UNKNOWN to use the default. |
|
A GCancellable or NULL . [allow-none]
|
|
A GAsyncReadyCallback to call when the request is satisfied or NULL . |
|
User data to pass to callback . |
gboolean mm_sms_store_finish (MMSms *self
,GAsyncResult *res
,GError **error
);
Finishes an operation started with mm_sms_store()
.
|
A MMSms. |
|
The GAsyncResult obtained from the GAsyncReadyCallback passed to mm_sms_store() . |
|
Return location for error or NULL . |
Returns : |
TRUE if the operation succeded, FALSE if error is set. |
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.