
/* 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 "mbim-flag-types.h"
/* enumerations from "../libmbim/src/libmbim-glib/mbim-enums.h" */
static const GFlagsValue mbim_cellular_class_values[] = {
    { MBIM_CELLULAR_CLASS_NONE, "MBIM_CELLULAR_CLASS_NONE", "none" },
    { MBIM_CELLULAR_CLASS_GSM, "MBIM_CELLULAR_CLASS_GSM", "gsm" },
    { MBIM_CELLULAR_CLASS_CDMA, "MBIM_CELLULAR_CLASS_CDMA", "cdma" },
    { 0, NULL, NULL }
};

/* Define type-specific symbols */

GType
mbim_cellular_class_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 ("MbimCellularClass"),
                                      mbim_cellular_class_values);
        g_once_init_leave (&g_define_type_id_initialized, g_define_type_id);
    }

    return g_define_type_id_initialized;
}

/* Flags-specific method to build a string with the given mask.
 * We get a comma separated list of the nicks of the GFlagsValues.
 * Note that this will be valid even if the GFlagsClass is not referenced
 * anywhere. */
gchar *
mbim_cellular_class_build_string_from_mask (MbimCellularClass mask)
{
    guint i;
    gboolean first = TRUE;
    GString *str = NULL;

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

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

    return (str ? g_string_free (str, FALSE) : NULL);
}
static const GFlagsValue mbim_sim_class_values[] = {
    { MBIM_SIM_CLASS_NONE, "MBIM_SIM_CLASS_NONE", "none" },
    { MBIM_SIM_CLASS_LOGICAL, "MBIM_SIM_CLASS_LOGICAL", "logical" },
    { MBIM_SIM_CLASS_REMOVABLE, "MBIM_SIM_CLASS_REMOVABLE", "removable" },
    { 0, NULL, NULL }
};

/* Define type-specific symbols */

GType
mbim_sim_class_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 ("MbimSimClass"),
                                      mbim_sim_class_values);
        g_once_init_leave (&g_define_type_id_initialized, g_define_type_id);
    }

    return g_define_type_id_initialized;
}

/* Flags-specific method to build a string with the given mask.
 * We get a comma separated list of the nicks of the GFlagsValues.
 * Note that this will be valid even if the GFlagsClass is not referenced
 * anywhere. */
gchar *
mbim_sim_class_build_string_from_mask (MbimSimClass mask)
{
    guint i;
    gboolean first = TRUE;
    GString *str = NULL;

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

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

    return (str ? g_string_free (str, FALSE) : NULL);
}
static const GFlagsValue mbim_data_class_values[] = {
    { MBIM_DATA_CLASS_NONE, "MBIM_DATA_CLASS_NONE", "none" },
    { MBIM_DATA_CLASS_GPRS, "MBIM_DATA_CLASS_GPRS", "gprs" },
    { MBIM_DATA_CLASS_EDGE, "MBIM_DATA_CLASS_EDGE", "edge" },
    { MBIM_DATA_CLASS_UMTS, "MBIM_DATA_CLASS_UMTS", "umts" },
    { MBIM_DATA_CLASS_HSDPA, "MBIM_DATA_CLASS_HSDPA", "hsdpa" },
    { MBIM_DATA_CLASS_HSUPA, "MBIM_DATA_CLASS_HSUPA", "hsupa" },
    { MBIM_DATA_CLASS_LTE, "MBIM_DATA_CLASS_LTE", "lte" },
    { MBIM_DATA_CLASS_5G_NSA, "MBIM_DATA_CLASS_5G_NSA", "5g-nsa" },
    { MBIM_DATA_CLASS_5G_SA, "MBIM_DATA_CLASS_5G_SA", "5g-sa" },
    { MBIM_DATA_CLASS_1XRTT, "MBIM_DATA_CLASS_1XRTT", "1xrtt" },
    { MBIM_DATA_CLASS_1XEVDO, "MBIM_DATA_CLASS_1XEVDO", "1xevdo" },
    { MBIM_DATA_CLASS_1XEVDO_REVA, "MBIM_DATA_CLASS_1XEVDO_REVA", "1xevdo-reva" },
    { MBIM_DATA_CLASS_1XEVDV, "MBIM_DATA_CLASS_1XEVDV", "1xevdv" },
    { MBIM_DATA_CLASS_3XRTT, "MBIM_DATA_CLASS_3XRTT", "3xrtt" },
    { MBIM_DATA_CLASS_1XEVDO_REVB, "MBIM_DATA_CLASS_1XEVDO_REVB", "1xevdo-revb" },
    { MBIM_DATA_CLASS_UMB, "MBIM_DATA_CLASS_UMB", "umb" },
    { MBIM_DATA_CLASS_CUSTOM, "MBIM_DATA_CLASS_CUSTOM", "custom" },
    { 0, NULL, NULL }
};

/* Define type-specific symbols */

GType
mbim_data_class_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 ("MbimDataClass"),
                                      mbim_data_class_values);
        g_once_init_leave (&g_define_type_id_initialized, g_define_type_id);
    }

    return g_define_type_id_initialized;
}

/* Flags-specific method to build a string with the given mask.
 * We get a comma separated list of the nicks of the GFlagsValues.
 * Note that this will be valid even if the GFlagsClass is not referenced
 * anywhere. */
gchar *
mbim_data_class_build_string_from_mask (MbimDataClass mask)
{
    guint i;
    gboolean first = TRUE;
    GString *str = NULL;

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

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

    return (str ? g_string_free (str, FALSE) : NULL);
}
static const GFlagsValue mbim_sms_caps_values[] = {
    { MBIM_SMS_CAPS_NONE, "MBIM_SMS_CAPS_NONE", "none" },
    { MBIM_SMS_CAPS_PDU_RECEIVE, "MBIM_SMS_CAPS_PDU_RECEIVE", "pdu-receive" },
    { MBIM_SMS_CAPS_PDU_SEND, "MBIM_SMS_CAPS_PDU_SEND", "pdu-send" },
    { MBIM_SMS_CAPS_TEXT_RECEIVE, "MBIM_SMS_CAPS_TEXT_RECEIVE", "text-receive" },
    { MBIM_SMS_CAPS_TEXT_SEND, "MBIM_SMS_CAPS_TEXT_SEND", "text-send" },
    { 0, NULL, NULL }
};

/* Define type-specific symbols */

GType
mbim_sms_caps_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 ("MbimSmsCaps"),
                                      mbim_sms_caps_values);
        g_once_init_leave (&g_define_type_id_initialized, g_define_type_id);
    }

    return g_define_type_id_initialized;
}

/* Flags-specific method to build a string with the given mask.
 * We get a comma separated list of the nicks of the GFlagsValues.
 * Note that this will be valid even if the GFlagsClass is not referenced
 * anywhere. */
gchar *
mbim_sms_caps_build_string_from_mask (MbimSmsCaps mask)
{
    guint i;
    gboolean first = TRUE;
    GString *str = NULL;

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

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

    return (str ? g_string_free (str, FALSE) : NULL);
}
static const GFlagsValue mbim_ctrl_caps_values[] = {
    { MBIM_CTRL_CAPS_NONE, "MBIM_CTRL_CAPS_NONE", "none" },
    { MBIM_CTRL_CAPS_REG_MANUAL, "MBIM_CTRL_CAPS_REG_MANUAL", "reg-manual" },
    { MBIM_CTRL_CAPS_HW_RADIO_SWITCH, "MBIM_CTRL_CAPS_HW_RADIO_SWITCH", "hw-radio-switch" },
    { MBIM_CTRL_CAPS_CDMA_MOBILE_IP, "MBIM_CTRL_CAPS_CDMA_MOBILE_IP", "cdma-mobile-ip" },
    { MBIM_CTRL_CAPS_CDMA_SIMPLE_IP, "MBIM_CTRL_CAPS_CDMA_SIMPLE_IP", "cdma-simple-ip" },
    { MBIM_CTRL_CAPS_MULTI_CARRIER, "MBIM_CTRL_CAPS_MULTI_CARRIER", "multi-carrier" },
    { MBIM_CTRL_CAPS_ESIM, "MBIM_CTRL_CAPS_ESIM", "esim" },
    { MBIM_CTRL_CAPS_UE_POLICY_ROUTE_SELECTION, "MBIM_CTRL_CAPS_UE_POLICY_ROUTE_SELECTION", "ue-policy-route-selection" },
    { MBIM_CTRL_CAPS_SIM_HOT_SWAP_CAPABLE, "MBIM_CTRL_CAPS_SIM_HOT_SWAP_CAPABLE", "sim-hot-swap-capable" },
    { 0, NULL, NULL }
};

/* Define type-specific symbols */

GType
mbim_ctrl_caps_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 ("MbimCtrlCaps"),
                                      mbim_ctrl_caps_values);
        g_once_init_leave (&g_define_type_id_initialized, g_define_type_id);
    }

    return g_define_type_id_initialized;
}

/* Flags-specific method to build a string with the given mask.
 * We get a comma separated list of the nicks of the GFlagsValues.
 * Note that this will be valid even if the GFlagsClass is not referenced
 * anywhere. */
gchar *
mbim_ctrl_caps_build_string_from_mask (MbimCtrlCaps mask)
{
    guint i;
    gboolean first = TRUE;
    GString *str = NULL;

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

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

    return (str ? g_string_free (str, FALSE) : NULL);
}
static const GFlagsValue mbim_ready_info_flag_values[] = {
    { MBIM_READY_INFO_FLAG_NONE, "MBIM_READY_INFO_FLAG_NONE", "none" },
    { MBIM_READY_INFO_FLAG_PROTECT_UNIQUE_ID, "MBIM_READY_INFO_FLAG_PROTECT_UNIQUE_ID", "protect-unique-id" },
    { 0, NULL, NULL }
};

/* Define type-specific symbols */

GType
mbim_ready_info_flag_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 ("MbimReadyInfoFlag"),
                                      mbim_ready_info_flag_values);
        g_once_init_leave (&g_define_type_id_initialized, g_define_type_id);
    }

    return g_define_type_id_initialized;
}

/* Flags-specific method to build a string with the given mask.
 * We get a comma separated list of the nicks of the GFlagsValues.
 * Note that this will be valid even if the GFlagsClass is not referenced
 * anywhere. */
gchar *
mbim_ready_info_flag_build_string_from_mask (MbimReadyInfoFlag mask)
{
    guint i;
    gboolean first = TRUE;
    GString *str = NULL;

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

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

    return (str ? g_string_free (str, FALSE) : NULL);
}
static const GFlagsValue mbim_provider_state_values[] = {
    { MBIM_PROVIDER_STATE_UNKNOWN, "MBIM_PROVIDER_STATE_UNKNOWN", "unknown" },
    { MBIM_PROVIDER_STATE_HOME, "MBIM_PROVIDER_STATE_HOME", "home" },
    { MBIM_PROVIDER_STATE_FORBIDDEN, "MBIM_PROVIDER_STATE_FORBIDDEN", "forbidden" },
    { MBIM_PROVIDER_STATE_PREFERRED, "MBIM_PROVIDER_STATE_PREFERRED", "preferred" },
    { MBIM_PROVIDER_STATE_VISIBLE, "MBIM_PROVIDER_STATE_VISIBLE", "visible" },
    { MBIM_PROVIDER_STATE_REGISTERED, "MBIM_PROVIDER_STATE_REGISTERED", "registered" },
    { MBIM_PROVIDER_STATE_PREFERRED_MULTICARRIER, "MBIM_PROVIDER_STATE_PREFERRED_MULTICARRIER", "preferred-multicarrier" },
    { 0, NULL, NULL }
};

/* Define type-specific symbols */

GType
mbim_provider_state_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 ("MbimProviderState"),
                                      mbim_provider_state_values);
        g_once_init_leave (&g_define_type_id_initialized, g_define_type_id);
    }

    return g_define_type_id_initialized;
}

/* Flags-specific method to build a string with the given mask.
 * We get a comma separated list of the nicks of the GFlagsValues.
 * Note that this will be valid even if the GFlagsClass is not referenced
 * anywhere. */
gchar *
mbim_provider_state_build_string_from_mask (MbimProviderState mask)
{
    guint i;
    gboolean first = TRUE;
    GString *str = NULL;

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

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

    return (str ? g_string_free (str, FALSE) : NULL);
}
static const GFlagsValue mbim_registration_flag_values[] = {
    { MBIM_REGISTRATION_FLAG_NONE, "MBIM_REGISTRATION_FLAG_NONE", "none" },
    { MBIM_REGISTRATION_FLAG_MANUAL_SELECTION_NOT_AVAILABLE, "MBIM_REGISTRATION_FLAG_MANUAL_SELECTION_NOT_AVAILABLE", "manual-selection-not-available" },
    { MBIM_REGISTRATION_FLAG_PACKET_SERVICE_AUTOMATIC_ATTACH, "MBIM_REGISTRATION_FLAG_PACKET_SERVICE_AUTOMATIC_ATTACH", "packet-service-automatic-attach" },
    { 0, NULL, NULL }
};

/* Define type-specific symbols */

GType
mbim_registration_flag_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 ("MbimRegistrationFlag"),
                                      mbim_registration_flag_values);
        g_once_init_leave (&g_define_type_id_initialized, g_define_type_id);
    }

    return g_define_type_id_initialized;
}

/* Flags-specific method to build a string with the given mask.
 * We get a comma separated list of the nicks of the GFlagsValues.
 * Note that this will be valid even if the GFlagsClass is not referenced
 * anywhere. */
gchar *
mbim_registration_flag_build_string_from_mask (MbimRegistrationFlag mask)
{
    guint i;
    gboolean first = TRUE;
    GString *str = NULL;

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

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

    return (str ? g_string_free (str, FALSE) : NULL);
}
static const GFlagsValue mbim_ip_configuration_available_flag_values[] = {
    { MBIM_IP_CONFIGURATION_AVAILABLE_FLAG_NONE, "MBIM_IP_CONFIGURATION_AVAILABLE_FLAG_NONE", "none" },
    { MBIM_IP_CONFIGURATION_AVAILABLE_FLAG_ADDRESS, "MBIM_IP_CONFIGURATION_AVAILABLE_FLAG_ADDRESS", "address" },
    { MBIM_IP_CONFIGURATION_AVAILABLE_FLAG_GATEWAY, "MBIM_IP_CONFIGURATION_AVAILABLE_FLAG_GATEWAY", "gateway" },
    { MBIM_IP_CONFIGURATION_AVAILABLE_FLAG_DNS, "MBIM_IP_CONFIGURATION_AVAILABLE_FLAG_DNS", "dns" },
    { MBIM_IP_CONFIGURATION_AVAILABLE_FLAG_MTU, "MBIM_IP_CONFIGURATION_AVAILABLE_FLAG_MTU", "mtu" },
    { 0, NULL, NULL }
};

/* Define type-specific symbols */

GType
mbim_ip_configuration_available_flag_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 ("MbimIPConfigurationAvailableFlag"),
                                      mbim_ip_configuration_available_flag_values);
        g_once_init_leave (&g_define_type_id_initialized, g_define_type_id);
    }

    return g_define_type_id_initialized;
}

/* Flags-specific method to build a string with the given mask.
 * We get a comma separated list of the nicks of the GFlagsValues.
 * Note that this will be valid even if the GFlagsClass is not referenced
 * anywhere. */
gchar *
mbim_ip_configuration_available_flag_build_string_from_mask (MbimIPConfigurationAvailableFlag mask)
{
    guint i;
    gboolean first = TRUE;
    GString *str = NULL;

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

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

    return (str ? g_string_free (str, FALSE) : NULL);
}
static const GFlagsValue mbim_sms_status_flag_values[] = {
    { MBIM_SMS_STATUS_FLAG_NONE, "MBIM_SMS_STATUS_FLAG_NONE", "none" },
    { MBIM_SMS_STATUS_FLAG_MESSAGE_STORE_FULL, "MBIM_SMS_STATUS_FLAG_MESSAGE_STORE_FULL", "message-store-full" },
    { MBIM_SMS_STATUS_FLAG_NEW_MESSAGE, "MBIM_SMS_STATUS_FLAG_NEW_MESSAGE", "new-message" },
    { 0, NULL, NULL }
};

/* Define type-specific symbols */

GType
mbim_sms_status_flag_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 ("MbimSmsStatusFlag"),
                                      mbim_sms_status_flag_values);
        g_once_init_leave (&g_define_type_id_initialized, g_define_type_id);
    }

    return g_define_type_id_initialized;
}

/* Flags-specific method to build a string with the given mask.
 * We get a comma separated list of the nicks of the GFlagsValues.
 * Note that this will be valid even if the GFlagsClass is not referenced
 * anywhere. */
gchar *
mbim_sms_status_flag_build_string_from_mask (MbimSmsStatusFlag mask)
{
    guint i;
    gboolean first = TRUE;
    GString *str = NULL;

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

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

    return (str ? g_string_free (str, FALSE) : NULL);
}
static const GFlagsValue mbim_frequency_range_values[] = {
    { MBIM_FREQUENCY_RANGE_UNKNOWN, "MBIM_FREQUENCY_RANGE_UNKNOWN", "unknown" },
    { MBIM_FREQUENCY_RANGE_1, "MBIM_FREQUENCY_RANGE_1", "1" },
    { MBIM_FREQUENCY_RANGE_2, "MBIM_FREQUENCY_RANGE_2", "2" },
    { 0, NULL, NULL }
};

/* Define type-specific symbols */

GType
mbim_frequency_range_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 ("MbimFrequencyRange"),
                                      mbim_frequency_range_values);
        g_once_init_leave (&g_define_type_id_initialized, g_define_type_id);
    }

    return g_define_type_id_initialized;
}

/* Flags-specific method to build a string with the given mask.
 * We get a comma separated list of the nicks of the GFlagsValues.
 * Note that this will be valid even if the GFlagsClass is not referenced
 * anywhere. */
gchar *
mbim_frequency_range_build_string_from_mask (MbimFrequencyRange mask)
{
    guint i;
    gboolean first = TRUE;
    GString *str = NULL;

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

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

    return (str ? g_string_free (str, FALSE) : NULL);
}
static const GFlagsValue mbim_subscriber_ready_status_flag_values[] = {
    { MBIM_SUBSCRIBER_READY_STATUS_FLAG_NONE, "MBIM_SUBSCRIBER_READY_STATUS_FLAG_NONE", "none" },
    { MBIM_SUBSCRIBER_READY_STATUS_FLAG_ESIM, "MBIM_SUBSCRIBER_READY_STATUS_FLAG_ESIM", "esim" },
    { MBIM_SUBSCRIBER_READY_STATUS_FLAG_SIM_REMOVABILITY_KNOWN, "MBIM_SUBSCRIBER_READY_STATUS_FLAG_SIM_REMOVABILITY_KNOWN", "sim-removability-known" },
    { MBIM_SUBSCRIBER_READY_STATUS_FLAG_SIM_REMOVABLE, "MBIM_SUBSCRIBER_READY_STATUS_FLAG_SIM_REMOVABLE", "sim-removable" },
    { 0, NULL, NULL }
};

/* Define type-specific symbols */

GType
mbim_subscriber_ready_status_flag_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 ("MbimSubscriberReadyStatusFlag"),
                                      mbim_subscriber_ready_status_flag_values);
        g_once_init_leave (&g_define_type_id_initialized, g_define_type_id);
    }

    return g_define_type_id_initialized;
}

/* Flags-specific method to build a string with the given mask.
 * We get a comma separated list of the nicks of the GFlagsValues.
 * Note that this will be valid even if the GFlagsClass is not referenced
 * anywhere. */
gchar *
mbim_subscriber_ready_status_flag_build_string_from_mask (MbimSubscriberReadyStatusFlag mask)
{
    guint i;
    gboolean first = TRUE;
    GString *str = NULL;

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

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

    return (str ? g_string_free (str, FALSE) : NULL);
}
static const GFlagsValue mbim_data_class_v3_values[] = {
    { MBIM_DATA_CLASS_V3_NONE, "MBIM_DATA_CLASS_V3_NONE", "none" },
    { MBIM_DATA_CLASS_V3_GPRS, "MBIM_DATA_CLASS_V3_GPRS", "gprs" },
    { MBIM_DATA_CLASS_V3_EDGE, "MBIM_DATA_CLASS_V3_EDGE", "edge" },
    { MBIM_DATA_CLASS_V3_UMTS, "MBIM_DATA_CLASS_V3_UMTS", "umts" },
    { MBIM_DATA_CLASS_V3_HSDPA, "MBIM_DATA_CLASS_V3_HSDPA", "hsdpa" },
    { MBIM_DATA_CLASS_V3_HSUPA, "MBIM_DATA_CLASS_V3_HSUPA", "hsupa" },
    { MBIM_DATA_CLASS_V3_LTE, "MBIM_DATA_CLASS_V3_LTE", "lte" },
    { MBIM_DATA_CLASS_V3_5G, "MBIM_DATA_CLASS_V3_5G", "5g" },
    { MBIM_DATA_CLASS_V3_1XRTT, "MBIM_DATA_CLASS_V3_1XRTT", "1xrtt" },
    { MBIM_DATA_CLASS_V3_1XEVDO, "MBIM_DATA_CLASS_V3_1XEVDO", "1xevdo" },
    { MBIM_DATA_CLASS_V3_1XEVDO_REVA, "MBIM_DATA_CLASS_V3_1XEVDO_REVA", "1xevdo-reva" },
    { MBIM_DATA_CLASS_V3_1XEVDV, "MBIM_DATA_CLASS_V3_1XEVDV", "1xevdv" },
    { MBIM_DATA_CLASS_V3_3XRTT, "MBIM_DATA_CLASS_V3_3XRTT", "3xrtt" },
    { MBIM_DATA_CLASS_V3_1XEVDO_REVB, "MBIM_DATA_CLASS_V3_1XEVDO_REVB", "1xevdo-revb" },
    { MBIM_DATA_CLASS_V3_UMB, "MBIM_DATA_CLASS_V3_UMB", "umb" },
    { MBIM_DATA_CLASS_V3_CUSTOM, "MBIM_DATA_CLASS_V3_CUSTOM", "custom" },
    { 0, NULL, NULL }
};

/* Define type-specific symbols */

GType
mbim_data_class_v3_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 ("MbimDataClassV3"),
                                      mbim_data_class_v3_values);
        g_once_init_leave (&g_define_type_id_initialized, g_define_type_id);
    }

    return g_define_type_id_initialized;
}

/* Flags-specific method to build a string with the given mask.
 * We get a comma separated list of the nicks of the GFlagsValues.
 * Note that this will be valid even if the GFlagsClass is not referenced
 * anywhere. */
gchar *
mbim_data_class_v3_build_string_from_mask (MbimDataClassV3 mask)
{
    guint i;
    gboolean first = TRUE;
    GString *str = NULL;

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

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

    return (str ? g_string_free (str, FALSE) : NULL);
}
static const GFlagsValue mbim_data_subclass_values[] = {
    { MBIM_DATA_SUBCLASS_NONE, "MBIM_DATA_SUBCLASS_NONE", "none" },
    { MBIM_DATA_SUBCLASS_5G_ENDC, "MBIM_DATA_SUBCLASS_5G_ENDC", "5g-endc" },
    { MBIM_DATA_SUBCLASS_5G_NR, "MBIM_DATA_SUBCLASS_5G_NR", "5g-nr" },
    { MBIM_DATA_SUBCLASS_5G_NEDC, "MBIM_DATA_SUBCLASS_5G_NEDC", "5g-nedc" },
    { MBIM_DATA_SUBCLASS_5G_ELTE, "MBIM_DATA_SUBCLASS_5G_ELTE", "5g-elte" },
    { MBIM_DATA_SUBCLASS_5G_NGENDC, "MBIM_DATA_SUBCLASS_5G_NGENDC", "5g-ngendc" },
    { 0, NULL, NULL }
};

/* Define type-specific symbols */

GType
mbim_data_subclass_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 ("MbimDataSubclass"),
                                      mbim_data_subclass_values);
        g_once_init_leave (&g_define_type_id_initialized, g_define_type_id);
    }

    return g_define_type_id_initialized;
}

/* Flags-specific method to build a string with the given mask.
 * We get a comma separated list of the nicks of the GFlagsValues.
 * Note that this will be valid even if the GFlagsClass is not referenced
 * anywhere. */
gchar *
mbim_data_subclass_build_string_from_mask (MbimDataSubclass mask)
{
    guint i;
    gboolean first = TRUE;
    GString *str = NULL;

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

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

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

/* Generated data ends here */

