[PATCH v2] uim: implement 'Card Status' indication

Aleksander Morgado aleksander at aleksander.es
Sun Dec 16 08:06:47 UTC 2018


On 12/12/18 20:19, Ben Chan wrote:
> ---
>  data/qmi-service-uim.json                     | 165 ++++++++++--------
>  .../libqmi-glib/libqmi-glib-docs.xml          |   4 +
>  2 files changed, 95 insertions(+), 74 deletions(-)
> 

Thanks, pushed.
I've also pushed a follow-up commit to fix the 'since' version in the request/response, which was bumped to 1.22 in your patch.

> diff --git a/data/qmi-service-uim.json b/data/qmi-service-uim.json
> index 860acbe..89045d8 100644
> --- a/data/qmi-service-uim.json
> +++ b/data/qmi-service-uim.json
> @@ -13,6 +13,86 @@
>    {  "name"    : "QMI Message UIM",
>       "type"    : "Message-ID-Enum" },
>  
> +  // *********************************************************************************
> +  {  "name"    : "QMI Indication UIM",
> +     "type"    : "Indication-ID-Enum" },
> +
> +  // *********************************************************************************
> +  { "common-ref"    : "UIM Card Status",
> +    "name"          : "Card Status",
> +    "id"            : "0x10",
> +    "type"          : "TLV",
> +    "since"         : "1.22",
> +    "format"        : "sequence",
> +    "contents"      : [ { "name"   : "Index GW Primary",
> +                          "format" : "guint16" },
> +                        { "name"   : "Index 1x Primary",
> +                          "format" : "guint16" },
> +                        { "name"   : "Index GW Secondary",
> +                          "format" : "guint16" },
> +                        { "name"   : "Index 1x Secondary",
> +                          "format" : "guint16" },
> +                        { "name"               : "Cards",
> +                          "format"             : "array",
> +                          "size-prefix-format" : "guint8",
> +                          "array-element"      : { "name"   : "Element",
> +                                                   "format" : "struct",
> +                                                   "contents" : [ { "name"          : "Card State",
> +                                                                    "format"        : "guint8",
> +                                                                    "public-format" : "QmiUimCardState" },
> +                                                                  { "name"          : "UPIN State",
> +                                                                    "format"        : "guint8",
> +                                                                    "public-format" : "QmiUimPinState" },
> +                                                                  { "name"   : "UPIN Retries",
> +                                                                    "format" : "guint8" },
> +                                                                  { "name"   : "UPUK Retries",
> +                                                                    "format" : "guint8" },
> +                                                                  { "name"          : "Error code",
> +                                                                    "format"        : "guint8",
> +                                                                    "public-format" : "QmiUimCardError" },
> +                                                                  { "name"               : "Applications",
> +                                                                    "format"             : "array",
> +                                                                    "size-prefix-format" : "guint8",
> +                                                                    "array-element"      : { "name"   : "Element",
> +                                                                                             "format" : "struct",
> +                                                                                             "contents" : [ { "name"          : "Type",
> +                                                                                                              "format"        : "guint8",
> +                                                                                                              "public-format" : "QmiUimCardApplicationType" },
> +                                                                                                            { "name"          : "State",
> +                                                                                                              "format"        : "guint8",
> +                                                                                                              "public-format" : "QmiUimCardApplicationState" },
> +                                                                                                            { "name"          : "Personalization State",
> +                                                                                                              "format"        : "guint8",
> +                                                                                                              "public-format" : "QmiUimCardApplicationPersonalizationState" },
> +                                                                                                            { "name"          : "Personalization Feature",
> +                                                                                                              "format"        : "guint8",
> +                                                                                                              "public-format" : "QmiUimCardApplicationPersonalizationFeature" },
> +                                                                                                            { "name"   : "Personalization Retries",
> +                                                                                                              "format" : "guint8" },
> +                                                                                                            { "name"   : "Personalization Unblock Retries",
> +                                                                                                              "format" : "guint8" },
> +                                                                                                            { "name"               : "Application Identifier Value",
> +                                                                                                              "format"             : "array",
> +                                                                                                              "size-prefix-format" : "guint8",
> +                                                                                                              "array-element"      : { "format" : "guint8" } },
> +                                                                                                            { "name"          : "UPIN replaces PIN1",
> +                                                                                                              "format"        : "guint8",
> +                                                                                                              "public-format" : "gboolean" },
> +                                                                                                            { "name"          : "PIN1 State",
> +                                                                                                              "format"        : "guint8",
> +                                                                                                              "public-format" : "QmiUimPinState" },
> +                                                                                                            { "name"   : "PIN1 Retries",
> +                                                                                                              "format" : "guint8" },
> +                                                                                                            { "name"   : "PUK1 Retries",
> +                                                                                                              "format" : "guint8" },
> +                                                                                                            { "name"          : "PIN2 State",
> +                                                                                                              "format"        : "guint8",
> +                                                                                                              "public-format" : "QmiUimPinState" },
> +                                                                                                            { "name"   : "PIN2 Retries",
> +                                                                                                              "format" : "guint8" },
> +                                                                                                            { "name"   : "PUK2 Retries",
> +                                                                                                              "format" : "guint8" } ] } } ] } } ] },
> +
>    // *********************************************************************************
>    { "common-ref" : "UIM Session",
>      "name"       : "Session",
> @@ -492,79 +572,7 @@
>       "version" : "1.0",
>       "since"   : "1.10",
>       "output"  : [ { "common-ref" : "Operation Result" },
> -                   { "name"          : "Card Status",
> -                     "id"            : "0x10",
> -                     "type"          : "TLV",
> -                     "since"         : "1.10",
> -                     "format"        : "sequence",
> -                     "contents"      : [ { "name"   : "Index GW Primary",
> -                                           "format" : "guint16" },
> -                                         { "name"   : "Index 1x Primary",
> -                                           "format" : "guint16" },
> -                                         { "name"   : "Index GW Secondary",
> -                                           "format" : "guint16" },
> -                                         { "name"   : "Index 1x Secondary",
> -                                           "format" : "guint16" },
> -                                         { "name"               : "Cards",
> -                                           "format"             : "array",
> -                                           "size-prefix-format" : "guint8",
> -                                           "array-element"      : { "name"   : "Element",
> -                                                                    "format" : "struct",
> -                                                                    "contents" : [ { "name"          : "Card State",
> -                                                                                     "format"        : "guint8",
> -                                                                                     "public-format" : "QmiUimCardState" },
> -                                                                                   { "name"          : "UPIN State",
> -                                                                                     "format"        : "guint8",
> -                                                                                     "public-format" : "QmiUimPinState" },
> -                                                                                   { "name"   : "UPIN Retries",
> -                                                                                     "format" : "guint8" },
> -                                                                                   { "name"   : "UPUK Retries",
> -                                                                                     "format" : "guint8" },
> -                                                                                   { "name"          : "Error code",
> -                                                                                     "format"        : "guint8",
> -                                                                                     "public-format" : "QmiUimCardError" },
> -                                                                                   { "name"               : "Applications",
> -                                                                                     "format"             : "array",
> -                                                                                     "size-prefix-format" : "guint8",
> -                                                                                     "array-element"      : { "name"   : "Element",
> -                                                                                                              "format" : "struct",
> -                                                                                                              "contents" : [ { "name"          : "Type",
> -                                                                                                                               "format"        : "guint8",
> -                                                                                                                               "public-format" : "QmiUimCardApplicationType" },
> -                                                                                                                             { "name"          : "State",
> -                                                                                                                               "format"        : "guint8",
> -                                                                                                                               "public-format" : "QmiUimCardApplicationState" },
> -                                                                                                                             { "name"          : "Personalization State",
> -                                                                                                                               "format"        : "guint8",
> -                                                                                                                               "public-format" : "QmiUimCardApplicationPersonalizationState" },
> -                                                                                                                             { "name"          : "Personalization Feature",
> -                                                                                                                               "format"        : "guint8",
> -                                                                                                                               "public-format" : "QmiUimCardApplicationPersonalizationFeature" },
> -                                                                                                                             { "name"   : "Personalization Retries",
> -                                                                                                                               "format" : "guint8" },
> -                                                                                                                             { "name"   : "Personalization Unblock Retries",
> -                                                                                                                               "format" : "guint8" },
> -                                                                                                                             { "name"               : "Application Identifier Value",
> -                                                                                                                               "format"             : "array",
> -                                                                                                                               "size-prefix-format" : "guint8",
> -                                                                                                                               "array-element"      : { "format" : "guint8" } },
> -                                                                                                                             { "name"          : "UPIN replaces PIN1",
> -                                                                                                                               "format"        : "guint8",
> -                                                                                                                               "public-format" : "gboolean" },
> -                                                                                                                             { "name"          : "PIN1 State",
> -                                                                                                                               "format"        : "guint8",
> -                                                                                                                               "public-format" : "QmiUimPinState" },
> -                                                                                                                             { "name"   : "PIN1 Retries",
> -                                                                                                                               "format" : "guint8" },
> -                                                                                                                             { "name"   : "PUK1 Retries",
> -                                                                                                                               "format" : "guint8" },
> -                                                                                                                             { "name"          : "PIN2 State",
> -                                                                                                                               "format"        : "guint8",
> -                                                                                                                               "public-format" : "QmiUimPinState" },
> -                                                                                                                             { "name"   : "PIN2 Retries",
> -                                                                                                                               "format" : "guint8" },
> -                                                                                                                             { "name"   : "PUK2 Retries",
> -                                                                                                                               "format" : "guint8" } ] } } ] } } ] } ] },
> +                   { "common-ref" : "UIM Card Status" } ] },
>  
>    // *********************************************************************************
>    {  "name"    : "Power Off SIM",
> @@ -593,6 +601,15 @@
>                       "type"      : "TLV",
>                       "since"     : "1.18",
>                       "format"    : "guint8" } ],
> -     "output"  : [ { "common-ref" : "Operation Result" } ] }
> +     "output"  : [ { "common-ref" : "Operation Result" } ] },
> +
> +  // *********************************************************************************
> +  {  "name"    : "Card Status",
> +     "type"    : "Indication",
> +     "service" : "UIM",
> +     "id"      : "0x0032",
> +     "version" : "1.0",
> +     "since"   : "1.22",
> +     "output"  : [ { "common-ref"    : "UIM Card Status" } ] }
>  
>  ]
> diff --git a/docs/reference/libqmi-glib/libqmi-glib-docs.xml b/docs/reference/libqmi-glib/libqmi-glib-docs.xml
> index 34bbb6f..24f3326 100644
> --- a/docs/reference/libqmi-glib/libqmi-glib-docs.xml
> +++ b/docs/reference/libqmi-glib/libqmi-glib-docs.xml
> @@ -308,6 +308,10 @@
>      <title>User Identity Module (UIM) service</title>
>      <xi:include href="xml/qmi-client-uim.xml"/>
>      <xi:include href="xml/qmi-enums-uim.xml"/>
> +    <section>
> +      <title>UIM Indications</title>
> +      <xi:include href="xml/qmi-indication-uim-card-status.xml"/>
> +    </section>
>      <section>
>        <title>UIM Requests</title>
>        <xi:include href="xml/qmi-message-uim-reset.xml"/>
> 


-- 
Aleksander
https://aleksander.es


More information about the libqmi-devel mailing list