/*
 * This file is auto-generated, do not modify!
 *
 * SPDX-License-Identifier: LGPL-2.1-or-later
 */

#include "config.h"

#include <glib.h>

#include "fu-device-struct.h"

#ifdef G_LOG_DOMAIN
  #undef G_LOG_DOMAIN
#endif
#define G_LOG_DOMAIN "FuStruct"

/**
 * fu_device_instance_flags_to_string:
 * @val: value, e.g. %FU_DEVICE_INSTANCE_FLAG_VISIBLE
 *
 * Converts an enumerated value to a string.
 *
 * Returns: identifier string
 *
 **/
gchar *
fu_device_instance_flags_to_string(FuDeviceInstanceFlags val)
{
    const gchar *data[6] = {0};
    guint idx = 0;
    if (val == FU_DEVICE_INSTANCE_FLAG_NONE)
        return g_strdup("none");
    if (val & FU_DEVICE_INSTANCE_FLAG_VISIBLE)
        data[idx++] = "visible";
    if (val & FU_DEVICE_INSTANCE_FLAG_QUIRKS)
        data[idx++] = "quirks";
    if (val & FU_DEVICE_INSTANCE_FLAG_GENERIC)
        data[idx++] = "generic";
    if (val & FU_DEVICE_INSTANCE_FLAG_COUNTERPART)
        data[idx++] = "counterpart";
    if (val & FU_DEVICE_INSTANCE_FLAG_DEPRECATED)
        data[idx++] = "deprecated";
    return g_strjoinv(",", (gchar **)data);
}

