
/* 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 "mm-flags-types.h"
/* enumerations from "../ModemManager/include/ModemManager-enums.h" */
static const GFlagsValue mm_modem_capability_values[] = {
    { MM_MODEM_CAPABILITY_NONE, "MM_MODEM_CAPABILITY_NONE", "none" },
    { MM_MODEM_CAPABILITY_POTS, "MM_MODEM_CAPABILITY_POTS", "pots" },
    { MM_MODEM_CAPABILITY_CDMA_EVDO, "MM_MODEM_CAPABILITY_CDMA_EVDO", "cdma-evdo" },
    { MM_MODEM_CAPABILITY_GSM_UMTS, "MM_MODEM_CAPABILITY_GSM_UMTS", "gsm-umts" },
    { MM_MODEM_CAPABILITY_LTE, "MM_MODEM_CAPABILITY_LTE", "lte" },
    { MM_MODEM_CAPABILITY_IRIDIUM, "MM_MODEM_CAPABILITY_IRIDIUM", "iridium" },
    { MM_MODEM_CAPABILITY_5GNR, "MM_MODEM_CAPABILITY_5GNR", "5gnr" },
    { MM_MODEM_CAPABILITY_TDS, "MM_MODEM_CAPABILITY_TDS", "tds" },
    { MM_MODEM_CAPABILITY_ANY, "MM_MODEM_CAPABILITY_ANY", "any" },
    { 0, NULL, NULL }
};

GType
mm_modem_capability_get_type (void)
{
    static gsize g_define_type_id_initialized = 0;

    if (g_once_init_enter (&g_define_type_id_initialized)) {
        GType g_define_type_id =
            g_flags_register_static (g_intern_static_string ("MMModemCapability"),
                                      mm_modem_capability_values);
        g_once_init_leave (&g_define_type_id_initialized, g_define_type_id);
    }

    return g_define_type_id_initialized;
}

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

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

        /* Build list with single-bit masks */
        if (mask & mm_modem_capability_values[i].value) {
            guint c;
            gulong number = mm_modem_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 ? "" : ", ",
                                        mm_modem_capability_values[i].value_nick);
                if (first)
                    first = FALSE;
            }
        }
    }

    return (str ? g_string_free (str, FALSE) : NULL);
}
static const GFlagsValue mm_modem_access_technology_values[] = {
    { MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN, "MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN", "unknown" },
    { MM_MODEM_ACCESS_TECHNOLOGY_POTS, "MM_MODEM_ACCESS_TECHNOLOGY_POTS", "pots" },
    { MM_MODEM_ACCESS_TECHNOLOGY_GSM, "MM_MODEM_ACCESS_TECHNOLOGY_GSM", "gsm" },
    { MM_MODEM_ACCESS_TECHNOLOGY_GSM_COMPACT, "MM_MODEM_ACCESS_TECHNOLOGY_GSM_COMPACT", "gsm-compact" },
    { MM_MODEM_ACCESS_TECHNOLOGY_GPRS, "MM_MODEM_ACCESS_TECHNOLOGY_GPRS", "gprs" },
    { MM_MODEM_ACCESS_TECHNOLOGY_EDGE, "MM_MODEM_ACCESS_TECHNOLOGY_EDGE", "edge" },
    { MM_MODEM_ACCESS_TECHNOLOGY_UMTS, "MM_MODEM_ACCESS_TECHNOLOGY_UMTS", "umts" },
    { MM_MODEM_ACCESS_TECHNOLOGY_HSDPA, "MM_MODEM_ACCESS_TECHNOLOGY_HSDPA", "hsdpa" },
    { MM_MODEM_ACCESS_TECHNOLOGY_HSUPA, "MM_MODEM_ACCESS_TECHNOLOGY_HSUPA", "hsupa" },
    { MM_MODEM_ACCESS_TECHNOLOGY_HSPA, "MM_MODEM_ACCESS_TECHNOLOGY_HSPA", "hspa" },
    { MM_MODEM_ACCESS_TECHNOLOGY_HSPA_PLUS, "MM_MODEM_ACCESS_TECHNOLOGY_HSPA_PLUS", "hspa-plus" },
    { MM_MODEM_ACCESS_TECHNOLOGY_1XRTT, "MM_MODEM_ACCESS_TECHNOLOGY_1XRTT", "1xrtt" },
    { MM_MODEM_ACCESS_TECHNOLOGY_EVDO0, "MM_MODEM_ACCESS_TECHNOLOGY_EVDO0", "evdo0" },
    { MM_MODEM_ACCESS_TECHNOLOGY_EVDOA, "MM_MODEM_ACCESS_TECHNOLOGY_EVDOA", "evdoa" },
    { MM_MODEM_ACCESS_TECHNOLOGY_EVDOB, "MM_MODEM_ACCESS_TECHNOLOGY_EVDOB", "evdob" },
    { MM_MODEM_ACCESS_TECHNOLOGY_LTE, "MM_MODEM_ACCESS_TECHNOLOGY_LTE", "lte" },
    { MM_MODEM_ACCESS_TECHNOLOGY_5GNR, "MM_MODEM_ACCESS_TECHNOLOGY_5GNR", "5gnr" },
    { MM_MODEM_ACCESS_TECHNOLOGY_LTE_CAT_M, "MM_MODEM_ACCESS_TECHNOLOGY_LTE_CAT_M", "lte-cat-m" },
    { MM_MODEM_ACCESS_TECHNOLOGY_LTE_NB_IOT, "MM_MODEM_ACCESS_TECHNOLOGY_LTE_NB_IOT", "lte-nb-iot" },
    { MM_MODEM_ACCESS_TECHNOLOGY_ANY, "MM_MODEM_ACCESS_TECHNOLOGY_ANY", "any" },
    { 0, NULL, NULL }
};

GType
mm_modem_access_technology_get_type (void)
{
    static gsize g_define_type_id_initialized = 0;

    if (g_once_init_enter (&g_define_type_id_initialized)) {
        GType g_define_type_id =
            g_flags_register_static (g_intern_static_string ("MMModemAccessTechnology"),
                                      mm_modem_access_technology_values);
        g_once_init_leave (&g_define_type_id_initialized, g_define_type_id);
    }

    return g_define_type_id_initialized;
}

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

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

        /* Build list with single-bit masks */
        if (mask & mm_modem_access_technology_values[i].value) {
            guint c;
            gulong number = mm_modem_access_technology_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 ? "" : ", ",
                                        mm_modem_access_technology_values[i].value_nick);
                if (first)
                    first = FALSE;
            }
        }
    }

    return (str ? g_string_free (str, FALSE) : NULL);
}
static const GFlagsValue mm_modem_mode_values[] = {
    { MM_MODEM_MODE_NONE, "MM_MODEM_MODE_NONE", "none" },
    { MM_MODEM_MODE_CS, "MM_MODEM_MODE_CS", "cs" },
    { MM_MODEM_MODE_2G, "MM_MODEM_MODE_2G", "2g" },
    { MM_MODEM_MODE_3G, "MM_MODEM_MODE_3G", "3g" },
    { MM_MODEM_MODE_4G, "MM_MODEM_MODE_4G", "4g" },
    { MM_MODEM_MODE_5G, "MM_MODEM_MODE_5G", "5g" },
    { MM_MODEM_MODE_ANY, "MM_MODEM_MODE_ANY", "any" },
    { 0, NULL, NULL }
};

GType
mm_modem_mode_get_type (void)
{
    static gsize g_define_type_id_initialized = 0;

    if (g_once_init_enter (&g_define_type_id_initialized)) {
        GType g_define_type_id =
            g_flags_register_static (g_intern_static_string ("MMModemMode"),
                                      mm_modem_mode_values);
        g_once_init_leave (&g_define_type_id_initialized, g_define_type_id);
    }

    return g_define_type_id_initialized;
}

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

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

        /* Build list with single-bit masks */
        if (mask & mm_modem_mode_values[i].value) {
            guint c;
            gulong number = mm_modem_mode_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 ? "" : ", ",
                                        mm_modem_mode_values[i].value_nick);
                if (first)
                    first = FALSE;
            }
        }
    }

    return (str ? g_string_free (str, FALSE) : NULL);
}
static const GFlagsValue mm_modem_location_source_values[] = {
    { MM_MODEM_LOCATION_SOURCE_NONE, "MM_MODEM_LOCATION_SOURCE_NONE", "none" },
    { MM_MODEM_LOCATION_SOURCE_3GPP_LAC_CI, "MM_MODEM_LOCATION_SOURCE_3GPP_LAC_CI", "3gpp-lac-ci" },
    { MM_MODEM_LOCATION_SOURCE_GPS_RAW, "MM_MODEM_LOCATION_SOURCE_GPS_RAW", "gps-raw" },
    { MM_MODEM_LOCATION_SOURCE_GPS_NMEA, "MM_MODEM_LOCATION_SOURCE_GPS_NMEA", "gps-nmea" },
    { MM_MODEM_LOCATION_SOURCE_CDMA_BS, "MM_MODEM_LOCATION_SOURCE_CDMA_BS", "cdma-bs" },
    { MM_MODEM_LOCATION_SOURCE_GPS_UNMANAGED, "MM_MODEM_LOCATION_SOURCE_GPS_UNMANAGED", "gps-unmanaged" },
    { MM_MODEM_LOCATION_SOURCE_AGPS_MSA, "MM_MODEM_LOCATION_SOURCE_AGPS_MSA", "agps-msa" },
    { MM_MODEM_LOCATION_SOURCE_AGPS_MSB, "MM_MODEM_LOCATION_SOURCE_AGPS_MSB", "agps-msb" },
    { 0, NULL, NULL }
};

GType
mm_modem_location_source_get_type (void)
{
    static gsize g_define_type_id_initialized = 0;

    if (g_once_init_enter (&g_define_type_id_initialized)) {
        GType g_define_type_id =
            g_flags_register_static (g_intern_static_string ("MMModemLocationSource"),
                                      mm_modem_location_source_values);
        g_once_init_leave (&g_define_type_id_initialized, g_define_type_id);
    }

    return g_define_type_id_initialized;
}

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

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

        /* Build list with single-bit masks */
        if (mask & mm_modem_location_source_values[i].value) {
            guint c;
            gulong number = mm_modem_location_source_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 ? "" : ", ",
                                        mm_modem_location_source_values[i].value_nick);
                if (first)
                    first = FALSE;
            }
        }
    }

    return (str ? g_string_free (str, FALSE) : NULL);
}
static const GFlagsValue mm_modem_location_assistance_data_type_values[] = {
    { MM_MODEM_LOCATION_ASSISTANCE_DATA_TYPE_NONE, "MM_MODEM_LOCATION_ASSISTANCE_DATA_TYPE_NONE", "none" },
    { MM_MODEM_LOCATION_ASSISTANCE_DATA_TYPE_XTRA, "MM_MODEM_LOCATION_ASSISTANCE_DATA_TYPE_XTRA", "xtra" },
    { 0, NULL, NULL }
};

GType
mm_modem_location_assistance_data_type_get_type (void)
{
    static gsize g_define_type_id_initialized = 0;

    if (g_once_init_enter (&g_define_type_id_initialized)) {
        GType g_define_type_id =
            g_flags_register_static (g_intern_static_string ("MMModemLocationAssistanceDataType"),
                                      mm_modem_location_assistance_data_type_values);
        g_once_init_leave (&g_define_type_id_initialized, g_define_type_id);
    }

    return g_define_type_id_initialized;
}

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

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

        /* Build list with single-bit masks */
        if (mask & mm_modem_location_assistance_data_type_values[i].value) {
            guint c;
            gulong number = mm_modem_location_assistance_data_type_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 ? "" : ", ",
                                        mm_modem_location_assistance_data_type_values[i].value_nick);
                if (first)
                    first = FALSE;
            }
        }
    }

    return (str ? g_string_free (str, FALSE) : NULL);
}
static const GFlagsValue mm_bearer_ip_family_values[] = {
    { MM_BEARER_IP_FAMILY_NONE, "MM_BEARER_IP_FAMILY_NONE", "none" },
    { MM_BEARER_IP_FAMILY_IPV4, "MM_BEARER_IP_FAMILY_IPV4", "ipv4" },
    { MM_BEARER_IP_FAMILY_IPV6, "MM_BEARER_IP_FAMILY_IPV6", "ipv6" },
    { MM_BEARER_IP_FAMILY_IPV4V6, "MM_BEARER_IP_FAMILY_IPV4V6", "ipv4v6" },
    { MM_BEARER_IP_FAMILY_NON_IP, "MM_BEARER_IP_FAMILY_NON_IP", "non-ip" },
    { MM_BEARER_IP_FAMILY_ANY, "MM_BEARER_IP_FAMILY_ANY", "any" },
    { 0, NULL, NULL }
};

GType
mm_bearer_ip_family_get_type (void)
{
    static gsize g_define_type_id_initialized = 0;

    if (g_once_init_enter (&g_define_type_id_initialized)) {
        GType g_define_type_id =
            g_flags_register_static (g_intern_static_string ("MMBearerIpFamily"),
                                      mm_bearer_ip_family_values);
        g_once_init_leave (&g_define_type_id_initialized, g_define_type_id);
    }

    return g_define_type_id_initialized;
}

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

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

        /* Build list with single-bit masks */
        if (mask & mm_bearer_ip_family_values[i].value) {
            guint c;
            gulong number = mm_bearer_ip_family_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 ? "" : ", ",
                                        mm_bearer_ip_family_values[i].value_nick);
                if (first)
                    first = FALSE;
            }
        }
    }

    return (str ? g_string_free (str, FALSE) : NULL);
}
static const GFlagsValue mm_bearer_allowed_auth_values[] = {
    { MM_BEARER_ALLOWED_AUTH_UNKNOWN, "MM_BEARER_ALLOWED_AUTH_UNKNOWN", "unknown" },
    { MM_BEARER_ALLOWED_AUTH_NONE, "MM_BEARER_ALLOWED_AUTH_NONE", "none" },
    { MM_BEARER_ALLOWED_AUTH_PAP, "MM_BEARER_ALLOWED_AUTH_PAP", "pap" },
    { MM_BEARER_ALLOWED_AUTH_CHAP, "MM_BEARER_ALLOWED_AUTH_CHAP", "chap" },
    { MM_BEARER_ALLOWED_AUTH_MSCHAP, "MM_BEARER_ALLOWED_AUTH_MSCHAP", "mschap" },
    { MM_BEARER_ALLOWED_AUTH_MSCHAPV2, "MM_BEARER_ALLOWED_AUTH_MSCHAPV2", "mschapv2" },
    { MM_BEARER_ALLOWED_AUTH_EAP, "MM_BEARER_ALLOWED_AUTH_EAP", "eap" },
    { 0, NULL, NULL }
};

GType
mm_bearer_allowed_auth_get_type (void)
{
    static gsize g_define_type_id_initialized = 0;

    if (g_once_init_enter (&g_define_type_id_initialized)) {
        GType g_define_type_id =
            g_flags_register_static (g_intern_static_string ("MMBearerAllowedAuth"),
                                      mm_bearer_allowed_auth_values);
        g_once_init_leave (&g_define_type_id_initialized, g_define_type_id);
    }

    return g_define_type_id_initialized;
}

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

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

        /* Build list with single-bit masks */
        if (mask & mm_bearer_allowed_auth_values[i].value) {
            guint c;
            gulong number = mm_bearer_allowed_auth_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 ? "" : ", ",
                                        mm_bearer_allowed_auth_values[i].value_nick);
                if (first)
                    first = FALSE;
            }
        }
    }

    return (str ? g_string_free (str, FALSE) : NULL);
}
static const GFlagsValue mm_modem_3gpp_facility_values[] = {
    { MM_MODEM_3GPP_FACILITY_NONE, "MM_MODEM_3GPP_FACILITY_NONE", "none" },
    { MM_MODEM_3GPP_FACILITY_SIM, "MM_MODEM_3GPP_FACILITY_SIM", "sim" },
    { MM_MODEM_3GPP_FACILITY_FIXED_DIALING, "MM_MODEM_3GPP_FACILITY_FIXED_DIALING", "fixed-dialing" },
    { MM_MODEM_3GPP_FACILITY_PH_SIM, "MM_MODEM_3GPP_FACILITY_PH_SIM", "ph-sim" },
    { MM_MODEM_3GPP_FACILITY_PH_FSIM, "MM_MODEM_3GPP_FACILITY_PH_FSIM", "ph-fsim" },
    { MM_MODEM_3GPP_FACILITY_NET_PERS, "MM_MODEM_3GPP_FACILITY_NET_PERS", "net-pers" },
    { MM_MODEM_3GPP_FACILITY_NET_SUB_PERS, "MM_MODEM_3GPP_FACILITY_NET_SUB_PERS", "net-sub-pers" },
    { MM_MODEM_3GPP_FACILITY_PROVIDER_PERS, "MM_MODEM_3GPP_FACILITY_PROVIDER_PERS", "provider-pers" },
    { MM_MODEM_3GPP_FACILITY_CORP_PERS, "MM_MODEM_3GPP_FACILITY_CORP_PERS", "corp-pers" },
    { 0, NULL, NULL }
};

GType
mm_modem_3gpp_facility_get_type (void)
{
    static gsize g_define_type_id_initialized = 0;

    if (g_once_init_enter (&g_define_type_id_initialized)) {
        GType g_define_type_id =
            g_flags_register_static (g_intern_static_string ("MMModem3gppFacility"),
                                      mm_modem_3gpp_facility_values);
        g_once_init_leave (&g_define_type_id_initialized, g_define_type_id);
    }

    return g_define_type_id_initialized;
}

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

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

        /* Build list with single-bit masks */
        if (mask & mm_modem_3gpp_facility_values[i].value) {
            guint c;
            gulong number = mm_modem_3gpp_facility_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 ? "" : ", ",
                                        mm_modem_3gpp_facility_values[i].value_nick);
                if (first)
                    first = FALSE;
            }
        }
    }

    return (str ? g_string_free (str, FALSE) : NULL);
}
static const GFlagsValue mm_oma_feature_values[] = {
    { MM_OMA_FEATURE_NONE, "MM_OMA_FEATURE_NONE", "none" },
    { MM_OMA_FEATURE_DEVICE_PROVISIONING, "MM_OMA_FEATURE_DEVICE_PROVISIONING", "device-provisioning" },
    { MM_OMA_FEATURE_PRL_UPDATE, "MM_OMA_FEATURE_PRL_UPDATE", "prl-update" },
    { MM_OMA_FEATURE_HANDS_FREE_ACTIVATION, "MM_OMA_FEATURE_HANDS_FREE_ACTIVATION", "hands-free-activation" },
    { 0, NULL, NULL }
};

GType
mm_oma_feature_get_type (void)
{
    static gsize g_define_type_id_initialized = 0;

    if (g_once_init_enter (&g_define_type_id_initialized)) {
        GType g_define_type_id =
            g_flags_register_static (g_intern_static_string ("MMOmaFeature"),
                                      mm_oma_feature_values);
        g_once_init_leave (&g_define_type_id_initialized, g_define_type_id);
    }

    return g_define_type_id_initialized;
}

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

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

        /* Build list with single-bit masks */
        if (mask & mm_oma_feature_values[i].value) {
            guint c;
            gulong number = mm_oma_feature_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 ? "" : ", ",
                                        mm_oma_feature_values[i].value_nick);
                if (first)
                    first = FALSE;
            }
        }
    }

    return (str ? g_string_free (str, FALSE) : NULL);
}
static const GFlagsValue mm_modem_firmware_update_method_values[] = {
    { MM_MODEM_FIRMWARE_UPDATE_METHOD_NONE, "MM_MODEM_FIRMWARE_UPDATE_METHOD_NONE", "none" },
    { MM_MODEM_FIRMWARE_UPDATE_METHOD_FASTBOOT, "MM_MODEM_FIRMWARE_UPDATE_METHOD_FASTBOOT", "fastboot" },
    { MM_MODEM_FIRMWARE_UPDATE_METHOD_QMI_PDC, "MM_MODEM_FIRMWARE_UPDATE_METHOD_QMI_PDC", "qmi-pdc" },
    { MM_MODEM_FIRMWARE_UPDATE_METHOD_MBIM_QDU, "MM_MODEM_FIRMWARE_UPDATE_METHOD_MBIM_QDU", "mbim-qdu" },
    { MM_MODEM_FIRMWARE_UPDATE_METHOD_FIREHOSE, "MM_MODEM_FIRMWARE_UPDATE_METHOD_FIREHOSE", "firehose" },
    { MM_MODEM_FIRMWARE_UPDATE_METHOD_SAHARA, "MM_MODEM_FIRMWARE_UPDATE_METHOD_SAHARA", "sahara" },
    { MM_MODEM_FIRMWARE_UPDATE_METHOD_DFOTA, "MM_MODEM_FIRMWARE_UPDATE_METHOD_DFOTA", "dfota" },
    { MM_MODEM_FIRMWARE_UPDATE_METHOD_CINTERION_FDL, "MM_MODEM_FIRMWARE_UPDATE_METHOD_CINTERION_FDL", "cinterion-fdl" },
    { 0, NULL, NULL }
};

GType
mm_modem_firmware_update_method_get_type (void)
{
    static gsize g_define_type_id_initialized = 0;

    if (g_once_init_enter (&g_define_type_id_initialized)) {
        GType g_define_type_id =
            g_flags_register_static (g_intern_static_string ("MMModemFirmwareUpdateMethod"),
                                      mm_modem_firmware_update_method_values);
        g_once_init_leave (&g_define_type_id_initialized, g_define_type_id);
    }

    return g_define_type_id_initialized;
}

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

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

        /* Build list with single-bit masks */
        if (mask & mm_modem_firmware_update_method_values[i].value) {
            guint c;
            gulong number = mm_modem_firmware_update_method_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 ? "" : ", ",
                                        mm_modem_firmware_update_method_values[i].value_nick);
                if (first)
                    first = FALSE;
            }
        }
    }

    return (str ? g_string_free (str, FALSE) : NULL);
}
static const GFlagsValue mm_bearer_apn_type_values[] = {
    { MM_BEARER_APN_TYPE_NONE, "MM_BEARER_APN_TYPE_NONE", "none" },
    { MM_BEARER_APN_TYPE_INITIAL, "MM_BEARER_APN_TYPE_INITIAL", "initial" },
    { MM_BEARER_APN_TYPE_DEFAULT, "MM_BEARER_APN_TYPE_DEFAULT", "default" },
    { MM_BEARER_APN_TYPE_IMS, "MM_BEARER_APN_TYPE_IMS", "ims" },
    { MM_BEARER_APN_TYPE_MMS, "MM_BEARER_APN_TYPE_MMS", "mms" },
    { MM_BEARER_APN_TYPE_MANAGEMENT, "MM_BEARER_APN_TYPE_MANAGEMENT", "management" },
    { MM_BEARER_APN_TYPE_VOICE, "MM_BEARER_APN_TYPE_VOICE", "voice" },
    { MM_BEARER_APN_TYPE_EMERGENCY, "MM_BEARER_APN_TYPE_EMERGENCY", "emergency" },
    { MM_BEARER_APN_TYPE_PRIVATE, "MM_BEARER_APN_TYPE_PRIVATE", "private" },
    { MM_BEARER_APN_TYPE_PURCHASE, "MM_BEARER_APN_TYPE_PURCHASE", "purchase" },
    { MM_BEARER_APN_TYPE_VIDEO_SHARE, "MM_BEARER_APN_TYPE_VIDEO_SHARE", "video-share" },
    { MM_BEARER_APN_TYPE_LOCAL, "MM_BEARER_APN_TYPE_LOCAL", "local" },
    { MM_BEARER_APN_TYPE_APP, "MM_BEARER_APN_TYPE_APP", "app" },
    { MM_BEARER_APN_TYPE_XCAP, "MM_BEARER_APN_TYPE_XCAP", "xcap" },
    { MM_BEARER_APN_TYPE_TETHERING, "MM_BEARER_APN_TYPE_TETHERING", "tethering" },
    { 0, NULL, NULL }
};

GType
mm_bearer_apn_type_get_type (void)
{
    static gsize g_define_type_id_initialized = 0;

    if (g_once_init_enter (&g_define_type_id_initialized)) {
        GType g_define_type_id =
            g_flags_register_static (g_intern_static_string ("MMBearerApnType"),
                                      mm_bearer_apn_type_values);
        g_once_init_leave (&g_define_type_id_initialized, g_define_type_id);
    }

    return g_define_type_id_initialized;
}

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

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

        /* Build list with single-bit masks */
        if (mask & mm_bearer_apn_type_values[i].value) {
            guint c;
            gulong number = mm_bearer_apn_type_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 ? "" : ", ",
                                        mm_bearer_apn_type_values[i].value_nick);
                if (first)
                    first = FALSE;
            }
        }
    }

    return (str ? g_string_free (str, FALSE) : NULL);
}
static const GFlagsValue mm_bearer_roaming_allowance_values[] = {
    { MM_BEARER_ROAMING_ALLOWANCE_NONE, "MM_BEARER_ROAMING_ALLOWANCE_NONE", "none" },
    { MM_BEARER_ROAMING_ALLOWANCE_HOME, "MM_BEARER_ROAMING_ALLOWANCE_HOME", "home" },
    { MM_BEARER_ROAMING_ALLOWANCE_PARTNER, "MM_BEARER_ROAMING_ALLOWANCE_PARTNER", "partner" },
    { MM_BEARER_ROAMING_ALLOWANCE_NON_PARTNER, "MM_BEARER_ROAMING_ALLOWANCE_NON_PARTNER", "non-partner" },
    { 0, NULL, NULL }
};

GType
mm_bearer_roaming_allowance_get_type (void)
{
    static gsize g_define_type_id_initialized = 0;

    if (g_once_init_enter (&g_define_type_id_initialized)) {
        GType g_define_type_id =
            g_flags_register_static (g_intern_static_string ("MMBearerRoamingAllowance"),
                                      mm_bearer_roaming_allowance_values);
        g_once_init_leave (&g_define_type_id_initialized, g_define_type_id);
    }

    return g_define_type_id_initialized;
}

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

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

        /* Build list with single-bit masks */
        if (mask & mm_bearer_roaming_allowance_values[i].value) {
            guint c;
            gulong number = mm_bearer_roaming_allowance_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 ? "" : ", ",
                                        mm_bearer_roaming_allowance_values[i].value_nick);
                if (first)
                    first = FALSE;
            }
        }
    }

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

/* Generated data ends here */

