From 7faa48ea9490c0af563d3bb8426a1e2d9bf83f82 Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Tue, 11 Sep 2012 14:40:42 +0200 Subject: [PATCH] api: new `PduType' property in the SMS interface It will help deciding the type of message. --- docs/reference/api/ModemManager-sections.txt | 1 + include/ModemManager-enums.h | 16 ++++++++++ .../org.freedesktop.ModemManager1.Sms.xml | 8 +++++ src/mm-broadband-modem.c | 32 +++++++++++++------ src/mm-sms-part.c | 10 ++++-- src/mm-sms-part.h | 8 ++++- src/mm-sms.c | 7 ++-- src/tests/test-sms-part.c | 2 +- 8 files changed, 69 insertions(+), 15 deletions(-) diff --git a/docs/reference/api/ModemManager-sections.txt b/docs/reference/api/ModemManager-sections.txt index 06f1311a..cfbabcfd 100644 --- a/docs/reference/api/ModemManager-sections.txt +++ b/docs/reference/api/ModemManager-sections.txt @@ -19,6 +19,7 @@ MMModemLock MMModemMode MMModemState MMModemStateChangeReason +MMSmsPduType MMSmsState MMSmsStorage diff --git a/include/ModemManager-enums.h b/include/ModemManager-enums.h index d853106d..75693823 100644 --- a/include/ModemManager-enums.h +++ b/include/ModemManager-enums.h @@ -354,6 +354,22 @@ typedef enum { /*< underscore_name=mm_modem_band >*/ MM_MODEM_BAND_ANY = 256 } MMModemBand; +/** + * MMSmsPduType: + * @MM_SMS_PDU_TYPE_UNKNOWN: Unknown type. + * @MM_SMS_PDU_TYPE_DELIVER: SMS has been received from the SMSC. + * @MM_SMS_PDU_TYPE_SUBMIT: SMS is sent, or to be sent to the SMSC. + * @MM_SMS_PDU_TYPE_STATUS_REPORT: SMS is a status report received from the SMSC. + * + * Type of PDUs used in the SMS. + */ +typedef enum { /*< underscore_name=mm_sms_pdu_type >*/ + MM_SMS_PDU_TYPE_UNKNOWN = 0, + MM_SMS_PDU_TYPE_DELIVER = 1, + MM_SMS_PDU_TYPE_SUBMIT = 2, + MM_SMS_PDU_TYPE_STATUS_REPORT = 3 +} MMSmsPduType; + /** * MMSmsState: * @MM_SMS_STATE_UNKNOWN: State unknown or not reportable. diff --git a/introspection/org.freedesktop.ModemManager1.Sms.xml b/introspection/org.freedesktop.ModemManager1.Sms.xml index 1992edcf..e382bd95 100644 --- a/introspection/org.freedesktop.ModemManager1.Sms.xml +++ b/introspection/org.freedesktop.ModemManager1.Sms.xml @@ -48,6 +48,14 @@ --> + + +