
/* This file is generated by glib-mkenums, do not modify it. This code is licensed under the same license as the containing project. Note that it links to GLib, so must comply with the LGPL linking clauses. */

#include "qmi-flags64-types.h"

typedef struct {
  guint64 value;
  const gchar *value_name;
  const gchar *value_nick;
} GFlags64Value;
/* enumerations from "../git/src/libqmi-glib/qmi-flags64-dms.h" */
static const GFlags64Value qmi_dms_band_capability_values[] = {
    { QMI_DMS_BAND_CAPABILITY_BC_0_A_SYSTEM, "QMI_DMS_BAND_CAPABILITY_BC_0_A_SYSTEM", "bc-0-a-system" },
    { QMI_DMS_BAND_CAPABILITY_BC_0_B_SYSTEM, "QMI_DMS_BAND_CAPABILITY_BC_0_B_SYSTEM", "bc-0-b-system" },
    { QMI_DMS_BAND_CAPABILITY_BC_1_ALL_BLOCKS, "QMI_DMS_BAND_CAPABILITY_BC_1_ALL_BLOCKS", "bc-1-all-blocks" },
    { QMI_DMS_BAND_CAPABILITY_BC_2, "QMI_DMS_BAND_CAPABILITY_BC_2", "bc-2" },
    { QMI_DMS_BAND_CAPABILITY_BC_3_A_SYSTEM, "QMI_DMS_BAND_CAPABILITY_BC_3_A_SYSTEM", "bc-3-a-system" },
    { QMI_DMS_BAND_CAPABILITY_BC_4_ALL_BLOCKS, "QMI_DMS_BAND_CAPABILITY_BC_4_ALL_BLOCKS", "bc-4-all-blocks" },
    { QMI_DMS_BAND_CAPABILITY_BC_5_ALL_BLOCKS, "QMI_DMS_BAND_CAPABILITY_BC_5_ALL_BLOCKS", "bc-5-all-blocks" },
    { QMI_DMS_BAND_CAPABILITY_GSM_DCS_1800, "QMI_DMS_BAND_CAPABILITY_GSM_DCS_1800", "gsm-dcs-1800" },
    { QMI_DMS_BAND_CAPABILITY_GSM_900_EXTENDED, "QMI_DMS_BAND_CAPABILITY_GSM_900_EXTENDED", "gsm-900-extended" },
    { QMI_DMS_BAND_CAPABILITY_GSM_900_PRIMARY, "QMI_DMS_BAND_CAPABILITY_GSM_900_PRIMARY", "gsm-900-primary" },
    { QMI_DMS_BAND_CAPABILITY_BC_6, "QMI_DMS_BAND_CAPABILITY_BC_6", "bc-6" },
    { QMI_DMS_BAND_CAPABILITY_BC_7, "QMI_DMS_BAND_CAPABILITY_BC_7", "bc-7" },
    { QMI_DMS_BAND_CAPABILITY_BC_8, "QMI_DMS_BAND_CAPABILITY_BC_8", "bc-8" },
    { QMI_DMS_BAND_CAPABILITY_BC_9, "QMI_DMS_BAND_CAPABILITY_BC_9", "bc-9" },
    { QMI_DMS_BAND_CAPABILITY_BC_10, "QMI_DMS_BAND_CAPABILITY_BC_10", "bc-10" },
    { QMI_DMS_BAND_CAPABILITY_BC_11, "QMI_DMS_BAND_CAPABILITY_BC_11", "bc-11" },
    { QMI_DMS_BAND_CAPABILITY_GSM_450, "QMI_DMS_BAND_CAPABILITY_GSM_450", "gsm-450" },
    { QMI_DMS_BAND_CAPABILITY_GSM_480, "QMI_DMS_BAND_CAPABILITY_GSM_480", "gsm-480" },
    { QMI_DMS_BAND_CAPABILITY_GSM_750, "QMI_DMS_BAND_CAPABILITY_GSM_750", "gsm-750" },
    { QMI_DMS_BAND_CAPABILITY_GSM_850, "QMI_DMS_BAND_CAPABILITY_GSM_850", "gsm-850" },
    { QMI_DMS_BAND_CAPABILITY_GSM_900_RAILWAYS, "QMI_DMS_BAND_CAPABILITY_GSM_900_RAILWAYS", "gsm-900-railways" },
    { QMI_DMS_BAND_CAPABILITY_GSM_PCS_1900, "QMI_DMS_BAND_CAPABILITY_GSM_PCS_1900", "gsm-pcs-1900" },
    { QMI_DMS_BAND_CAPABILITY_WCDMA_2100, "QMI_DMS_BAND_CAPABILITY_WCDMA_2100", "wcdma-2100" },
    { QMI_DMS_BAND_CAPABILITY_WCDMA_PCS_1900, "QMI_DMS_BAND_CAPABILITY_WCDMA_PCS_1900", "wcdma-pcs-1900" },
    { QMI_DMS_BAND_CAPABILITY_WCDMA_DCS_1800, "QMI_DMS_BAND_CAPABILITY_WCDMA_DCS_1800", "wcdma-dcs-1800" },
    { QMI_DMS_BAND_CAPABILITY_WCDMA_1700_US, "QMI_DMS_BAND_CAPABILITY_WCDMA_1700_US", "wcdma-1700-us" },
    { QMI_DMS_BAND_CAPABILITY_WCDMA_850_US, "QMI_DMS_BAND_CAPABILITY_WCDMA_850_US", "wcdma-850-us" },
    { QMI_DMS_BAND_CAPABILITY_WCDMA_800, "QMI_DMS_BAND_CAPABILITY_WCDMA_800", "wcdma-800" },
    { QMI_DMS_BAND_CAPABILITY_BC_12, "QMI_DMS_BAND_CAPABILITY_BC_12", "bc-12" },
    { QMI_DMS_BAND_CAPABILITY_BC_14, "QMI_DMS_BAND_CAPABILITY_BC_14", "bc-14" },
    { QMI_DMS_BAND_CAPABILITY_BC_15, "QMI_DMS_BAND_CAPABILITY_BC_15", "bc-15" },
    { QMI_DMS_BAND_CAPABILITY_WCDMA_2600, "QMI_DMS_BAND_CAPABILITY_WCDMA_2600", "wcdma-2600" },
    { QMI_DMS_BAND_CAPABILITY_WCDMA_900, "QMI_DMS_BAND_CAPABILITY_WCDMA_900", "wcdma-900" },
    { QMI_DMS_BAND_CAPABILITY_WCDMA_1700_JAPAN, "QMI_DMS_BAND_CAPABILITY_WCDMA_1700_JAPAN", "wcdma-1700-japan" },
    { QMI_DMS_BAND_CAPABILITY_BC_16, "QMI_DMS_BAND_CAPABILITY_BC_16", "bc-16" },
    { QMI_DMS_BAND_CAPABILITY_BC_17, "QMI_DMS_BAND_CAPABILITY_BC_17", "bc-17" },
    { QMI_DMS_BAND_CAPABILITY_BC_18, "QMI_DMS_BAND_CAPABILITY_BC_18", "bc-18" },
    { QMI_DMS_BAND_CAPABILITY_BC_19, "QMI_DMS_BAND_CAPABILITY_BC_19", "bc-19" },
    { QMI_DMS_BAND_CAPABILITY_WCDMA_850_JAPAN, "QMI_DMS_BAND_CAPABILITY_WCDMA_850_JAPAN", "wcdma-850-japan" },
    { QMI_DMS_BAND_CAPABILITY_WCDMA_1500, "QMI_DMS_BAND_CAPABILITY_WCDMA_1500", "wcdma-1500" },
    { 0, NULL, NULL }
};

gchar *
qmi_dms_band_capability_build_string_from_mask (QmiDmsBandCapability mask)
{
    guint i;
    gboolean first = TRUE;
    GString *str = NULL;

    for (i = 0; qmi_dms_band_capability_values[i].value_nick; i++) {
        /* We also look for exact matches */
        if (mask == qmi_dms_band_capability_values[i].value) {
            if (str)
                g_string_free (str, TRUE);
            return g_strdup (qmi_dms_band_capability_values[i].value_nick);
        }

        /* Build list with single-bit masks */
        if (mask & qmi_dms_band_capability_values[i].value) {
            guint c;
            guint64 number = qmi_dms_band_capability_values[i].value;

            for (c = 0; number; c++)
                number &= number - 1;

            if (c == 1) {
                if (!str)
                    str = g_string_new ("");
                g_string_append_printf (str, "%s%s",
                                        first ? "" : ", ",
                                        qmi_dms_band_capability_values[i].value_nick);
                if (first)
                    first = FALSE;
            }
        }
    }

    return (str ? g_string_free (str, FALSE) : NULL);
}
static const GFlags64Value qmi_dms_lte_band_capability_values[] = {
    { QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_1, "QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_1", "1" },
    { QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_2, "QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_2", "2" },
    { QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_3, "QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_3", "3" },
    { QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_4, "QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_4", "4" },
    { QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_5, "QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_5", "5" },
    { QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_6, "QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_6", "6" },
    { QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_7, "QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_7", "7" },
    { QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_8, "QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_8", "8" },
    { QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_9, "QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_9", "9" },
    { QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_10, "QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_10", "10" },
    { QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_11, "QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_11", "11" },
    { QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_12, "QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_12", "12" },
    { QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_13, "QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_13", "13" },
    { QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_14, "QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_14", "14" },
    { QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_17, "QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_17", "17" },
    { QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_18, "QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_18", "18" },
    { QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_19, "QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_19", "19" },
    { QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_20, "QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_20", "20" },
    { QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_21, "QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_21", "21" },
    { QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_24, "QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_24", "24" },
    { QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_25, "QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_25", "25" },
    { QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_26, "QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_26", "26" },
    { QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_27, "QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_27", "27" },
    { QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_28, "QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_28", "28" },
    { QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_29, "QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_29", "29" },
    { QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_30, "QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_30", "30" },
    { QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_31, "QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_31", "31" },
    { QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_32, "QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_32", "32" },
    { QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_33, "QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_33", "33" },
    { QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_34, "QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_34", "34" },
    { QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_35, "QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_35", "35" },
    { QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_36, "QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_36", "36" },
    { QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_37, "QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_37", "37" },
    { QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_38, "QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_38", "38" },
    { QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_39, "QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_39", "39" },
    { QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_40, "QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_40", "40" },
    { QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_41, "QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_41", "41" },
    { QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_42, "QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_42", "42" },
    { QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_43, "QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_43", "43" },
    { 0, NULL, NULL }
};

gchar *
qmi_dms_lte_band_capability_build_string_from_mask (QmiDmsLteBandCapability mask)
{
    guint i;
    gboolean first = TRUE;
    GString *str = NULL;

    for (i = 0; qmi_dms_lte_band_capability_values[i].value_nick; i++) {
        /* We also look for exact matches */
        if (mask == qmi_dms_lte_band_capability_values[i].value) {
            if (str)
                g_string_free (str, TRUE);
            return g_strdup (qmi_dms_lte_band_capability_values[i].value_nick);
        }

        /* Build list with single-bit masks */
        if (mask & qmi_dms_lte_band_capability_values[i].value) {
            guint c;
            guint64 number = qmi_dms_lte_band_capability_values[i].value;

            for (c = 0; number; c++)
                number &= number - 1;

            if (c == 1) {
                if (!str)
                    str = g_string_new ("");
                g_string_append_printf (str, "%s%s",
                                        first ? "" : ", ",
                                        qmi_dms_lte_band_capability_values[i].value_nick);
                if (first)
                    first = FALSE;
            }
        }
    }

    return (str ? g_string_free (str, FALSE) : NULL);
}
/* enumerations from "../git/src/libqmi-glib/qmi-flags64-dsd.h" */
static const GFlags64Value qmi_dsd_apn_type_preference_values[] = {
    { QMI_DSD_APN_TYPE_PREFERENCE_DEFAULT, "QMI_DSD_APN_TYPE_PREFERENCE_DEFAULT", "default" },
    { QMI_DSD_APN_TYPE_PREFERENCE_IMS, "QMI_DSD_APN_TYPE_PREFERENCE_IMS", "ims" },
    { QMI_DSD_APN_TYPE_PREFERENCE_MMS, "QMI_DSD_APN_TYPE_PREFERENCE_MMS", "mms" },
    { QMI_DSD_APN_TYPE_PREFERENCE_DUN, "QMI_DSD_APN_TYPE_PREFERENCE_DUN", "dun" },
    { QMI_DSD_APN_TYPE_PREFERENCE_SUPL, "QMI_DSD_APN_TYPE_PREFERENCE_SUPL", "supl" },
    { QMI_DSD_APN_TYPE_PREFERENCE_HIPRI, "QMI_DSD_APN_TYPE_PREFERENCE_HIPRI", "hipri" },
    { QMI_DSD_APN_TYPE_PREFERENCE_FOTA, "QMI_DSD_APN_TYPE_PREFERENCE_FOTA", "fota" },
    { QMI_DSD_APN_TYPE_PREFERENCE_CBS, "QMI_DSD_APN_TYPE_PREFERENCE_CBS", "cbs" },
    { QMI_DSD_APN_TYPE_PREFERENCE_IA, "QMI_DSD_APN_TYPE_PREFERENCE_IA", "ia" },
    { QMI_DSD_APN_TYPE_PREFERENCE_EMERGENCY, "QMI_DSD_APN_TYPE_PREFERENCE_EMERGENCY", "emergency" },
    { 0, NULL, NULL }
};

gchar *
qmi_dsd_apn_type_preference_build_string_from_mask (QmiDsdApnTypePreference mask)
{
    guint i;
    gboolean first = TRUE;
    GString *str = NULL;

    for (i = 0; qmi_dsd_apn_type_preference_values[i].value_nick; i++) {
        /* We also look for exact matches */
        if (mask == qmi_dsd_apn_type_preference_values[i].value) {
            if (str)
                g_string_free (str, TRUE);
            return g_strdup (qmi_dsd_apn_type_preference_values[i].value_nick);
        }

        /* Build list with single-bit masks */
        if (mask & qmi_dsd_apn_type_preference_values[i].value) {
            guint c;
            guint64 number = qmi_dsd_apn_type_preference_values[i].value;

            for (c = 0; number; c++)
                number &= number - 1;

            if (c == 1) {
                if (!str)
                    str = g_string_new ("");
                g_string_append_printf (str, "%s%s",
                                        first ? "" : ", ",
                                        qmi_dsd_apn_type_preference_values[i].value_nick);
                if (first)
                    first = FALSE;
            }
        }
    }

    return (str ? g_string_free (str, FALSE) : NULL);
}
static const GFlags64Value qmi_dsd_so_mask_values[] = {
    { QMI_DSD_3GPP_SO_MASK_WCDMA, "QMI_DSD_3GPP_SO_MASK_WCDMA", "3gpp-so-mask-wcdma" },
    { QMI_DSD_3GPP_SO_MASK_HSDPA, "QMI_DSD_3GPP_SO_MASK_HSDPA", "3gpp-so-mask-hsdpa" },
    { QMI_DSD_3GPP_SO_MASK_HSUPA, "QMI_DSD_3GPP_SO_MASK_HSUPA", "3gpp-so-mask-hsupa" },
    { QMI_DSD_3GPP_SO_MASK_HSDPAPLUS, "QMI_DSD_3GPP_SO_MASK_HSDPAPLUS", "3gpp-so-mask-hsdpaplus" },
    { QMI_DSD_3GPP_SO_MASK_DC_HSDPAPLUS, "QMI_DSD_3GPP_SO_MASK_DC_HSDPAPLUS", "3gpp-so-mask-dc-hsdpaplus" },
    { QMI_DSD_3GPP_SO_MASK_64_QAM, "QMI_DSD_3GPP_SO_MASK_64_QAM", "3gpp-so-mask-64-qam" },
    { QMI_DSD_3GPP_SO_MASK_HSPA, "QMI_DSD_3GPP_SO_MASK_HSPA", "3gpp-so-mask-hspa" },
    { QMI_DSD_3GPP_SO_MASK_GPRS, "QMI_DSD_3GPP_SO_MASK_GPRS", "3gpp-so-mask-gprs" },
    { QMI_DSD_3GPP_SO_MASK_EDGE, "QMI_DSD_3GPP_SO_MASK_EDGE", "3gpp-so-mask-edge" },
    { QMI_DSD_3GPP_SO_MASK_GSM, "QMI_DSD_3GPP_SO_MASK_GSM", "3gpp-so-mask-gsm" },
    { QMI_DSD_3GPP_SO_MASK_S2B, "QMI_DSD_3GPP_SO_MASK_S2B", "3gpp-so-mask-s2b" },
    { QMI_DSD_3GPP_SO_MASK_LTE_LIMITED_SRVC, "QMI_DSD_3GPP_SO_MASK_LTE_LIMITED_SRVC", "3gpp-so-mask-lte-limited-srvc" },
    { QMI_DSD_3GPP_SO_MASK_LTE_FDD, "QMI_DSD_3GPP_SO_MASK_LTE_FDD", "3gpp-so-mask-lte-fdd" },
    { QMI_DSD_3GPP_SO_MASK_LTE_TDD, "QMI_DSD_3GPP_SO_MASK_LTE_TDD", "3gpp-so-mask-lte-tdd" },
    { QMI_DSD_3GPP_SO_MASK_TDSCDMA, "QMI_DSD_3GPP_SO_MASK_TDSCDMA", "3gpp-so-mask-tdscdma" },
    { QMI_DSD_3GPP_SO_MASK_DC_HSUPA, "QMI_DSD_3GPP_SO_MASK_DC_HSUPA", "3gpp-so-mask-dc-hsupa" },
    { QMI_DSD_3GPP_SO_MASK_LTE_CA_DL, "QMI_DSD_3GPP_SO_MASK_LTE_CA_DL", "3gpp-so-mask-lte-ca-dl" },
    { QMI_DSD_3GPP_SO_MASK_LTE_CA_UL, "QMI_DSD_3GPP_SO_MASK_LTE_CA_UL", "3gpp-so-mask-lte-ca-ul" },
    { QMI_DSD_3GPP_SO_MASK_S2B_LIMITED_SRVC, "QMI_DSD_3GPP_SO_MASK_S2B_LIMITED_SRVC", "3gpp-so-mask-s2b-limited-srvc" },
    { QMI_DSD_3GPP_SO_MASK_FOUR_POINT_FIVE_G, "QMI_DSD_3GPP_SO_MASK_FOUR_POINT_FIVE_G", "3gpp-so-mask-four-point-five-g" },
    { QMI_DSD_3GPP_SO_MASK_FOUR_POINT_FIVE_G_PLUS, "QMI_DSD_3GPP_SO_MASK_FOUR_POINT_FIVE_G_PLUS", "3gpp-so-mask-four-point-five-g-plus" },
    { QMI_DSD_3GPP2_SO_MASK_1X_IS95, "QMI_DSD_3GPP2_SO_MASK_1X_IS95", "3gpp2-so-mask-1x-is95" },
    { QMI_DSD_3GPP2_SO_MASK_1X_IS2000, "QMI_DSD_3GPP2_SO_MASK_1X_IS2000", "3gpp2-so-mask-1x-is2000" },
    { QMI_DSD_3GPP2_SO_MASK_1X_IS2000_REL_A, "QMI_DSD_3GPP2_SO_MASK_1X_IS2000_REL_A", "3gpp2-so-mask-1x-is2000-rel-a" },
    { QMI_DSD_3GPP2_SO_MASK_HDR_REV0_DPA, "QMI_DSD_3GPP2_SO_MASK_HDR_REV0_DPA", "3gpp2-so-mask-hdr-rev0-dpa" },
    { QMI_DSD_3GPP2_SO_MASK_HDR_REVA_DPA, "QMI_DSD_3GPP2_SO_MASK_HDR_REVA_DPA", "3gpp2-so-mask-hdr-reva-dpa" },
    { QMI_DSD_3GPP2_SO_MASK_HDR_REVB_DPA, "QMI_DSD_3GPP2_SO_MASK_HDR_REVB_DPA", "3gpp2-so-mask-hdr-revb-dpa" },
    { QMI_DSD_3GPP2_SO_MASK_HDR_REVA_MPA, "QMI_DSD_3GPP2_SO_MASK_HDR_REVA_MPA", "3gpp2-so-mask-hdr-reva-mpa" },
    { QMI_DSD_3GPP2_SO_MASK_HDR_REVB_MPA, "QMI_DSD_3GPP2_SO_MASK_HDR_REVB_MPA", "3gpp2-so-mask-hdr-revb-mpa" },
    { QMI_DSD_3GPP2_SO_MASK_HDR_REVA_EMPA, "QMI_DSD_3GPP2_SO_MASK_HDR_REVA_EMPA", "3gpp2-so-mask-hdr-reva-empa" },
    { QMI_DSD_3GPP2_SO_MASK_HDR_REVB_EMPA, "QMI_DSD_3GPP2_SO_MASK_HDR_REVB_EMPA", "3gpp2-so-mask-hdr-revb-empa" },
    { QMI_DSD_3GPP2_SO_MASK_HDR_REVB_MMPA, "QMI_DSD_3GPP2_SO_MASK_HDR_REVB_MMPA", "3gpp2-so-mask-hdr-revb-mmpa" },
    { QMI_DSD_3GPP2_SO_MASK_HDR_EVDO_FMC, "QMI_DSD_3GPP2_SO_MASK_HDR_EVDO_FMC", "3gpp2-so-mask-hdr-evdo-fmc" },
    { QMI_DSD_3GPP2_SO_MASK_1X_CS, "QMI_DSD_3GPP2_SO_MASK_1X_CS", "3gpp2-so-mask-1x-cs" },
    { QMI_DSD_3GPP_SO_MASK_5G_TDD, "QMI_DSD_3GPP_SO_MASK_5G_TDD", "3gpp-so-mask-5g-tdd" },
    { QMI_DSD_3GPP_SO_MASK_5G_SUB6, "QMI_DSD_3GPP_SO_MASK_5G_SUB6", "3gpp-so-mask-5g-sub6" },
    { QMI_DSD_3GPP_SO_MASK_5G_MMWAVE, "QMI_DSD_3GPP_SO_MASK_5G_MMWAVE", "3gpp-so-mask-5g-mmwave" },
    { QMI_DSD_3GPP_SO_MASK_5G_NSA, "QMI_DSD_3GPP_SO_MASK_5G_NSA", "3gpp-so-mask-5g-nsa" },
    { QMI_DSD_3GPP_SO_MASK_5G_SA, "QMI_DSD_3GPP_SO_MASK_5G_SA", "3gpp-so-mask-5g-sa" },
    { 0, NULL, NULL }
};

gchar *
qmi_dsd_so_mask_build_string_from_mask (QmiDsdSoMask mask)
{
    guint i;
    gboolean first = TRUE;
    GString *str = NULL;

    for (i = 0; qmi_dsd_so_mask_values[i].value_nick; i++) {
        /* We also look for exact matches */
        if (mask == qmi_dsd_so_mask_values[i].value) {
            if (str)
                g_string_free (str, TRUE);
            return g_strdup (qmi_dsd_so_mask_values[i].value_nick);
        }

        /* Build list with single-bit masks */
        if (mask & qmi_dsd_so_mask_values[i].value) {
            guint c;
            guint64 number = qmi_dsd_so_mask_values[i].value;

            for (c = 0; number; c++)
                number &= number - 1;

            if (c == 1) {
                if (!str)
                    str = g_string_new ("");
                g_string_append_printf (str, "%s%s",
                                        first ? "" : ", ",
                                        qmi_dsd_so_mask_values[i].value_nick);
                if (first)
                    first = FALSE;
            }
        }
    }

    return (str ? g_string_free (str, FALSE) : NULL);
}
/* enumerations from "../git/src/libqmi-glib/qmi-flags64-loc.h" */
static const GFlags64Value qmi_loc_event_registration_flag_values[] = {
    { QMI_LOC_EVENT_REGISTRATION_FLAG_POSITION_REPORT, "QMI_LOC_EVENT_REGISTRATION_FLAG_POSITION_REPORT", "position-report" },
    { QMI_LOC_EVENT_REGISTRATION_FLAG_GNSS_SATELLITE_INFO, "QMI_LOC_EVENT_REGISTRATION_FLAG_GNSS_SATELLITE_INFO", "gnss-satellite-info" },
    { QMI_LOC_EVENT_REGISTRATION_FLAG_NMEA, "QMI_LOC_EVENT_REGISTRATION_FLAG_NMEA", "nmea" },
    { QMI_LOC_EVENT_REGISTRATION_FLAG_NI_NOTIFY_VERIFY_REQUEST, "QMI_LOC_EVENT_REGISTRATION_FLAG_NI_NOTIFY_VERIFY_REQUEST", "ni-notify-verify-request" },
    { QMI_LOC_EVENT_REGISTRATION_FLAG_INJECT_TIME_REQUEST, "QMI_LOC_EVENT_REGISTRATION_FLAG_INJECT_TIME_REQUEST", "inject-time-request" },
    { QMI_LOC_EVENT_REGISTRATION_FLAG_INJECT_PREDICTED_ORBITS_REQUEST, "QMI_LOC_EVENT_REGISTRATION_FLAG_INJECT_PREDICTED_ORBITS_REQUEST", "inject-predicted-orbits-request" },
    { QMI_LOC_EVENT_REGISTRATION_FLAG_INJECT_POSITION_REQUEST, "QMI_LOC_EVENT_REGISTRATION_FLAG_INJECT_POSITION_REQUEST", "inject-position-request" },
    { QMI_LOC_EVENT_REGISTRATION_FLAG_ENGINE_STATE, "QMI_LOC_EVENT_REGISTRATION_FLAG_ENGINE_STATE", "engine-state" },
    { QMI_LOC_EVENT_REGISTRATION_FLAG_FIX_SESSION_STATE, "QMI_LOC_EVENT_REGISTRATION_FLAG_FIX_SESSION_STATE", "fix-session-state" },
    { QMI_LOC_EVENT_REGISTRATION_FLAG_WIFI_REQUEST, "QMI_LOC_EVENT_REGISTRATION_FLAG_WIFI_REQUEST", "wifi-request" },
    { QMI_LOC_EVENT_REGISTRATION_FLAG_SENSOR_STREAMING_READY_STATUS, "QMI_LOC_EVENT_REGISTRATION_FLAG_SENSOR_STREAMING_READY_STATUS", "sensor-streaming-ready-status" },
    { QMI_LOC_EVENT_REGISTRATION_FLAG_TIME_SYNC_REQUEST, "QMI_LOC_EVENT_REGISTRATION_FLAG_TIME_SYNC_REQUEST", "time-sync-request" },
    { QMI_LOC_EVENT_REGISTRATION_FLAG_SET_SPI_STREAMING_REPORT, "QMI_LOC_EVENT_REGISTRATION_FLAG_SET_SPI_STREAMING_REPORT", "set-spi-streaming-report" },
    { QMI_LOC_EVENT_REGISTRATION_FLAG_LOCATION_SERVER_CONNECTION_REQUEST, "QMI_LOC_EVENT_REGISTRATION_FLAG_LOCATION_SERVER_CONNECTION_REQUEST", "location-server-connection-request" },
    { QMI_LOC_EVENT_REGISTRATION_FLAG_NI_GEOFENCE_NOTIFICATION, "QMI_LOC_EVENT_REGISTRATION_FLAG_NI_GEOFENCE_NOTIFICATION", "ni-geofence-notification" },
    { QMI_LOC_EVENT_REGISTRATION_FLAG_GEOFENCE_GENERAL_ALERT, "QMI_LOC_EVENT_REGISTRATION_FLAG_GEOFENCE_GENERAL_ALERT", "geofence-general-alert" },
    { QMI_LOC_EVENT_REGISTRATION_FLAG_GEOFENCE_BREACH_NOTIFICATION, "QMI_LOC_EVENT_REGISTRATION_FLAG_GEOFENCE_BREACH_NOTIFICATION", "geofence-breach-notification" },
    { QMI_LOC_EVENT_REGISTRATION_FLAG_PEDOMETER_CONTROL, "QMI_LOC_EVENT_REGISTRATION_FLAG_PEDOMETER_CONTROL", "pedometer-control" },
    { QMI_LOC_EVENT_REGISTRATION_FLAG_MOTION_DATA_CONTROL, "QMI_LOC_EVENT_REGISTRATION_FLAG_MOTION_DATA_CONTROL", "motion-data-control" },
    { 0, NULL, NULL }
};

gchar *
qmi_loc_event_registration_flag_build_string_from_mask (QmiLocEventRegistrationFlag mask)
{
    guint i;
    gboolean first = TRUE;
    GString *str = NULL;

    for (i = 0; qmi_loc_event_registration_flag_values[i].value_nick; i++) {
        /* We also look for exact matches */
        if (mask == qmi_loc_event_registration_flag_values[i].value) {
            if (str)
                g_string_free (str, TRUE);
            return g_strdup (qmi_loc_event_registration_flag_values[i].value_nick);
        }

        /* Build list with single-bit masks */
        if (mask & qmi_loc_event_registration_flag_values[i].value) {
            guint c;
            guint64 number = qmi_loc_event_registration_flag_values[i].value;

            for (c = 0; number; c++)
                number &= number - 1;

            if (c == 1) {
                if (!str)
                    str = g_string_new ("");
                g_string_append_printf (str, "%s%s",
                                        first ? "" : ", ",
                                        qmi_loc_event_registration_flag_values[i].value_nick);
                if (first)
                    first = FALSE;
            }
        }
    }

    return (str ? g_string_free (str, FALSE) : NULL);
}
static const GFlags64Value qmi_loc_sensor_data_usage_values[] = {
    { QMI_LOC_SENSOR_DATA_USAGE_ACCELEROMETER_USED, "QMI_LOC_SENSOR_DATA_USAGE_ACCELEROMETER_USED", "accelerometer-used" },
    { QMI_LOC_SENSOR_DATA_USAGE_GYRO_USED, "QMI_LOC_SENSOR_DATA_USAGE_GYRO_USED", "gyro-used" },
    { QMI_LOC_SENSOR_DATA_USAGE_AIDED_HEADING, "QMI_LOC_SENSOR_DATA_USAGE_AIDED_HEADING", "aided-heading" },
    { QMI_LOC_SENSOR_DATA_USAGE_AIDED_SPEED, "QMI_LOC_SENSOR_DATA_USAGE_AIDED_SPEED", "aided-speed" },
    { QMI_LOC_SENSOR_DATA_USAGE_AIDED_POSITION, "QMI_LOC_SENSOR_DATA_USAGE_AIDED_POSITION", "aided-position" },
    { QMI_LOC_SENSOR_DATA_USAGE_AIDED_VELOCITY, "QMI_LOC_SENSOR_DATA_USAGE_AIDED_VELOCITY", "aided-velocity" },
    { 0, NULL, NULL }
};

gchar *
qmi_loc_sensor_data_usage_build_string_from_mask (QmiLocSensorDataUsage mask)
{
    guint i;
    gboolean first = TRUE;
    GString *str = NULL;

    for (i = 0; qmi_loc_sensor_data_usage_values[i].value_nick; i++) {
        /* We also look for exact matches */
        if (mask == qmi_loc_sensor_data_usage_values[i].value) {
            if (str)
                g_string_free (str, TRUE);
            return g_strdup (qmi_loc_sensor_data_usage_values[i].value_nick);
        }

        /* Build list with single-bit masks */
        if (mask & qmi_loc_sensor_data_usage_values[i].value) {
            guint c;
            guint64 number = qmi_loc_sensor_data_usage_values[i].value;

            for (c = 0; number; c++)
                number &= number - 1;

            if (c == 1) {
                if (!str)
                    str = g_string_new ("");
                g_string_append_printf (str, "%s%s",
                                        first ? "" : ", ",
                                        qmi_loc_sensor_data_usage_values[i].value_nick);
                if (first)
                    first = FALSE;
            }
        }
    }

    return (str ? g_string_free (str, FALSE) : NULL);
}
static const GFlags64Value qmi_loc_delete_gnss_data_values[] = {
    { QMI_LOC_DELETE_GNSS_DATA_GPS_SVDIR, "QMI_LOC_DELETE_GNSS_DATA_GPS_SVDIR", "gps-svdir" },
    { QMI_LOC_DELETE_GNSS_DATA_GPS_SVSTEER, "QMI_LOC_DELETE_GNSS_DATA_GPS_SVSTEER", "gps-svsteer" },
    { QMI_LOC_DELETE_GNSS_DATA_GPS_TIME, "QMI_LOC_DELETE_GNSS_DATA_GPS_TIME", "gps-time" },
    { QMI_LOC_DELETE_GNSS_DATA_GPS_ALM_CORR, "QMI_LOC_DELETE_GNSS_DATA_GPS_ALM_CORR", "gps-alm-corr" },
    { QMI_LOC_DELETE_GNSS_DATA_GLO_SVDIR, "QMI_LOC_DELETE_GNSS_DATA_GLO_SVDIR", "glo-svdir" },
    { QMI_LOC_DELETE_GNSS_DATA_GLO_SVSTEER, "QMI_LOC_DELETE_GNSS_DATA_GLO_SVSTEER", "glo-svsteer" },
    { QMI_LOC_DELETE_GNSS_DATA_GLO_TIME, "QMI_LOC_DELETE_GNSS_DATA_GLO_TIME", "glo-time" },
    { QMI_LOC_DELETE_GNSS_DATA_GLO_ALM_CORR, "QMI_LOC_DELETE_GNSS_DATA_GLO_ALM_CORR", "glo-alm-corr" },
    { QMI_LOC_DELETE_GNSS_DATA_SBAS_SVDIR, "QMI_LOC_DELETE_GNSS_DATA_SBAS_SVDIR", "sbas-svdir" },
    { QMI_LOC_DELETE_GNSS_DATA_SBAS_SVSTEER, "QMI_LOC_DELETE_GNSS_DATA_SBAS_SVSTEER", "sbas-svsteer" },
    { QMI_LOC_DELETE_GNSS_DATA_POSITION, "QMI_LOC_DELETE_GNSS_DATA_POSITION", "position" },
    { QMI_LOC_DELETE_GNSS_DATA_TIME, "QMI_LOC_DELETE_GNSS_DATA_TIME", "time" },
    { QMI_LOC_DELETE_GNSS_DATA_IONO, "QMI_LOC_DELETE_GNSS_DATA_IONO", "iono" },
    { QMI_LOC_DELETE_GNSS_DATA_UTC, "QMI_LOC_DELETE_GNSS_DATA_UTC", "utc" },
    { QMI_LOC_DELETE_GNSS_DATA_HEALTH, "QMI_LOC_DELETE_GNSS_DATA_HEALTH", "health" },
    { QMI_LOC_DELETE_GNSS_DATA_SADATA, "QMI_LOC_DELETE_GNSS_DATA_SADATA", "sadata" },
    { QMI_LOC_DELETE_GNSS_DATA_RTI, "QMI_LOC_DELETE_GNSS_DATA_RTI", "rti" },
    { QMI_LOC_DELETE_GNSS_DATA_SV_NO_EXIST, "QMI_LOC_DELETE_GNSS_DATA_SV_NO_EXIST", "sv-no-exist" },
    { QMI_LOC_DELETE_GNSS_DATA_FREQ_BIAS_EST, "QMI_LOC_DELETE_GNSS_DATA_FREQ_BIAS_EST", "freq-bias-est" },
    { 0, NULL, NULL }
};

gchar *
qmi_loc_delete_gnss_data_build_string_from_mask (QmiLocDeleteGnssData mask)
{
    guint i;
    gboolean first = TRUE;
    GString *str = NULL;

    for (i = 0; qmi_loc_delete_gnss_data_values[i].value_nick; i++) {
        /* We also look for exact matches */
        if (mask == qmi_loc_delete_gnss_data_values[i].value) {
            if (str)
                g_string_free (str, TRUE);
            return g_strdup (qmi_loc_delete_gnss_data_values[i].value_nick);
        }

        /* Build list with single-bit masks */
        if (mask & qmi_loc_delete_gnss_data_values[i].value) {
            guint c;
            guint64 number = qmi_loc_delete_gnss_data_values[i].value;

            for (c = 0; number; c++)
                number &= number - 1;

            if (c == 1) {
                if (!str)
                    str = g_string_new ("");
                g_string_append_printf (str, "%s%s",
                                        first ? "" : ", ",
                                        qmi_loc_delete_gnss_data_values[i].value_nick);
                if (first)
                    first = FALSE;
            }
        }
    }

    return (str ? g_string_free (str, FALSE) : NULL);
}
/* enumerations from "../git/src/libqmi-glib/qmi-flags64-nas.h" */
static const GFlags64Value qmi_nas_band_preference_values[] = {
    { QMI_NAS_BAND_PREFERENCE_BC_0_A_SYSTEM, "QMI_NAS_BAND_PREFERENCE_BC_0_A_SYSTEM", "bc-0-a-system" },
    { QMI_NAS_BAND_PREFERENCE_BC_0_B_SYSTEM, "QMI_NAS_BAND_PREFERENCE_BC_0_B_SYSTEM", "bc-0-b-system" },
    { QMI_NAS_BAND_PREFERENCE_BC_1_ALL_BLOCKS, "QMI_NAS_BAND_PREFERENCE_BC_1_ALL_BLOCKS", "bc-1-all-blocks" },
    { QMI_NAS_BAND_PREFERENCE_BC_2, "QMI_NAS_BAND_PREFERENCE_BC_2", "bc-2" },
    { QMI_NAS_BAND_PREFERENCE_BC_3_A_SYSTEM, "QMI_NAS_BAND_PREFERENCE_BC_3_A_SYSTEM", "bc-3-a-system" },
    { QMI_NAS_BAND_PREFERENCE_BC_4_ALL_BLOCKS, "QMI_NAS_BAND_PREFERENCE_BC_4_ALL_BLOCKS", "bc-4-all-blocks" },
    { QMI_NAS_BAND_PREFERENCE_BC_5_ALL_BLOCKS, "QMI_NAS_BAND_PREFERENCE_BC_5_ALL_BLOCKS", "bc-5-all-blocks" },
    { QMI_NAS_BAND_PREFERENCE_GSM_DCS_1800, "QMI_NAS_BAND_PREFERENCE_GSM_DCS_1800", "gsm-dcs-1800" },
    { QMI_NAS_BAND_PREFERENCE_GSM_900_EXTENDED, "QMI_NAS_BAND_PREFERENCE_GSM_900_EXTENDED", "gsm-900-extended" },
    { QMI_NAS_BAND_PREFERENCE_GSM_900_PRIMARY, "QMI_NAS_BAND_PREFERENCE_GSM_900_PRIMARY", "gsm-900-primary" },
    { QMI_NAS_BAND_PREFERENCE_BC_6, "QMI_NAS_BAND_PREFERENCE_BC_6", "bc-6" },
    { QMI_NAS_BAND_PREFERENCE_BC_7, "QMI_NAS_BAND_PREFERENCE_BC_7", "bc-7" },
    { QMI_NAS_BAND_PREFERENCE_BC_8, "QMI_NAS_BAND_PREFERENCE_BC_8", "bc-8" },
    { QMI_NAS_BAND_PREFERENCE_BC_9, "QMI_NAS_BAND_PREFERENCE_BC_9", "bc-9" },
    { QMI_NAS_BAND_PREFERENCE_BC_10, "QMI_NAS_BAND_PREFERENCE_BC_10", "bc-10" },
    { QMI_NAS_BAND_PREFERENCE_BC_11, "QMI_NAS_BAND_PREFERENCE_BC_11", "bc-11" },
    { QMI_NAS_BAND_PREFERENCE_GSM_450, "QMI_NAS_BAND_PREFERENCE_GSM_450", "gsm-450" },
    { QMI_NAS_BAND_PREFERENCE_GSM_480, "QMI_NAS_BAND_PREFERENCE_GSM_480", "gsm-480" },
    { QMI_NAS_BAND_PREFERENCE_GSM_750, "QMI_NAS_BAND_PREFERENCE_GSM_750", "gsm-750" },
    { QMI_NAS_BAND_PREFERENCE_GSM_850, "QMI_NAS_BAND_PREFERENCE_GSM_850", "gsm-850" },
    { QMI_NAS_BAND_PREFERENCE_GSM_900_RAILWAYS, "QMI_NAS_BAND_PREFERENCE_GSM_900_RAILWAYS", "gsm-900-railways" },
    { QMI_NAS_BAND_PREFERENCE_GSM_PCS_1900, "QMI_NAS_BAND_PREFERENCE_GSM_PCS_1900", "gsm-pcs-1900" },
    { QMI_NAS_BAND_PREFERENCE_WCDMA_2100, "QMI_NAS_BAND_PREFERENCE_WCDMA_2100", "wcdma-2100" },
    { QMI_NAS_BAND_PREFERENCE_WCDMA_PCS_1900, "QMI_NAS_BAND_PREFERENCE_WCDMA_PCS_1900", "wcdma-pcs-1900" },
    { QMI_NAS_BAND_PREFERENCE_WCDMA_DCS_1800, "QMI_NAS_BAND_PREFERENCE_WCDMA_DCS_1800", "wcdma-dcs-1800" },
    { QMI_NAS_BAND_PREFERENCE_WCDMA_1700_US, "QMI_NAS_BAND_PREFERENCE_WCDMA_1700_US", "wcdma-1700-us" },
    { QMI_NAS_BAND_PREFERENCE_WCDMA_850_US, "QMI_NAS_BAND_PREFERENCE_WCDMA_850_US", "wcdma-850-us" },
    { QMI_NAS_BAND_PREFERENCE_WCDMA_800, "QMI_NAS_BAND_PREFERENCE_WCDMA_800", "wcdma-800" },
    { QMI_NAS_BAND_PREFERENCE_BC_12, "QMI_NAS_BAND_PREFERENCE_BC_12", "bc-12" },
    { QMI_NAS_BAND_PREFERENCE_BC_14, "QMI_NAS_BAND_PREFERENCE_BC_14", "bc-14" },
    { QMI_NAS_BAND_PREFERENCE_BC_15, "QMI_NAS_BAND_PREFERENCE_BC_15", "bc-15" },
    { QMI_NAS_BAND_PREFERENCE_WCDMA_2600, "QMI_NAS_BAND_PREFERENCE_WCDMA_2600", "wcdma-2600" },
    { QMI_NAS_BAND_PREFERENCE_WCDMA_900, "QMI_NAS_BAND_PREFERENCE_WCDMA_900", "wcdma-900" },
    { QMI_NAS_BAND_PREFERENCE_WCDMA_1700_JAPAN, "QMI_NAS_BAND_PREFERENCE_WCDMA_1700_JAPAN", "wcdma-1700-japan" },
    { QMI_NAS_BAND_PREFERENCE_BC_16, "QMI_NAS_BAND_PREFERENCE_BC_16", "bc-16" },
    { QMI_NAS_BAND_PREFERENCE_BC_17, "QMI_NAS_BAND_PREFERENCE_BC_17", "bc-17" },
    { QMI_NAS_BAND_PREFERENCE_BC_18, "QMI_NAS_BAND_PREFERENCE_BC_18", "bc-18" },
    { QMI_NAS_BAND_PREFERENCE_BC_19, "QMI_NAS_BAND_PREFERENCE_BC_19", "bc-19" },
    { QMI_NAS_BAND_PREFERENCE_WCDMA_850_JAPAN, "QMI_NAS_BAND_PREFERENCE_WCDMA_850_JAPAN", "wcdma-850-japan" },
    { QMI_NAS_BAND_PREFERENCE_WCDMA_1500, "QMI_NAS_BAND_PREFERENCE_WCDMA_1500", "wcdma-1500" },
    { 0, NULL, NULL }
};

gchar *
qmi_nas_band_preference_build_string_from_mask (QmiNasBandPreference mask)
{
    guint i;
    gboolean first = TRUE;
    GString *str = NULL;

    for (i = 0; qmi_nas_band_preference_values[i].value_nick; i++) {
        /* We also look for exact matches */
        if (mask == qmi_nas_band_preference_values[i].value) {
            if (str)
                g_string_free (str, TRUE);
            return g_strdup (qmi_nas_band_preference_values[i].value_nick);
        }

        /* Build list with single-bit masks */
        if (mask & qmi_nas_band_preference_values[i].value) {
            guint c;
            guint64 number = qmi_nas_band_preference_values[i].value;

            for (c = 0; number; c++)
                number &= number - 1;

            if (c == 1) {
                if (!str)
                    str = g_string_new ("");
                g_string_append_printf (str, "%s%s",
                                        first ? "" : ", ",
                                        qmi_nas_band_preference_values[i].value_nick);
                if (first)
                    first = FALSE;
            }
        }
    }

    return (str ? g_string_free (str, FALSE) : NULL);
}
static const GFlags64Value qmi_nas_lte_band_preference_values[] = {
    { QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_1, "QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_1", "1" },
    { QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_2, "QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_2", "2" },
    { QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_3, "QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_3", "3" },
    { QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_4, "QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_4", "4" },
    { QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_5, "QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_5", "5" },
    { QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_6, "QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_6", "6" },
    { QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_7, "QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_7", "7" },
    { QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_8, "QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_8", "8" },
    { QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_9, "QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_9", "9" },
    { QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_10, "QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_10", "10" },
    { QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_11, "QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_11", "11" },
    { QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_12, "QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_12", "12" },
    { QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_13, "QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_13", "13" },
    { QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_14, "QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_14", "14" },
    { QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_17, "QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_17", "17" },
    { QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_18, "QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_18", "18" },
    { QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_19, "QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_19", "19" },
    { QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_20, "QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_20", "20" },
    { QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_21, "QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_21", "21" },
    { QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_24, "QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_24", "24" },
    { QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_25, "QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_25", "25" },
    { QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_26, "QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_26", "26" },
    { QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_27, "QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_27", "27" },
    { QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_28, "QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_28", "28" },
    { QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_29, "QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_29", "29" },
    { QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_30, "QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_30", "30" },
    { QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_31, "QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_31", "31" },
    { QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_32, "QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_32", "32" },
    { QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_33, "QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_33", "33" },
    { QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_34, "QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_34", "34" },
    { QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_35, "QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_35", "35" },
    { QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_36, "QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_36", "36" },
    { QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_37, "QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_37", "37" },
    { QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_38, "QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_38", "38" },
    { QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_39, "QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_39", "39" },
    { QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_40, "QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_40", "40" },
    { QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_41, "QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_41", "41" },
    { QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_42, "QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_42", "42" },
    { QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_43, "QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_43", "43" },
    { 0, NULL, NULL }
};

gchar *
qmi_nas_lte_band_preference_build_string_from_mask (QmiNasLteBandPreference mask)
{
    guint i;
    gboolean first = TRUE;
    GString *str = NULL;

    for (i = 0; qmi_nas_lte_band_preference_values[i].value_nick; i++) {
        /* We also look for exact matches */
        if (mask == qmi_nas_lte_band_preference_values[i].value) {
            if (str)
                g_string_free (str, TRUE);
            return g_strdup (qmi_nas_lte_band_preference_values[i].value_nick);
        }

        /* Build list with single-bit masks */
        if (mask & qmi_nas_lte_band_preference_values[i].value) {
            guint c;
            guint64 number = qmi_nas_lte_band_preference_values[i].value;

            for (c = 0; number; c++)
                number &= number - 1;

            if (c == 1) {
                if (!str)
                    str = g_string_new ("");
                g_string_append_printf (str, "%s%s",
                                        first ? "" : ", ",
                                        qmi_nas_lte_band_preference_values[i].value_nick);
                if (first)
                    first = FALSE;
            }
        }
    }

    return (str ? g_string_free (str, FALSE) : NULL);
}
/* enumerations from "../git/src/libqmi-glib/qmi-flags64-wds.h" */
static const GFlags64Value qmi_wds_apn_type_mask_values[] = {
    { QMI_WDS_APN_TYPE_MASK_DEFAULT, "QMI_WDS_APN_TYPE_MASK_DEFAULT", "default" },
    { QMI_WDS_APN_TYPE_MASK_IMS, "QMI_WDS_APN_TYPE_MASK_IMS", "ims" },
    { QMI_WDS_APN_TYPE_MASK_MMS, "QMI_WDS_APN_TYPE_MASK_MMS", "mms" },
    { QMI_WDS_APN_TYPE_MASK_FOTA, "QMI_WDS_APN_TYPE_MASK_FOTA", "fota" },
    { QMI_WDS_APN_TYPE_MASK_IA, "QMI_WDS_APN_TYPE_MASK_IA", "ia" },
    { QMI_WDS_APN_TYPE_MASK_EMERGENCY, "QMI_WDS_APN_TYPE_MASK_EMERGENCY", "emergency" },
    { 0, NULL, NULL }
};

gchar *
qmi_wds_apn_type_mask_build_string_from_mask (QmiWdsApnTypeMask mask)
{
    guint i;
    gboolean first = TRUE;
    GString *str = NULL;

    for (i = 0; qmi_wds_apn_type_mask_values[i].value_nick; i++) {
        /* We also look for exact matches */
        if (mask == qmi_wds_apn_type_mask_values[i].value) {
            if (str)
                g_string_free (str, TRUE);
            return g_strdup (qmi_wds_apn_type_mask_values[i].value_nick);
        }

        /* Build list with single-bit masks */
        if (mask & qmi_wds_apn_type_mask_values[i].value) {
            guint c;
            guint64 number = qmi_wds_apn_type_mask_values[i].value;

            for (c = 0; number; c++)
                number &= number - 1;

            if (c == 1) {
                if (!str)
                    str = g_string_new ("");
                g_string_append_printf (str, "%s%s",
                                        first ? "" : ", ",
                                        qmi_wds_apn_type_mask_values[i].value_nick);
                if (first)
                    first = FALSE;
            }
        }
    }

    return (str ? g_string_free (str, FALSE) : NULL);
}

/* Generated data ends here */

