
/* 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-enums-types.h"
/* enumerations from "/build/modemmanager/src/build/../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_ANY, "MM_MODEM_CAPABILITY_ANY", "any" },
    { 0, NULL, NULL }
};

/* Define type-specific symbols */
#undef __MM_IS_ENUM__
#undef __MM_IS_FLAGS__
#define __MM_IS_FLAGS__

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;
}

/**
 * mm_modem_capability_get_string:
 * @val: a MMModemCapability.
 *
 * Gets the nickname string for the #MMModemCapability specified at @val.
 *
 * Returns: (transfer none): a string with the nickname, or %NULL if not found. Do not free the returned value.
 */
#if defined __MM_IS_ENUM__
const gchar *
mm_modem_capability_get_string (MMModemCapability val)
{
    guint i;

    for (i = 0; mm_modem_capability_values[i].value_nick; i++) {
        if ((gint)val == mm_modem_capability_values[i].value)
            return mm_modem_capability_values[i].value_nick;
    }

    return NULL;
}
#endif /* __MM_IS_ENUM_ */

/**
 * mm_modem_capability_build_string_from_mask:
 * @mask: bitmask of MMModemCapability values.
 *
 * Builds a string containing a comma-separated list of nicknames for
 * each #MMModemCapability in @mask.
 *
 * Returns: (transfer full): a string with the list of nicknames, or %NULL if none given. The returned value should be freed with g_free().
 */
#if defined __MM_IS_FLAGS__
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);
}
#endif /* __MM_IS_FLAGS__ */
static const GEnumValue mm_modem_lock_values[] = {
    { MM_MODEM_LOCK_UNKNOWN, "MM_MODEM_LOCK_UNKNOWN", "unknown" },
    { MM_MODEM_LOCK_NONE, "MM_MODEM_LOCK_NONE", "none" },
    { MM_MODEM_LOCK_SIM_PIN, "MM_MODEM_LOCK_SIM_PIN", "sim-pin" },
    { MM_MODEM_LOCK_SIM_PIN2, "MM_MODEM_LOCK_SIM_PIN2", "sim-pin2" },
    { MM_MODEM_LOCK_SIM_PUK, "MM_MODEM_LOCK_SIM_PUK", "sim-puk" },
    { MM_MODEM_LOCK_SIM_PUK2, "MM_MODEM_LOCK_SIM_PUK2", "sim-puk2" },
    { MM_MODEM_LOCK_PH_SP_PIN, "MM_MODEM_LOCK_PH_SP_PIN", "ph-sp-pin" },
    { MM_MODEM_LOCK_PH_SP_PUK, "MM_MODEM_LOCK_PH_SP_PUK", "ph-sp-puk" },
    { MM_MODEM_LOCK_PH_NET_PIN, "MM_MODEM_LOCK_PH_NET_PIN", "ph-net-pin" },
    { MM_MODEM_LOCK_PH_NET_PUK, "MM_MODEM_LOCK_PH_NET_PUK", "ph-net-puk" },
    { MM_MODEM_LOCK_PH_SIM_PIN, "MM_MODEM_LOCK_PH_SIM_PIN", "ph-sim-pin" },
    { MM_MODEM_LOCK_PH_CORP_PIN, "MM_MODEM_LOCK_PH_CORP_PIN", "ph-corp-pin" },
    { MM_MODEM_LOCK_PH_CORP_PUK, "MM_MODEM_LOCK_PH_CORP_PUK", "ph-corp-puk" },
    { MM_MODEM_LOCK_PH_FSIM_PIN, "MM_MODEM_LOCK_PH_FSIM_PIN", "ph-fsim-pin" },
    { MM_MODEM_LOCK_PH_FSIM_PUK, "MM_MODEM_LOCK_PH_FSIM_PUK", "ph-fsim-puk" },
    { MM_MODEM_LOCK_PH_NETSUB_PIN, "MM_MODEM_LOCK_PH_NETSUB_PIN", "ph-netsub-pin" },
    { MM_MODEM_LOCK_PH_NETSUB_PUK, "MM_MODEM_LOCK_PH_NETSUB_PUK", "ph-netsub-puk" },
    { 0, NULL, NULL }
};

/* Define type-specific symbols */
#undef __MM_IS_ENUM__
#undef __MM_IS_FLAGS__
#define __MM_IS_ENUM__

GType
mm_modem_lock_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_enum_register_static (g_intern_static_string ("MMModemLock"),
                                      mm_modem_lock_values);
        g_once_init_leave (&g_define_type_id_initialized, g_define_type_id);
    }

    return g_define_type_id_initialized;
}

/**
 * mm_modem_lock_get_string:
 * @val: a MMModemLock.
 *
 * Gets the nickname string for the #MMModemLock specified at @val.
 *
 * Returns: (transfer none): a string with the nickname, or %NULL if not found. Do not free the returned value.
 */
#if defined __MM_IS_ENUM__
const gchar *
mm_modem_lock_get_string (MMModemLock val)
{
    guint i;

    for (i = 0; mm_modem_lock_values[i].value_nick; i++) {
        if ((gint)val == mm_modem_lock_values[i].value)
            return mm_modem_lock_values[i].value_nick;
    }

    return NULL;
}
#endif /* __MM_IS_ENUM_ */

/**
 * mm_modem_lock_build_string_from_mask:
 * @mask: bitmask of MMModemLock values.
 *
 * Builds a string containing a comma-separated list of nicknames for
 * each #MMModemLock in @mask.
 *
 * Returns: (transfer full): a string with the list of nicknames, or %NULL if none given. The returned value should be freed with g_free().
 */
#if defined __MM_IS_FLAGS__
gchar *
mm_modem_lock_build_string_from_mask (MMModemLock mask)
{
    guint i;
    gboolean first = TRUE;
    GString *str = NULL;

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

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

    return (str ? g_string_free (str, FALSE) : NULL);
}
#endif /* __MM_IS_FLAGS__ */
static const GEnumValue mm_modem_state_values[] = {
    { MM_MODEM_STATE_FAILED, "MM_MODEM_STATE_FAILED", "failed" },
    { MM_MODEM_STATE_UNKNOWN, "MM_MODEM_STATE_UNKNOWN", "unknown" },
    { MM_MODEM_STATE_INITIALIZING, "MM_MODEM_STATE_INITIALIZING", "initializing" },
    { MM_MODEM_STATE_LOCKED, "MM_MODEM_STATE_LOCKED", "locked" },
    { MM_MODEM_STATE_DISABLED, "MM_MODEM_STATE_DISABLED", "disabled" },
    { MM_MODEM_STATE_DISABLING, "MM_MODEM_STATE_DISABLING", "disabling" },
    { MM_MODEM_STATE_ENABLING, "MM_MODEM_STATE_ENABLING", "enabling" },
    { MM_MODEM_STATE_ENABLED, "MM_MODEM_STATE_ENABLED", "enabled" },
    { MM_MODEM_STATE_SEARCHING, "MM_MODEM_STATE_SEARCHING", "searching" },
    { MM_MODEM_STATE_REGISTERED, "MM_MODEM_STATE_REGISTERED", "registered" },
    { MM_MODEM_STATE_DISCONNECTING, "MM_MODEM_STATE_DISCONNECTING", "disconnecting" },
    { MM_MODEM_STATE_CONNECTING, "MM_MODEM_STATE_CONNECTING", "connecting" },
    { MM_MODEM_STATE_CONNECTED, "MM_MODEM_STATE_CONNECTED", "connected" },
    { 0, NULL, NULL }
};

/* Define type-specific symbols */
#undef __MM_IS_ENUM__
#undef __MM_IS_FLAGS__
#define __MM_IS_ENUM__

GType
mm_modem_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_enum_register_static (g_intern_static_string ("MMModemState"),
                                      mm_modem_state_values);
        g_once_init_leave (&g_define_type_id_initialized, g_define_type_id);
    }

    return g_define_type_id_initialized;
}

/**
 * mm_modem_state_get_string:
 * @val: a MMModemState.
 *
 * Gets the nickname string for the #MMModemState specified at @val.
 *
 * Returns: (transfer none): a string with the nickname, or %NULL if not found. Do not free the returned value.
 */
#if defined __MM_IS_ENUM__
const gchar *
mm_modem_state_get_string (MMModemState val)
{
    guint i;

    for (i = 0; mm_modem_state_values[i].value_nick; i++) {
        if ((gint)val == mm_modem_state_values[i].value)
            return mm_modem_state_values[i].value_nick;
    }

    return NULL;
}
#endif /* __MM_IS_ENUM_ */

/**
 * mm_modem_state_build_string_from_mask:
 * @mask: bitmask of MMModemState values.
 *
 * Builds a string containing a comma-separated list of nicknames for
 * each #MMModemState in @mask.
 *
 * Returns: (transfer full): a string with the list of nicknames, or %NULL if none given. The returned value should be freed with g_free().
 */
#if defined __MM_IS_FLAGS__
gchar *
mm_modem_state_build_string_from_mask (MMModemState mask)
{
    guint i;
    gboolean first = TRUE;
    GString *str = NULL;

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

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

    return (str ? g_string_free (str, FALSE) : NULL);
}
#endif /* __MM_IS_FLAGS__ */
static const GEnumValue mm_modem_state_failed_reason_values[] = {
    { MM_MODEM_STATE_FAILED_REASON_NONE, "MM_MODEM_STATE_FAILED_REASON_NONE", "none" },
    { MM_MODEM_STATE_FAILED_REASON_UNKNOWN, "MM_MODEM_STATE_FAILED_REASON_UNKNOWN", "unknown" },
    { MM_MODEM_STATE_FAILED_REASON_SIM_MISSING, "MM_MODEM_STATE_FAILED_REASON_SIM_MISSING", "sim-missing" },
    { MM_MODEM_STATE_FAILED_REASON_SIM_ERROR, "MM_MODEM_STATE_FAILED_REASON_SIM_ERROR", "sim-error" },
    { 0, NULL, NULL }
};

/* Define type-specific symbols */
#undef __MM_IS_ENUM__
#undef __MM_IS_FLAGS__
#define __MM_IS_ENUM__

GType
mm_modem_state_failed_reason_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_enum_register_static (g_intern_static_string ("MMModemStateFailedReason"),
                                      mm_modem_state_failed_reason_values);
        g_once_init_leave (&g_define_type_id_initialized, g_define_type_id);
    }

    return g_define_type_id_initialized;
}

/**
 * mm_modem_state_failed_reason_get_string:
 * @val: a MMModemStateFailedReason.
 *
 * Gets the nickname string for the #MMModemStateFailedReason specified at @val.
 *
 * Returns: (transfer none): a string with the nickname, or %NULL if not found. Do not free the returned value.
 */
#if defined __MM_IS_ENUM__
const gchar *
mm_modem_state_failed_reason_get_string (MMModemStateFailedReason val)
{
    guint i;

    for (i = 0; mm_modem_state_failed_reason_values[i].value_nick; i++) {
        if ((gint)val == mm_modem_state_failed_reason_values[i].value)
            return mm_modem_state_failed_reason_values[i].value_nick;
    }

    return NULL;
}
#endif /* __MM_IS_ENUM_ */

/**
 * mm_modem_state_failed_reason_build_string_from_mask:
 * @mask: bitmask of MMModemStateFailedReason values.
 *
 * Builds a string containing a comma-separated list of nicknames for
 * each #MMModemStateFailedReason in @mask.
 *
 * Returns: (transfer full): a string with the list of nicknames, or %NULL if none given. The returned value should be freed with g_free().
 */
#if defined __MM_IS_FLAGS__
gchar *
mm_modem_state_failed_reason_build_string_from_mask (MMModemStateFailedReason mask)
{
    guint i;
    gboolean first = TRUE;
    GString *str = NULL;

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

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

    return (str ? g_string_free (str, FALSE) : NULL);
}
#endif /* __MM_IS_FLAGS__ */
static const GEnumValue mm_modem_power_state_values[] = {
    { MM_MODEM_POWER_STATE_UNKNOWN, "MM_MODEM_POWER_STATE_UNKNOWN", "unknown" },
    { MM_MODEM_POWER_STATE_OFF, "MM_MODEM_POWER_STATE_OFF", "off" },
    { MM_MODEM_POWER_STATE_LOW, "MM_MODEM_POWER_STATE_LOW", "low" },
    { MM_MODEM_POWER_STATE_ON, "MM_MODEM_POWER_STATE_ON", "on" },
    { 0, NULL, NULL }
};

/* Define type-specific symbols */
#undef __MM_IS_ENUM__
#undef __MM_IS_FLAGS__
#define __MM_IS_ENUM__

GType
mm_modem_power_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_enum_register_static (g_intern_static_string ("MMModemPowerState"),
                                      mm_modem_power_state_values);
        g_once_init_leave (&g_define_type_id_initialized, g_define_type_id);
    }

    return g_define_type_id_initialized;
}

/**
 * mm_modem_power_state_get_string:
 * @val: a MMModemPowerState.
 *
 * Gets the nickname string for the #MMModemPowerState specified at @val.
 *
 * Returns: (transfer none): a string with the nickname, or %NULL if not found. Do not free the returned value.
 */
#if defined __MM_IS_ENUM__
const gchar *
mm_modem_power_state_get_string (MMModemPowerState val)
{
    guint i;

    for (i = 0; mm_modem_power_state_values[i].value_nick; i++) {
        if ((gint)val == mm_modem_power_state_values[i].value)
            return mm_modem_power_state_values[i].value_nick;
    }

    return NULL;
}
#endif /* __MM_IS_ENUM_ */

/**
 * mm_modem_power_state_build_string_from_mask:
 * @mask: bitmask of MMModemPowerState values.
 *
 * Builds a string containing a comma-separated list of nicknames for
 * each #MMModemPowerState in @mask.
 *
 * Returns: (transfer full): a string with the list of nicknames, or %NULL if none given. The returned value should be freed with g_free().
 */
#if defined __MM_IS_FLAGS__
gchar *
mm_modem_power_state_build_string_from_mask (MMModemPowerState mask)
{
    guint i;
    gboolean first = TRUE;
    GString *str = NULL;

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

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

    return (str ? g_string_free (str, FALSE) : NULL);
}
#endif /* __MM_IS_FLAGS__ */
static const GEnumValue mm_modem_state_change_reason_values[] = {
    { MM_MODEM_STATE_CHANGE_REASON_UNKNOWN, "MM_MODEM_STATE_CHANGE_REASON_UNKNOWN", "unknown" },
    { MM_MODEM_STATE_CHANGE_REASON_USER_REQUESTED, "MM_MODEM_STATE_CHANGE_REASON_USER_REQUESTED", "user-requested" },
    { MM_MODEM_STATE_CHANGE_REASON_SUSPEND, "MM_MODEM_STATE_CHANGE_REASON_SUSPEND", "suspend" },
    { MM_MODEM_STATE_CHANGE_REASON_FAILURE, "MM_MODEM_STATE_CHANGE_REASON_FAILURE", "failure" },
    { 0, NULL, NULL }
};

/* Define type-specific symbols */
#undef __MM_IS_ENUM__
#undef __MM_IS_FLAGS__
#define __MM_IS_ENUM__

GType
mm_modem_state_change_reason_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_enum_register_static (g_intern_static_string ("MMModemStateChangeReason"),
                                      mm_modem_state_change_reason_values);
        g_once_init_leave (&g_define_type_id_initialized, g_define_type_id);
    }

    return g_define_type_id_initialized;
}

/**
 * mm_modem_state_change_reason_get_string:
 * @val: a MMModemStateChangeReason.
 *
 * Gets the nickname string for the #MMModemStateChangeReason specified at @val.
 *
 * Returns: (transfer none): a string with the nickname, or %NULL if not found. Do not free the returned value.
 */
#if defined __MM_IS_ENUM__
const gchar *
mm_modem_state_change_reason_get_string (MMModemStateChangeReason val)
{
    guint i;

    for (i = 0; mm_modem_state_change_reason_values[i].value_nick; i++) {
        if ((gint)val == mm_modem_state_change_reason_values[i].value)
            return mm_modem_state_change_reason_values[i].value_nick;
    }

    return NULL;
}
#endif /* __MM_IS_ENUM_ */

/**
 * mm_modem_state_change_reason_build_string_from_mask:
 * @mask: bitmask of MMModemStateChangeReason values.
 *
 * Builds a string containing a comma-separated list of nicknames for
 * each #MMModemStateChangeReason in @mask.
 *
 * Returns: (transfer full): a string with the list of nicknames, or %NULL if none given. The returned value should be freed with g_free().
 */
#if defined __MM_IS_FLAGS__
gchar *
mm_modem_state_change_reason_build_string_from_mask (MMModemStateChangeReason mask)
{
    guint i;
    gboolean first = TRUE;
    GString *str = NULL;

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

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

    return (str ? g_string_free (str, FALSE) : NULL);
}
#endif /* __MM_IS_FLAGS__ */
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_ANY, "MM_MODEM_ACCESS_TECHNOLOGY_ANY", "any" },
    { 0, NULL, NULL }
};

/* Define type-specific symbols */
#undef __MM_IS_ENUM__
#undef __MM_IS_FLAGS__
#define __MM_IS_FLAGS__

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;
}

/**
 * mm_modem_access_technology_get_string:
 * @val: a MMModemAccessTechnology.
 *
 * Gets the nickname string for the #MMModemAccessTechnology specified at @val.
 *
 * Returns: (transfer none): a string with the nickname, or %NULL if not found. Do not free the returned value.
 */
#if defined __MM_IS_ENUM__
const gchar *
mm_modem_access_technology_get_string (MMModemAccessTechnology val)
{
    guint i;

    for (i = 0; mm_modem_access_technology_values[i].value_nick; i++) {
        if ((gint)val == mm_modem_access_technology_values[i].value)
            return mm_modem_access_technology_values[i].value_nick;
    }

    return NULL;
}
#endif /* __MM_IS_ENUM_ */

/**
 * mm_modem_access_technology_build_string_from_mask:
 * @mask: bitmask of MMModemAccessTechnology values.
 *
 * Builds a string containing a comma-separated list of nicknames for
 * each #MMModemAccessTechnology in @mask.
 *
 * Returns: (transfer full): a string with the list of nicknames, or %NULL if none given. The returned value should be freed with g_free().
 */
#if defined __MM_IS_FLAGS__
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);
}
#endif /* __MM_IS_FLAGS__ */
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 }
};

/* Define type-specific symbols */
#undef __MM_IS_ENUM__
#undef __MM_IS_FLAGS__
#define __MM_IS_FLAGS__

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;
}

/**
 * mm_modem_mode_get_string:
 * @val: a MMModemMode.
 *
 * Gets the nickname string for the #MMModemMode specified at @val.
 *
 * Returns: (transfer none): a string with the nickname, or %NULL if not found. Do not free the returned value.
 */
#if defined __MM_IS_ENUM__
const gchar *
mm_modem_mode_get_string (MMModemMode val)
{
    guint i;

    for (i = 0; mm_modem_mode_values[i].value_nick; i++) {
        if ((gint)val == mm_modem_mode_values[i].value)
            return mm_modem_mode_values[i].value_nick;
    }

    return NULL;
}
#endif /* __MM_IS_ENUM_ */

/**
 * mm_modem_mode_build_string_from_mask:
 * @mask: bitmask of MMModemMode values.
 *
 * Builds a string containing a comma-separated list of nicknames for
 * each #MMModemMode in @mask.
 *
 * Returns: (transfer full): a string with the list of nicknames, or %NULL if none given. The returned value should be freed with g_free().
 */
#if defined __MM_IS_FLAGS__
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);
}
#endif /* __MM_IS_FLAGS__ */
static const GEnumValue mm_modem_band_values[] = {
    { MM_MODEM_BAND_UNKNOWN, "MM_MODEM_BAND_UNKNOWN", "unknown" },
    { MM_MODEM_BAND_EGSM, "MM_MODEM_BAND_EGSM", "egsm" },
    { MM_MODEM_BAND_DCS, "MM_MODEM_BAND_DCS", "dcs" },
    { MM_MODEM_BAND_PCS, "MM_MODEM_BAND_PCS", "pcs" },
    { MM_MODEM_BAND_G850, "MM_MODEM_BAND_G850", "g850" },
    { MM_MODEM_BAND_UTRAN_1, "MM_MODEM_BAND_UTRAN_1", "utran-1" },
    { MM_MODEM_BAND_UTRAN_3, "MM_MODEM_BAND_UTRAN_3", "utran-3" },
    { MM_MODEM_BAND_UTRAN_4, "MM_MODEM_BAND_UTRAN_4", "utran-4" },
    { MM_MODEM_BAND_UTRAN_6, "MM_MODEM_BAND_UTRAN_6", "utran-6" },
    { MM_MODEM_BAND_UTRAN_5, "MM_MODEM_BAND_UTRAN_5", "utran-5" },
    { MM_MODEM_BAND_UTRAN_8, "MM_MODEM_BAND_UTRAN_8", "utran-8" },
    { MM_MODEM_BAND_UTRAN_9, "MM_MODEM_BAND_UTRAN_9", "utran-9" },
    { MM_MODEM_BAND_UTRAN_2, "MM_MODEM_BAND_UTRAN_2", "utran-2" },
    { MM_MODEM_BAND_UTRAN_7, "MM_MODEM_BAND_UTRAN_7", "utran-7" },
    { MM_MODEM_BAND_G450, "MM_MODEM_BAND_G450", "g450" },
    { MM_MODEM_BAND_G480, "MM_MODEM_BAND_G480", "g480" },
    { MM_MODEM_BAND_G750, "MM_MODEM_BAND_G750", "g750" },
    { MM_MODEM_BAND_G380, "MM_MODEM_BAND_G380", "g380" },
    { MM_MODEM_BAND_G410, "MM_MODEM_BAND_G410", "g410" },
    { MM_MODEM_BAND_G710, "MM_MODEM_BAND_G710", "g710" },
    { MM_MODEM_BAND_G810, "MM_MODEM_BAND_G810", "g810" },
    { MM_MODEM_BAND_EUTRAN_1, "MM_MODEM_BAND_EUTRAN_1", "eutran-1" },
    { MM_MODEM_BAND_EUTRAN_2, "MM_MODEM_BAND_EUTRAN_2", "eutran-2" },
    { MM_MODEM_BAND_EUTRAN_3, "MM_MODEM_BAND_EUTRAN_3", "eutran-3" },
    { MM_MODEM_BAND_EUTRAN_4, "MM_MODEM_BAND_EUTRAN_4", "eutran-4" },
    { MM_MODEM_BAND_EUTRAN_5, "MM_MODEM_BAND_EUTRAN_5", "eutran-5" },
    { MM_MODEM_BAND_EUTRAN_6, "MM_MODEM_BAND_EUTRAN_6", "eutran-6" },
    { MM_MODEM_BAND_EUTRAN_7, "MM_MODEM_BAND_EUTRAN_7", "eutran-7" },
    { MM_MODEM_BAND_EUTRAN_8, "MM_MODEM_BAND_EUTRAN_8", "eutran-8" },
    { MM_MODEM_BAND_EUTRAN_9, "MM_MODEM_BAND_EUTRAN_9", "eutran-9" },
    { MM_MODEM_BAND_EUTRAN_10, "MM_MODEM_BAND_EUTRAN_10", "eutran-10" },
    { MM_MODEM_BAND_EUTRAN_11, "MM_MODEM_BAND_EUTRAN_11", "eutran-11" },
    { MM_MODEM_BAND_EUTRAN_12, "MM_MODEM_BAND_EUTRAN_12", "eutran-12" },
    { MM_MODEM_BAND_EUTRAN_13, "MM_MODEM_BAND_EUTRAN_13", "eutran-13" },
    { MM_MODEM_BAND_EUTRAN_14, "MM_MODEM_BAND_EUTRAN_14", "eutran-14" },
    { MM_MODEM_BAND_EUTRAN_17, "MM_MODEM_BAND_EUTRAN_17", "eutran-17" },
    { MM_MODEM_BAND_EUTRAN_18, "MM_MODEM_BAND_EUTRAN_18", "eutran-18" },
    { MM_MODEM_BAND_EUTRAN_19, "MM_MODEM_BAND_EUTRAN_19", "eutran-19" },
    { MM_MODEM_BAND_EUTRAN_20, "MM_MODEM_BAND_EUTRAN_20", "eutran-20" },
    { MM_MODEM_BAND_EUTRAN_21, "MM_MODEM_BAND_EUTRAN_21", "eutran-21" },
    { MM_MODEM_BAND_EUTRAN_22, "MM_MODEM_BAND_EUTRAN_22", "eutran-22" },
    { MM_MODEM_BAND_EUTRAN_23, "MM_MODEM_BAND_EUTRAN_23", "eutran-23" },
    { MM_MODEM_BAND_EUTRAN_24, "MM_MODEM_BAND_EUTRAN_24", "eutran-24" },
    { MM_MODEM_BAND_EUTRAN_25, "MM_MODEM_BAND_EUTRAN_25", "eutran-25" },
    { MM_MODEM_BAND_EUTRAN_26, "MM_MODEM_BAND_EUTRAN_26", "eutran-26" },
    { MM_MODEM_BAND_EUTRAN_27, "MM_MODEM_BAND_EUTRAN_27", "eutran-27" },
    { MM_MODEM_BAND_EUTRAN_28, "MM_MODEM_BAND_EUTRAN_28", "eutran-28" },
    { MM_MODEM_BAND_EUTRAN_29, "MM_MODEM_BAND_EUTRAN_29", "eutran-29" },
    { MM_MODEM_BAND_EUTRAN_30, "MM_MODEM_BAND_EUTRAN_30", "eutran-30" },
    { MM_MODEM_BAND_EUTRAN_31, "MM_MODEM_BAND_EUTRAN_31", "eutran-31" },
    { MM_MODEM_BAND_EUTRAN_32, "MM_MODEM_BAND_EUTRAN_32", "eutran-32" },
    { MM_MODEM_BAND_EUTRAN_33, "MM_MODEM_BAND_EUTRAN_33", "eutran-33" },
    { MM_MODEM_BAND_EUTRAN_34, "MM_MODEM_BAND_EUTRAN_34", "eutran-34" },
    { MM_MODEM_BAND_EUTRAN_35, "MM_MODEM_BAND_EUTRAN_35", "eutran-35" },
    { MM_MODEM_BAND_EUTRAN_36, "MM_MODEM_BAND_EUTRAN_36", "eutran-36" },
    { MM_MODEM_BAND_EUTRAN_37, "MM_MODEM_BAND_EUTRAN_37", "eutran-37" },
    { MM_MODEM_BAND_EUTRAN_38, "MM_MODEM_BAND_EUTRAN_38", "eutran-38" },
    { MM_MODEM_BAND_EUTRAN_39, "MM_MODEM_BAND_EUTRAN_39", "eutran-39" },
    { MM_MODEM_BAND_EUTRAN_40, "MM_MODEM_BAND_EUTRAN_40", "eutran-40" },
    { MM_MODEM_BAND_EUTRAN_41, "MM_MODEM_BAND_EUTRAN_41", "eutran-41" },
    { MM_MODEM_BAND_EUTRAN_42, "MM_MODEM_BAND_EUTRAN_42", "eutran-42" },
    { MM_MODEM_BAND_EUTRAN_43, "MM_MODEM_BAND_EUTRAN_43", "eutran-43" },
    { MM_MODEM_BAND_EUTRAN_44, "MM_MODEM_BAND_EUTRAN_44", "eutran-44" },
    { MM_MODEM_BAND_EUTRAN_45, "MM_MODEM_BAND_EUTRAN_45", "eutran-45" },
    { MM_MODEM_BAND_EUTRAN_46, "MM_MODEM_BAND_EUTRAN_46", "eutran-46" },
    { MM_MODEM_BAND_EUTRAN_47, "MM_MODEM_BAND_EUTRAN_47", "eutran-47" },
    { MM_MODEM_BAND_EUTRAN_48, "MM_MODEM_BAND_EUTRAN_48", "eutran-48" },
    { MM_MODEM_BAND_EUTRAN_49, "MM_MODEM_BAND_EUTRAN_49", "eutran-49" },
    { MM_MODEM_BAND_EUTRAN_50, "MM_MODEM_BAND_EUTRAN_50", "eutran-50" },
    { MM_MODEM_BAND_EUTRAN_51, "MM_MODEM_BAND_EUTRAN_51", "eutran-51" },
    { MM_MODEM_BAND_EUTRAN_52, "MM_MODEM_BAND_EUTRAN_52", "eutran-52" },
    { MM_MODEM_BAND_EUTRAN_53, "MM_MODEM_BAND_EUTRAN_53", "eutran-53" },
    { MM_MODEM_BAND_EUTRAN_54, "MM_MODEM_BAND_EUTRAN_54", "eutran-54" },
    { MM_MODEM_BAND_EUTRAN_55, "MM_MODEM_BAND_EUTRAN_55", "eutran-55" },
    { MM_MODEM_BAND_EUTRAN_56, "MM_MODEM_BAND_EUTRAN_56", "eutran-56" },
    { MM_MODEM_BAND_EUTRAN_57, "MM_MODEM_BAND_EUTRAN_57", "eutran-57" },
    { MM_MODEM_BAND_EUTRAN_58, "MM_MODEM_BAND_EUTRAN_58", "eutran-58" },
    { MM_MODEM_BAND_EUTRAN_59, "MM_MODEM_BAND_EUTRAN_59", "eutran-59" },
    { MM_MODEM_BAND_EUTRAN_60, "MM_MODEM_BAND_EUTRAN_60", "eutran-60" },
    { MM_MODEM_BAND_EUTRAN_61, "MM_MODEM_BAND_EUTRAN_61", "eutran-61" },
    { MM_MODEM_BAND_EUTRAN_62, "MM_MODEM_BAND_EUTRAN_62", "eutran-62" },
    { MM_MODEM_BAND_EUTRAN_63, "MM_MODEM_BAND_EUTRAN_63", "eutran-63" },
    { MM_MODEM_BAND_EUTRAN_64, "MM_MODEM_BAND_EUTRAN_64", "eutran-64" },
    { MM_MODEM_BAND_EUTRAN_65, "MM_MODEM_BAND_EUTRAN_65", "eutran-65" },
    { MM_MODEM_BAND_EUTRAN_66, "MM_MODEM_BAND_EUTRAN_66", "eutran-66" },
    { MM_MODEM_BAND_EUTRAN_67, "MM_MODEM_BAND_EUTRAN_67", "eutran-67" },
    { MM_MODEM_BAND_EUTRAN_68, "MM_MODEM_BAND_EUTRAN_68", "eutran-68" },
    { MM_MODEM_BAND_EUTRAN_69, "MM_MODEM_BAND_EUTRAN_69", "eutran-69" },
    { MM_MODEM_BAND_EUTRAN_70, "MM_MODEM_BAND_EUTRAN_70", "eutran-70" },
    { MM_MODEM_BAND_EUTRAN_71, "MM_MODEM_BAND_EUTRAN_71", "eutran-71" },
    { MM_MODEM_BAND_CDMA_BC0, "MM_MODEM_BAND_CDMA_BC0", "cdma-bc0" },
    { MM_MODEM_BAND_CDMA_BC1, "MM_MODEM_BAND_CDMA_BC1", "cdma-bc1" },
    { MM_MODEM_BAND_CDMA_BC2, "MM_MODEM_BAND_CDMA_BC2", "cdma-bc2" },
    { MM_MODEM_BAND_CDMA_BC3, "MM_MODEM_BAND_CDMA_BC3", "cdma-bc3" },
    { MM_MODEM_BAND_CDMA_BC4, "MM_MODEM_BAND_CDMA_BC4", "cdma-bc4" },
    { MM_MODEM_BAND_CDMA_BC5, "MM_MODEM_BAND_CDMA_BC5", "cdma-bc5" },
    { MM_MODEM_BAND_CDMA_BC6, "MM_MODEM_BAND_CDMA_BC6", "cdma-bc6" },
    { MM_MODEM_BAND_CDMA_BC7, "MM_MODEM_BAND_CDMA_BC7", "cdma-bc7" },
    { MM_MODEM_BAND_CDMA_BC8, "MM_MODEM_BAND_CDMA_BC8", "cdma-bc8" },
    { MM_MODEM_BAND_CDMA_BC9, "MM_MODEM_BAND_CDMA_BC9", "cdma-bc9" },
    { MM_MODEM_BAND_CDMA_BC10, "MM_MODEM_BAND_CDMA_BC10", "cdma-bc10" },
    { MM_MODEM_BAND_CDMA_BC11, "MM_MODEM_BAND_CDMA_BC11", "cdma-bc11" },
    { MM_MODEM_BAND_CDMA_BC12, "MM_MODEM_BAND_CDMA_BC12", "cdma-bc12" },
    { MM_MODEM_BAND_CDMA_BC13, "MM_MODEM_BAND_CDMA_BC13", "cdma-bc13" },
    { MM_MODEM_BAND_CDMA_BC14, "MM_MODEM_BAND_CDMA_BC14", "cdma-bc14" },
    { MM_MODEM_BAND_CDMA_BC15, "MM_MODEM_BAND_CDMA_BC15", "cdma-bc15" },
    { MM_MODEM_BAND_CDMA_BC16, "MM_MODEM_BAND_CDMA_BC16", "cdma-bc16" },
    { MM_MODEM_BAND_CDMA_BC17, "MM_MODEM_BAND_CDMA_BC17", "cdma-bc17" },
    { MM_MODEM_BAND_CDMA_BC18, "MM_MODEM_BAND_CDMA_BC18", "cdma-bc18" },
    { MM_MODEM_BAND_CDMA_BC19, "MM_MODEM_BAND_CDMA_BC19", "cdma-bc19" },
    { MM_MODEM_BAND_UTRAN_10, "MM_MODEM_BAND_UTRAN_10", "utran-10" },
    { MM_MODEM_BAND_UTRAN_11, "MM_MODEM_BAND_UTRAN_11", "utran-11" },
    { MM_MODEM_BAND_UTRAN_12, "MM_MODEM_BAND_UTRAN_12", "utran-12" },
    { MM_MODEM_BAND_UTRAN_13, "MM_MODEM_BAND_UTRAN_13", "utran-13" },
    { MM_MODEM_BAND_UTRAN_14, "MM_MODEM_BAND_UTRAN_14", "utran-14" },
    { MM_MODEM_BAND_UTRAN_19, "MM_MODEM_BAND_UTRAN_19", "utran-19" },
    { MM_MODEM_BAND_UTRAN_20, "MM_MODEM_BAND_UTRAN_20", "utran-20" },
    { MM_MODEM_BAND_UTRAN_21, "MM_MODEM_BAND_UTRAN_21", "utran-21" },
    { MM_MODEM_BAND_UTRAN_22, "MM_MODEM_BAND_UTRAN_22", "utran-22" },
    { MM_MODEM_BAND_UTRAN_25, "MM_MODEM_BAND_UTRAN_25", "utran-25" },
    { MM_MODEM_BAND_UTRAN_26, "MM_MODEM_BAND_UTRAN_26", "utran-26" },
    { MM_MODEM_BAND_UTRAN_32, "MM_MODEM_BAND_UTRAN_32", "utran-32" },
    { MM_MODEM_BAND_ANY, "MM_MODEM_BAND_ANY", "any" },
    { 0, NULL, NULL }
};

/* Define type-specific symbols */
#undef __MM_IS_ENUM__
#undef __MM_IS_FLAGS__
#define __MM_IS_ENUM__

GType
mm_modem_band_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_enum_register_static (g_intern_static_string ("MMModemBand"),
                                      mm_modem_band_values);
        g_once_init_leave (&g_define_type_id_initialized, g_define_type_id);
    }

    return g_define_type_id_initialized;
}

/**
 * mm_modem_band_get_string:
 * @val: a MMModemBand.
 *
 * Gets the nickname string for the #MMModemBand specified at @val.
 *
 * Returns: (transfer none): a string with the nickname, or %NULL if not found. Do not free the returned value.
 */
#if defined __MM_IS_ENUM__
const gchar *
mm_modem_band_get_string (MMModemBand val)
{
    guint i;

    for (i = 0; mm_modem_band_values[i].value_nick; i++) {
        if ((gint)val == mm_modem_band_values[i].value)
            return mm_modem_band_values[i].value_nick;
    }

    return NULL;
}
#endif /* __MM_IS_ENUM_ */

/**
 * mm_modem_band_build_string_from_mask:
 * @mask: bitmask of MMModemBand values.
 *
 * Builds a string containing a comma-separated list of nicknames for
 * each #MMModemBand in @mask.
 *
 * Returns: (transfer full): a string with the list of nicknames, or %NULL if none given. The returned value should be freed with g_free().
 */
#if defined __MM_IS_FLAGS__
gchar *
mm_modem_band_build_string_from_mask (MMModemBand mask)
{
    guint i;
    gboolean first = TRUE;
    GString *str = NULL;

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

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

    return (str ? g_string_free (str, FALSE) : NULL);
}
#endif /* __MM_IS_FLAGS__ */
static const GEnumValue mm_modem_port_type_values[] = {
    { MM_MODEM_PORT_TYPE_UNKNOWN, "MM_MODEM_PORT_TYPE_UNKNOWN", "unknown" },
    { MM_MODEM_PORT_TYPE_NET, "MM_MODEM_PORT_TYPE_NET", "net" },
    { MM_MODEM_PORT_TYPE_AT, "MM_MODEM_PORT_TYPE_AT", "at" },
    { MM_MODEM_PORT_TYPE_QCDM, "MM_MODEM_PORT_TYPE_QCDM", "qcdm" },
    { MM_MODEM_PORT_TYPE_GPS, "MM_MODEM_PORT_TYPE_GPS", "gps" },
    { MM_MODEM_PORT_TYPE_QMI, "MM_MODEM_PORT_TYPE_QMI", "qmi" },
    { MM_MODEM_PORT_TYPE_MBIM, "MM_MODEM_PORT_TYPE_MBIM", "mbim" },
    { MM_MODEM_PORT_TYPE_AUDIO, "MM_MODEM_PORT_TYPE_AUDIO", "audio" },
    { MM_MODEM_PORT_TYPE_IGNORED, "MM_MODEM_PORT_TYPE_IGNORED", "ignored" },
    { 0, NULL, NULL }
};

/* Define type-specific symbols */
#undef __MM_IS_ENUM__
#undef __MM_IS_FLAGS__
#define __MM_IS_ENUM__

GType
mm_modem_port_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_enum_register_static (g_intern_static_string ("MMModemPortType"),
                                      mm_modem_port_type_values);
        g_once_init_leave (&g_define_type_id_initialized, g_define_type_id);
    }

    return g_define_type_id_initialized;
}

/**
 * mm_modem_port_type_get_string:
 * @val: a MMModemPortType.
 *
 * Gets the nickname string for the #MMModemPortType specified at @val.
 *
 * Returns: (transfer none): a string with the nickname, or %NULL if not found. Do not free the returned value.
 */
#if defined __MM_IS_ENUM__
const gchar *
mm_modem_port_type_get_string (MMModemPortType val)
{
    guint i;

    for (i = 0; mm_modem_port_type_values[i].value_nick; i++) {
        if ((gint)val == mm_modem_port_type_values[i].value)
            return mm_modem_port_type_values[i].value_nick;
    }

    return NULL;
}
#endif /* __MM_IS_ENUM_ */

/**
 * mm_modem_port_type_build_string_from_mask:
 * @mask: bitmask of MMModemPortType values.
 *
 * Builds a string containing a comma-separated list of nicknames for
 * each #MMModemPortType in @mask.
 *
 * Returns: (transfer full): a string with the list of nicknames, or %NULL if none given. The returned value should be freed with g_free().
 */
#if defined __MM_IS_FLAGS__
gchar *
mm_modem_port_type_build_string_from_mask (MMModemPortType mask)
{
    guint i;
    gboolean first = TRUE;
    GString *str = NULL;

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

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

    return (str ? g_string_free (str, FALSE) : NULL);
}
#endif /* __MM_IS_FLAGS__ */
static const GEnumValue mm_sms_pdu_type_values[] = {
    { MM_SMS_PDU_TYPE_UNKNOWN, "MM_SMS_PDU_TYPE_UNKNOWN", "unknown" },
    { MM_SMS_PDU_TYPE_DELIVER, "MM_SMS_PDU_TYPE_DELIVER", "deliver" },
    { MM_SMS_PDU_TYPE_SUBMIT, "MM_SMS_PDU_TYPE_SUBMIT", "submit" },
    { MM_SMS_PDU_TYPE_STATUS_REPORT, "MM_SMS_PDU_TYPE_STATUS_REPORT", "status-report" },
    { MM_SMS_PDU_TYPE_CDMA_DELIVER, "MM_SMS_PDU_TYPE_CDMA_DELIVER", "cdma-deliver" },
    { MM_SMS_PDU_TYPE_CDMA_SUBMIT, "MM_SMS_PDU_TYPE_CDMA_SUBMIT", "cdma-submit" },
    { MM_SMS_PDU_TYPE_CDMA_CANCELLATION, "MM_SMS_PDU_TYPE_CDMA_CANCELLATION", "cdma-cancellation" },
    { MM_SMS_PDU_TYPE_CDMA_DELIVERY_ACKNOWLEDGEMENT, "MM_SMS_PDU_TYPE_CDMA_DELIVERY_ACKNOWLEDGEMENT", "cdma-delivery-acknowledgement" },
    { MM_SMS_PDU_TYPE_CDMA_USER_ACKNOWLEDGEMENT, "MM_SMS_PDU_TYPE_CDMA_USER_ACKNOWLEDGEMENT", "cdma-user-acknowledgement" },
    { MM_SMS_PDU_TYPE_CDMA_READ_ACKNOWLEDGEMENT, "MM_SMS_PDU_TYPE_CDMA_READ_ACKNOWLEDGEMENT", "cdma-read-acknowledgement" },
    { 0, NULL, NULL }
};

/* Define type-specific symbols */
#undef __MM_IS_ENUM__
#undef __MM_IS_FLAGS__
#define __MM_IS_ENUM__

GType
mm_sms_pdu_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_enum_register_static (g_intern_static_string ("MMSmsPduType"),
                                      mm_sms_pdu_type_values);
        g_once_init_leave (&g_define_type_id_initialized, g_define_type_id);
    }

    return g_define_type_id_initialized;
}

/**
 * mm_sms_pdu_type_get_string:
 * @val: a MMSmsPduType.
 *
 * Gets the nickname string for the #MMSmsPduType specified at @val.
 *
 * Returns: (transfer none): a string with the nickname, or %NULL if not found. Do not free the returned value.
 */
#if defined __MM_IS_ENUM__
const gchar *
mm_sms_pdu_type_get_string (MMSmsPduType val)
{
    guint i;

    for (i = 0; mm_sms_pdu_type_values[i].value_nick; i++) {
        if ((gint)val == mm_sms_pdu_type_values[i].value)
            return mm_sms_pdu_type_values[i].value_nick;
    }

    return NULL;
}
#endif /* __MM_IS_ENUM_ */

/**
 * mm_sms_pdu_type_build_string_from_mask:
 * @mask: bitmask of MMSmsPduType values.
 *
 * Builds a string containing a comma-separated list of nicknames for
 * each #MMSmsPduType in @mask.
 *
 * Returns: (transfer full): a string with the list of nicknames, or %NULL if none given. The returned value should be freed with g_free().
 */
#if defined __MM_IS_FLAGS__
gchar *
mm_sms_pdu_type_build_string_from_mask (MMSmsPduType mask)
{
    guint i;
    gboolean first = TRUE;
    GString *str = NULL;

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

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

    return (str ? g_string_free (str, FALSE) : NULL);
}
#endif /* __MM_IS_FLAGS__ */
static const GEnumValue mm_sms_state_values[] = {
    { MM_SMS_STATE_UNKNOWN, "MM_SMS_STATE_UNKNOWN", "unknown" },
    { MM_SMS_STATE_STORED, "MM_SMS_STATE_STORED", "stored" },
    { MM_SMS_STATE_RECEIVING, "MM_SMS_STATE_RECEIVING", "receiving" },
    { MM_SMS_STATE_RECEIVED, "MM_SMS_STATE_RECEIVED", "received" },
    { MM_SMS_STATE_SENDING, "MM_SMS_STATE_SENDING", "sending" },
    { MM_SMS_STATE_SENT, "MM_SMS_STATE_SENT", "sent" },
    { 0, NULL, NULL }
};

/* Define type-specific symbols */
#undef __MM_IS_ENUM__
#undef __MM_IS_FLAGS__
#define __MM_IS_ENUM__

GType
mm_sms_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_enum_register_static (g_intern_static_string ("MMSmsState"),
                                      mm_sms_state_values);
        g_once_init_leave (&g_define_type_id_initialized, g_define_type_id);
    }

    return g_define_type_id_initialized;
}

/**
 * mm_sms_state_get_string:
 * @val: a MMSmsState.
 *
 * Gets the nickname string for the #MMSmsState specified at @val.
 *
 * Returns: (transfer none): a string with the nickname, or %NULL if not found. Do not free the returned value.
 */
#if defined __MM_IS_ENUM__
const gchar *
mm_sms_state_get_string (MMSmsState val)
{
    guint i;

    for (i = 0; mm_sms_state_values[i].value_nick; i++) {
        if ((gint)val == mm_sms_state_values[i].value)
            return mm_sms_state_values[i].value_nick;
    }

    return NULL;
}
#endif /* __MM_IS_ENUM_ */

/**
 * mm_sms_state_build_string_from_mask:
 * @mask: bitmask of MMSmsState values.
 *
 * Builds a string containing a comma-separated list of nicknames for
 * each #MMSmsState in @mask.
 *
 * Returns: (transfer full): a string with the list of nicknames, or %NULL if none given. The returned value should be freed with g_free().
 */
#if defined __MM_IS_FLAGS__
gchar *
mm_sms_state_build_string_from_mask (MMSmsState mask)
{
    guint i;
    gboolean first = TRUE;
    GString *str = NULL;

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

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

    return (str ? g_string_free (str, FALSE) : NULL);
}
#endif /* __MM_IS_FLAGS__ */
static const GEnumValue mm_sms_delivery_state_values[] = {
    { MM_SMS_DELIVERY_STATE_COMPLETED_RECEIVED, "MM_SMS_DELIVERY_STATE_COMPLETED_RECEIVED", "completed-received" },
    { MM_SMS_DELIVERY_STATE_COMPLETED_FORWARDED_UNCONFIRMED, "MM_SMS_DELIVERY_STATE_COMPLETED_FORWARDED_UNCONFIRMED", "completed-forwarded-unconfirmed" },
    { MM_SMS_DELIVERY_STATE_COMPLETED_REPLACED_BY_SC, "MM_SMS_DELIVERY_STATE_COMPLETED_REPLACED_BY_SC", "completed-replaced-by-sc" },
    { MM_SMS_DELIVERY_STATE_TEMPORARY_ERROR_CONGESTION, "MM_SMS_DELIVERY_STATE_TEMPORARY_ERROR_CONGESTION", "temporary-error-congestion" },
    { MM_SMS_DELIVERY_STATE_TEMPORARY_ERROR_SME_BUSY, "MM_SMS_DELIVERY_STATE_TEMPORARY_ERROR_SME_BUSY", "temporary-error-sme-busy" },
    { MM_SMS_DELIVERY_STATE_TEMPORARY_ERROR_NO_RESPONSE_FROM_SME, "MM_SMS_DELIVERY_STATE_TEMPORARY_ERROR_NO_RESPONSE_FROM_SME", "temporary-error-no-response-from-sme" },
    { MM_SMS_DELIVERY_STATE_TEMPORARY_ERROR_SERVICE_REJECTED, "MM_SMS_DELIVERY_STATE_TEMPORARY_ERROR_SERVICE_REJECTED", "temporary-error-service-rejected" },
    { MM_SMS_DELIVERY_STATE_TEMPORARY_ERROR_QOS_NOT_AVAILABLE, "MM_SMS_DELIVERY_STATE_TEMPORARY_ERROR_QOS_NOT_AVAILABLE", "temporary-error-qos-not-available" },
    { MM_SMS_DELIVERY_STATE_TEMPORARY_ERROR_IN_SME, "MM_SMS_DELIVERY_STATE_TEMPORARY_ERROR_IN_SME", "temporary-error-in-sme" },
    { MM_SMS_DELIVERY_STATE_ERROR_REMOTE_PROCEDURE, "MM_SMS_DELIVERY_STATE_ERROR_REMOTE_PROCEDURE", "error-remote-procedure" },
    { MM_SMS_DELIVERY_STATE_ERROR_INCOMPATIBLE_DESTINATION, "MM_SMS_DELIVERY_STATE_ERROR_INCOMPATIBLE_DESTINATION", "error-incompatible-destination" },
    { MM_SMS_DELIVERY_STATE_ERROR_CONNECTION_REJECTED, "MM_SMS_DELIVERY_STATE_ERROR_CONNECTION_REJECTED", "error-connection-rejected" },
    { MM_SMS_DELIVERY_STATE_ERROR_NOT_OBTAINABLE, "MM_SMS_DELIVERY_STATE_ERROR_NOT_OBTAINABLE", "error-not-obtainable" },
    { MM_SMS_DELIVERY_STATE_ERROR_QOS_NOT_AVAILABLE, "MM_SMS_DELIVERY_STATE_ERROR_QOS_NOT_AVAILABLE", "error-qos-not-available" },
    { MM_SMS_DELIVERY_STATE_ERROR_NO_INTERWORKING_AVAILABLE, "MM_SMS_DELIVERY_STATE_ERROR_NO_INTERWORKING_AVAILABLE", "error-no-interworking-available" },
    { MM_SMS_DELIVERY_STATE_ERROR_VALIDITY_PERIOD_EXPIRED, "MM_SMS_DELIVERY_STATE_ERROR_VALIDITY_PERIOD_EXPIRED", "error-validity-period-expired" },
    { MM_SMS_DELIVERY_STATE_ERROR_DELETED_BY_ORIGINATING_SME, "MM_SMS_DELIVERY_STATE_ERROR_DELETED_BY_ORIGINATING_SME", "error-deleted-by-originating-sme" },
    { MM_SMS_DELIVERY_STATE_ERROR_DELETED_BY_SC_ADMINISTRATION, "MM_SMS_DELIVERY_STATE_ERROR_DELETED_BY_SC_ADMINISTRATION", "error-deleted-by-sc-administration" },
    { MM_SMS_DELIVERY_STATE_ERROR_MESSAGE_DOES_NOT_EXIST, "MM_SMS_DELIVERY_STATE_ERROR_MESSAGE_DOES_NOT_EXIST", "error-message-does-not-exist" },
    { MM_SMS_DELIVERY_STATE_TEMPORARY_FATAL_ERROR_CONGESTION, "MM_SMS_DELIVERY_STATE_TEMPORARY_FATAL_ERROR_CONGESTION", "temporary-fatal-error-congestion" },
    { MM_SMS_DELIVERY_STATE_TEMPORARY_FATAL_ERROR_SME_BUSY, "MM_SMS_DELIVERY_STATE_TEMPORARY_FATAL_ERROR_SME_BUSY", "temporary-fatal-error-sme-busy" },
    { MM_SMS_DELIVERY_STATE_TEMPORARY_FATAL_ERROR_NO_RESPONSE_FROM_SME, "MM_SMS_DELIVERY_STATE_TEMPORARY_FATAL_ERROR_NO_RESPONSE_FROM_SME", "temporary-fatal-error-no-response-from-sme" },
    { MM_SMS_DELIVERY_STATE_TEMPORARY_FATAL_ERROR_SERVICE_REJECTED, "MM_SMS_DELIVERY_STATE_TEMPORARY_FATAL_ERROR_SERVICE_REJECTED", "temporary-fatal-error-service-rejected" },
    { MM_SMS_DELIVERY_STATE_TEMPORARY_FATAL_ERROR_QOS_NOT_AVAILABLE, "MM_SMS_DELIVERY_STATE_TEMPORARY_FATAL_ERROR_QOS_NOT_AVAILABLE", "temporary-fatal-error-qos-not-available" },
    { MM_SMS_DELIVERY_STATE_TEMPORARY_FATAL_ERROR_IN_SME, "MM_SMS_DELIVERY_STATE_TEMPORARY_FATAL_ERROR_IN_SME", "temporary-fatal-error-in-sme" },
    { MM_SMS_DELIVERY_STATE_UNKNOWN, "MM_SMS_DELIVERY_STATE_UNKNOWN", "unknown" },
    { MM_SMS_DELIVERY_STATE_NETWORK_PROBLEM_ADDRESS_VACANT, "MM_SMS_DELIVERY_STATE_NETWORK_PROBLEM_ADDRESS_VACANT", "network-problem-address-vacant" },
    { MM_SMS_DELIVERY_STATE_NETWORK_PROBLEM_ADDRESS_TRANSLATION_FAILURE, "MM_SMS_DELIVERY_STATE_NETWORK_PROBLEM_ADDRESS_TRANSLATION_FAILURE", "network-problem-address-translation-failure" },
    { MM_SMS_DELIVERY_STATE_NETWORK_PROBLEM_NETWORK_RESOURCE_OUTAGE, "MM_SMS_DELIVERY_STATE_NETWORK_PROBLEM_NETWORK_RESOURCE_OUTAGE", "network-problem-network-resource-outage" },
    { MM_SMS_DELIVERY_STATE_NETWORK_PROBLEM_NETWORK_FAILURE, "MM_SMS_DELIVERY_STATE_NETWORK_PROBLEM_NETWORK_FAILURE", "network-problem-network-failure" },
    { MM_SMS_DELIVERY_STATE_NETWORK_PROBLEM_INVALID_TELESERVICE_ID, "MM_SMS_DELIVERY_STATE_NETWORK_PROBLEM_INVALID_TELESERVICE_ID", "network-problem-invalid-teleservice-id" },
    { MM_SMS_DELIVERY_STATE_NETWORK_PROBLEM_OTHER, "MM_SMS_DELIVERY_STATE_NETWORK_PROBLEM_OTHER", "network-problem-other" },
    { MM_SMS_DELIVERY_STATE_TERMINAL_PROBLEM_NO_PAGE_RESPONSE, "MM_SMS_DELIVERY_STATE_TERMINAL_PROBLEM_NO_PAGE_RESPONSE", "terminal-problem-no-page-response" },
    { MM_SMS_DELIVERY_STATE_TERMINAL_PROBLEM_DESTINATION_BUSY, "MM_SMS_DELIVERY_STATE_TERMINAL_PROBLEM_DESTINATION_BUSY", "terminal-problem-destination-busy" },
    { MM_SMS_DELIVERY_STATE_TERMINAL_PROBLEM_NO_ACKNOWLEDGMENT, "MM_SMS_DELIVERY_STATE_TERMINAL_PROBLEM_NO_ACKNOWLEDGMENT", "terminal-problem-no-acknowledgment" },
    { MM_SMS_DELIVERY_STATE_TERMINAL_PROBLEM_DESTINATION_RESOURCE_SHORTAGE, "MM_SMS_DELIVERY_STATE_TERMINAL_PROBLEM_DESTINATION_RESOURCE_SHORTAGE", "terminal-problem-destination-resource-shortage" },
    { MM_SMS_DELIVERY_STATE_TERMINAL_PROBLEM_SMS_DELIVERY_POSTPONED, "MM_SMS_DELIVERY_STATE_TERMINAL_PROBLEM_SMS_DELIVERY_POSTPONED", "terminal-problem-sms-delivery-postponed" },
    { MM_SMS_DELIVERY_STATE_TERMINAL_PROBLEM_DESTINATION_OUT_OF_SERVICE, "MM_SMS_DELIVERY_STATE_TERMINAL_PROBLEM_DESTINATION_OUT_OF_SERVICE", "terminal-problem-destination-out-of-service" },
    { MM_SMS_DELIVERY_STATE_TERMINAL_PROBLEM_DESTINATION_NO_LONGER_AT_THIS_ADDRESS, "MM_SMS_DELIVERY_STATE_TERMINAL_PROBLEM_DESTINATION_NO_LONGER_AT_THIS_ADDRESS", "terminal-problem-destination-no-longer-at-this-address" },
    { MM_SMS_DELIVERY_STATE_TERMINAL_PROBLEM_OTHER, "MM_SMS_DELIVERY_STATE_TERMINAL_PROBLEM_OTHER", "terminal-problem-other" },
    { MM_SMS_DELIVERY_STATE_RADIO_INTERFACE_PROBLEM_RESOURCE_SHORTAGE, "MM_SMS_DELIVERY_STATE_RADIO_INTERFACE_PROBLEM_RESOURCE_SHORTAGE", "radio-interface-problem-resource-shortage" },
    { MM_SMS_DELIVERY_STATE_RADIO_INTERFACE_PROBLEM_INCOMPATIBILITY, "MM_SMS_DELIVERY_STATE_RADIO_INTERFACE_PROBLEM_INCOMPATIBILITY", "radio-interface-problem-incompatibility" },
    { MM_SMS_DELIVERY_STATE_RADIO_INTERFACE_PROBLEM_OTHER, "MM_SMS_DELIVERY_STATE_RADIO_INTERFACE_PROBLEM_OTHER", "radio-interface-problem-other" },
    { MM_SMS_DELIVERY_STATE_GENERAL_PROBLEM_ENCODING, "MM_SMS_DELIVERY_STATE_GENERAL_PROBLEM_ENCODING", "general-problem-encoding" },
    { MM_SMS_DELIVERY_STATE_GENERAL_PROBLEM_SMS_ORIGINATION_DENIED, "MM_SMS_DELIVERY_STATE_GENERAL_PROBLEM_SMS_ORIGINATION_DENIED", "general-problem-sms-origination-denied" },
    { MM_SMS_DELIVERY_STATE_GENERAL_PROBLEM_SMS_TERMINATION_DENIED, "MM_SMS_DELIVERY_STATE_GENERAL_PROBLEM_SMS_TERMINATION_DENIED", "general-problem-sms-termination-denied" },
    { MM_SMS_DELIVERY_STATE_GENERAL_PROBLEM_SUPPLEMENTARY_SERVICE_NOT_SUPPORTED, "MM_SMS_DELIVERY_STATE_GENERAL_PROBLEM_SUPPLEMENTARY_SERVICE_NOT_SUPPORTED", "general-problem-supplementary-service-not-supported" },
    { MM_SMS_DELIVERY_STATE_GENERAL_PROBLEM_SMS_NOT_SUPPORTED, "MM_SMS_DELIVERY_STATE_GENERAL_PROBLEM_SMS_NOT_SUPPORTED", "general-problem-sms-not-supported" },
    { MM_SMS_DELIVERY_STATE_GENERAL_PROBLEM_MISSING_EXPECTED_PARAMETER, "MM_SMS_DELIVERY_STATE_GENERAL_PROBLEM_MISSING_EXPECTED_PARAMETER", "general-problem-missing-expected-parameter" },
    { MM_SMS_DELIVERY_STATE_GENERAL_PROBLEM_MISSING_MANDATORY_PARAMETER, "MM_SMS_DELIVERY_STATE_GENERAL_PROBLEM_MISSING_MANDATORY_PARAMETER", "general-problem-missing-mandatory-parameter" },
    { MM_SMS_DELIVERY_STATE_GENERAL_PROBLEM_UNRECOGNIZED_PARAMETER_VALUE, "MM_SMS_DELIVERY_STATE_GENERAL_PROBLEM_UNRECOGNIZED_PARAMETER_VALUE", "general-problem-unrecognized-parameter-value" },
    { MM_SMS_DELIVERY_STATE_GENERAL_PROBLEM_UNEXPECTED_PARAMETER_VALUE, "MM_SMS_DELIVERY_STATE_GENERAL_PROBLEM_UNEXPECTED_PARAMETER_VALUE", "general-problem-unexpected-parameter-value" },
    { MM_SMS_DELIVERY_STATE_GENERAL_PROBLEM_USER_DATA_SIZE_ERROR, "MM_SMS_DELIVERY_STATE_GENERAL_PROBLEM_USER_DATA_SIZE_ERROR", "general-problem-user-data-size-error" },
    { MM_SMS_DELIVERY_STATE_GENERAL_PROBLEM_OTHER, "MM_SMS_DELIVERY_STATE_GENERAL_PROBLEM_OTHER", "general-problem-other" },
    { MM_SMS_DELIVERY_STATE_TEMPORARY_NETWORK_PROBLEM_ADDRESS_VACANT, "MM_SMS_DELIVERY_STATE_TEMPORARY_NETWORK_PROBLEM_ADDRESS_VACANT", "temporary-network-problem-address-vacant" },
    { MM_SMS_DELIVERY_STATE_TEMPORARY_NETWORK_PROBLEM_ADDRESS_TRANSLATION_FAILURE, "MM_SMS_DELIVERY_STATE_TEMPORARY_NETWORK_PROBLEM_ADDRESS_TRANSLATION_FAILURE", "temporary-network-problem-address-translation-failure" },
    { MM_SMS_DELIVERY_STATE_TEMPORARY_NETWORK_PROBLEM_NETWORK_RESOURCE_OUTAGE, "MM_SMS_DELIVERY_STATE_TEMPORARY_NETWORK_PROBLEM_NETWORK_RESOURCE_OUTAGE", "temporary-network-problem-network-resource-outage" },
    { MM_SMS_DELIVERY_STATE_TEMPORARY_NETWORK_PROBLEM_NETWORK_FAILURE, "MM_SMS_DELIVERY_STATE_TEMPORARY_NETWORK_PROBLEM_NETWORK_FAILURE", "temporary-network-problem-network-failure" },
    { MM_SMS_DELIVERY_STATE_TEMPORARY_NETWORK_PROBLEM_INVALID_TELESERVICE_ID, "MM_SMS_DELIVERY_STATE_TEMPORARY_NETWORK_PROBLEM_INVALID_TELESERVICE_ID", "temporary-network-problem-invalid-teleservice-id" },
    { MM_SMS_DELIVERY_STATE_TEMPORARY_NETWORK_PROBLEM_OTHER, "MM_SMS_DELIVERY_STATE_TEMPORARY_NETWORK_PROBLEM_OTHER", "temporary-network-problem-other" },
    { MM_SMS_DELIVERY_STATE_TEMPORARY_TERMINAL_PROBLEM_NO_PAGE_RESPONSE, "MM_SMS_DELIVERY_STATE_TEMPORARY_TERMINAL_PROBLEM_NO_PAGE_RESPONSE", "temporary-terminal-problem-no-page-response" },
    { MM_SMS_DELIVERY_STATE_TEMPORARY_TERMINAL_PROBLEM_DESTINATION_BUSY, "MM_SMS_DELIVERY_STATE_TEMPORARY_TERMINAL_PROBLEM_DESTINATION_BUSY", "temporary-terminal-problem-destination-busy" },
    { MM_SMS_DELIVERY_STATE_TEMPORARY_TERMINAL_PROBLEM_NO_ACKNOWLEDGMENT, "MM_SMS_DELIVERY_STATE_TEMPORARY_TERMINAL_PROBLEM_NO_ACKNOWLEDGMENT", "temporary-terminal-problem-no-acknowledgment" },
    { MM_SMS_DELIVERY_STATE_TEMPORARY_TERMINAL_PROBLEM_DESTINATION_RESOURCE_SHORTAGE, "MM_SMS_DELIVERY_STATE_TEMPORARY_TERMINAL_PROBLEM_DESTINATION_RESOURCE_SHORTAGE", "temporary-terminal-problem-destination-resource-shortage" },
    { MM_SMS_DELIVERY_STATE_TEMPORARY_TERMINAL_PROBLEM_SMS_DELIVERY_POSTPONED, "MM_SMS_DELIVERY_STATE_TEMPORARY_TERMINAL_PROBLEM_SMS_DELIVERY_POSTPONED", "temporary-terminal-problem-sms-delivery-postponed" },
    { MM_SMS_DELIVERY_STATE_TEMPORARY_TERMINAL_PROBLEM_DESTINATION_OUT_OF_SERVICE, "MM_SMS_DELIVERY_STATE_TEMPORARY_TERMINAL_PROBLEM_DESTINATION_OUT_OF_SERVICE", "temporary-terminal-problem-destination-out-of-service" },
    { MM_SMS_DELIVERY_STATE_TEMPORARY_TERMINAL_PROBLEM_DESTINATION_NO_LONGER_AT_THIS_ADDRESS, "MM_SMS_DELIVERY_STATE_TEMPORARY_TERMINAL_PROBLEM_DESTINATION_NO_LONGER_AT_THIS_ADDRESS", "temporary-terminal-problem-destination-no-longer-at-this-address" },
    { MM_SMS_DELIVERY_STATE_TEMPORARY_TERMINAL_PROBLEM_OTHER, "MM_SMS_DELIVERY_STATE_TEMPORARY_TERMINAL_PROBLEM_OTHER", "temporary-terminal-problem-other" },
    { MM_SMS_DELIVERY_STATE_TEMPORARY_RADIO_INTERFACE_PROBLEM_RESOURCE_SHORTAGE, "MM_SMS_DELIVERY_STATE_TEMPORARY_RADIO_INTERFACE_PROBLEM_RESOURCE_SHORTAGE", "temporary-radio-interface-problem-resource-shortage" },
    { MM_SMS_DELIVERY_STATE_TEMPORARY_RADIO_INTERFACE_PROBLEM_INCOMPATIBILITY, "MM_SMS_DELIVERY_STATE_TEMPORARY_RADIO_INTERFACE_PROBLEM_INCOMPATIBILITY", "temporary-radio-interface-problem-incompatibility" },
    { MM_SMS_DELIVERY_STATE_TEMPORARY_RADIO_INTERFACE_PROBLEM_OTHER, "MM_SMS_DELIVERY_STATE_TEMPORARY_RADIO_INTERFACE_PROBLEM_OTHER", "temporary-radio-interface-problem-other" },
    { MM_SMS_DELIVERY_STATE_TEMPORARY_GENERAL_PROBLEM_ENCODING, "MM_SMS_DELIVERY_STATE_TEMPORARY_GENERAL_PROBLEM_ENCODING", "temporary-general-problem-encoding" },
    { MM_SMS_DELIVERY_STATE_TEMPORARY_GENERAL_PROBLEM_SMS_ORIGINATION_DENIED, "MM_SMS_DELIVERY_STATE_TEMPORARY_GENERAL_PROBLEM_SMS_ORIGINATION_DENIED", "temporary-general-problem-sms-origination-denied" },
    { MM_SMS_DELIVERY_STATE_TEMPORARY_GENERAL_PROBLEM_SMS_TERMINATION_DENIED, "MM_SMS_DELIVERY_STATE_TEMPORARY_GENERAL_PROBLEM_SMS_TERMINATION_DENIED", "temporary-general-problem-sms-termination-denied" },
    { MM_SMS_DELIVERY_STATE_TEMPORARY_GENERAL_PROBLEM_SUPPLEMENTARY_SERVICE_NOT_SUPPORTED, "MM_SMS_DELIVERY_STATE_TEMPORARY_GENERAL_PROBLEM_SUPPLEMENTARY_SERVICE_NOT_SUPPORTED", "temporary-general-problem-supplementary-service-not-supported" },
    { MM_SMS_DELIVERY_STATE_TEMPORARY_GENERAL_PROBLEM_SMS_NOT_SUPPORTED, "MM_SMS_DELIVERY_STATE_TEMPORARY_GENERAL_PROBLEM_SMS_NOT_SUPPORTED", "temporary-general-problem-sms-not-supported" },
    { MM_SMS_DELIVERY_STATE_TEMPORARY_GENERAL_PROBLEM_MISSING_EXPECTED_PARAMETER, "MM_SMS_DELIVERY_STATE_TEMPORARY_GENERAL_PROBLEM_MISSING_EXPECTED_PARAMETER", "temporary-general-problem-missing-expected-parameter" },
    { MM_SMS_DELIVERY_STATE_TEMPORARY_GENERAL_PROBLEM_MISSING_MANDATORY_PARAMETER, "MM_SMS_DELIVERY_STATE_TEMPORARY_GENERAL_PROBLEM_MISSING_MANDATORY_PARAMETER", "temporary-general-problem-missing-mandatory-parameter" },
    { MM_SMS_DELIVERY_STATE_TEMPORARY_GENERAL_PROBLEM_UNRECOGNIZED_PARAMETER_VALUE, "MM_SMS_DELIVERY_STATE_TEMPORARY_GENERAL_PROBLEM_UNRECOGNIZED_PARAMETER_VALUE", "temporary-general-problem-unrecognized-parameter-value" },
    { MM_SMS_DELIVERY_STATE_TEMPORARY_GENERAL_PROBLEM_UNEXPECTED_PARAMETER_VALUE, "MM_SMS_DELIVERY_STATE_TEMPORARY_GENERAL_PROBLEM_UNEXPECTED_PARAMETER_VALUE", "temporary-general-problem-unexpected-parameter-value" },
    { MM_SMS_DELIVERY_STATE_TEMPORARY_GENERAL_PROBLEM_USER_DATA_SIZE_ERROR, "MM_SMS_DELIVERY_STATE_TEMPORARY_GENERAL_PROBLEM_USER_DATA_SIZE_ERROR", "temporary-general-problem-user-data-size-error" },
    { MM_SMS_DELIVERY_STATE_TEMPORARY_GENERAL_PROBLEM_OTHER, "MM_SMS_DELIVERY_STATE_TEMPORARY_GENERAL_PROBLEM_OTHER", "temporary-general-problem-other" },
    { 0, NULL, NULL }
};

/* Define type-specific symbols */
#undef __MM_IS_ENUM__
#undef __MM_IS_FLAGS__
#define __MM_IS_ENUM__

GType
mm_sms_delivery_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_enum_register_static (g_intern_static_string ("MMSmsDeliveryState"),
                                      mm_sms_delivery_state_values);
        g_once_init_leave (&g_define_type_id_initialized, g_define_type_id);
    }

    return g_define_type_id_initialized;
}

/**
 * mm_sms_delivery_state_get_string:
 * @val: a MMSmsDeliveryState.
 *
 * Gets the nickname string for the #MMSmsDeliveryState specified at @val.
 *
 * Returns: (transfer none): a string with the nickname, or %NULL if not found. Do not free the returned value.
 */
#if defined __MM_IS_ENUM__
const gchar *
mm_sms_delivery_state_get_string (MMSmsDeliveryState val)
{
    guint i;

    for (i = 0; mm_sms_delivery_state_values[i].value_nick; i++) {
        if ((gint)val == mm_sms_delivery_state_values[i].value)
            return mm_sms_delivery_state_values[i].value_nick;
    }

    return NULL;
}
#endif /* __MM_IS_ENUM_ */

/**
 * mm_sms_delivery_state_build_string_from_mask:
 * @mask: bitmask of MMSmsDeliveryState values.
 *
 * Builds a string containing a comma-separated list of nicknames for
 * each #MMSmsDeliveryState in @mask.
 *
 * Returns: (transfer full): a string with the list of nicknames, or %NULL if none given. The returned value should be freed with g_free().
 */
#if defined __MM_IS_FLAGS__
gchar *
mm_sms_delivery_state_build_string_from_mask (MMSmsDeliveryState mask)
{
    guint i;
    gboolean first = TRUE;
    GString *str = NULL;

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

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

    return (str ? g_string_free (str, FALSE) : NULL);
}
#endif /* __MM_IS_FLAGS__ */
static const GEnumValue mm_sms_storage_values[] = {
    { MM_SMS_STORAGE_UNKNOWN, "MM_SMS_STORAGE_UNKNOWN", "unknown" },
    { MM_SMS_STORAGE_SM, "MM_SMS_STORAGE_SM", "sm" },
    { MM_SMS_STORAGE_ME, "MM_SMS_STORAGE_ME", "me" },
    { MM_SMS_STORAGE_MT, "MM_SMS_STORAGE_MT", "mt" },
    { MM_SMS_STORAGE_SR, "MM_SMS_STORAGE_SR", "sr" },
    { MM_SMS_STORAGE_BM, "MM_SMS_STORAGE_BM", "bm" },
    { MM_SMS_STORAGE_TA, "MM_SMS_STORAGE_TA", "ta" },
    { 0, NULL, NULL }
};

/* Define type-specific symbols */
#undef __MM_IS_ENUM__
#undef __MM_IS_FLAGS__
#define __MM_IS_ENUM__

GType
mm_sms_storage_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_enum_register_static (g_intern_static_string ("MMSmsStorage"),
                                      mm_sms_storage_values);
        g_once_init_leave (&g_define_type_id_initialized, g_define_type_id);
    }

    return g_define_type_id_initialized;
}

/**
 * mm_sms_storage_get_string:
 * @val: a MMSmsStorage.
 *
 * Gets the nickname string for the #MMSmsStorage specified at @val.
 *
 * Returns: (transfer none): a string with the nickname, or %NULL if not found. Do not free the returned value.
 */
#if defined __MM_IS_ENUM__
const gchar *
mm_sms_storage_get_string (MMSmsStorage val)
{
    guint i;

    for (i = 0; mm_sms_storage_values[i].value_nick; i++) {
        if ((gint)val == mm_sms_storage_values[i].value)
            return mm_sms_storage_values[i].value_nick;
    }

    return NULL;
}
#endif /* __MM_IS_ENUM_ */

/**
 * mm_sms_storage_build_string_from_mask:
 * @mask: bitmask of MMSmsStorage values.
 *
 * Builds a string containing a comma-separated list of nicknames for
 * each #MMSmsStorage in @mask.
 *
 * Returns: (transfer full): a string with the list of nicknames, or %NULL if none given. The returned value should be freed with g_free().
 */
#if defined __MM_IS_FLAGS__
gchar *
mm_sms_storage_build_string_from_mask (MMSmsStorage mask)
{
    guint i;
    gboolean first = TRUE;
    GString *str = NULL;

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

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

    return (str ? g_string_free (str, FALSE) : NULL);
}
#endif /* __MM_IS_FLAGS__ */
static const GEnumValue mm_sms_validity_type_values[] = {
    { MM_SMS_VALIDITY_TYPE_UNKNOWN, "MM_SMS_VALIDITY_TYPE_UNKNOWN", "unknown" },
    { MM_SMS_VALIDITY_TYPE_RELATIVE, "MM_SMS_VALIDITY_TYPE_RELATIVE", "relative" },
    { MM_SMS_VALIDITY_TYPE_ABSOLUTE, "MM_SMS_VALIDITY_TYPE_ABSOLUTE", "absolute" },
    { MM_SMS_VALIDITY_TYPE_ENHANCED, "MM_SMS_VALIDITY_TYPE_ENHANCED", "enhanced" },
    { 0, NULL, NULL }
};

/* Define type-specific symbols */
#undef __MM_IS_ENUM__
#undef __MM_IS_FLAGS__
#define __MM_IS_ENUM__

GType
mm_sms_validity_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_enum_register_static (g_intern_static_string ("MMSmsValidityType"),
                                      mm_sms_validity_type_values);
        g_once_init_leave (&g_define_type_id_initialized, g_define_type_id);
    }

    return g_define_type_id_initialized;
}

/**
 * mm_sms_validity_type_get_string:
 * @val: a MMSmsValidityType.
 *
 * Gets the nickname string for the #MMSmsValidityType specified at @val.
 *
 * Returns: (transfer none): a string with the nickname, or %NULL if not found. Do not free the returned value.
 */
#if defined __MM_IS_ENUM__
const gchar *
mm_sms_validity_type_get_string (MMSmsValidityType val)
{
    guint i;

    for (i = 0; mm_sms_validity_type_values[i].value_nick; i++) {
        if ((gint)val == mm_sms_validity_type_values[i].value)
            return mm_sms_validity_type_values[i].value_nick;
    }

    return NULL;
}
#endif /* __MM_IS_ENUM_ */

/**
 * mm_sms_validity_type_build_string_from_mask:
 * @mask: bitmask of MMSmsValidityType values.
 *
 * Builds a string containing a comma-separated list of nicknames for
 * each #MMSmsValidityType in @mask.
 *
 * Returns: (transfer full): a string with the list of nicknames, or %NULL if none given. The returned value should be freed with g_free().
 */
#if defined __MM_IS_FLAGS__
gchar *
mm_sms_validity_type_build_string_from_mask (MMSmsValidityType mask)
{
    guint i;
    gboolean first = TRUE;
    GString *str = NULL;

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

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

    return (str ? g_string_free (str, FALSE) : NULL);
}
#endif /* __MM_IS_FLAGS__ */
static const GEnumValue mm_sms_cdma_teleservice_id_values[] = {
    { MM_SMS_CDMA_TELESERVICE_ID_UNKNOWN, "MM_SMS_CDMA_TELESERVICE_ID_UNKNOWN", "unknown" },
    { MM_SMS_CDMA_TELESERVICE_ID_CMT91, "MM_SMS_CDMA_TELESERVICE_ID_CMT91", "cmt91" },
    { MM_SMS_CDMA_TELESERVICE_ID_WPT, "MM_SMS_CDMA_TELESERVICE_ID_WPT", "wpt" },
    { MM_SMS_CDMA_TELESERVICE_ID_WMT, "MM_SMS_CDMA_TELESERVICE_ID_WMT", "wmt" },
    { MM_SMS_CDMA_TELESERVICE_ID_VMN, "MM_SMS_CDMA_TELESERVICE_ID_VMN", "vmn" },
    { MM_SMS_CDMA_TELESERVICE_ID_WAP, "MM_SMS_CDMA_TELESERVICE_ID_WAP", "wap" },
    { MM_SMS_CDMA_TELESERVICE_ID_WEMT, "MM_SMS_CDMA_TELESERVICE_ID_WEMT", "wemt" },
    { MM_SMS_CDMA_TELESERVICE_ID_SCPT, "MM_SMS_CDMA_TELESERVICE_ID_SCPT", "scpt" },
    { MM_SMS_CDMA_TELESERVICE_ID_CATPT, "MM_SMS_CDMA_TELESERVICE_ID_CATPT", "catpt" },
    { 0, NULL, NULL }
};

/* Define type-specific symbols */
#undef __MM_IS_ENUM__
#undef __MM_IS_FLAGS__
#define __MM_IS_ENUM__

GType
mm_sms_cdma_teleservice_id_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_enum_register_static (g_intern_static_string ("MMSmsCdmaTeleserviceId"),
                                      mm_sms_cdma_teleservice_id_values);
        g_once_init_leave (&g_define_type_id_initialized, g_define_type_id);
    }

    return g_define_type_id_initialized;
}

/**
 * mm_sms_cdma_teleservice_id_get_string:
 * @val: a MMSmsCdmaTeleserviceId.
 *
 * Gets the nickname string for the #MMSmsCdmaTeleserviceId specified at @val.
 *
 * Returns: (transfer none): a string with the nickname, or %NULL if not found. Do not free the returned value.
 */
#if defined __MM_IS_ENUM__
const gchar *
mm_sms_cdma_teleservice_id_get_string (MMSmsCdmaTeleserviceId val)
{
    guint i;

    for (i = 0; mm_sms_cdma_teleservice_id_values[i].value_nick; i++) {
        if ((gint)val == mm_sms_cdma_teleservice_id_values[i].value)
            return mm_sms_cdma_teleservice_id_values[i].value_nick;
    }

    return NULL;
}
#endif /* __MM_IS_ENUM_ */

/**
 * mm_sms_cdma_teleservice_id_build_string_from_mask:
 * @mask: bitmask of MMSmsCdmaTeleserviceId values.
 *
 * Builds a string containing a comma-separated list of nicknames for
 * each #MMSmsCdmaTeleserviceId in @mask.
 *
 * Returns: (transfer full): a string with the list of nicknames, or %NULL if none given. The returned value should be freed with g_free().
 */
#if defined __MM_IS_FLAGS__
gchar *
mm_sms_cdma_teleservice_id_build_string_from_mask (MMSmsCdmaTeleserviceId mask)
{
    guint i;
    gboolean first = TRUE;
    GString *str = NULL;

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

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

    return (str ? g_string_free (str, FALSE) : NULL);
}
#endif /* __MM_IS_FLAGS__ */
static const GEnumValue mm_sms_cdma_service_category_values[] = {
    { MM_SMS_CDMA_SERVICE_CATEGORY_UNKNOWN, "MM_SMS_CDMA_SERVICE_CATEGORY_UNKNOWN", "unknown" },
    { MM_SMS_CDMA_SERVICE_CATEGORY_EMERGENCY_BROADCAST, "MM_SMS_CDMA_SERVICE_CATEGORY_EMERGENCY_BROADCAST", "emergency-broadcast" },
    { MM_SMS_CDMA_SERVICE_CATEGORY_ADMINISTRATIVE, "MM_SMS_CDMA_SERVICE_CATEGORY_ADMINISTRATIVE", "administrative" },
    { MM_SMS_CDMA_SERVICE_CATEGORY_MAINTENANCE, "MM_SMS_CDMA_SERVICE_CATEGORY_MAINTENANCE", "maintenance" },
    { MM_SMS_CDMA_SERVICE_CATEGORY_GENERAL_NEWS_LOCAL, "MM_SMS_CDMA_SERVICE_CATEGORY_GENERAL_NEWS_LOCAL", "general-news-local" },
    { MM_SMS_CDMA_SERVICE_CATEGORY_GENERAL_NEWS_REGIONAL, "MM_SMS_CDMA_SERVICE_CATEGORY_GENERAL_NEWS_REGIONAL", "general-news-regional" },
    { MM_SMS_CDMA_SERVICE_CATEGORY_GENERAL_NEWS_NATIONAL, "MM_SMS_CDMA_SERVICE_CATEGORY_GENERAL_NEWS_NATIONAL", "general-news-national" },
    { MM_SMS_CDMA_SERVICE_CATEGORY_GENERAL_NEWS_INTERNATIONAL, "MM_SMS_CDMA_SERVICE_CATEGORY_GENERAL_NEWS_INTERNATIONAL", "general-news-international" },
    { MM_SMS_CDMA_SERVICE_CATEGORY_BUSINESS_NEWS_LOCAL, "MM_SMS_CDMA_SERVICE_CATEGORY_BUSINESS_NEWS_LOCAL", "business-news-local" },
    { MM_SMS_CDMA_SERVICE_CATEGORY_BUSINESS_NEWS_REGIONAL, "MM_SMS_CDMA_SERVICE_CATEGORY_BUSINESS_NEWS_REGIONAL", "business-news-regional" },
    { MM_SMS_CDMA_SERVICE_CATEGORY_BUSINESS_NEWS_NATIONAL, "MM_SMS_CDMA_SERVICE_CATEGORY_BUSINESS_NEWS_NATIONAL", "business-news-national" },
    { MM_SMS_CDMA_SERVICE_CATEGORY_BUSINESS_NEWS_INTERNATIONAL, "MM_SMS_CDMA_SERVICE_CATEGORY_BUSINESS_NEWS_INTERNATIONAL", "business-news-international" },
    { MM_SMS_CDMA_SERVICE_CATEGORY_SPORTS_NEWS_LOCAL, "MM_SMS_CDMA_SERVICE_CATEGORY_SPORTS_NEWS_LOCAL", "sports-news-local" },
    { MM_SMS_CDMA_SERVICE_CATEGORY_SPORTS_NEWS_REGIONAL, "MM_SMS_CDMA_SERVICE_CATEGORY_SPORTS_NEWS_REGIONAL", "sports-news-regional" },
    { MM_SMS_CDMA_SERVICE_CATEGORY_SPORTS_NEWS_NATIONAL, "MM_SMS_CDMA_SERVICE_CATEGORY_SPORTS_NEWS_NATIONAL", "sports-news-national" },
    { MM_SMS_CDMA_SERVICE_CATEGORY_SPORTS_NEWS_INTERNATIONAL, "MM_SMS_CDMA_SERVICE_CATEGORY_SPORTS_NEWS_INTERNATIONAL", "sports-news-international" },
    { MM_SMS_CDMA_SERVICE_CATEGORY_ENTERTAINMENT_NEWS_LOCAL, "MM_SMS_CDMA_SERVICE_CATEGORY_ENTERTAINMENT_NEWS_LOCAL", "entertainment-news-local" },
    { MM_SMS_CDMA_SERVICE_CATEGORY_ENTERTAINMENT_NEWS_REGIONAL, "MM_SMS_CDMA_SERVICE_CATEGORY_ENTERTAINMENT_NEWS_REGIONAL", "entertainment-news-regional" },
    { MM_SMS_CDMA_SERVICE_CATEGORY_ENTERTAINMENT_NEWS_NATIONAL, "MM_SMS_CDMA_SERVICE_CATEGORY_ENTERTAINMENT_NEWS_NATIONAL", "entertainment-news-national" },
    { MM_SMS_CDMA_SERVICE_CATEGORY_ENTERTAINMENT_NEWS_INTERNATIONAL, "MM_SMS_CDMA_SERVICE_CATEGORY_ENTERTAINMENT_NEWS_INTERNATIONAL", "entertainment-news-international" },
    { MM_SMS_CDMA_SERVICE_CATEGORY_LOCAL_WEATHER, "MM_SMS_CDMA_SERVICE_CATEGORY_LOCAL_WEATHER", "local-weather" },
    { MM_SMS_CDMA_SERVICE_CATEGORY_TRAFFIC_REPORT, "MM_SMS_CDMA_SERVICE_CATEGORY_TRAFFIC_REPORT", "traffic-report" },
    { MM_SMS_CDMA_SERVICE_CATEGORY_FLIGHT_SCHEDULES, "MM_SMS_CDMA_SERVICE_CATEGORY_FLIGHT_SCHEDULES", "flight-schedules" },
    { MM_SMS_CDMA_SERVICE_CATEGORY_RESTAURANTS, "MM_SMS_CDMA_SERVICE_CATEGORY_RESTAURANTS", "restaurants" },
    { MM_SMS_CDMA_SERVICE_CATEGORY_LODGINGS, "MM_SMS_CDMA_SERVICE_CATEGORY_LODGINGS", "lodgings" },
    { MM_SMS_CDMA_SERVICE_CATEGORY_RETAIL_DIRECTORY, "MM_SMS_CDMA_SERVICE_CATEGORY_RETAIL_DIRECTORY", "retail-directory" },
    { MM_SMS_CDMA_SERVICE_CATEGORY_ADVERTISEMENTS, "MM_SMS_CDMA_SERVICE_CATEGORY_ADVERTISEMENTS", "advertisements" },
    { MM_SMS_CDMA_SERVICE_CATEGORY_STOCK_QUOTES, "MM_SMS_CDMA_SERVICE_CATEGORY_STOCK_QUOTES", "stock-quotes" },
    { MM_SMS_CDMA_SERVICE_CATEGORY_EMPLOYMENT, "MM_SMS_CDMA_SERVICE_CATEGORY_EMPLOYMENT", "employment" },
    { MM_SMS_CDMA_SERVICE_CATEGORY_HOSPITALS, "MM_SMS_CDMA_SERVICE_CATEGORY_HOSPITALS", "hospitals" },
    { MM_SMS_CDMA_SERVICE_CATEGORY_TECHNOLOGY_NEWS, "MM_SMS_CDMA_SERVICE_CATEGORY_TECHNOLOGY_NEWS", "technology-news" },
    { MM_SMS_CDMA_SERVICE_CATEGORY_MULTICATEGORY, "MM_SMS_CDMA_SERVICE_CATEGORY_MULTICATEGORY", "multicategory" },
    { MM_SMS_CDMA_SERVICE_CATEGORY_CMAS_PRESIDENTIAL_ALERT, "MM_SMS_CDMA_SERVICE_CATEGORY_CMAS_PRESIDENTIAL_ALERT", "cmas-presidential-alert" },
    { MM_SMS_CDMA_SERVICE_CATEGORY_CMAS_EXTREME_THREAT, "MM_SMS_CDMA_SERVICE_CATEGORY_CMAS_EXTREME_THREAT", "cmas-extreme-threat" },
    { MM_SMS_CDMA_SERVICE_CATEGORY_CMAS_SEVERE_THREAT, "MM_SMS_CDMA_SERVICE_CATEGORY_CMAS_SEVERE_THREAT", "cmas-severe-threat" },
    { MM_SMS_CDMA_SERVICE_CATEGORY_CMAS_CHILD_ABDUCTION_EMERGENCY, "MM_SMS_CDMA_SERVICE_CATEGORY_CMAS_CHILD_ABDUCTION_EMERGENCY", "cmas-child-abduction-emergency" },
    { MM_SMS_CDMA_SERVICE_CATEGORY_CMAS_TEST, "MM_SMS_CDMA_SERVICE_CATEGORY_CMAS_TEST", "cmas-test" },
    { 0, NULL, NULL }
};

/* Define type-specific symbols */
#undef __MM_IS_ENUM__
#undef __MM_IS_FLAGS__
#define __MM_IS_ENUM__

GType
mm_sms_cdma_service_category_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_enum_register_static (g_intern_static_string ("MMSmsCdmaServiceCategory"),
                                      mm_sms_cdma_service_category_values);
        g_once_init_leave (&g_define_type_id_initialized, g_define_type_id);
    }

    return g_define_type_id_initialized;
}

/**
 * mm_sms_cdma_service_category_get_string:
 * @val: a MMSmsCdmaServiceCategory.
 *
 * Gets the nickname string for the #MMSmsCdmaServiceCategory specified at @val.
 *
 * Returns: (transfer none): a string with the nickname, or %NULL if not found. Do not free the returned value.
 */
#if defined __MM_IS_ENUM__
const gchar *
mm_sms_cdma_service_category_get_string (MMSmsCdmaServiceCategory val)
{
    guint i;

    for (i = 0; mm_sms_cdma_service_category_values[i].value_nick; i++) {
        if ((gint)val == mm_sms_cdma_service_category_values[i].value)
            return mm_sms_cdma_service_category_values[i].value_nick;
    }

    return NULL;
}
#endif /* __MM_IS_ENUM_ */

/**
 * mm_sms_cdma_service_category_build_string_from_mask:
 * @mask: bitmask of MMSmsCdmaServiceCategory values.
 *
 * Builds a string containing a comma-separated list of nicknames for
 * each #MMSmsCdmaServiceCategory in @mask.
 *
 * Returns: (transfer full): a string with the list of nicknames, or %NULL if none given. The returned value should be freed with g_free().
 */
#if defined __MM_IS_FLAGS__
gchar *
mm_sms_cdma_service_category_build_string_from_mask (MMSmsCdmaServiceCategory mask)
{
    guint i;
    gboolean first = TRUE;
    GString *str = NULL;

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

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

    return (str ? g_string_free (str, FALSE) : NULL);
}
#endif /* __MM_IS_FLAGS__ */
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 }
};

/* Define type-specific symbols */
#undef __MM_IS_ENUM__
#undef __MM_IS_FLAGS__
#define __MM_IS_FLAGS__

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;
}

/**
 * mm_modem_location_source_get_string:
 * @val: a MMModemLocationSource.
 *
 * Gets the nickname string for the #MMModemLocationSource specified at @val.
 *
 * Returns: (transfer none): a string with the nickname, or %NULL if not found. Do not free the returned value.
 */
#if defined __MM_IS_ENUM__
const gchar *
mm_modem_location_source_get_string (MMModemLocationSource val)
{
    guint i;

    for (i = 0; mm_modem_location_source_values[i].value_nick; i++) {
        if ((gint)val == mm_modem_location_source_values[i].value)
            return mm_modem_location_source_values[i].value_nick;
    }

    return NULL;
}
#endif /* __MM_IS_ENUM_ */

/**
 * mm_modem_location_source_build_string_from_mask:
 * @mask: bitmask of MMModemLocationSource values.
 *
 * Builds a string containing a comma-separated list of nicknames for
 * each #MMModemLocationSource in @mask.
 *
 * Returns: (transfer full): a string with the list of nicknames, or %NULL if none given. The returned value should be freed with g_free().
 */
#if defined __MM_IS_FLAGS__
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);
}
#endif /* __MM_IS_FLAGS__ */
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 }
};

/* Define type-specific symbols */
#undef __MM_IS_ENUM__
#undef __MM_IS_FLAGS__
#define __MM_IS_FLAGS__

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;
}

/**
 * mm_modem_location_assistance_data_type_get_string:
 * @val: a MMModemLocationAssistanceDataType.
 *
 * Gets the nickname string for the #MMModemLocationAssistanceDataType specified at @val.
 *
 * Returns: (transfer none): a string with the nickname, or %NULL if not found. Do not free the returned value.
 */
#if defined __MM_IS_ENUM__
const gchar *
mm_modem_location_assistance_data_type_get_string (MMModemLocationAssistanceDataType val)
{
    guint i;

    for (i = 0; mm_modem_location_assistance_data_type_values[i].value_nick; i++) {
        if ((gint)val == mm_modem_location_assistance_data_type_values[i].value)
            return mm_modem_location_assistance_data_type_values[i].value_nick;
    }

    return NULL;
}
#endif /* __MM_IS_ENUM_ */

/**
 * mm_modem_location_assistance_data_type_build_string_from_mask:
 * @mask: bitmask of MMModemLocationAssistanceDataType values.
 *
 * Builds a string containing a comma-separated list of nicknames for
 * each #MMModemLocationAssistanceDataType in @mask.
 *
 * Returns: (transfer full): a string with the list of nicknames, or %NULL if none given. The returned value should be freed with g_free().
 */
#if defined __MM_IS_FLAGS__
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);
}
#endif /* __MM_IS_FLAGS__ */
static const GEnumValue mm_modem_contacts_storage_values[] = {
    { MM_MODEM_CONTACTS_STORAGE_UNKNOWN, "MM_MODEM_CONTACTS_STORAGE_UNKNOWN", "unknown" },
    { MM_MODEM_CONTACTS_STORAGE_ME, "MM_MODEM_CONTACTS_STORAGE_ME", "me" },
    { MM_MODEM_CONTACTS_STORAGE_SM, "MM_MODEM_CONTACTS_STORAGE_SM", "sm" },
    { MM_MODEM_CONTACTS_STORAGE_MT, "MM_MODEM_CONTACTS_STORAGE_MT", "mt" },
    { 0, NULL, NULL }
};

/* Define type-specific symbols */
#undef __MM_IS_ENUM__
#undef __MM_IS_FLAGS__
#define __MM_IS_ENUM__

GType
mm_modem_contacts_storage_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_enum_register_static (g_intern_static_string ("MMModemContactsStorage"),
                                      mm_modem_contacts_storage_values);
        g_once_init_leave (&g_define_type_id_initialized, g_define_type_id);
    }

    return g_define_type_id_initialized;
}

/**
 * mm_modem_contacts_storage_get_string:
 * @val: a MMModemContactsStorage.
 *
 * Gets the nickname string for the #MMModemContactsStorage specified at @val.
 *
 * Returns: (transfer none): a string with the nickname, or %NULL if not found. Do not free the returned value.
 */
#if defined __MM_IS_ENUM__
const gchar *
mm_modem_contacts_storage_get_string (MMModemContactsStorage val)
{
    guint i;

    for (i = 0; mm_modem_contacts_storage_values[i].value_nick; i++) {
        if ((gint)val == mm_modem_contacts_storage_values[i].value)
            return mm_modem_contacts_storage_values[i].value_nick;
    }

    return NULL;
}
#endif /* __MM_IS_ENUM_ */

/**
 * mm_modem_contacts_storage_build_string_from_mask:
 * @mask: bitmask of MMModemContactsStorage values.
 *
 * Builds a string containing a comma-separated list of nicknames for
 * each #MMModemContactsStorage in @mask.
 *
 * Returns: (transfer full): a string with the list of nicknames, or %NULL if none given. The returned value should be freed with g_free().
 */
#if defined __MM_IS_FLAGS__
gchar *
mm_modem_contacts_storage_build_string_from_mask (MMModemContactsStorage mask)
{
    guint i;
    gboolean first = TRUE;
    GString *str = NULL;

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

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

    return (str ? g_string_free (str, FALSE) : NULL);
}
#endif /* __MM_IS_FLAGS__ */
static const GEnumValue mm_bearer_type_values[] = {
    { MM_BEARER_TYPE_UNKNOWN, "MM_BEARER_TYPE_UNKNOWN", "unknown" },
    { MM_BEARER_TYPE_DEFAULT, "MM_BEARER_TYPE_DEFAULT", "default" },
    { MM_BEARER_TYPE_DEFAULT_ATTACH, "MM_BEARER_TYPE_DEFAULT_ATTACH", "default-attach" },
    { MM_BEARER_TYPE_DEDICATED, "MM_BEARER_TYPE_DEDICATED", "dedicated" },
    { 0, NULL, NULL }
};

/* Define type-specific symbols */
#undef __MM_IS_ENUM__
#undef __MM_IS_FLAGS__
#define __MM_IS_ENUM__

GType
mm_bearer_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_enum_register_static (g_intern_static_string ("MMBearerType"),
                                      mm_bearer_type_values);
        g_once_init_leave (&g_define_type_id_initialized, g_define_type_id);
    }

    return g_define_type_id_initialized;
}

/**
 * mm_bearer_type_get_string:
 * @val: a MMBearerType.
 *
 * Gets the nickname string for the #MMBearerType specified at @val.
 *
 * Returns: (transfer none): a string with the nickname, or %NULL if not found. Do not free the returned value.
 */
#if defined __MM_IS_ENUM__
const gchar *
mm_bearer_type_get_string (MMBearerType val)
{
    guint i;

    for (i = 0; mm_bearer_type_values[i].value_nick; i++) {
        if ((gint)val == mm_bearer_type_values[i].value)
            return mm_bearer_type_values[i].value_nick;
    }

    return NULL;
}
#endif /* __MM_IS_ENUM_ */

/**
 * mm_bearer_type_build_string_from_mask:
 * @mask: bitmask of MMBearerType values.
 *
 * Builds a string containing a comma-separated list of nicknames for
 * each #MMBearerType in @mask.
 *
 * Returns: (transfer full): a string with the list of nicknames, or %NULL if none given. The returned value should be freed with g_free().
 */
#if defined __MM_IS_FLAGS__
gchar *
mm_bearer_type_build_string_from_mask (MMBearerType mask)
{
    guint i;
    gboolean first = TRUE;
    GString *str = NULL;

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

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

    return (str ? g_string_free (str, FALSE) : NULL);
}
#endif /* __MM_IS_FLAGS__ */
static const GEnumValue mm_bearer_ip_method_values[] = {
    { MM_BEARER_IP_METHOD_UNKNOWN, "MM_BEARER_IP_METHOD_UNKNOWN", "unknown" },
    { MM_BEARER_IP_METHOD_PPP, "MM_BEARER_IP_METHOD_PPP", "ppp" },
    { MM_BEARER_IP_METHOD_STATIC, "MM_BEARER_IP_METHOD_STATIC", "static" },
    { MM_BEARER_IP_METHOD_DHCP, "MM_BEARER_IP_METHOD_DHCP", "dhcp" },
    { 0, NULL, NULL }
};

/* Define type-specific symbols */
#undef __MM_IS_ENUM__
#undef __MM_IS_FLAGS__
#define __MM_IS_ENUM__

GType
mm_bearer_ip_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_enum_register_static (g_intern_static_string ("MMBearerIpMethod"),
                                      mm_bearer_ip_method_values);
        g_once_init_leave (&g_define_type_id_initialized, g_define_type_id);
    }

    return g_define_type_id_initialized;
}

/**
 * mm_bearer_ip_method_get_string:
 * @val: a MMBearerIpMethod.
 *
 * Gets the nickname string for the #MMBearerIpMethod specified at @val.
 *
 * Returns: (transfer none): a string with the nickname, or %NULL if not found. Do not free the returned value.
 */
#if defined __MM_IS_ENUM__
const gchar *
mm_bearer_ip_method_get_string (MMBearerIpMethod val)
{
    guint i;

    for (i = 0; mm_bearer_ip_method_values[i].value_nick; i++) {
        if ((gint)val == mm_bearer_ip_method_values[i].value)
            return mm_bearer_ip_method_values[i].value_nick;
    }

    return NULL;
}
#endif /* __MM_IS_ENUM_ */

/**
 * mm_bearer_ip_method_build_string_from_mask:
 * @mask: bitmask of MMBearerIpMethod values.
 *
 * Builds a string containing a comma-separated list of nicknames for
 * each #MMBearerIpMethod in @mask.
 *
 * Returns: (transfer full): a string with the list of nicknames, or %NULL if none given. The returned value should be freed with g_free().
 */
#if defined __MM_IS_FLAGS__
gchar *
mm_bearer_ip_method_build_string_from_mask (MMBearerIpMethod mask)
{
    guint i;
    gboolean first = TRUE;
    GString *str = NULL;

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

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

    return (str ? g_string_free (str, FALSE) : NULL);
}
#endif /* __MM_IS_FLAGS__ */
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_ANY, "MM_BEARER_IP_FAMILY_ANY", "any" },
    { 0, NULL, NULL }
};

/* Define type-specific symbols */
#undef __MM_IS_ENUM__
#undef __MM_IS_FLAGS__
#define __MM_IS_FLAGS__

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;
}

/**
 * mm_bearer_ip_family_get_string:
 * @val: a MMBearerIpFamily.
 *
 * Gets the nickname string for the #MMBearerIpFamily specified at @val.
 *
 * Returns: (transfer none): a string with the nickname, or %NULL if not found. Do not free the returned value.
 */
#if defined __MM_IS_ENUM__
const gchar *
mm_bearer_ip_family_get_string (MMBearerIpFamily val)
{
    guint i;

    for (i = 0; mm_bearer_ip_family_values[i].value_nick; i++) {
        if ((gint)val == mm_bearer_ip_family_values[i].value)
            return mm_bearer_ip_family_values[i].value_nick;
    }

    return NULL;
}
#endif /* __MM_IS_ENUM_ */

/**
 * mm_bearer_ip_family_build_string_from_mask:
 * @mask: bitmask of MMBearerIpFamily values.
 *
 * Builds a string containing a comma-separated list of nicknames for
 * each #MMBearerIpFamily in @mask.
 *
 * Returns: (transfer full): a string with the list of nicknames, or %NULL if none given. The returned value should be freed with g_free().
 */
#if defined __MM_IS_FLAGS__
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);
}
#endif /* __MM_IS_FLAGS__ */
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 }
};

/* Define type-specific symbols */
#undef __MM_IS_ENUM__
#undef __MM_IS_FLAGS__
#define __MM_IS_FLAGS__

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;
}

/**
 * mm_bearer_allowed_auth_get_string:
 * @val: a MMBearerAllowedAuth.
 *
 * Gets the nickname string for the #MMBearerAllowedAuth specified at @val.
 *
 * Returns: (transfer none): a string with the nickname, or %NULL if not found. Do not free the returned value.
 */
#if defined __MM_IS_ENUM__
const gchar *
mm_bearer_allowed_auth_get_string (MMBearerAllowedAuth val)
{
    guint i;

    for (i = 0; mm_bearer_allowed_auth_values[i].value_nick; i++) {
        if ((gint)val == mm_bearer_allowed_auth_values[i].value)
            return mm_bearer_allowed_auth_values[i].value_nick;
    }

    return NULL;
}
#endif /* __MM_IS_ENUM_ */

/**
 * mm_bearer_allowed_auth_build_string_from_mask:
 * @mask: bitmask of MMBearerAllowedAuth values.
 *
 * Builds a string containing a comma-separated list of nicknames for
 * each #MMBearerAllowedAuth in @mask.
 *
 * Returns: (transfer full): a string with the list of nicknames, or %NULL if none given. The returned value should be freed with g_free().
 */
#if defined __MM_IS_FLAGS__
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);
}
#endif /* __MM_IS_FLAGS__ */
static const GEnumValue mm_modem_cdma_registration_state_values[] = {
    { MM_MODEM_CDMA_REGISTRATION_STATE_UNKNOWN, "MM_MODEM_CDMA_REGISTRATION_STATE_UNKNOWN", "unknown" },
    { MM_MODEM_CDMA_REGISTRATION_STATE_REGISTERED, "MM_MODEM_CDMA_REGISTRATION_STATE_REGISTERED", "registered" },
    { MM_MODEM_CDMA_REGISTRATION_STATE_HOME, "MM_MODEM_CDMA_REGISTRATION_STATE_HOME", "home" },
    { MM_MODEM_CDMA_REGISTRATION_STATE_ROAMING, "MM_MODEM_CDMA_REGISTRATION_STATE_ROAMING", "roaming" },
    { 0, NULL, NULL }
};

/* Define type-specific symbols */
#undef __MM_IS_ENUM__
#undef __MM_IS_FLAGS__
#define __MM_IS_ENUM__

GType
mm_modem_cdma_registration_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_enum_register_static (g_intern_static_string ("MMModemCdmaRegistrationState"),
                                      mm_modem_cdma_registration_state_values);
        g_once_init_leave (&g_define_type_id_initialized, g_define_type_id);
    }

    return g_define_type_id_initialized;
}

/**
 * mm_modem_cdma_registration_state_get_string:
 * @val: a MMModemCdmaRegistrationState.
 *
 * Gets the nickname string for the #MMModemCdmaRegistrationState specified at @val.
 *
 * Returns: (transfer none): a string with the nickname, or %NULL if not found. Do not free the returned value.
 */
#if defined __MM_IS_ENUM__
const gchar *
mm_modem_cdma_registration_state_get_string (MMModemCdmaRegistrationState val)
{
    guint i;

    for (i = 0; mm_modem_cdma_registration_state_values[i].value_nick; i++) {
        if ((gint)val == mm_modem_cdma_registration_state_values[i].value)
            return mm_modem_cdma_registration_state_values[i].value_nick;
    }

    return NULL;
}
#endif /* __MM_IS_ENUM_ */

/**
 * mm_modem_cdma_registration_state_build_string_from_mask:
 * @mask: bitmask of MMModemCdmaRegistrationState values.
 *
 * Builds a string containing a comma-separated list of nicknames for
 * each #MMModemCdmaRegistrationState in @mask.
 *
 * Returns: (transfer full): a string with the list of nicknames, or %NULL if none given. The returned value should be freed with g_free().
 */
#if defined __MM_IS_FLAGS__
gchar *
mm_modem_cdma_registration_state_build_string_from_mask (MMModemCdmaRegistrationState mask)
{
    guint i;
    gboolean first = TRUE;
    GString *str = NULL;

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

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

    return (str ? g_string_free (str, FALSE) : NULL);
}
#endif /* __MM_IS_FLAGS__ */
static const GEnumValue mm_modem_cdma_activation_state_values[] = {
    { MM_MODEM_CDMA_ACTIVATION_STATE_UNKNOWN, "MM_MODEM_CDMA_ACTIVATION_STATE_UNKNOWN", "unknown" },
    { MM_MODEM_CDMA_ACTIVATION_STATE_NOT_ACTIVATED, "MM_MODEM_CDMA_ACTIVATION_STATE_NOT_ACTIVATED", "not-activated" },
    { MM_MODEM_CDMA_ACTIVATION_STATE_ACTIVATING, "MM_MODEM_CDMA_ACTIVATION_STATE_ACTIVATING", "activating" },
    { MM_MODEM_CDMA_ACTIVATION_STATE_PARTIALLY_ACTIVATED, "MM_MODEM_CDMA_ACTIVATION_STATE_PARTIALLY_ACTIVATED", "partially-activated" },
    { MM_MODEM_CDMA_ACTIVATION_STATE_ACTIVATED, "MM_MODEM_CDMA_ACTIVATION_STATE_ACTIVATED", "activated" },
    { 0, NULL, NULL }
};

/* Define type-specific symbols */
#undef __MM_IS_ENUM__
#undef __MM_IS_FLAGS__
#define __MM_IS_ENUM__

GType
mm_modem_cdma_activation_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_enum_register_static (g_intern_static_string ("MMModemCdmaActivationState"),
                                      mm_modem_cdma_activation_state_values);
        g_once_init_leave (&g_define_type_id_initialized, g_define_type_id);
    }

    return g_define_type_id_initialized;
}

/**
 * mm_modem_cdma_activation_state_get_string:
 * @val: a MMModemCdmaActivationState.
 *
 * Gets the nickname string for the #MMModemCdmaActivationState specified at @val.
 *
 * Returns: (transfer none): a string with the nickname, or %NULL if not found. Do not free the returned value.
 */
#if defined __MM_IS_ENUM__
const gchar *
mm_modem_cdma_activation_state_get_string (MMModemCdmaActivationState val)
{
    guint i;

    for (i = 0; mm_modem_cdma_activation_state_values[i].value_nick; i++) {
        if ((gint)val == mm_modem_cdma_activation_state_values[i].value)
            return mm_modem_cdma_activation_state_values[i].value_nick;
    }

    return NULL;
}
#endif /* __MM_IS_ENUM_ */

/**
 * mm_modem_cdma_activation_state_build_string_from_mask:
 * @mask: bitmask of MMModemCdmaActivationState values.
 *
 * Builds a string containing a comma-separated list of nicknames for
 * each #MMModemCdmaActivationState in @mask.
 *
 * Returns: (transfer full): a string with the list of nicknames, or %NULL if none given. The returned value should be freed with g_free().
 */
#if defined __MM_IS_FLAGS__
gchar *
mm_modem_cdma_activation_state_build_string_from_mask (MMModemCdmaActivationState mask)
{
    guint i;
    gboolean first = TRUE;
    GString *str = NULL;

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

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

    return (str ? g_string_free (str, FALSE) : NULL);
}
#endif /* __MM_IS_FLAGS__ */
static const GEnumValue mm_modem_cdma_rm_protocol_values[] = {
    { MM_MODEM_CDMA_RM_PROTOCOL_UNKNOWN, "MM_MODEM_CDMA_RM_PROTOCOL_UNKNOWN", "unknown" },
    { MM_MODEM_CDMA_RM_PROTOCOL_ASYNC, "MM_MODEM_CDMA_RM_PROTOCOL_ASYNC", "async" },
    { MM_MODEM_CDMA_RM_PROTOCOL_PACKET_RELAY, "MM_MODEM_CDMA_RM_PROTOCOL_PACKET_RELAY", "packet-relay" },
    { MM_MODEM_CDMA_RM_PROTOCOL_PACKET_NETWORK_PPP, "MM_MODEM_CDMA_RM_PROTOCOL_PACKET_NETWORK_PPP", "packet-network-ppp" },
    { MM_MODEM_CDMA_RM_PROTOCOL_PACKET_NETWORK_SLIP, "MM_MODEM_CDMA_RM_PROTOCOL_PACKET_NETWORK_SLIP", "packet-network-slip" },
    { MM_MODEM_CDMA_RM_PROTOCOL_STU_III, "MM_MODEM_CDMA_RM_PROTOCOL_STU_III", "stu-iii" },
    { 0, NULL, NULL }
};

/* Define type-specific symbols */
#undef __MM_IS_ENUM__
#undef __MM_IS_FLAGS__
#define __MM_IS_ENUM__

GType
mm_modem_cdma_rm_protocol_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_enum_register_static (g_intern_static_string ("MMModemCdmaRmProtocol"),
                                      mm_modem_cdma_rm_protocol_values);
        g_once_init_leave (&g_define_type_id_initialized, g_define_type_id);
    }

    return g_define_type_id_initialized;
}

/**
 * mm_modem_cdma_rm_protocol_get_string:
 * @val: a MMModemCdmaRmProtocol.
 *
 * Gets the nickname string for the #MMModemCdmaRmProtocol specified at @val.
 *
 * Returns: (transfer none): a string with the nickname, or %NULL if not found. Do not free the returned value.
 */
#if defined __MM_IS_ENUM__
const gchar *
mm_modem_cdma_rm_protocol_get_string (MMModemCdmaRmProtocol val)
{
    guint i;

    for (i = 0; mm_modem_cdma_rm_protocol_values[i].value_nick; i++) {
        if ((gint)val == mm_modem_cdma_rm_protocol_values[i].value)
            return mm_modem_cdma_rm_protocol_values[i].value_nick;
    }

    return NULL;
}
#endif /* __MM_IS_ENUM_ */

/**
 * mm_modem_cdma_rm_protocol_build_string_from_mask:
 * @mask: bitmask of MMModemCdmaRmProtocol values.
 *
 * Builds a string containing a comma-separated list of nicknames for
 * each #MMModemCdmaRmProtocol in @mask.
 *
 * Returns: (transfer full): a string with the list of nicknames, or %NULL if none given. The returned value should be freed with g_free().
 */
#if defined __MM_IS_FLAGS__
gchar *
mm_modem_cdma_rm_protocol_build_string_from_mask (MMModemCdmaRmProtocol mask)
{
    guint i;
    gboolean first = TRUE;
    GString *str = NULL;

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

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

    return (str ? g_string_free (str, FALSE) : NULL);
}
#endif /* __MM_IS_FLAGS__ */
static const GEnumValue mm_modem_3gpp_registration_state_values[] = {
    { MM_MODEM_3GPP_REGISTRATION_STATE_IDLE, "MM_MODEM_3GPP_REGISTRATION_STATE_IDLE", "idle" },
    { MM_MODEM_3GPP_REGISTRATION_STATE_HOME, "MM_MODEM_3GPP_REGISTRATION_STATE_HOME", "home" },
    { MM_MODEM_3GPP_REGISTRATION_STATE_SEARCHING, "MM_MODEM_3GPP_REGISTRATION_STATE_SEARCHING", "searching" },
    { MM_MODEM_3GPP_REGISTRATION_STATE_DENIED, "MM_MODEM_3GPP_REGISTRATION_STATE_DENIED", "denied" },
    { MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN, "MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN", "unknown" },
    { MM_MODEM_3GPP_REGISTRATION_STATE_ROAMING, "MM_MODEM_3GPP_REGISTRATION_STATE_ROAMING", "roaming" },
    { MM_MODEM_3GPP_REGISTRATION_STATE_HOME_SMS_ONLY, "MM_MODEM_3GPP_REGISTRATION_STATE_HOME_SMS_ONLY", "home-sms-only" },
    { MM_MODEM_3GPP_REGISTRATION_STATE_ROAMING_SMS_ONLY, "MM_MODEM_3GPP_REGISTRATION_STATE_ROAMING_SMS_ONLY", "roaming-sms-only" },
    { MM_MODEM_3GPP_REGISTRATION_STATE_EMERGENCY_ONLY, "MM_MODEM_3GPP_REGISTRATION_STATE_EMERGENCY_ONLY", "emergency-only" },
    { MM_MODEM_3GPP_REGISTRATION_STATE_HOME_CSFB_NOT_PREFERRED, "MM_MODEM_3GPP_REGISTRATION_STATE_HOME_CSFB_NOT_PREFERRED", "home-csfb-not-preferred" },
    { MM_MODEM_3GPP_REGISTRATION_STATE_ROAMING_CSFB_NOT_PREFERRED, "MM_MODEM_3GPP_REGISTRATION_STATE_ROAMING_CSFB_NOT_PREFERRED", "roaming-csfb-not-preferred" },
    { MM_MODEM_3GPP_REGISTRATION_STATE_ATTACHED_RLOS, "MM_MODEM_3GPP_REGISTRATION_STATE_ATTACHED_RLOS", "attached-rlos" },
    { 0, NULL, NULL }
};

/* Define type-specific symbols */
#undef __MM_IS_ENUM__
#undef __MM_IS_FLAGS__
#define __MM_IS_ENUM__

GType
mm_modem_3gpp_registration_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_enum_register_static (g_intern_static_string ("MMModem3gppRegistrationState"),
                                      mm_modem_3gpp_registration_state_values);
        g_once_init_leave (&g_define_type_id_initialized, g_define_type_id);
    }

    return g_define_type_id_initialized;
}

/**
 * mm_modem_3gpp_registration_state_get_string:
 * @val: a MMModem3gppRegistrationState.
 *
 * Gets the nickname string for the #MMModem3gppRegistrationState specified at @val.
 *
 * Returns: (transfer none): a string with the nickname, or %NULL if not found. Do not free the returned value.
 */
#if defined __MM_IS_ENUM__
const gchar *
mm_modem_3gpp_registration_state_get_string (MMModem3gppRegistrationState val)
{
    guint i;

    for (i = 0; mm_modem_3gpp_registration_state_values[i].value_nick; i++) {
        if ((gint)val == mm_modem_3gpp_registration_state_values[i].value)
            return mm_modem_3gpp_registration_state_values[i].value_nick;
    }

    return NULL;
}
#endif /* __MM_IS_ENUM_ */

/**
 * mm_modem_3gpp_registration_state_build_string_from_mask:
 * @mask: bitmask of MMModem3gppRegistrationState values.
 *
 * Builds a string containing a comma-separated list of nicknames for
 * each #MMModem3gppRegistrationState in @mask.
 *
 * Returns: (transfer full): a string with the list of nicknames, or %NULL if none given. The returned value should be freed with g_free().
 */
#if defined __MM_IS_FLAGS__
gchar *
mm_modem_3gpp_registration_state_build_string_from_mask (MMModem3gppRegistrationState mask)
{
    guint i;
    gboolean first = TRUE;
    GString *str = NULL;

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

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

    return (str ? g_string_free (str, FALSE) : NULL);
}
#endif /* __MM_IS_FLAGS__ */
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 }
};

/* Define type-specific symbols */
#undef __MM_IS_ENUM__
#undef __MM_IS_FLAGS__
#define __MM_IS_FLAGS__

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;
}

/**
 * mm_modem_3gpp_facility_get_string:
 * @val: a MMModem3gppFacility.
 *
 * Gets the nickname string for the #MMModem3gppFacility specified at @val.
 *
 * Returns: (transfer none): a string with the nickname, or %NULL if not found. Do not free the returned value.
 */
#if defined __MM_IS_ENUM__
const gchar *
mm_modem_3gpp_facility_get_string (MMModem3gppFacility val)
{
    guint i;

    for (i = 0; mm_modem_3gpp_facility_values[i].value_nick; i++) {
        if ((gint)val == mm_modem_3gpp_facility_values[i].value)
            return mm_modem_3gpp_facility_values[i].value_nick;
    }

    return NULL;
}
#endif /* __MM_IS_ENUM_ */

/**
 * mm_modem_3gpp_facility_build_string_from_mask:
 * @mask: bitmask of MMModem3gppFacility values.
 *
 * Builds a string containing a comma-separated list of nicknames for
 * each #MMModem3gppFacility in @mask.
 *
 * Returns: (transfer full): a string with the list of nicknames, or %NULL if none given. The returned value should be freed with g_free().
 */
#if defined __MM_IS_FLAGS__
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);
}
#endif /* __MM_IS_FLAGS__ */
static const GEnumValue mm_modem_3gpp_network_availability_values[] = {
    { MM_MODEM_3GPP_NETWORK_AVAILABILITY_UNKNOWN, "MM_MODEM_3GPP_NETWORK_AVAILABILITY_UNKNOWN", "unknown" },
    { MM_MODEM_3GPP_NETWORK_AVAILABILITY_AVAILABLE, "MM_MODEM_3GPP_NETWORK_AVAILABILITY_AVAILABLE", "available" },
    { MM_MODEM_3GPP_NETWORK_AVAILABILITY_CURRENT, "MM_MODEM_3GPP_NETWORK_AVAILABILITY_CURRENT", "current" },
    { MM_MODEM_3GPP_NETWORK_AVAILABILITY_FORBIDDEN, "MM_MODEM_3GPP_NETWORK_AVAILABILITY_FORBIDDEN", "forbidden" },
    { 0, NULL, NULL }
};

/* Define type-specific symbols */
#undef __MM_IS_ENUM__
#undef __MM_IS_FLAGS__
#define __MM_IS_ENUM__

GType
mm_modem_3gpp_network_availability_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_enum_register_static (g_intern_static_string ("MMModem3gppNetworkAvailability"),
                                      mm_modem_3gpp_network_availability_values);
        g_once_init_leave (&g_define_type_id_initialized, g_define_type_id);
    }

    return g_define_type_id_initialized;
}

/**
 * mm_modem_3gpp_network_availability_get_string:
 * @val: a MMModem3gppNetworkAvailability.
 *
 * Gets the nickname string for the #MMModem3gppNetworkAvailability specified at @val.
 *
 * Returns: (transfer none): a string with the nickname, or %NULL if not found. Do not free the returned value.
 */
#if defined __MM_IS_ENUM__
const gchar *
mm_modem_3gpp_network_availability_get_string (MMModem3gppNetworkAvailability val)
{
    guint i;

    for (i = 0; mm_modem_3gpp_network_availability_values[i].value_nick; i++) {
        if ((gint)val == mm_modem_3gpp_network_availability_values[i].value)
            return mm_modem_3gpp_network_availability_values[i].value_nick;
    }

    return NULL;
}
#endif /* __MM_IS_ENUM_ */

/**
 * mm_modem_3gpp_network_availability_build_string_from_mask:
 * @mask: bitmask of MMModem3gppNetworkAvailability values.
 *
 * Builds a string containing a comma-separated list of nicknames for
 * each #MMModem3gppNetworkAvailability in @mask.
 *
 * Returns: (transfer full): a string with the list of nicknames, or %NULL if none given. The returned value should be freed with g_free().
 */
#if defined __MM_IS_FLAGS__
gchar *
mm_modem_3gpp_network_availability_build_string_from_mask (MMModem3gppNetworkAvailability mask)
{
    guint i;
    gboolean first = TRUE;
    GString *str = NULL;

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

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

    return (str ? g_string_free (str, FALSE) : NULL);
}
#endif /* __MM_IS_FLAGS__ */
static const GEnumValue mm_modem_3gpp_subscription_state_values[] = {
    { MM_MODEM_3GPP_SUBSCRIPTION_STATE_UNKNOWN, "MM_MODEM_3GPP_SUBSCRIPTION_STATE_UNKNOWN", "unknown" },
    { MM_MODEM_3GPP_SUBSCRIPTION_STATE_UNPROVISIONED, "MM_MODEM_3GPP_SUBSCRIPTION_STATE_UNPROVISIONED", "unprovisioned" },
    { MM_MODEM_3GPP_SUBSCRIPTION_STATE_PROVISIONED, "MM_MODEM_3GPP_SUBSCRIPTION_STATE_PROVISIONED", "provisioned" },
    { MM_MODEM_3GPP_SUBSCRIPTION_STATE_OUT_OF_DATA, "MM_MODEM_3GPP_SUBSCRIPTION_STATE_OUT_OF_DATA", "out-of-data" },
    { 0, NULL, NULL }
};

/* Define type-specific symbols */
#undef __MM_IS_ENUM__
#undef __MM_IS_FLAGS__
#define __MM_IS_ENUM__

GType
mm_modem_3gpp_subscription_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_enum_register_static (g_intern_static_string ("MMModem3gppSubscriptionState"),
                                      mm_modem_3gpp_subscription_state_values);
        g_once_init_leave (&g_define_type_id_initialized, g_define_type_id);
    }

    return g_define_type_id_initialized;
}

/**
 * mm_modem_3gpp_subscription_state_get_string:
 * @val: a MMModem3gppSubscriptionState.
 *
 * Gets the nickname string for the #MMModem3gppSubscriptionState specified at @val.
 *
 * Returns: (transfer none): a string with the nickname, or %NULL if not found. Do not free the returned value.
 */
#if defined __MM_IS_ENUM__
const gchar *
mm_modem_3gpp_subscription_state_get_string (MMModem3gppSubscriptionState val)
{
    guint i;

    for (i = 0; mm_modem_3gpp_subscription_state_values[i].value_nick; i++) {
        if ((gint)val == mm_modem_3gpp_subscription_state_values[i].value)
            return mm_modem_3gpp_subscription_state_values[i].value_nick;
    }

    return NULL;
}
#endif /* __MM_IS_ENUM_ */

/**
 * mm_modem_3gpp_subscription_state_build_string_from_mask:
 * @mask: bitmask of MMModem3gppSubscriptionState values.
 *
 * Builds a string containing a comma-separated list of nicknames for
 * each #MMModem3gppSubscriptionState in @mask.
 *
 * Returns: (transfer full): a string with the list of nicknames, or %NULL if none given. The returned value should be freed with g_free().
 */
#if defined __MM_IS_FLAGS__
gchar *
mm_modem_3gpp_subscription_state_build_string_from_mask (MMModem3gppSubscriptionState mask)
{
    guint i;
    gboolean first = TRUE;
    GString *str = NULL;

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

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

    return (str ? g_string_free (str, FALSE) : NULL);
}
#endif /* __MM_IS_FLAGS__ */
static const GEnumValue mm_modem_3gpp_ussd_session_state_values[] = {
    { MM_MODEM_3GPP_USSD_SESSION_STATE_UNKNOWN, "MM_MODEM_3GPP_USSD_SESSION_STATE_UNKNOWN", "unknown" },
    { MM_MODEM_3GPP_USSD_SESSION_STATE_IDLE, "MM_MODEM_3GPP_USSD_SESSION_STATE_IDLE", "idle" },
    { MM_MODEM_3GPP_USSD_SESSION_STATE_ACTIVE, "MM_MODEM_3GPP_USSD_SESSION_STATE_ACTIVE", "active" },
    { MM_MODEM_3GPP_USSD_SESSION_STATE_USER_RESPONSE, "MM_MODEM_3GPP_USSD_SESSION_STATE_USER_RESPONSE", "user-response" },
    { 0, NULL, NULL }
};

/* Define type-specific symbols */
#undef __MM_IS_ENUM__
#undef __MM_IS_FLAGS__
#define __MM_IS_ENUM__

GType
mm_modem_3gpp_ussd_session_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_enum_register_static (g_intern_static_string ("MMModem3gppUssdSessionState"),
                                      mm_modem_3gpp_ussd_session_state_values);
        g_once_init_leave (&g_define_type_id_initialized, g_define_type_id);
    }

    return g_define_type_id_initialized;
}

/**
 * mm_modem_3gpp_ussd_session_state_get_string:
 * @val: a MMModem3gppUssdSessionState.
 *
 * Gets the nickname string for the #MMModem3gppUssdSessionState specified at @val.
 *
 * Returns: (transfer none): a string with the nickname, or %NULL if not found. Do not free the returned value.
 */
#if defined __MM_IS_ENUM__
const gchar *
mm_modem_3gpp_ussd_session_state_get_string (MMModem3gppUssdSessionState val)
{
    guint i;

    for (i = 0; mm_modem_3gpp_ussd_session_state_values[i].value_nick; i++) {
        if ((gint)val == mm_modem_3gpp_ussd_session_state_values[i].value)
            return mm_modem_3gpp_ussd_session_state_values[i].value_nick;
    }

    return NULL;
}
#endif /* __MM_IS_ENUM_ */

/**
 * mm_modem_3gpp_ussd_session_state_build_string_from_mask:
 * @mask: bitmask of MMModem3gppUssdSessionState values.
 *
 * Builds a string containing a comma-separated list of nicknames for
 * each #MMModem3gppUssdSessionState in @mask.
 *
 * Returns: (transfer full): a string with the list of nicknames, or %NULL if none given. The returned value should be freed with g_free().
 */
#if defined __MM_IS_FLAGS__
gchar *
mm_modem_3gpp_ussd_session_state_build_string_from_mask (MMModem3gppUssdSessionState mask)
{
    guint i;
    gboolean first = TRUE;
    GString *str = NULL;

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

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

    return (str ? g_string_free (str, FALSE) : NULL);
}
#endif /* __MM_IS_FLAGS__ */
static const GEnumValue mm_modem_3gpp_eps_ue_mode_operation_values[] = {
    { MM_MODEM_3GPP_EPS_UE_MODE_OPERATION_UNKNOWN, "MM_MODEM_3GPP_EPS_UE_MODE_OPERATION_UNKNOWN", "unknown" },
    { MM_MODEM_3GPP_EPS_UE_MODE_OPERATION_PS_1, "MM_MODEM_3GPP_EPS_UE_MODE_OPERATION_PS_1", "ps-1" },
    { MM_MODEM_3GPP_EPS_UE_MODE_OPERATION_PS_2, "MM_MODEM_3GPP_EPS_UE_MODE_OPERATION_PS_2", "ps-2" },
    { MM_MODEM_3GPP_EPS_UE_MODE_OPERATION_CSPS_1, "MM_MODEM_3GPP_EPS_UE_MODE_OPERATION_CSPS_1", "csps-1" },
    { MM_MODEM_3GPP_EPS_UE_MODE_OPERATION_CSPS_2, "MM_MODEM_3GPP_EPS_UE_MODE_OPERATION_CSPS_2", "csps-2" },
    { 0, NULL, NULL }
};

/* Define type-specific symbols */
#undef __MM_IS_ENUM__
#undef __MM_IS_FLAGS__
#define __MM_IS_ENUM__

GType
mm_modem_3gpp_eps_ue_mode_operation_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_enum_register_static (g_intern_static_string ("MMModem3gppEpsUeModeOperation"),
                                      mm_modem_3gpp_eps_ue_mode_operation_values);
        g_once_init_leave (&g_define_type_id_initialized, g_define_type_id);
    }

    return g_define_type_id_initialized;
}

/**
 * mm_modem_3gpp_eps_ue_mode_operation_get_string:
 * @val: a MMModem3gppEpsUeModeOperation.
 *
 * Gets the nickname string for the #MMModem3gppEpsUeModeOperation specified at @val.
 *
 * Returns: (transfer none): a string with the nickname, or %NULL if not found. Do not free the returned value.
 */
#if defined __MM_IS_ENUM__
const gchar *
mm_modem_3gpp_eps_ue_mode_operation_get_string (MMModem3gppEpsUeModeOperation val)
{
    guint i;

    for (i = 0; mm_modem_3gpp_eps_ue_mode_operation_values[i].value_nick; i++) {
        if ((gint)val == mm_modem_3gpp_eps_ue_mode_operation_values[i].value)
            return mm_modem_3gpp_eps_ue_mode_operation_values[i].value_nick;
    }

    return NULL;
}
#endif /* __MM_IS_ENUM_ */

/**
 * mm_modem_3gpp_eps_ue_mode_operation_build_string_from_mask:
 * @mask: bitmask of MMModem3gppEpsUeModeOperation values.
 *
 * Builds a string containing a comma-separated list of nicknames for
 * each #MMModem3gppEpsUeModeOperation in @mask.
 *
 * Returns: (transfer full): a string with the list of nicknames, or %NULL if none given. The returned value should be freed with g_free().
 */
#if defined __MM_IS_FLAGS__
gchar *
mm_modem_3gpp_eps_ue_mode_operation_build_string_from_mask (MMModem3gppEpsUeModeOperation mask)
{
    guint i;
    gboolean first = TRUE;
    GString *str = NULL;

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

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

    return (str ? g_string_free (str, FALSE) : NULL);
}
#endif /* __MM_IS_FLAGS__ */
static const GEnumValue mm_firmware_image_type_values[] = {
    { MM_FIRMWARE_IMAGE_TYPE_UNKNOWN, "MM_FIRMWARE_IMAGE_TYPE_UNKNOWN", "unknown" },
    { MM_FIRMWARE_IMAGE_TYPE_GENERIC, "MM_FIRMWARE_IMAGE_TYPE_GENERIC", "generic" },
    { MM_FIRMWARE_IMAGE_TYPE_GOBI, "MM_FIRMWARE_IMAGE_TYPE_GOBI", "gobi" },
    { 0, NULL, NULL }
};

/* Define type-specific symbols */
#undef __MM_IS_ENUM__
#undef __MM_IS_FLAGS__
#define __MM_IS_ENUM__

GType
mm_firmware_image_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_enum_register_static (g_intern_static_string ("MMFirmwareImageType"),
                                      mm_firmware_image_type_values);
        g_once_init_leave (&g_define_type_id_initialized, g_define_type_id);
    }

    return g_define_type_id_initialized;
}

/**
 * mm_firmware_image_type_get_string:
 * @val: a MMFirmwareImageType.
 *
 * Gets the nickname string for the #MMFirmwareImageType specified at @val.
 *
 * Returns: (transfer none): a string with the nickname, or %NULL if not found. Do not free the returned value.
 */
#if defined __MM_IS_ENUM__
const gchar *
mm_firmware_image_type_get_string (MMFirmwareImageType val)
{
    guint i;

    for (i = 0; mm_firmware_image_type_values[i].value_nick; i++) {
        if ((gint)val == mm_firmware_image_type_values[i].value)
            return mm_firmware_image_type_values[i].value_nick;
    }

    return NULL;
}
#endif /* __MM_IS_ENUM_ */

/**
 * mm_firmware_image_type_build_string_from_mask:
 * @mask: bitmask of MMFirmwareImageType values.
 *
 * Builds a string containing a comma-separated list of nicknames for
 * each #MMFirmwareImageType in @mask.
 *
 * Returns: (transfer full): a string with the list of nicknames, or %NULL if none given. The returned value should be freed with g_free().
 */
#if defined __MM_IS_FLAGS__
gchar *
mm_firmware_image_type_build_string_from_mask (MMFirmwareImageType mask)
{
    guint i;
    gboolean first = TRUE;
    GString *str = NULL;

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

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

    return (str ? g_string_free (str, FALSE) : NULL);
}
#endif /* __MM_IS_FLAGS__ */
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 }
};

/* Define type-specific symbols */
#undef __MM_IS_ENUM__
#undef __MM_IS_FLAGS__
#define __MM_IS_FLAGS__

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;
}

/**
 * mm_oma_feature_get_string:
 * @val: a MMOmaFeature.
 *
 * Gets the nickname string for the #MMOmaFeature specified at @val.
 *
 * Returns: (transfer none): a string with the nickname, or %NULL if not found. Do not free the returned value.
 */
#if defined __MM_IS_ENUM__
const gchar *
mm_oma_feature_get_string (MMOmaFeature val)
{
    guint i;

    for (i = 0; mm_oma_feature_values[i].value_nick; i++) {
        if ((gint)val == mm_oma_feature_values[i].value)
            return mm_oma_feature_values[i].value_nick;
    }

    return NULL;
}
#endif /* __MM_IS_ENUM_ */

/**
 * mm_oma_feature_build_string_from_mask:
 * @mask: bitmask of MMOmaFeature values.
 *
 * Builds a string containing a comma-separated list of nicknames for
 * each #MMOmaFeature in @mask.
 *
 * Returns: (transfer full): a string with the list of nicknames, or %NULL if none given. The returned value should be freed with g_free().
 */
#if defined __MM_IS_FLAGS__
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);
}
#endif /* __MM_IS_FLAGS__ */
static const GEnumValue mm_oma_session_type_values[] = {
    { MM_OMA_SESSION_TYPE_UNKNOWN, "MM_OMA_SESSION_TYPE_UNKNOWN", "unknown" },
    { MM_OMA_SESSION_TYPE_CLIENT_INITIATED_DEVICE_CONFIGURE, "MM_OMA_SESSION_TYPE_CLIENT_INITIATED_DEVICE_CONFIGURE", "client-initiated-device-configure" },
    { MM_OMA_SESSION_TYPE_CLIENT_INITIATED_PRL_UPDATE, "MM_OMA_SESSION_TYPE_CLIENT_INITIATED_PRL_UPDATE", "client-initiated-prl-update" },
    { MM_OMA_SESSION_TYPE_CLIENT_INITIATED_HANDS_FREE_ACTIVATION, "MM_OMA_SESSION_TYPE_CLIENT_INITIATED_HANDS_FREE_ACTIVATION", "client-initiated-hands-free-activation" },
    { MM_OMA_SESSION_TYPE_NETWORK_INITIATED_DEVICE_CONFIGURE, "MM_OMA_SESSION_TYPE_NETWORK_INITIATED_DEVICE_CONFIGURE", "network-initiated-device-configure" },
    { MM_OMA_SESSION_TYPE_NETWORK_INITIATED_PRL_UPDATE, "MM_OMA_SESSION_TYPE_NETWORK_INITIATED_PRL_UPDATE", "network-initiated-prl-update" },
    { MM_OMA_SESSION_TYPE_DEVICE_INITIATED_PRL_UPDATE, "MM_OMA_SESSION_TYPE_DEVICE_INITIATED_PRL_UPDATE", "device-initiated-prl-update" },
    { MM_OMA_SESSION_TYPE_DEVICE_INITIATED_HANDS_FREE_ACTIVATION, "MM_OMA_SESSION_TYPE_DEVICE_INITIATED_HANDS_FREE_ACTIVATION", "device-initiated-hands-free-activation" },
    { 0, NULL, NULL }
};

/* Define type-specific symbols */
#undef __MM_IS_ENUM__
#undef __MM_IS_FLAGS__
#define __MM_IS_ENUM__

GType
mm_oma_session_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_enum_register_static (g_intern_static_string ("MMOmaSessionType"),
                                      mm_oma_session_type_values);
        g_once_init_leave (&g_define_type_id_initialized, g_define_type_id);
    }

    return g_define_type_id_initialized;
}

/**
 * mm_oma_session_type_get_string:
 * @val: a MMOmaSessionType.
 *
 * Gets the nickname string for the #MMOmaSessionType specified at @val.
 *
 * Returns: (transfer none): a string with the nickname, or %NULL if not found. Do not free the returned value.
 */
#if defined __MM_IS_ENUM__
const gchar *
mm_oma_session_type_get_string (MMOmaSessionType val)
{
    guint i;

    for (i = 0; mm_oma_session_type_values[i].value_nick; i++) {
        if ((gint)val == mm_oma_session_type_values[i].value)
            return mm_oma_session_type_values[i].value_nick;
    }

    return NULL;
}
#endif /* __MM_IS_ENUM_ */

/**
 * mm_oma_session_type_build_string_from_mask:
 * @mask: bitmask of MMOmaSessionType values.
 *
 * Builds a string containing a comma-separated list of nicknames for
 * each #MMOmaSessionType in @mask.
 *
 * Returns: (transfer full): a string with the list of nicknames, or %NULL if none given. The returned value should be freed with g_free().
 */
#if defined __MM_IS_FLAGS__
gchar *
mm_oma_session_type_build_string_from_mask (MMOmaSessionType mask)
{
    guint i;
    gboolean first = TRUE;
    GString *str = NULL;

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

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

    return (str ? g_string_free (str, FALSE) : NULL);
}
#endif /* __MM_IS_FLAGS__ */
static const GEnumValue mm_oma_session_state_values[] = {
    { MM_OMA_SESSION_STATE_FAILED, "MM_OMA_SESSION_STATE_FAILED", "failed" },
    { MM_OMA_SESSION_STATE_UNKNOWN, "MM_OMA_SESSION_STATE_UNKNOWN", "unknown" },
    { MM_OMA_SESSION_STATE_STARTED, "MM_OMA_SESSION_STATE_STARTED", "started" },
    { MM_OMA_SESSION_STATE_RETRYING, "MM_OMA_SESSION_STATE_RETRYING", "retrying" },
    { MM_OMA_SESSION_STATE_CONNECTING, "MM_OMA_SESSION_STATE_CONNECTING", "connecting" },
    { MM_OMA_SESSION_STATE_CONNECTED, "MM_OMA_SESSION_STATE_CONNECTED", "connected" },
    { MM_OMA_SESSION_STATE_AUTHENTICATED, "MM_OMA_SESSION_STATE_AUTHENTICATED", "authenticated" },
    { MM_OMA_SESSION_STATE_MDN_DOWNLOADED, "MM_OMA_SESSION_STATE_MDN_DOWNLOADED", "mdn-downloaded" },
    { MM_OMA_SESSION_STATE_MSID_DOWNLOADED, "MM_OMA_SESSION_STATE_MSID_DOWNLOADED", "msid-downloaded" },
    { MM_OMA_SESSION_STATE_PRL_DOWNLOADED, "MM_OMA_SESSION_STATE_PRL_DOWNLOADED", "prl-downloaded" },
    { MM_OMA_SESSION_STATE_MIP_PROFILE_DOWNLOADED, "MM_OMA_SESSION_STATE_MIP_PROFILE_DOWNLOADED", "mip-profile-downloaded" },
    { MM_OMA_SESSION_STATE_COMPLETED, "MM_OMA_SESSION_STATE_COMPLETED", "completed" },
    { 0, NULL, NULL }
};

/* Define type-specific symbols */
#undef __MM_IS_ENUM__
#undef __MM_IS_FLAGS__
#define __MM_IS_ENUM__

GType
mm_oma_session_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_enum_register_static (g_intern_static_string ("MMOmaSessionState"),
                                      mm_oma_session_state_values);
        g_once_init_leave (&g_define_type_id_initialized, g_define_type_id);
    }

    return g_define_type_id_initialized;
}

/**
 * mm_oma_session_state_get_string:
 * @val: a MMOmaSessionState.
 *
 * Gets the nickname string for the #MMOmaSessionState specified at @val.
 *
 * Returns: (transfer none): a string with the nickname, or %NULL if not found. Do not free the returned value.
 */
#if defined __MM_IS_ENUM__
const gchar *
mm_oma_session_state_get_string (MMOmaSessionState val)
{
    guint i;

    for (i = 0; mm_oma_session_state_values[i].value_nick; i++) {
        if ((gint)val == mm_oma_session_state_values[i].value)
            return mm_oma_session_state_values[i].value_nick;
    }

    return NULL;
}
#endif /* __MM_IS_ENUM_ */

/**
 * mm_oma_session_state_build_string_from_mask:
 * @mask: bitmask of MMOmaSessionState values.
 *
 * Builds a string containing a comma-separated list of nicknames for
 * each #MMOmaSessionState in @mask.
 *
 * Returns: (transfer full): a string with the list of nicknames, or %NULL if none given. The returned value should be freed with g_free().
 */
#if defined __MM_IS_FLAGS__
gchar *
mm_oma_session_state_build_string_from_mask (MMOmaSessionState mask)
{
    guint i;
    gboolean first = TRUE;
    GString *str = NULL;

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

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

    return (str ? g_string_free (str, FALSE) : NULL);
}
#endif /* __MM_IS_FLAGS__ */
static const GEnumValue mm_oma_session_state_failed_reason_values[] = {
    { MM_OMA_SESSION_STATE_FAILED_REASON_UNKNOWN, "MM_OMA_SESSION_STATE_FAILED_REASON_UNKNOWN", "unknown" },
    { MM_OMA_SESSION_STATE_FAILED_REASON_NETWORK_UNAVAILABLE, "MM_OMA_SESSION_STATE_FAILED_REASON_NETWORK_UNAVAILABLE", "network-unavailable" },
    { MM_OMA_SESSION_STATE_FAILED_REASON_SERVER_UNAVAILABLE, "MM_OMA_SESSION_STATE_FAILED_REASON_SERVER_UNAVAILABLE", "server-unavailable" },
    { MM_OMA_SESSION_STATE_FAILED_REASON_AUTHENTICATION_FAILED, "MM_OMA_SESSION_STATE_FAILED_REASON_AUTHENTICATION_FAILED", "authentication-failed" },
    { MM_OMA_SESSION_STATE_FAILED_REASON_MAX_RETRY_EXCEEDED, "MM_OMA_SESSION_STATE_FAILED_REASON_MAX_RETRY_EXCEEDED", "max-retry-exceeded" },
    { MM_OMA_SESSION_STATE_FAILED_REASON_SESSION_CANCELLED, "MM_OMA_SESSION_STATE_FAILED_REASON_SESSION_CANCELLED", "session-cancelled" },
    { 0, NULL, NULL }
};

/* Define type-specific symbols */
#undef __MM_IS_ENUM__
#undef __MM_IS_FLAGS__
#define __MM_IS_ENUM__

GType
mm_oma_session_state_failed_reason_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_enum_register_static (g_intern_static_string ("MMOmaSessionStateFailedReason"),
                                      mm_oma_session_state_failed_reason_values);
        g_once_init_leave (&g_define_type_id_initialized, g_define_type_id);
    }

    return g_define_type_id_initialized;
}

/**
 * mm_oma_session_state_failed_reason_get_string:
 * @val: a MMOmaSessionStateFailedReason.
 *
 * Gets the nickname string for the #MMOmaSessionStateFailedReason specified at @val.
 *
 * Returns: (transfer none): a string with the nickname, or %NULL if not found. Do not free the returned value.
 */
#if defined __MM_IS_ENUM__
const gchar *
mm_oma_session_state_failed_reason_get_string (MMOmaSessionStateFailedReason val)
{
    guint i;

    for (i = 0; mm_oma_session_state_failed_reason_values[i].value_nick; i++) {
        if ((gint)val == mm_oma_session_state_failed_reason_values[i].value)
            return mm_oma_session_state_failed_reason_values[i].value_nick;
    }

    return NULL;
}
#endif /* __MM_IS_ENUM_ */

/**
 * mm_oma_session_state_failed_reason_build_string_from_mask:
 * @mask: bitmask of MMOmaSessionStateFailedReason values.
 *
 * Builds a string containing a comma-separated list of nicknames for
 * each #MMOmaSessionStateFailedReason in @mask.
 *
 * Returns: (transfer full): a string with the list of nicknames, or %NULL if none given. The returned value should be freed with g_free().
 */
#if defined __MM_IS_FLAGS__
gchar *
mm_oma_session_state_failed_reason_build_string_from_mask (MMOmaSessionStateFailedReason mask)
{
    guint i;
    gboolean first = TRUE;
    GString *str = NULL;

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

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

    return (str ? g_string_free (str, FALSE) : NULL);
}
#endif /* __MM_IS_FLAGS__ */
static const GEnumValue mm_call_state_values[] = {
    { MM_CALL_STATE_UNKNOWN, "MM_CALL_STATE_UNKNOWN", "unknown" },
    { MM_CALL_STATE_DIALING, "MM_CALL_STATE_DIALING", "dialing" },
    { MM_CALL_STATE_RINGING_OUT, "MM_CALL_STATE_RINGING_OUT", "ringing-out" },
    { MM_CALL_STATE_RINGING_IN, "MM_CALL_STATE_RINGING_IN", "ringing-in" },
    { MM_CALL_STATE_ACTIVE, "MM_CALL_STATE_ACTIVE", "active" },
    { MM_CALL_STATE_HELD, "MM_CALL_STATE_HELD", "held" },
    { MM_CALL_STATE_WAITING, "MM_CALL_STATE_WAITING", "waiting" },
    { MM_CALL_STATE_TERMINATED, "MM_CALL_STATE_TERMINATED", "terminated" },
    { 0, NULL, NULL }
};

/* Define type-specific symbols */
#undef __MM_IS_ENUM__
#undef __MM_IS_FLAGS__
#define __MM_IS_ENUM__

GType
mm_call_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_enum_register_static (g_intern_static_string ("MMCallState"),
                                      mm_call_state_values);
        g_once_init_leave (&g_define_type_id_initialized, g_define_type_id);
    }

    return g_define_type_id_initialized;
}

/**
 * mm_call_state_get_string:
 * @val: a MMCallState.
 *
 * Gets the nickname string for the #MMCallState specified at @val.
 *
 * Returns: (transfer none): a string with the nickname, or %NULL if not found. Do not free the returned value.
 */
#if defined __MM_IS_ENUM__
const gchar *
mm_call_state_get_string (MMCallState val)
{
    guint i;

    for (i = 0; mm_call_state_values[i].value_nick; i++) {
        if ((gint)val == mm_call_state_values[i].value)
            return mm_call_state_values[i].value_nick;
    }

    return NULL;
}
#endif /* __MM_IS_ENUM_ */

/**
 * mm_call_state_build_string_from_mask:
 * @mask: bitmask of MMCallState values.
 *
 * Builds a string containing a comma-separated list of nicknames for
 * each #MMCallState in @mask.
 *
 * Returns: (transfer full): a string with the list of nicknames, or %NULL if none given. The returned value should be freed with g_free().
 */
#if defined __MM_IS_FLAGS__
gchar *
mm_call_state_build_string_from_mask (MMCallState mask)
{
    guint i;
    gboolean first = TRUE;
    GString *str = NULL;

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

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

    return (str ? g_string_free (str, FALSE) : NULL);
}
#endif /* __MM_IS_FLAGS__ */
static const GEnumValue mm_call_state_reason_values[] = {
    { MM_CALL_STATE_REASON_UNKNOWN, "MM_CALL_STATE_REASON_UNKNOWN", "unknown" },
    { MM_CALL_STATE_REASON_OUTGOING_STARTED, "MM_CALL_STATE_REASON_OUTGOING_STARTED", "outgoing-started" },
    { MM_CALL_STATE_REASON_INCOMING_NEW, "MM_CALL_STATE_REASON_INCOMING_NEW", "incoming-new" },
    { MM_CALL_STATE_REASON_ACCEPTED, "MM_CALL_STATE_REASON_ACCEPTED", "accepted" },
    { MM_CALL_STATE_REASON_TERMINATED, "MM_CALL_STATE_REASON_TERMINATED", "terminated" },
    { MM_CALL_STATE_REASON_REFUSED_OR_BUSY, "MM_CALL_STATE_REASON_REFUSED_OR_BUSY", "refused-or-busy" },
    { MM_CALL_STATE_REASON_ERROR, "MM_CALL_STATE_REASON_ERROR", "error" },
    { MM_CALL_STATE_REASON_AUDIO_SETUP_FAILED, "MM_CALL_STATE_REASON_AUDIO_SETUP_FAILED", "audio-setup-failed" },
    { MM_CALL_STATE_REASON_TRANSFERRED, "MM_CALL_STATE_REASON_TRANSFERRED", "transferred" },
    { MM_CALL_STATE_REASON_DEFLECTED, "MM_CALL_STATE_REASON_DEFLECTED", "deflected" },
    { 0, NULL, NULL }
};

/* Define type-specific symbols */
#undef __MM_IS_ENUM__
#undef __MM_IS_FLAGS__
#define __MM_IS_ENUM__

GType
mm_call_state_reason_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_enum_register_static (g_intern_static_string ("MMCallStateReason"),
                                      mm_call_state_reason_values);
        g_once_init_leave (&g_define_type_id_initialized, g_define_type_id);
    }

    return g_define_type_id_initialized;
}

/**
 * mm_call_state_reason_get_string:
 * @val: a MMCallStateReason.
 *
 * Gets the nickname string for the #MMCallStateReason specified at @val.
 *
 * Returns: (transfer none): a string with the nickname, or %NULL if not found. Do not free the returned value.
 */
#if defined __MM_IS_ENUM__
const gchar *
mm_call_state_reason_get_string (MMCallStateReason val)
{
    guint i;

    for (i = 0; mm_call_state_reason_values[i].value_nick; i++) {
        if ((gint)val == mm_call_state_reason_values[i].value)
            return mm_call_state_reason_values[i].value_nick;
    }

    return NULL;
}
#endif /* __MM_IS_ENUM_ */

/**
 * mm_call_state_reason_build_string_from_mask:
 * @mask: bitmask of MMCallStateReason values.
 *
 * Builds a string containing a comma-separated list of nicknames for
 * each #MMCallStateReason in @mask.
 *
 * Returns: (transfer full): a string with the list of nicknames, or %NULL if none given. The returned value should be freed with g_free().
 */
#if defined __MM_IS_FLAGS__
gchar *
mm_call_state_reason_build_string_from_mask (MMCallStateReason mask)
{
    guint i;
    gboolean first = TRUE;
    GString *str = NULL;

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

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

    return (str ? g_string_free (str, FALSE) : NULL);
}
#endif /* __MM_IS_FLAGS__ */
static const GEnumValue mm_call_direction_values[] = {
    { MM_CALL_DIRECTION_UNKNOWN, "MM_CALL_DIRECTION_UNKNOWN", "unknown" },
    { MM_CALL_DIRECTION_INCOMING, "MM_CALL_DIRECTION_INCOMING", "incoming" },
    { MM_CALL_DIRECTION_OUTGOING, "MM_CALL_DIRECTION_OUTGOING", "outgoing" },
    { 0, NULL, NULL }
};

/* Define type-specific symbols */
#undef __MM_IS_ENUM__
#undef __MM_IS_FLAGS__
#define __MM_IS_ENUM__

GType
mm_call_direction_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_enum_register_static (g_intern_static_string ("MMCallDirection"),
                                      mm_call_direction_values);
        g_once_init_leave (&g_define_type_id_initialized, g_define_type_id);
    }

    return g_define_type_id_initialized;
}

/**
 * mm_call_direction_get_string:
 * @val: a MMCallDirection.
 *
 * Gets the nickname string for the #MMCallDirection specified at @val.
 *
 * Returns: (transfer none): a string with the nickname, or %NULL if not found. Do not free the returned value.
 */
#if defined __MM_IS_ENUM__
const gchar *
mm_call_direction_get_string (MMCallDirection val)
{
    guint i;

    for (i = 0; mm_call_direction_values[i].value_nick; i++) {
        if ((gint)val == mm_call_direction_values[i].value)
            return mm_call_direction_values[i].value_nick;
    }

    return NULL;
}
#endif /* __MM_IS_ENUM_ */

/**
 * mm_call_direction_build_string_from_mask:
 * @mask: bitmask of MMCallDirection values.
 *
 * Builds a string containing a comma-separated list of nicknames for
 * each #MMCallDirection in @mask.
 *
 * Returns: (transfer full): a string with the list of nicknames, or %NULL if none given. The returned value should be freed with g_free().
 */
#if defined __MM_IS_FLAGS__
gchar *
mm_call_direction_build_string_from_mask (MMCallDirection mask)
{
    guint i;
    gboolean first = TRUE;
    GString *str = NULL;

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

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

    return (str ? g_string_free (str, FALSE) : NULL);
}
#endif /* __MM_IS_FLAGS__ */
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" },
    { 0, NULL, NULL }
};

/* Define type-specific symbols */
#undef __MM_IS_ENUM__
#undef __MM_IS_FLAGS__
#define __MM_IS_FLAGS__

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;
}

/**
 * mm_modem_firmware_update_method_get_string:
 * @val: a MMModemFirmwareUpdateMethod.
 *
 * Gets the nickname string for the #MMModemFirmwareUpdateMethod specified at @val.
 *
 * Returns: (transfer none): a string with the nickname, or %NULL if not found. Do not free the returned value.
 */
#if defined __MM_IS_ENUM__
const gchar *
mm_modem_firmware_update_method_get_string (MMModemFirmwareUpdateMethod val)
{
    guint i;

    for (i = 0; mm_modem_firmware_update_method_values[i].value_nick; i++) {
        if ((gint)val == mm_modem_firmware_update_method_values[i].value)
            return mm_modem_firmware_update_method_values[i].value_nick;
    }

    return NULL;
}
#endif /* __MM_IS_ENUM_ */

/**
 * mm_modem_firmware_update_method_build_string_from_mask:
 * @mask: bitmask of MMModemFirmwareUpdateMethod values.
 *
 * Builds a string containing a comma-separated list of nicknames for
 * each #MMModemFirmwareUpdateMethod in @mask.
 *
 * Returns: (transfer full): a string with the list of nicknames, or %NULL if none given. The returned value should be freed with g_free().
 */
#if defined __MM_IS_FLAGS__
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);
}
#endif /* __MM_IS_FLAGS__ */
static const GEnumValue mm_bearer_multiplex_support_values[] = {
    { MM_BEARER_MULTIPLEX_SUPPORT_UNKNOWN, "MM_BEARER_MULTIPLEX_SUPPORT_UNKNOWN", "unknown" },
    { MM_BEARER_MULTIPLEX_SUPPORT_NONE, "MM_BEARER_MULTIPLEX_SUPPORT_NONE", "none" },
    { MM_BEARER_MULTIPLEX_SUPPORT_REQUESTED, "MM_BEARER_MULTIPLEX_SUPPORT_REQUESTED", "requested" },
    { MM_BEARER_MULTIPLEX_SUPPORT_REQUIRED, "MM_BEARER_MULTIPLEX_SUPPORT_REQUIRED", "required" },
    { 0, NULL, NULL }
};

/* Define type-specific symbols */
#undef __MM_IS_ENUM__
#undef __MM_IS_FLAGS__
#define __MM_IS_ENUM__

GType
mm_bearer_multiplex_support_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_enum_register_static (g_intern_static_string ("MMBearerMultiplexSupport"),
                                      mm_bearer_multiplex_support_values);
        g_once_init_leave (&g_define_type_id_initialized, g_define_type_id);
    }

    return g_define_type_id_initialized;
}

/**
 * mm_bearer_multiplex_support_get_string:
 * @val: a MMBearerMultiplexSupport.
 *
 * Gets the nickname string for the #MMBearerMultiplexSupport specified at @val.
 *
 * Returns: (transfer none): a string with the nickname, or %NULL if not found. Do not free the returned value.
 */
#if defined __MM_IS_ENUM__
const gchar *
mm_bearer_multiplex_support_get_string (MMBearerMultiplexSupport val)
{
    guint i;

    for (i = 0; mm_bearer_multiplex_support_values[i].value_nick; i++) {
        if ((gint)val == mm_bearer_multiplex_support_values[i].value)
            return mm_bearer_multiplex_support_values[i].value_nick;
    }

    return NULL;
}
#endif /* __MM_IS_ENUM_ */

/**
 * mm_bearer_multiplex_support_build_string_from_mask:
 * @mask: bitmask of MMBearerMultiplexSupport values.
 *
 * Builds a string containing a comma-separated list of nicknames for
 * each #MMBearerMultiplexSupport in @mask.
 *
 * Returns: (transfer full): a string with the list of nicknames, or %NULL if none given. The returned value should be freed with g_free().
 */
#if defined __MM_IS_FLAGS__
gchar *
mm_bearer_multiplex_support_build_string_from_mask (MMBearerMultiplexSupport mask)
{
    guint i;
    gboolean first = TRUE;
    GString *str = NULL;

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

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

    return (str ? g_string_free (str, FALSE) : NULL);
}
#endif /* __MM_IS_FLAGS__ */
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" },
    { 0, NULL, NULL }
};

/* Define type-specific symbols */
#undef __MM_IS_ENUM__
#undef __MM_IS_FLAGS__
#define __MM_IS_FLAGS__

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;
}

/**
 * mm_bearer_apn_type_get_string:
 * @val: a MMBearerApnType.
 *
 * Gets the nickname string for the #MMBearerApnType specified at @val.
 *
 * Returns: (transfer none): a string with the nickname, or %NULL if not found. Do not free the returned value.
 */
#if defined __MM_IS_ENUM__
const gchar *
mm_bearer_apn_type_get_string (MMBearerApnType val)
{
    guint i;

    for (i = 0; mm_bearer_apn_type_values[i].value_nick; i++) {
        if ((gint)val == mm_bearer_apn_type_values[i].value)
            return mm_bearer_apn_type_values[i].value_nick;
    }

    return NULL;
}
#endif /* __MM_IS_ENUM_ */

/**
 * mm_bearer_apn_type_build_string_from_mask:
 * @mask: bitmask of MMBearerApnType values.
 *
 * Builds a string containing a comma-separated list of nicknames for
 * each #MMBearerApnType in @mask.
 *
 * Returns: (transfer full): a string with the list of nicknames, or %NULL if none given. The returned value should be freed with g_free().
 */
#if defined __MM_IS_FLAGS__
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);
}
#endif /* __MM_IS_FLAGS__ */

/* Generated data ends here */

