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

#include "config.h"

#include <glib.h>

#include "fu-firmware-struct.h"

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




/**
 * fu_firmware_flags_to_string:
 * @val: value, e.g. %FU_FIRMWARE_FLAG_DEDUPE_ID
 *
 * Converts an enumerated value to a string.
 *
 * Returns: identifier string
 *
 **/
gchar *
fu_firmware_flags_to_string(FuFirmwareFlags val)
{
    const gchar *data[13] = {0};
    guint idx = 0;
    if (val == FU_FIRMWARE_FLAG_NONE)
        return g_strdup("none");
    if (val & FU_FIRMWARE_FLAG_DEDUPE_ID)
        data[idx++] = "dedupe-id";
    if (val & FU_FIRMWARE_FLAG_DEDUPE_IDX)
        data[idx++] = "dedupe-idx";
    if (val & FU_FIRMWARE_FLAG_HAS_CHECKSUM)
        data[idx++] = "has-checksum";
    if (val & FU_FIRMWARE_FLAG_HAS_VID_PID)
        data[idx++] = "has-vid-pid";
    if (val & FU_FIRMWARE_FLAG_DONE_PARSE)
        data[idx++] = "done-parse";
    if (val & FU_FIRMWARE_FLAG_HAS_STORED_SIZE)
        data[idx++] = "has-stored-size";
    if (val & FU_FIRMWARE_FLAG_ALWAYS_SEARCH)
        data[idx++] = "always-search";
    if (val & FU_FIRMWARE_FLAG_NO_AUTO_DETECTION)
        data[idx++] = "no-auto-detection";
    if (val & FU_FIRMWARE_FLAG_HAS_CHECK_COMPATIBLE)
        data[idx++] = "has-check-compatible";
    if (val & FU_FIRMWARE_FLAG_IS_LAST_IMAGE)
        data[idx++] = "is-last-image";
    if (val & FU_FIRMWARE_FLAG_ALLOW_LINEAR)
        data[idx++] = "allow-linear";
    if (val & FU_FIRMWARE_FLAG_IS_ABSTRACT)
        data[idx++] = "is-abstract";
    return g_strjoinv(",", (gchar **)data);
}

