[PATCH 1/2] libmbim-glib: add partial support for Basic IP Connectivity Extensions service

Ben Chan benchan at chromium.org
Fri Jul 27 06:38:06 UTC 2018


This patch adds partial support for the Basic IP Connectivity Extensions
service defined in Microsoft Mobile Broadband Design Guide. Only the
Protocol Configuration Operations (PCO) command is defined.
---
 data/Makefile.am                              |  1 +
 ...mbim-service-basic-connect-extensions.json | 34 +++++++++++++++++++
 docs/reference/libmbim-glib/Makefile.am       |  1 +
 .../libmbim-glib/libmbim-glib-common.sections |  8 +++++
 .../libmbim-glib/libmbim-glib-docs.xml        |  1 +
 src/libmbim-glib/generated/Makefile.am        | 12 +++++++
 src/libmbim-glib/libmbim-glib.h               |  1 +
 src/libmbim-glib/mbim-cid.c                   | 23 +++++++++++++
 src/libmbim-glib/mbim-cid.h                   | 30 ++++++++++++++++
 src/libmbim-glib/mbim-enums.h                 | 15 ++++++++
 src/libmbim-glib/mbim-uuid.c                  | 13 +++++++
 src/libmbim-glib/mbim-uuid.h                  | 11 ++++++
 src/libmbim-glib/test/test-uuid.c             |  8 +++++
 13 files changed, 158 insertions(+)
 create mode 100644 data/mbim-service-basic-connect-extensions.json

diff --git a/data/Makefile.am b/data/Makefile.am
index 357275e..8be274b 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -2,6 +2,7 @@ SUBDIRS = . pkg-config
 
 EXTRA_DIST = \
 	mbim-service-basic-connect.json \
+	mbim-service-basic-connect-extensions.json \
 	mbim-service-sms.json \
 	mbim-service-ussd.json \
 	mbim-service-auth.json \
diff --git a/data/mbim-service-basic-connect-extensions.json b/data/mbim-service-basic-connect-extensions.json
new file mode 100644
index 0000000..2ef8345
--- /dev/null
+++ b/data/mbim-service-basic-connect-extensions.json
@@ -0,0 +1,34 @@
+[
+  // *********************************************************************************
+  { "type" : "Service",
+    "name" : "Basic Connect Extensions" },
+
+  // *********************************************************************************
+  { "name"         : "PCO",
+    "service"      : "Basic Connect Extensions",
+    "type"         : "Command",
+    "query"        : [ { "name"        : "PcoValue",
+                         "format"      : "struct",
+                         "struct-type" : "MbimPcoValue" } ],
+    "response"     : [ { "name"        : "PcoValue",
+                         "format"      : "struct",
+                         "struct-type" : "MbimPcoValue" } ],
+    "notification" : [ { "name"        : "PcoValue",
+                         "format"      : "struct",
+                         "struct-type" : "MbimPcoValue" } ] },
+
+  // *********************************************************************************
+  { "name"     : "MbimPcoValue",
+    "type"     : "Struct",
+    "contents" : [ { "name"             : "SessionId",
+                     "format"           : "guint32" },
+                   { "name"             : "PcoDataSize",
+                     "format"           : "guint32" },
+                   { "name"             : "PcoDataType",
+                     "format"           : "guint32",
+                     "public-format"    : "MbimPcoType" },
+                   { "name"             : "PcoDataBuffer",
+                     "format"           : "ref-byte-array",
+                     "array-size-field" : "PcoDataSize" } ] }
+
+]
diff --git a/docs/reference/libmbim-glib/Makefile.am b/docs/reference/libmbim-glib/Makefile.am
index d569d13..4bef3b6 100644
--- a/docs/reference/libmbim-glib/Makefile.am
+++ b/docs/reference/libmbim-glib/Makefile.am
@@ -9,6 +9,7 @@ DOC_MAIN_SGML_FILE = $(DOC_MODULE)-docs.xml
 ALL_SECTIONS = \
 	$(srcdir)/libmbim-glib-common.sections \
 	$(top_builddir)/src/libmbim-glib/generated/mbim-basic-connect.sections \
+	$(top_builddir)/src/libmbim-glib/generated/mbim-basic-connect-extensions.sections \
 	$(top_builddir)/src/libmbim-glib/generated/mbim-sms.sections \
 	$(top_builddir)/src/libmbim-glib/generated/mbim-ussd.sections \
 	$(top_builddir)/src/libmbim-glib/generated/mbim-auth.sections \
diff --git a/docs/reference/libmbim-glib/libmbim-glib-common.sections b/docs/reference/libmbim-glib/libmbim-glib-common.sections
index 8d564b9..e5e65f1 100644
--- a/docs/reference/libmbim-glib/libmbim-glib-common.sections
+++ b/docs/reference/libmbim-glib/libmbim-glib-common.sections
@@ -15,6 +15,7 @@ MbimUuid
 MBIM_UUID_INVALID
 MBIM_UUID_ATDS
 MBIM_UUID_BASIC_CONNECT
+MBIM_UUID_BASIC_CONNECT_EXTENSIONS
 MBIM_UUID_SMS
 MBIM_UUID_USSD
 MBIM_UUID_PHONEBOOK
@@ -50,6 +51,7 @@ mbim_context_type_build_string_from_mask
 <FILE>mbim-cid</FILE>
 MbimCidAtds
 MbimCidBasicConnect
+MbimCidBasicConnectExtensions
 MbimCidSms
 MbimCidUssd
 MbimCidPhonebook
@@ -68,6 +70,7 @@ mbim_cid_can_notify
 mbim_cid_get_printable
 mbim_cid_atds_get_string
 mbim_cid_basic_connect_get_string
+mbim_cid_basic_connect_extensions_get_string
 mbim_cid_sms_get_string
 mbim_cid_ussd_get_string
 mbim_cid_phonebook_get_string
@@ -82,6 +85,7 @@ mbim_cid_intel_firmware_update_get_string
 <SUBSECTION Private>
 mbim_cid_atds_build_string_from_mask
 mbim_cid_basic_connect_build_string_from_mask
+mbim_cid_basic_connect_extensions_build_string_from_mask
 mbim_cid_sms_build_string_from_mask
 mbim_cid_ussd_build_string_from_mask
 mbim_cid_phonebook_build_string_from_mask
@@ -97,6 +101,7 @@ mbim_cid_intel_firmware_update_build_string_from_mask
 MBIM_TYPE_CID_ATDS
 MBIM_TYPE_CID_AUTH
 MBIM_TYPE_CID_BASIC_CONNECT
+MBIM_TYPE_CID_BASIC_CONNECT_EXTENSIONS
 MBIM_TYPE_CID_DSS
 MBIM_TYPE_CID_PHONEBOOK
 MBIM_TYPE_CID_SMS
@@ -110,6 +115,7 @@ MBIM_TYPE_CID_INTEL_FIRMWARE_UPDATE
 mbim_cid_atds_get_type
 mbim_cid_auth_get_type
 mbim_cid_basic_connect_get_type
+mbim_cid_basic_connect_extensions_get_type
 mbim_cid_dss_get_type
 mbim_cid_phonebook_get_type
 mbim_cid_sms_get_type
@@ -308,6 +314,7 @@ MbimStkPacType
 MbimNetworkIdleHintState
 MbimEmergencyModeState
 MbimDssLinkState
+MbimPcoType
 <SUBSECTION Methods>
 mbim_device_type_get_string
 mbim_cellular_class_build_string_from_mask
@@ -468,6 +475,7 @@ MBIM_TYPE_STK_PAC_TYPE
 MBIM_TYPE_NETWORK_IDLE_HINT_STATE
 MBIM_TYPE_EMERGENCY_MODE_STATE
 MBIM_TYPE_DSS_LINK_STATE
+MBIM_TYPE_PCO_TYPE
 mbim_activation_command_get_type
 mbim_activation_state_get_type
 mbim_auth_protocol_get_type
diff --git a/docs/reference/libmbim-glib/libmbim-glib-docs.xml b/docs/reference/libmbim-glib/libmbim-glib-docs.xml
index 08d79be..5c67028 100644
--- a/docs/reference/libmbim-glib/libmbim-glib-docs.xml
+++ b/docs/reference/libmbim-glib/libmbim-glib-docs.xml
@@ -68,6 +68,7 @@
 
   <chapter>
     <title>Other Services</title>
+    <xi:include href="xml/mbim-basic-connect-extensions.xml"/>
     <xi:include href="xml/mbim-ms-firmware-id.xml"/>
     <xi:include href="xml/mbim-ms-host-shutdown.xml"/>
     <xi:include href="xml/mbim-qmi.xml"/>
diff --git a/src/libmbim-glib/generated/Makefile.am b/src/libmbim-glib/generated/Makefile.am
index 2834b99..d534d6b 100644
--- a/src/libmbim-glib/generated/Makefile.am
+++ b/src/libmbim-glib/generated/Makefile.am
@@ -4,6 +4,7 @@ GENERATED_H = \
 	mbim-error-types.h \
 	mbim-enum-types.h \
 	mbim-basic-connect.h \
+	mbim-basic-connect-extensions.h \
 	mbim-sms.h \
 	mbim-ussd.h \
 	mbim-auth.h \
@@ -22,6 +23,7 @@ GENERATED_C = \
 	mbim-error-quarks.c \
 	mbim-enum-types.c \
 	mbim-basic-connect.c \
+	mbim-basic-connect-extensions.c \
 	mbim-sms.c \
 	mbim-ussd.c \
 	mbim-auth.c \
@@ -37,6 +39,7 @@ GENERATED_C = \
 
 GENERATED_SECTIONS = \
 	mbim-basic-connect.sections \
+	mbim-basic-connect-extensions.sections \
 	mbim-sms.sections \
 	mbim-ussd.sections \
 	mbim-auth.sections \
@@ -98,6 +101,15 @@ mbim-basic-connect.h mbim-basic-connect.c mbim-basic-connect.sections: $(top_src
 			--input $(top_srcdir)/data/mbim-service-basic-connect.json \
 			--output mbim-basic-connect
 
+# Basic Connect Extensions service
+mbim-basic-connect-extensions.h mbim-basic-connect-extensions.c mbim-basic-connect-extensions.sections: $(top_srcdir)/data/mbim-service-basic-connect-extensions.json $(top_srcdir)/build-aux/mbim-codegen/*.py $(top_srcdir)/build-aux/mbim-codegen/mbim-codegen
+	$(AM_V_GEN)  \
+		rm -f mbim-basic-connect-extensions.h && \
+		rm -f mbim-basic-connect-extensions.c && \
+		$(PYTHON) $(top_srcdir)/build-aux/mbim-codegen/mbim-codegen \
+			--input $(top_srcdir)/data/mbim-service-basic-connect-extensions.json \
+			--output mbim-basic-connect-extensions
+
 # SMS service
 mbim-sms.h mbim-sms.c mbim-sms.sections: $(top_srcdir)/data/mbim-service-sms.json $(top_srcdir)/build-aux/mbim-codegen/*.py $(top_srcdir)/build-aux/mbim-codegen/mbim-codegen
 	$(AM_V_GEN)  \
diff --git a/src/libmbim-glib/libmbim-glib.h b/src/libmbim-glib/libmbim-glib.h
index a7bf92c..c900ee7 100644
--- a/src/libmbim-glib/libmbim-glib.h
+++ b/src/libmbim-glib/libmbim-glib.h
@@ -40,6 +40,7 @@
 #include "mbim-enum-types.h"
 #include "mbim-error-types.h"
 #include "mbim-basic-connect.h"
+#include "mbim-basic-connect-extensions.h"
 #include "mbim-sms.h"
 #include "mbim-ussd.h"
 #include "mbim-auth.h"
diff --git a/src/libmbim-glib/mbim-cid.c b/src/libmbim-glib/mbim-cid.c
index 7609964..a677a92 100644
--- a/src/libmbim-glib/mbim-cid.c
+++ b/src/libmbim-glib/mbim-cid.c
@@ -163,6 +163,21 @@ static const CidConfig cid_intel_firmware_update_config [MBIM_CID_INTEL_FIRMWARE
     { SET, NO_QUERY, NO_NOTIFY }, /* MBIM_CID_INTEL_FIRMWARE_UPDATE_MODEM_REBOOT */
 };
 
+/* Note: index of the array is CID-1 */
+#define MBIM_CID_BASIC_CONNECT_EXTENSIONS_LAST MBIM_CID_BASIC_CONNECT_EXTENSIONS_MS_DEVICE_RESET
+static const CidConfig cid_basic_connect_extensions_config [MBIM_CID_BASIC_CONNECT_EXTENSIONS_LAST] = {
+    { SET,    QUERY,    NOTIFY    }, /* MBIM_CID_BASIC_CONNECT_EXTENSIONS_MS_PROVISIONED_CONTEXT_V2 */
+    { SET,    QUERY,    NOTIFY    }, /* MBIM_CID_BASIC_CONNECT_EXTENSIONS_MS_NETWORK_BLACKLIST */
+    { SET,    QUERY,    NOTIFY    }, /* MBIM_CID_BASIC_CONNECT_EXTENSIONS_MS_LTE_ATTACH_CONFIG */
+    { SET,    QUERY,    NOTIFY    }, /* MBIM_CID_BASIC_CONNECT_EXTENSIONS_MS_LTE_ATTACH_STATUS */
+    { NO_SET, QUERY,    NO_NOTIFY }, /* MBIM_CID_BASIC_CONNECT_EXTENSIONS_MS_SYS_CAPS */
+    { NO_SET, QUERY,    NO_NOTIFY }, /* MBIM_CID_BASIC_CONNECT_EXTENSIONS_MS_DEVICE_CAPS_V2 */
+    { SET,    QUERY,    NO_NOTIFY }, /* MBIM_CID_BASIC_CONNECT_EXTENSIONS_MS_DEVICE_SLOT_MAPPINGS */
+    { NO_SET, QUERY,    NOTIFY    }, /* MBIM_CID_BASIC_CONNECT_EXTENSIONS_MS_SLOT_INFO_STATUS */
+    { NO_SET, QUERY,    NOTIFY    }, /* MBIM_CID_BASIC_CONNECT_EXTENSIONS_PCO */
+    { SET,    NO_QUERY, NO_NOTIFY }, /* MBIM_CID_BASIC_CONNECT_EXTENSIONS_MS_DEVICE_RESET */
+};
+
 /**
  * mbim_cid_can_set:
  * @service: a #MbimService.
@@ -209,6 +224,8 @@ mbim_cid_can_set (MbimService service,
         return cid_atds_config[cid - 1].set;
     case MBIM_SERVICE_INTEL_FIRMWARE_UPDATE:
         return cid_intel_firmware_update_config[cid - 1].set;
+    case MBIM_SERVICE_BASIC_CONNECT_EXTENSIONS:
+        return cid_basic_connect_extensions_config[cid - 1].set;
     default:
         g_assert_not_reached ();
         return FALSE;
@@ -261,6 +278,8 @@ mbim_cid_can_query (MbimService service,
         return cid_atds_config[cid - 1].query;
     case MBIM_SERVICE_INTEL_FIRMWARE_UPDATE:
         return cid_intel_firmware_update_config[cid - 1].query;
+    case MBIM_SERVICE_BASIC_CONNECT_EXTENSIONS:
+        return cid_basic_connect_extensions_config[cid - 1].query;
     default:
         g_assert_not_reached ();
         return FALSE;
@@ -313,6 +332,8 @@ mbim_cid_can_notify (MbimService service,
         return cid_atds_config[cid - 1].notify;
     case MBIM_SERVICE_INTEL_FIRMWARE_UPDATE:
         return cid_intel_firmware_update_config[cid - 1].notify;
+    case MBIM_SERVICE_BASIC_CONNECT_EXTENSIONS:
+        return cid_basic_connect_extensions_config[cid - 1].notify;
     default:
         g_assert_not_reached ();
         return FALSE;
@@ -368,6 +389,8 @@ mbim_cid_get_printable (MbimService service,
         return mbim_cid_atds_get_string (cid);
     case MBIM_SERVICE_INTEL_FIRMWARE_UPDATE:
         return mbim_cid_intel_firmware_update_get_string (cid);
+    case MBIM_SERVICE_BASIC_CONNECT_EXTENSIONS:
+        return mbim_cid_basic_connect_extensions_get_string (cid);
     default:
         g_assert_not_reached ();
         return NULL;
diff --git a/src/libmbim-glib/mbim-cid.h b/src/libmbim-glib/mbim-cid.h
index ae1fe23..65eb7d3 100644
--- a/src/libmbim-glib/mbim-cid.h
+++ b/src/libmbim-glib/mbim-cid.h
@@ -89,6 +89,36 @@ typedef enum {
     MBIM_CID_BASIC_CONNECT_MULTICARRIER_PROVIDERS         = 24,
 } MbimCidBasicConnect;
 
+/**
+ * MbimCidBasicConnectExtensions:
+ * @MBIM_CID_BASIC_CONNECT_EXTENSIONS_UNKNOWN: Unknown command.
+ * @MBIM_CID_BASIC_CONNECT_EXTENSIONS_MS_PROVISIONED_CONTEXT_V2: Provisioned contexts.
+ * @MBIM_CID_BASIC_CONNECT_EXTENSIONS_MS_NETWORK_BLACKLIST: Network blacklist.
+ * @MBIM_CID_BASIC_CONNECT_EXTENSIONS_MS_LTE_ATTACH_CONFIG: LTE attach configuration.
+ * @MBIM_CID_BASIC_CONNECT_EXTENSIONS_MS_LTE_ATTACH_STATUS: LTE attach status.
+ * @MBIM_CID_BASIC_CONNECT_EXTENSIONS_MS_SYS_CAPS: System capabilities.
+ * @MBIM_CID_BASIC_CONNECT_EXTENSIONS_MS_DEVICE_CAPS_V2: Device capabilities.
+ * @MBIM_CID_BASIC_CONNECT_EXTENSIONS_MS_DEVICE_SLOT_MAPPINGS: Device slot mappings.
+ * @MBIM_CID_BASIC_CONNECT_EXTENSIONS_MS_SLOT_INFO_STATUS: Slot info status.
+ * @MBIM_CID_BASIC_CONNECT_EXTENSIONS_PCO: Protocol configuration operations (PCO).
+ * @MBIM_CID_BASIC_CONNECT_EXTENSIONS_MS_DEVICE_RESET: Device reset.
+ *
+ * MBIM commands in the %MBIM_SERVICE_BASIC_CONNECT_EXTENSIONS service.
+ */
+typedef enum {
+    MBIM_CID_BASIC_CONNECT_EXTENSIONS_UNKNOWN                   = 0,
+    MBIM_CID_BASIC_CONNECT_EXTENSIONS_MS_PROVISIONED_CONTEXT_V2 = 1,
+    MBIM_CID_BASIC_CONNECT_EXTENSIONS_MS_NETWORK_BLACKLIST      = 2,
+    MBIM_CID_BASIC_CONNECT_EXTENSIONS_MS_LTE_ATTACH_CONFIG      = 3,
+    MBIM_CID_BASIC_CONNECT_EXTENSIONS_MS_LTE_ATTACH_STATUS      = 4,
+    MBIM_CID_BASIC_CONNECT_EXTENSIONS_MS_SYS_CAPS               = 5,
+    MBIM_CID_BASIC_CONNECT_EXTENSIONS_MS_DEVICE_CAPS_V2         = 6,
+    MBIM_CID_BASIC_CONNECT_EXTENSIONS_MS_DEVICE_SLOT_MAPPINGS   = 7,
+    MBIM_CID_BASIC_CONNECT_EXTENSIONS_MS_SLOT_INFO_STATUS       = 8,
+    MBIM_CID_BASIC_CONNECT_EXTENSIONS_PCO                       = 9,
+    MBIM_CID_BASIC_CONNECT_EXTENSIONS_MS_DEVICE_RESET           = 10,
+} MbimCidBasicConnectExtensions;
+
 /**
  * MbimCidSms:
  * @MBIM_CID_SMS_UNKNOWN: Unknown command.
diff --git a/src/libmbim-glib/mbim-enums.h b/src/libmbim-glib/mbim-enums.h
index 7fc0baa..4681d33 100644
--- a/src/libmbim-glib/mbim-enums.h
+++ b/src/libmbim-glib/mbim-enums.h
@@ -1022,6 +1022,21 @@ typedef enum {
     MBIM_ATDS_PROVIDER_PLMN_MODE_LTE = 7,
 } MbimAtdsProviderPlmnMode;
 
+/*****************************************************************************/
+/* 'PCO' enums */
+
+/**
+ * MbimPcoType:
+ * @MBIM_PCO_TYPE_COMPLETE: The PCO structure is complete.
+ * @MBIM_PCO_TYPE_PARTIAL: The PCO structure is a subset of what was received from the network.
+ *
+ * Type of PCO structure.
+ */
+typedef enum {
+    MBIM_PCO_TYPE_COMPLETE = 0,
+    MBIM_PCO_TYPE_PARTIAL  = 1
+} MbimPcoType;
+
 G_END_DECLS
 
 #endif /* _LIBMBIM_GLIB_MBIM_ENUMS_H_ */
diff --git a/src/libmbim-glib/mbim-uuid.c b/src/libmbim-glib/mbim-uuid.c
index d77be39..7b0c182 100644
--- a/src/libmbim-glib/mbim-uuid.c
+++ b/src/libmbim-glib/mbim-uuid.c
@@ -252,6 +252,14 @@ static const MbimUuid uuid_intel_firmware_update = {
     .e = { 0x3b, 0x3f, 0xd7, 0x6f, 0x56, 0x41 }
 };
 
+static const MbimUuid uuid_basic_connect_extensions = {
+    .a = { 0x3d, 0x01, 0xdc, 0xc5 },
+    .b = { 0xfe, 0xf5 },
+    .c = { 0x4d, 0x05 },
+    .d = { 0x9d, 0x3a },
+    .e = { 0xbe, 0xf7, 0x05, 0x8e, 0x9a, 0xaf }
+};
+
 static GList *mbim_custom_service_list = NULL;
 
 typedef struct {
@@ -423,6 +431,8 @@ mbim_uuid_from_service (MbimService service)
         return &uuid_atds;
     case MBIM_SERVICE_INTEL_FIRMWARE_UPDATE:
         return &uuid_intel_firmware_update;
+    case MBIM_SERVICE_BASIC_CONNECT_EXTENSIONS:
+        return &uuid_basic_connect_extensions;
     default:
         for (l = mbim_custom_service_list; l != NULL; l = l->next) {
             if (service == ((MbimCustomService *)l->data)->service_id)
@@ -484,6 +494,9 @@ mbim_uuid_to_service (const MbimUuid *uuid)
     if (mbim_uuid_cmp (uuid, &uuid_intel_firmware_update))
         return MBIM_SERVICE_INTEL_FIRMWARE_UPDATE;
 
+    if (mbim_uuid_cmp (uuid, &uuid_basic_connect_extensions))
+        return MBIM_SERVICE_BASIC_CONNECT_EXTENSIONS;
+
     for (l = mbim_custom_service_list; l != NULL; l = l->next) {
         if (mbim_uuid_cmp (&((MbimCustomService *)l->data)->uuid, uuid))
             return ((MbimCustomService *)l->data)->service_id;
diff --git a/src/libmbim-glib/mbim-uuid.h b/src/libmbim-glib/mbim-uuid.h
index 59b6338..d8224a9 100644
--- a/src/libmbim-glib/mbim-uuid.h
+++ b/src/libmbim-glib/mbim-uuid.h
@@ -74,6 +74,7 @@ gboolean  mbim_uuid_from_printable (const gchar *str,
  * @MBIM_SERVICE_QMI: QMI-over-MBIM service.
  * @MBIM_SERVICE_ATDS: ATT Device service.
  * @MBIM_SERVICE_INTEL_FIRMWARE_UPDATE: Intel firmware update service.
+ * @MBIM_SERVICE_BASIC_CONNECT_EXTENSIONS: Basic connectivity extensions service.
  * @MBIM_SERVICE_LAST: Internal value.
  *
  * Enumeration of the generic MBIM services.
@@ -93,6 +94,7 @@ typedef enum {
     MBIM_SERVICE_QMI              = 11,
     MBIM_SERVICE_ATDS             = 12,
     MBIM_SERVICE_INTEL_FIRMWARE_UPDATE = 13,
+    MBIM_SERVICE_BASIC_CONNECT_EXTENSIONS = 14,
 #if defined LIBMBIM_GLIB_COMPILATION
     MBIM_SERVICE_LAST /*< skip >*/
 #endif
@@ -224,6 +226,15 @@ typedef enum {
  */
 #define MBIM_UUID_INTEL_FIRMWARE_UPDATE mbim_uuid_from_service (MBIM_SERVICE_INTEL_FIRMWARE_UPDATE)
 
+/**
+ * MBIM_UUID_BASIC_CONNECT_EXTENSIONS:
+ *
+ * Get the UUID of the %MBIM_SERVICE_BASIC_CONNECT_EXTENSIONS service.
+ *
+ * Returns: (transfer none): a #MbimUuid.
+ */
+#define MBIM_UUID_BASIC_CONNECT_EXTENSIONS mbim_uuid_from_service (MBIM_SERVICE_BASIC_CONNECT_EXTENSIONS)
+
 const gchar *mbim_service_lookup_name (guint service);
 
 guint mbim_register_custom_service (const MbimUuid *uuid,
diff --git a/src/libmbim-glib/test/test-uuid.c b/src/libmbim-glib/test/test-uuid.c
index accf45b..2e5717e 100644
--- a/src/libmbim-glib/test/test-uuid.c
+++ b/src/libmbim-glib/test/test-uuid.c
@@ -98,6 +98,13 @@ test_uuid_intel_firmware_update (void)
                           "0ed374cb-f835-4474-bc11-3b3fd76f5641");
 }
 
+static void
+test_uuid_basic_connect_extensions (void)
+{
+    compare_uuid_strings (MBIM_UUID_BASIC_CONNECT_EXTENSIONS,
+                          "3d01dcc5-fef5-4d05-9d3a-bef7058e9aaf");
+}
+
 /*****************************************************************************/
 
 static void
@@ -208,6 +215,7 @@ int main (int argc, char **argv)
     g_test_add_func ("/libmbim-glib/uuid/ms-firmware-id",   test_uuid_ms_firmware_id);
     g_test_add_func ("/libmbim-glib/uuid/ms-host-shutdown", test_uuid_ms_host_shutdown);
     g_test_add_func ("/libmbim-glib/uuid/intel-firmware-update", test_uuid_intel_firmware_update);
+    g_test_add_func ("/libmbim-glib/uuid/basic-connect-extensions", test_uuid_basic_connect_extensions);
 
     g_test_add_func ("/libmbim-glib/uuid/valid",           test_uuid_valid);
     g_test_add_func ("/libmbim-glib/uuid/valid/camelcase", test_uuid_valid_camelcase);
-- 
2.18.0.345.g5c9ce644c3-goog



More information about the libmbim-devel mailing list