From d0fb94c49f3c27590bb6134fdca328c6f0a2180f Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Thu, 18 Jul 2013 13:27:18 +0200 Subject: [PATCH] api: add 'TeleserviceId' property to the SMS interface Will be used in 3GPP2 SMS messages. --- cli/mmcli-sms.c | 10 +++++++ docs/reference/api/ModemManager-sections.txt | 1 + .../libmm-glib/libmm-glib-sections.txt | 7 +++++ include/ModemManager-enums.h | 27 +++++++++++++++++++ .../org.freedesktop.ModemManager1.Sms.xml | 9 +++++++ libmm-glib/mm-sms.c | 18 +++++++++++++ libmm-glib/mm-sms.h | 2 ++ src/mm-sms.c | 2 ++ 8 files changed, 76 insertions(+) diff --git a/cli/mmcli-sms.c b/cli/mmcli-sms.c index 4453df0b..f3478bd2 100644 --- a/cli/mmcli-sms.c +++ b/cli/mmcli-sms.c @@ -200,6 +200,16 @@ print_sms_info (MMSms *sms) VALIDATE (mm_sms_get_smsc (sms)), mm_sms_get_class (sms)); } + /* Teleservice ID is 3GPP2 specific */ + else if (pdu_type == MM_SMS_PDU_TYPE_CDMA_DELIVER || + pdu_type == MM_SMS_PDU_TYPE_CDMA_SUBMIT || + pdu_type == MM_SMS_PDU_TYPE_CDMA_CANCELLATION || + pdu_type == MM_SMS_PDU_TYPE_CDMA_DELIVERY_ACKNOWLEDGEMENT || + pdu_type == MM_SMS_PDU_TYPE_CDMA_USER_ACKNOWLEDGEMENT || + pdu_type == MM_SMS_PDU_TYPE_CDMA_READ_ACKNOWLEDGEMENT) { + g_print (" | teleservice id: '%s'\n", + mm_sms_cdma_teleservice_id_get_string (mm_sms_get_teleservice_id (sms))); + } if (pdu_type == MM_SMS_PDU_TYPE_SUBMIT) g_print (" | delivery report: '%s'\n", diff --git a/docs/reference/api/ModemManager-sections.txt b/docs/reference/api/ModemManager-sections.txt index a9fa9cd4..0f238e81 100644 --- a/docs/reference/api/ModemManager-sections.txt +++ b/docs/reference/api/ModemManager-sections.txt @@ -43,6 +43,7 @@ MMSmsState MMSmsDeliveryState MMSmsStorage MMSmsValidityType +MMSmsCdmaTeleserviceId
diff --git a/docs/reference/libmm-glib/libmm-glib-sections.txt b/docs/reference/libmm-glib/libmm-glib-sections.txt index 302f42c8..72c90643 100644 --- a/docs/reference/libmm-glib/libmm-glib-sections.txt +++ b/docs/reference/libmm-glib/libmm-glib-sections.txt @@ -1050,6 +1050,7 @@ mm_sms_get_smsc mm_sms_dup_smsc mm_sms_get_message_reference mm_sms_get_class +mm_sms_get_teleservice_id mm_sms_get_validity_type mm_sms_get_validity_relative mm_sms_get_timestamp @@ -1149,6 +1150,7 @@ mm_sms_state_get_string mm_sms_delivery_state_get_string mm_sms_storage_get_string mm_sms_validity_type_get_string +mm_sms_cdma_teleservice_id_get_string mm_firmware_image_type_get_string mm_oma_feature_build_string_from_mask mm_oma_session_type_get_string @@ -1169,6 +1171,7 @@ mm_sms_state_build_string_from_mask mm_sms_delivery_state_build_string_from_mask mm_sms_storage_build_string_from_mask mm_sms_validity_type_build_string_from_mask +mm_sms_cdma_teleservice_id_build_string_from_mask mm_modem_location_source_get_string mm_modem_contacts_storage_build_string_from_mask mm_bearer_ip_family_build_string_from_mask @@ -1218,6 +1221,7 @@ MM_TYPE_SMS_PDU_TYPE MM_TYPE_SMS_STATE MM_TYPE_SMS_STORAGE MM_TYPE_SMS_VALIDITY_TYPE +MM_TYPE_SMS_CDMA_TELESERVICE_ID MM_TYPE_OMA_FEATURE MM_TYPE_OMA_SESSION_STATE MM_TYPE_OMA_SESSION_STATE_FAILED_REASON @@ -1251,6 +1255,7 @@ mm_sms_pdu_type_get_type mm_sms_state_get_type mm_sms_storage_get_type mm_sms_validity_type_get_type +mm_sms_cdma_teleservice_id_get_type mm_oma_feature_get_type mm_oma_session_state_failed_reason_get_type mm_oma_session_state_get_type @@ -2608,6 +2613,7 @@ mm_gdbus_sms_dup_smsc mm_gdbus_sms_get_validity mm_gdbus_sms_dup_validity mm_gdbus_sms_get_class +mm_gdbus_sms_get_teleservice_id mm_gdbus_sms_get_timestamp mm_gdbus_sms_dup_timestamp mm_gdbus_sms_get_discharge_timestamp @@ -2623,6 +2629,7 @@ mm_gdbus_sms_call_store_finish mm_gdbus_sms_call_store_sync mm_gdbus_sms_set_class +mm_gdbus_sms_set_teleservice_id mm_gdbus_sms_set_data mm_gdbus_sms_set_delivery_report_request mm_gdbus_sms_set_delivery_state diff --git a/include/ModemManager-enums.h b/include/ModemManager-enums.h index 0c3be279..22d737b2 100644 --- a/include/ModemManager-enums.h +++ b/include/ModemManager-enums.h @@ -573,6 +573,33 @@ typedef enum { /*< underscore_name=mm_sms_validity_type >*/ MM_SMS_VALIDITY_TYPE_ENHANCED = 3, } MMSmsValidityType; +/** + * MMSmsCdmaTeleserviceId: + * @MM_SMS_CDMA_TELESERVICE_ID_UNKNOWN: Unknown. + * @MM_SMS_CDMA_TELESERVICE_ID_CMT91: IS-91 Extended Protocol Enhanced Services. + * @MM_SMS_CDMA_TELESERVICE_ID_WPT: Wireless Paging Teleservice. + * @MM_SMS_CDMA_TELESERVICE_ID_WMT: Wireless Messaging Teleservice. + * @MM_SMS_CDMA_TELESERVICE_ID_VMN: Voice Mail Notification. + * @MM_SMS_CDMA_TELESERVICE_ID_WAP: Wireless Application Protocol. + * @MM_SMS_CDMA_TELESERVICE_ID_WEMT: Wireless Enhanced Messaging Teleservice. + * @MM_SMS_CDMA_TELESERVICE_ID_SCPT: Service Category Programming Teleservice. + * @MM_SMS_CDMA_TELESERVICE_ID_CATPT: Card Application Toolkit Protocol Teleservice. + * + * Teleservice IDs supported for CDMA SMS, as defined in 3GPP2 X.S0004-550-E + * (section 2.256) and 3GPP2 C.S0015-B (section 3.4.3.1). + */ +typedef enum { /*< underscore_name=mm_sms_cdma_teleservice_id >*/ + MM_SMS_CDMA_TELESERVICE_ID_UNKNOWN = 0x0000, + MM_SMS_CDMA_TELESERVICE_ID_CMT91 = 0x1000, + MM_SMS_CDMA_TELESERVICE_ID_WPT = 0x1001, + MM_SMS_CDMA_TELESERVICE_ID_WMT = 0x1002, + MM_SMS_CDMA_TELESERVICE_ID_VMN = 0x1003, + MM_SMS_CDMA_TELESERVICE_ID_WAP = 0x1004, + MM_SMS_CDMA_TELESERVICE_ID_WEMT = 0x1005, + MM_SMS_CDMA_TELESERVICE_ID_SCPT = 0x1006, + MM_SMS_CDMA_TELESERVICE_ID_CATPT = 0x1007, +} MMSmsCdmaTeleserviceId; + /** * MMModemLocationSource: * @MM_MODEM_LOCATION_SOURCE_NONE: None. diff --git a/introspection/org.freedesktop.ModemManager1.Sms.xml b/introspection/org.freedesktop.ModemManager1.Sms.xml index 34b31c60..729271e3 100644 --- a/introspection/org.freedesktop.ModemManager1.Sms.xml +++ b/introspection/org.freedesktop.ModemManager1.Sms.xml @@ -128,6 +128,15 @@ --> + + +