[PATCH 1/2 v2] ms-host-shutdown: add support for the Microsoft Host Shutdown service

Ben Chan benchan at chromium.org
Tue Mar 4 11:09:53 PST 2014


---
 data/Makefile.am                             |  3 +-
 data/mbim-service-ms-host-shutdown.json      | 11 ++++++
 src/libmbim-glib/generated/Makefile.am       | 18 ++++++++--
 src/libmbim-glib/libmbim-glib.h              |  1 +
 src/libmbim-glib/mbim-cid.c                  | 23 ++++++++++---
 src/libmbim-glib/mbim-cid.h                  | 12 +++++++
 src/libmbim-glib/mbim-message.c              |  2 +-
 src/libmbim-glib/mbim-uuid.c                 | 15 +++++++-
 src/libmbim-glib/mbim-uuid.h                 | 29 +++++++++++-----
 src/libmbim-glib/test/test-cid.c             | 25 +++++++++-----
 src/libmbim-glib/test/test-message-builder.c | 51 ++++++++++++++++++++++++++++
 src/libmbim-glib/test/test-uuid.c            | 25 +++++++++-----
 12 files changed, 180 insertions(+), 35 deletions(-)
 create mode 100644 data/mbim-service-ms-host-shutdown.json

diff --git a/data/Makefile.am b/data/Makefile.am
index 0637465..f6820cc 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -8,4 +8,5 @@ EXTRA_DIST = \
 	mbim-service-phonebook.json \
 	mbim-service-stk.json \
 	mbim-service-dss.json \
-	mbim-service-ms-firmware-id.json
+	mbim-service-ms-firmware-id.json \
+	mbim-service-ms-host-shutdown.json
diff --git a/data/mbim-service-ms-host-shutdown.json b/data/mbim-service-ms-host-shutdown.json
new file mode 100644
index 0000000..9240295
--- /dev/null
+++ b/data/mbim-service-ms-host-shutdown.json
@@ -0,0 +1,11 @@
+[
+  // *********************************************************************************
+  { "type" : "Service",
+    "name" : "MS Host Shutdown" },
+
+  // *********************************************************************************
+  { "name"     : "Notify",
+    "service"  : "MS Host Shutdown",
+    "type"     : "Command",
+    "set"      : [] }
+]
diff --git a/src/libmbim-glib/generated/Makefile.am b/src/libmbim-glib/generated/Makefile.am
index c351043..43a79aa 100644
--- a/src/libmbim-glib/generated/Makefile.am
+++ b/src/libmbim-glib/generated/Makefile.am
@@ -10,7 +10,8 @@ GENERATED_H = \
 	mbim-phonebook.h \
 	mbim-stk.h \
 	mbim-dss.h \
-	mbim-ms-firmware-id.h
+	mbim-ms-firmware-id.h \
+	mbim-ms-host-shutdown.h
 
 GENERATED_C = \
 	mbim-error-types.c \
@@ -23,7 +24,8 @@ GENERATED_C = \
 	mbim-phonebook.c \
 	mbim-stk.c \
 	mbim-dss.c \
-	mbim-ms-firmware-id.c
+	mbim-ms-firmware-id.c \
+	mbim-ms-host-shutdown.c
 
 GENERATED_SECTIONS = \
 	mbim-basic-connect.sections \
@@ -33,7 +35,8 @@ GENERATED_SECTIONS = \
 	mbim-phonebook.sections \
 	mbim-stk.sections \
 	mbim-dss.sections \
-	mbim-ms-firmware-id.sections
+	mbim-ms-firmware-id.sections \
+	mbim-ms-host-shutdown.sections
 
 # Error types
 mbim-error-types.h: $(top_srcdir)/src/libmbim-glib/mbim-errors.h $(top_srcdir)/build-aux/templates/mbim-error-types-template.h
@@ -146,6 +149,15 @@ mbim-ms-firmware-id.h mbim-ms-firmware-id.c mbim-ms-firmware-id.sections: $(top_
 			--input $(top_srcdir)/data/mbim-service-ms-firmware-id.json \
 			--output mbim-ms-firmware-id
 
+# Microsoft Host Shutdown service
+mbim-ms-host-shutdown.h mbim-ms-host-shutdown.c mbim-ms-host-shutdown.sections: $(top_srcdir)/data/mbim-service-ms-host-shutdown.json $(top_srcdir)/build-aux/mbim-codegen/*.py $(top_srcdir)/build-aux/mbim-codegen/mbim-codegen
+	$(AM_V_GEN)  \
+		rm -f mbim-ms-host-shutdown.h && \
+		rm -f mbim-ms-host-shutdown.c && \
+		$(top_srcdir)/build-aux/mbim-codegen/mbim-codegen \
+			--input $(top_srcdir)/data/mbim-service-ms-host-shutdown.json \
+			--output mbim-ms-host-shutdown
+
 BUILT_SOURCES = $(GENERATED_H) $(GENERATED_C)
 
 nodist_libmbim_glib_generated_la_SOURCES = \
diff --git a/src/libmbim-glib/libmbim-glib.h b/src/libmbim-glib/libmbim-glib.h
index 12089b2..f6a7d65 100644
--- a/src/libmbim-glib/libmbim-glib.h
+++ b/src/libmbim-glib/libmbim-glib.h
@@ -46,5 +46,6 @@
 #include "mbim-stk.h"
 #include "mbim-dss.h"
 #include "mbim-ms-firmware-id.h"
+#include "mbim-ms-host-shutdown.h"
 
 #endif /* _LIBMBIM_GLIB_H_ */
diff --git a/src/libmbim-glib/mbim-cid.c b/src/libmbim-glib/mbim-cid.c
index fb79310..9f9bae2 100644
--- a/src/libmbim-glib/mbim-cid.c
+++ b/src/libmbim-glib/mbim-cid.c
@@ -119,6 +119,12 @@ static const CidConfig cid_ms_firmware_id_config [MBIM_CID_MS_FIRMWARE_ID_LAST]
     { FALSE, TRUE,  FALSE }, /* MBIM_CID_MS_FIRMWARE_ID_GET */
 };
 
+/* Note: index of the array is CID-1 */
+#define MBIM_CID_MS_HOST_SHUTDOWN_LAST MBIM_CID_MS_HOST_SHUTDOWN_NOTIFY
+static const CidConfig cid_ms_host_shutdown_config [MBIM_CID_MS_HOST_SHUTDOWN_LAST] = {
+    { TRUE,  FALSE, FALSE }, /* MBIM_CID_MS_HOST_SHUTDOWN_NOTIFY */
+};
+
 /**
  * mbim_cid_can_set:
  * @service: a #MbimService.
@@ -136,7 +142,7 @@ mbim_cid_can_set (MbimService service,
     g_return_val_if_fail (cid > 0, FALSE);
     /* Known service required */
     g_return_val_if_fail (service > MBIM_SERVICE_INVALID, FALSE);
-    g_return_val_if_fail (service <= MBIM_SERVICE_MS_FIRMWARE_ID, FALSE);
+    g_return_val_if_fail (service <= MBIM_SERVICE_MS_HOST_SHUTDOWN, FALSE);
 
     switch (service) {
     case MBIM_SERVICE_BASIC_CONNECT:
@@ -155,6 +161,8 @@ mbim_cid_can_set (MbimService service,
         return cid_dss_config[cid - 1].set;
     case MBIM_SERVICE_MS_FIRMWARE_ID:
         return cid_ms_firmware_id_config[cid - 1].set;
+    case MBIM_SERVICE_MS_HOST_SHUTDOWN:
+        return cid_ms_host_shutdown_config[cid - 1].set;
     default:
         g_assert_not_reached ();
         return FALSE;
@@ -178,7 +186,7 @@ mbim_cid_can_query (MbimService service,
     g_return_val_if_fail (cid > 0, FALSE);
     /* Known service required */
     g_return_val_if_fail (service > MBIM_SERVICE_INVALID, FALSE);
-    g_return_val_if_fail (service <= MBIM_SERVICE_MS_FIRMWARE_ID, FALSE);
+    g_return_val_if_fail (service <= MBIM_SERVICE_MS_HOST_SHUTDOWN, FALSE);
 
     switch (service) {
     case MBIM_SERVICE_BASIC_CONNECT:
@@ -197,6 +205,8 @@ mbim_cid_can_query (MbimService service,
         return cid_dss_config[cid - 1].query;
     case MBIM_SERVICE_MS_FIRMWARE_ID:
         return cid_ms_firmware_id_config[cid - 1].query;
+    case MBIM_SERVICE_MS_HOST_SHUTDOWN:
+        return cid_ms_host_shutdown_config[cid - 1].query;
     default:
         g_assert_not_reached ();
         return FALSE;
@@ -220,7 +230,7 @@ mbim_cid_can_notify (MbimService service,
     g_return_val_if_fail (cid > 0, FALSE);
     /* Known service required */
     g_return_val_if_fail (service > MBIM_SERVICE_INVALID, FALSE);
-    g_return_val_if_fail (service <= MBIM_SERVICE_MS_FIRMWARE_ID, FALSE);
+    g_return_val_if_fail (service <= MBIM_SERVICE_MS_HOST_SHUTDOWN, FALSE);
 
     switch (service) {
     case MBIM_SERVICE_BASIC_CONNECT:
@@ -239,6 +249,9 @@ mbim_cid_can_notify (MbimService service,
         return cid_dss_config[cid - 1].notify;
     case MBIM_SERVICE_MS_FIRMWARE_ID:
         return cid_ms_firmware_id_config[cid - 1].notify;
+    case MBIM_SERVICE_MS_HOST_SHUTDOWN:
+        return cid_ms_host_shutdown_config[cid - 1].notify;
+
     default:
         g_assert_not_reached ();
         return FALSE;
@@ -263,7 +276,7 @@ mbim_cid_get_printable (MbimService service,
     g_return_val_if_fail (cid > 0, NULL);
     /* Known service required */
     g_return_val_if_fail (service > MBIM_SERVICE_INVALID, NULL);
-    g_return_val_if_fail (service <= MBIM_SERVICE_MS_FIRMWARE_ID, NULL);
+    g_return_val_if_fail (service <= MBIM_SERVICE_MS_HOST_SHUTDOWN, NULL);
 
     switch (service) {
     case MBIM_SERVICE_BASIC_CONNECT:
@@ -282,6 +295,8 @@ mbim_cid_get_printable (MbimService service,
         return mbim_cid_dss_get_string (cid);
     case MBIM_SERVICE_MS_FIRMWARE_ID:
         return mbim_cid_ms_firmware_id_get_string (cid);
+    case MBIM_SERVICE_MS_HOST_SHUTDOWN:
+        return mbim_cid_ms_host_shutdown_get_string (cid);
     default:
         g_assert_not_reached ();
         return FALSE;
diff --git a/src/libmbim-glib/mbim-cid.h b/src/libmbim-glib/mbim-cid.h
index d3d2ee9..af93c79 100644
--- a/src/libmbim-glib/mbim-cid.h
+++ b/src/libmbim-glib/mbim-cid.h
@@ -195,6 +195,18 @@ typedef enum {
     MBIM_CID_MS_FIRMWARE_ID_GET     = 1
 } MbimCidMsFirmwareId;
 
+/**
+ * MbimCidMsHostShutdown:
+ * @MBIM_CID_MS_HOST_SHUTDOWN_UNKNOWN: Unknown command.
+ * @MBIM_CID_MS_HOST_SHUTDOWN_NOTIFY: Notify that the host is shutting down.
+ *
+ * MBIM commands in the %MBIM_SERVICE_MS_HOST_SHUTDOWN service.
+ */
+typedef enum {
+    MBIM_CID_MS_HOST_SHUTDOWN_UNKNOWN = 0,
+    MBIM_CID_MS_HOST_SHUTDOWN_NOTIFY  = 1
+} MbimCidMsHostShutdown;
+
 /* Command helpers */
 
 gboolean     mbim_cid_can_set       (MbimService service,
diff --git a/src/libmbim-glib/mbim-message.c b/src/libmbim-glib/mbim-message.c
index 3089ed1..bbd9d5f 100644
--- a/src/libmbim-glib/mbim-message.c
+++ b/src/libmbim-glib/mbim-message.c
@@ -1738,7 +1738,7 @@ mbim_message_command_new (guint32                transaction_id,
 
     /* Known service required */
     g_return_val_if_fail (service > MBIM_SERVICE_INVALID, FALSE);
-    g_return_val_if_fail (service <= MBIM_SERVICE_MS_FIRMWARE_ID, FALSE);
+    g_return_val_if_fail (service <= MBIM_SERVICE_MS_HOST_SHUTDOWN, FALSE);
     service_id = mbim_uuid_from_service (service);
 
     self = _mbim_message_allocate (MBIM_MESSAGE_TYPE_COMMAND,
diff --git a/src/libmbim-glib/mbim-uuid.c b/src/libmbim-glib/mbim-uuid.c
index 82ad609..bd5624e 100644
--- a/src/libmbim-glib/mbim-uuid.c
+++ b/src/libmbim-glib/mbim-uuid.c
@@ -151,6 +151,14 @@ static const MbimUuid uuid_ms_firmware_id = {
     .e = { 0x90, 0xa3, 0x69, 0x41, 0x03, 0xb6 }
 };
 
+static const MbimUuid uuid_ms_host_shutdown = {
+    .a = { 0x88, 0x3b, 0x7c, 0x26 },
+    .b = { 0x98, 0x5f },
+    .c = { 0x43, 0xfa },
+    .d = { 0x98, 0x04 },
+    .e = { 0x27, 0xd7, 0xfb, 0x80, 0x95, 0x9c }
+};
+
 /**
  * mbim_uuid_from_service:
  * @service: a #MbimService.
@@ -162,7 +170,7 @@ static const MbimUuid uuid_ms_firmware_id = {
 const MbimUuid *
 mbim_uuid_from_service (MbimService service)
 {
-    g_return_val_if_fail (service >= MBIM_SERVICE_INVALID && service <= MBIM_SERVICE_MS_FIRMWARE_ID,
+    g_return_val_if_fail (service >= MBIM_SERVICE_INVALID && service <= MBIM_SERVICE_MS_HOST_SHUTDOWN,
                           &uuid_invalid);
 
     switch (service) {
@@ -184,6 +192,8 @@ mbim_uuid_from_service (MbimService service)
         return &uuid_dss;
     case MBIM_SERVICE_MS_FIRMWARE_ID:
         return &uuid_ms_firmware_id;
+    case MBIM_SERVICE_MS_HOST_SHUTDOWN:
+        return &uuid_ms_host_shutdown;
     default:
         g_assert_not_reached ();
     }
@@ -224,6 +234,9 @@ mbim_uuid_to_service (const MbimUuid *uuid)
     if (mbim_uuid_cmp (uuid, &uuid_ms_firmware_id))
         return MBIM_SERVICE_MS_FIRMWARE_ID;
 
+    if (mbim_uuid_cmp (uuid, &uuid_ms_host_shutdown))
+        return MBIM_SERVICE_MS_HOST_SHUTDOWN;
+
     return MBIM_SERVICE_INVALID;
 }
 
diff --git a/src/libmbim-glib/mbim-uuid.h b/src/libmbim-glib/mbim-uuid.h
index c05ce41..fb47ffb 100644
--- a/src/libmbim-glib/mbim-uuid.h
+++ b/src/libmbim-glib/mbim-uuid.h
@@ -67,19 +67,21 @@ gchar    *mbim_uuid_get_printable (const MbimUuid *uuid);
  * @MBIM_SERVICE_AUTH: Authentication service.
  * @MBIM_SERVICE_DSS: Device Service Stream service.
  * @MBIM_SERVICE_MS_FIRMWARE_ID: Microsoft Firmware ID service.
+ * @MBIM_SERVICE_MS_HOST_SHUTDOWN: Microsoft Host Shutdown service.
  *
  * Enumeration of the generic MBIM services.
  */
 typedef enum {
-    MBIM_SERVICE_INVALID        = 0,
-    MBIM_SERVICE_BASIC_CONNECT  = 1,
-    MBIM_SERVICE_SMS            = 2,
-    MBIM_SERVICE_USSD           = 3,
-    MBIM_SERVICE_PHONEBOOK      = 4,
-    MBIM_SERVICE_STK            = 5,
-    MBIM_SERVICE_AUTH           = 6,
-    MBIM_SERVICE_DSS            = 7,
-    MBIM_SERVICE_MS_FIRMWARE_ID = 8,
+    MBIM_SERVICE_INVALID          = 0,
+    MBIM_SERVICE_BASIC_CONNECT    = 1,
+    MBIM_SERVICE_SMS              = 2,
+    MBIM_SERVICE_USSD             = 3,
+    MBIM_SERVICE_PHONEBOOK        = 4,
+    MBIM_SERVICE_STK              = 5,
+    MBIM_SERVICE_AUTH             = 6,
+    MBIM_SERVICE_DSS              = 7,
+    MBIM_SERVICE_MS_FIRMWARE_ID   = 8,
+    MBIM_SERVICE_MS_HOST_SHUTDOWN = 9,
 } MbimService;
 
 /**
@@ -163,6 +165,15 @@ typedef enum {
  */
 #define MBIM_UUID_MS_FIRMWARE_ID mbim_uuid_from_service (MBIM_SERVICE_MS_FIRMWARE_ID)
 
+/**
+ * MBIM_UUID_MS_HOST_SHUTDOWN:
+ *
+ * Get the UUID of the %MBIM_SERVICE_MS_HOST_SHUTDOWN service.
+ *
+ * Returns: (transfer none): a #MbimUuid.
+ */
+#define MBIM_UUID_MS_HOST_SHUTDOWN mbim_uuid_from_service (MBIM_SERVICE_MS_HOST_SHUTDOWN)
+
 /* To/From service */
 const MbimUuid *mbim_uuid_from_service  (MbimService     service);
 MbimService     mbim_uuid_to_service    (const MbimUuid *uuid);
diff --git a/src/libmbim-glib/test/test-cid.c b/src/libmbim-glib/test/test-cid.c
index f78a5be..fd8c86e 100644
--- a/src/libmbim-glib/test/test-cid.c
+++ b/src/libmbim-glib/test/test-cid.c
@@ -113,18 +113,27 @@ test_cid_ms_firmware_id (void)
                  FALSE, TRUE, FALSE);
 }
 
+static void
+test_cid_ms_host_shutdown (void)
+{
+    test_common (MBIM_SERVICE_MS_HOST_SHUTDOWN,
+                 MBIM_CID_MS_HOST_SHUTDOWN_NOTIFY,
+                 TRUE, FALSE, FALSE);
+}
+
 int main (int argc, char **argv)
 {
     g_test_init (&argc, &argv, NULL);
 
-    g_test_add_func ("/libmbim-glib/cid/basic-connect",  test_cid_basic_connect);
-    g_test_add_func ("/libmbim-glib/cid/sms",            test_cid_sms);
-    g_test_add_func ("/libmbim-glib/cid/ussd",           test_cid_ussd);
-    g_test_add_func ("/libmbim-glib/cid/phonebook",      test_cid_phonebook);
-    g_test_add_func ("/libmbim-glib/cid/stk",            test_cid_stk);
-    g_test_add_func ("/libmbim-glib/cid/auth",           test_cid_auth);
-    g_test_add_func ("/libmbim-glib/cid/dss",            test_cid_dss);
-    g_test_add_func ("/libmbim-glib/cid/ms-firmware-id", test_cid_ms_firmware_id);
+    g_test_add_func ("/libmbim-glib/cid/basic-connect",    test_cid_basic_connect);
+    g_test_add_func ("/libmbim-glib/cid/sms",              test_cid_sms);
+    g_test_add_func ("/libmbim-glib/cid/ussd",             test_cid_ussd);
+    g_test_add_func ("/libmbim-glib/cid/phonebook",        test_cid_phonebook);
+    g_test_add_func ("/libmbim-glib/cid/stk",              test_cid_stk);
+    g_test_add_func ("/libmbim-glib/cid/auth",             test_cid_auth);
+    g_test_add_func ("/libmbim-glib/cid/dss",              test_cid_dss);
+    g_test_add_func ("/libmbim-glib/cid/ms-firmware-id",   test_cid_ms_firmware_id);
+    g_test_add_func ("/libmbim-glib/cid/ms-host-shutdown", test_cid_ms_host_shutdown);
 
     return g_test_run ();
 }
diff --git a/src/libmbim-glib/test/test-message-builder.c b/src/libmbim-glib/test/test-message-builder.c
index 239a8bf..5bbe8c8 100644
--- a/src/libmbim-glib/test/test-message-builder.c
+++ b/src/libmbim-glib/test/test-message-builder.c
@@ -26,6 +26,7 @@
 #include "mbim-auth.h"
 #include "mbim-stk.h"
 #include "mbim-dss.h"
+#include "mbim-ms-host-shutdown.h"
 
 #if defined ENABLE_TEST_MESSAGE_TRACES
 static void
@@ -1296,6 +1297,55 @@ test_message_builder_basic_connect_multicarrier_providers_set (void)
     mbim_provider_array_free (providers);
 }
 
+static void
+test_message_builder_ms_host_shutdown_notify_set (void)
+{
+    GError *error = NULL;
+    MbimMessage *message;
+    const guint8 expected_message [] = {
+        /* header */
+        0x03, 0x00, 0x00, 0x00, /* type */
+        0x30, 0x00, 0x00, 0x00, /* length */
+        0x01, 0x00, 0x00, 0x00, /* transaction id */
+        /* fragment header */
+        0x01, 0x00, 0x00, 0x00, /* total */
+        0x00, 0x00, 0x00, 0x00, /* current */
+        /* command_message */
+        0x88, 0x3B, 0x7C, 0x26, /* service id */
+        0x98, 0x5F, 0x43, 0xFA,
+        0x98, 0x04, 0x27, 0xD7,
+        0xFB, 0x80, 0x95, 0x9C,
+        0x01, 0x00, 0x00, 0x00, /* command id */
+        0x01, 0x00, 0x00, 0x00, /* command_type */
+        0x00, 0x00, 0x00, 0x00, /* buffer_length */
+        /* information buffer */
+    };
+
+    /* MS Host Shutdown set message */
+    message = mbim_message_ms_host_shutdown_notify_set_new (&error);
+    g_assert_no_error (error);
+    g_assert (message != NULL);
+    mbim_message_set_transaction_id (message, 1);
+
+    test_message_trace ((const guint8 *)((GByteArray *)message)->data,
+                        ((GByteArray *)message)->len,
+                        expected_message,
+                        sizeof (expected_message));
+
+    g_assert_cmpuint (mbim_message_get_transaction_id (message), ==, 1);
+    g_assert_cmpuint (mbim_message_get_message_type   (message), ==, MBIM_MESSAGE_TYPE_COMMAND);
+    g_assert_cmpuint (mbim_message_get_message_length (message), ==, sizeof (expected_message));
+
+    g_assert_cmpuint (mbim_message_command_get_service      (message), ==, MBIM_SERVICE_MS_HOST_SHUTDOWN);
+    g_assert_cmpuint (mbim_message_command_get_cid          (message), ==, MBIM_CID_MS_HOST_SHUTDOWN_NOTIFY);
+    g_assert_cmpuint (mbim_message_command_get_command_type (message), ==, MBIM_MESSAGE_COMMAND_TYPE_SET);
+
+    g_assert_cmpuint (((GByteArray *)message)->len, ==, sizeof (expected_message));
+    g_assert (memcmp (((GByteArray *)message)->data, expected_message, sizeof (expected_message)) == 0);
+
+    mbim_message_unref (message);
+}
+
 int main (int argc, char **argv)
 {
     g_test_init (&argc, &argv, NULL);
@@ -1316,6 +1366,7 @@ int main (int argc, char **argv)
     g_test_add_func ("/libmbim-glib/message/builder/basic-connect/ip-packet-filters/set/two", test_message_builder_basic_connect_ip_packet_filters_set_two);
     g_test_add_func ("/libmbim-glib/message/builder/dss/connect/set", test_message_builder_dss_connect_set);
     g_test_add_func ("/libmbim-glib/message/builder/basic-connect/multicarrier-providers/set", test_message_builder_basic_connect_multicarrier_providers_set);
+    g_test_add_func ("/libmbim-glib/message/builder/ms-host-shutdown/notify/set", test_message_builder_ms_host_shutdown_notify_set);
 
     return g_test_run ();
 }
diff --git a/src/libmbim-glib/test/test-uuid.c b/src/libmbim-glib/test/test-uuid.c
index 8b0667c..f1d9004 100644
--- a/src/libmbim-glib/test/test-uuid.c
+++ b/src/libmbim-glib/test/test-uuid.c
@@ -83,18 +83,27 @@ test_uuid_ms_firmware_id (void)
     compare_uuid_strings (MBIM_UUID_MS_FIRMWARE_ID,
                           "e9f7dea2-feaf-4009-93ce-90a3694103b6");
 }
+
+static void
+test_uuid_ms_host_shutdown (void)
+{
+    compare_uuid_strings (MBIM_UUID_MS_HOST_SHUTDOWN,
+                          "883b7c26-985f-43fa-9804-27d7fb80959c");
+}
+
 int main (int argc, char **argv)
 {
     g_test_init (&argc, &argv, NULL);
 
-    g_test_add_func ("/libmbim-glib/uuid/basic-connect",  test_uuid_basic_connect);
-    g_test_add_func ("/libmbim-glib/uuid/sms",            test_uuid_sms);
-    g_test_add_func ("/libmbim-glib/uuid/ussd",           test_uuid_ussd);
-    g_test_add_func ("/libmbim-glib/uuid/phonebook",      test_uuid_phonebook);
-    g_test_add_func ("/libmbim-glib/uuid/stk",            test_uuid_stk);
-    g_test_add_func ("/libmbim-glib/uuid/auth",           test_uuid_auth);
-    g_test_add_func ("/libmbim-glib/uuid/dss",            test_uuid_dss);
-    g_test_add_func ("/libmbim-glib/uuid/ms-firmware-id", test_uuid_ms_firmware_id);
+    g_test_add_func ("/libmbim-glib/uuid/basic-connect",    test_uuid_basic_connect);
+    g_test_add_func ("/libmbim-glib/uuid/sms",              test_uuid_sms);
+    g_test_add_func ("/libmbim-glib/uuid/ussd",             test_uuid_ussd);
+    g_test_add_func ("/libmbim-glib/uuid/phonebook",        test_uuid_phonebook);
+    g_test_add_func ("/libmbim-glib/uuid/stk",              test_uuid_stk);
+    g_test_add_func ("/libmbim-glib/uuid/auth",             test_uuid_auth);
+    g_test_add_func ("/libmbim-glib/uuid/dss",              test_uuid_dss);
+    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);
 
     return g_test_run ();
 }
-- 
1.9.0.279.gdc9e3eb



More information about the ModemManager-devel mailing list