fwupd/src/fu-engine-request.h
Richard Hughes 70f9124545 Show translated firmware release notes when provided
Send the users locale to the daemon so that it can be used to prefer
the localized update text over the default en_US version.

    $ LANG=fr_FR.UTF8 fwupdmgr get-details test.cab
    ...
    └─ACME Plan 9:
          Nouvelle version: 0.0.5
          Licence:          Propriétaire
          Urgence:          Faible
          Fournisseur:      ACME Ltd.
          Description:      Cette version stable corrige des bugs.

I decided to send the locale to the daemon rather than change the
`Description` to return GVariant to `a{ss}` as we also probably want
to support things like localized summary and URLs too in the future.
2021-10-24 18:59:15 +01:00

38 lines
1.1 KiB
C

/*
* Copyright (C) 2020 Richard Hughes <richard@hughsie.com>
*
* SPDX-License-Identifier: LGPL-2.1+
*/
#pragma once
#include <fwupd.h>
#define FU_TYPE_ENGINE_REQUEST (fu_engine_request_get_type())
G_DECLARE_FINAL_TYPE(FuEngineRequest, fu_engine_request, FU, ENGINE_REQUEST, GObject)
typedef enum {
FU_ENGINE_REQUEST_KIND_UNKNOWN,
FU_ENGINE_REQUEST_KIND_ACTIVE,
FU_ENGINE_REQUEST_KIND_ONLY_SUPPORTED,
} FuEngineRequestKind;
FuEngineRequest *
fu_engine_request_new(FuEngineRequestKind kind);
FuEngineRequestKind
fu_engine_request_get_kind(FuEngineRequest *self);
FwupdFeatureFlags
fu_engine_request_get_feature_flags(FuEngineRequest *self);
void
fu_engine_request_set_feature_flags(FuEngineRequest *self, FwupdFeatureFlags feature_flags);
const gchar *
fu_engine_request_get_locale(FuEngineRequest *self);
void
fu_engine_request_set_locale(FuEngineRequest *self, const gchar *locale);
gboolean
fu_engine_request_has_feature_flag(FuEngineRequest *self, FwupdFeatureFlags feature_flag);
FwupdDeviceFlags
fu_engine_request_get_device_flags(FuEngineRequest *self);
void
fu_engine_request_set_device_flags(FuEngineRequest *self, FwupdDeviceFlags device_flags);