<commit_before>/*
 * Copyright (C) 2021 <NAME> <<EMAIL>>
 *
 * SPDX-License-Identifier: LGPL-2.1+
 */

#pragma once

#include <fwupdplugin.h>

#include "fu-redfish-backend.h"

#define FU_TYPE_REDFISH_DEVICE (fu_redfish_device_get_type())
G_DECLARE_DERIVABLE_TYPE(FuRedfishDevice, fu_redfish_device, FU, REDFISH_DEVICE, FuDevice)

struct _FuRedfishDeviceClass {
	FuDeviceClass parent_class;
};

/**
 * FU_REDFISH_DEVICE_FLAG_IS_BACKUP:
 *
 * The device is the other half of a dual image firmware.
 */
#define FU_REDFISH_DEVICE_FLAG_IS_BACKUP (1 << 0)

/**
 * FU_REDFISH_DEVICE_FLAG_UNSIGNED_BUILD:
 *
 * Use unsigned development builds.
 */
#define FU_REDFISH_DEVICE_FLAG_UNSIGNED_BUILD (1 << 1)

/**
 * FU_REDFISH_DEVICE_FLAG_MANAGER_RESET:
 *
 * Reset the manager (typically the BMC) after updating this device.
 */
#define FU_REDFISH_DEVICE_FLAG_MANAGER_RESET (1 << 2)

/**
 * FU_REDFISH_DEVICE_FLAG_WILDCARD_TARGETS:
 *
 * Do not specify the `odata.id` in the multipart update Targets array and allow
 * the BMC to deploy the firmware onto all compatible hardware.
 *
 * To use this option the payload must contain metadata that restricts it to a
 * specific SoftwareId.
 */
#define FU_REDFISH_DEVICE_FLAG_WILDCARD_TARGETS (1 << 2)

FuRedfishBackend *
fu_redfish_device_get_backend(FuRedfishDevice *self);
gboolean
fu_redfish_device_poll_task(FuRedfishDevice *self,
			    const gchar *location,
			    FuProgress *progress,
			    GError **error);
guint
fu_redfish_device_get_reset_pre_delay(FuRedfishDevice *self);
guint
fu_redfish_device_get_reset_post_delay(FuRedfishDevice *self);<commit_msg>redfish: Don't reboot the BMC for all updates<commit_after>/*
 * Copyright (C) 2021 <NAME> <<EMAIL>>
 *
 * SPDX-License-Identifier: LGPL-2.1+
 */

#pragma once

#include <fwupdplugin.h>

#include "fu-redfish-backend.h"

#define FU_TYPE_REDFISH_DEVICE (fu_redfish_device_get_type())
G_DECLARE_DERIVABLE_TYPE(FuRedfishDevice, fu_redfish_device, FU, REDFISH_DEVICE, FuDevice)

struct _FuRedfishDeviceClass {
	FuDeviceClass parent_class;
};

/**
 * FU_REDFISH_DEVICE_FLAG_IS_BACKUP:
 *
 * The device is the other half of a dual image firmware.
 */
#define FU_REDFISH_DEVICE_FLAG_IS_BACKUP (1 << 0)

/**
 * FU_REDFISH_DEVICE_FLAG_UNSIGNED_BUILD:
 *
 * Use unsigned development builds.
 */
#define FU_REDFISH_DEVICE_FLAG_UNSIGNED_BUILD (1 << 1)

/**
 * FU_REDFISH_DEVICE_FLAG_MANAGER_RESET:
 *
 * Reset the manager (typically the BMC) after updating this device.
 */
#define FU_REDFISH_DEVICE_FLAG_MANAGER_RESET (1 << 2)

/**
 * FU_REDFISH_DEVICE_FLAG_WILDCARD_TARGETS:
 *
 * Do not specify the `odata.id` in the multipart update Targets array and allow
 * the BMC to deploy the firmware onto all compatible hardware.
 *
 * To use this option the payload must contain metadata that restricts it to a
 * specific SoftwareId.
 */
#define FU_REDFISH_DEVICE_FLAG_WILDCARD_TARGETS (1 << 3)

FuRedfishBackend *
fu_redfish_device_get_backend(FuRedfishDevice *self);
gboolean
fu_redfish_device_poll_task(FuRedfishDevice *self,
			    const gchar *location,
			    FuProgress *progress,
			    GError **error);
guint
fu_redfish_device_get_reset_pre_delay(FuRedfishDevice *self);
guint
fu_redfish_device_get_reset_post_delay(FuRedfishDevice *self);
{'fraction_non_alphanumeric': 0.08972772277227722, 'fraction_numerical': 0.008663366336633664, 'mean_word_length': 5.544534412955466, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '911734', 'n_tokens_mistral': 1230, 'n_tokens_neox': 1167, 'n_words': 264}