fwupd/libfwupd/fwupd-client-sync.h
Richard Hughes 4257d5f451 Add support for Quit() in fwupdmgr
This allows us to only shut down the P2P daemon in the installed tests.
The easy fix would have been to use something like:

    gdbus call --address unix:path=/run/fwupd.sock --object-path / --method org.freedesktop.fwupd.Quit'

...but the daemon does not implement an ObjectManager, which gdbus requires.

This worked correctly for so long because the p2p tests were being run after
the bus tests, so shutting down the system daemon had no effect.

Fedora 37 seems to have flipped the order for some reason -- and now it
*sometimes* matters that we were doing the worng thing...
2023-02-07 11:00:53 +00:00

259 lines
8.2 KiB
C

/*
* Copyright (C) 2016 Richard Hughes <richard@hughsie.com>
*
* SPDX-License-Identifier: LGPL-2.1+
*/
#pragma once
#include "fwupd-client.h"
G_BEGIN_DECLS
gboolean
fwupd_client_connect(FwupdClient *self,
GCancellable *cancellable,
GError **error) G_GNUC_WARN_UNUSED_RESULT;
gboolean
fwupd_client_quit(FwupdClient *self,
GCancellable *cancellable,
GError **error) G_GNUC_WARN_UNUSED_RESULT;
GPtrArray *
fwupd_client_get_devices(FwupdClient *self,
GCancellable *cancellable,
GError **error) G_GNUC_WARN_UNUSED_RESULT;
GPtrArray *
fwupd_client_get_plugins(FwupdClient *self,
GCancellable *cancellable,
GError **error) G_GNUC_WARN_UNUSED_RESULT;
GPtrArray *
fwupd_client_get_history(FwupdClient *self,
GCancellable *cancellable,
GError **error) G_GNUC_WARN_UNUSED_RESULT;
GPtrArray *
fwupd_client_get_releases(FwupdClient *self,
const gchar *device_id,
GCancellable *cancellable,
GError **error) G_GNUC_WARN_UNUSED_RESULT;
GPtrArray *
fwupd_client_get_downgrades(FwupdClient *self,
const gchar *device_id,
GCancellable *cancellable,
GError **error) G_GNUC_WARN_UNUSED_RESULT;
GPtrArray *
fwupd_client_get_upgrades(FwupdClient *self,
const gchar *device_id,
GCancellable *cancellable,
GError **error) G_GNUC_WARN_UNUSED_RESULT;
GPtrArray *
fwupd_client_get_details(FwupdClient *self,
const gchar *filename,
GCancellable *cancellable,
GError **error) G_GNUC_WARN_UNUSED_RESULT;
GPtrArray *
fwupd_client_get_details_bytes(FwupdClient *self,
GBytes *bytes,
GCancellable *cancellable,
GError **error) G_GNUC_WARN_UNUSED_RESULT;
gboolean
fwupd_client_verify(FwupdClient *self,
const gchar *device_id,
GCancellable *cancellable,
GError **error) G_GNUC_WARN_UNUSED_RESULT;
gboolean
fwupd_client_verify_update(FwupdClient *self,
const gchar *device_id,
GCancellable *cancellable,
GError **error) G_GNUC_WARN_UNUSED_RESULT;
gboolean
fwupd_client_unlock(FwupdClient *self,
const gchar *device_id,
GCancellable *cancellable,
GError **error) G_GNUC_WARN_UNUSED_RESULT;
gchar *
fwupd_client_inhibit(FwupdClient *self,
const gchar *reason,
GCancellable *cancellable,
GError **error) G_GNUC_WARN_UNUSED_RESULT;
gboolean
fwupd_client_uninhibit(FwupdClient *self,
const gchar *inhibit_id,
GCancellable *cancellable,
GError **error) G_GNUC_WARN_UNUSED_RESULT;
gboolean
fwupd_client_modify_config(FwupdClient *self,
const gchar *key,
const gchar *value,
GCancellable *cancellable,
GError **error) G_GNUC_WARN_UNUSED_RESULT;
gboolean
fwupd_client_activate(FwupdClient *self,
GCancellable *cancellable,
const gchar *device_id,
GError **error) G_GNUC_WARN_UNUSED_RESULT;
gboolean
fwupd_client_clear_results(FwupdClient *self,
const gchar *device_id,
GCancellable *cancellable,
GError **error) G_GNUC_WARN_UNUSED_RESULT;
FwupdDevice *
fwupd_client_get_results(FwupdClient *self,
const gchar *device_id,
GCancellable *cancellable,
GError **error) G_GNUC_WARN_UNUSED_RESULT;
gboolean
fwupd_client_modify_bios_setting(FwupdClient *self,
GHashTable *settings,
GCancellable *cancellable,
GError **error);
GPtrArray *
fwupd_client_get_bios_settings(FwupdClient *self,
GCancellable *cancellable,
GError **error) G_GNUC_WARN_UNUSED_RESULT;
GPtrArray *
fwupd_client_get_host_security_attrs(FwupdClient *self,
GCancellable *cancellable,
GError **error) G_GNUC_WARN_UNUSED_RESULT;
GPtrArray *
fwupd_client_get_host_security_events(FwupdClient *self,
guint limit,
GCancellable *cancellable,
GError **error) G_GNUC_WARN_UNUSED_RESULT;
FwupdDevice *
fwupd_client_get_device_by_id(FwupdClient *self,
const gchar *device_id,
GCancellable *cancellable,
GError **error) G_GNUC_WARN_UNUSED_RESULT;
GPtrArray *
fwupd_client_get_devices_by_guid(FwupdClient *self,
const gchar *guid,
GCancellable *cancellable,
GError **error) G_GNUC_WARN_UNUSED_RESULT;
gboolean
fwupd_client_install(FwupdClient *self,
const gchar *device_id,
const gchar *filename,
FwupdInstallFlags install_flags,
GCancellable *cancellable,
GError **error) G_GNUC_WARN_UNUSED_RESULT;
gboolean
fwupd_client_install_bytes(FwupdClient *self,
const gchar *device_id,
GBytes *bytes,
FwupdInstallFlags install_flags,
GCancellable *cancellable,
GError **error) G_GNUC_WARN_UNUSED_RESULT;
gboolean
fwupd_client_install_release(FwupdClient *self,
FwupdDevice *device,
FwupdRelease *release,
FwupdInstallFlags install_flags,
GCancellable *cancellable,
GError **error) G_DEPRECATED_FOR(fwupd_client_install_release2);
gboolean
fwupd_client_install_release2(FwupdClient *self,
FwupdDevice *device,
FwupdRelease *release,
FwupdInstallFlags install_flags,
FwupdClientDownloadFlags download_flags,
GCancellable *cancellable,
GError **error) G_GNUC_WARN_UNUSED_RESULT;
gboolean
fwupd_client_update_metadata(FwupdClient *self,
const gchar *remote_id,
const gchar *metadata_fn,
const gchar *signature_fn,
GCancellable *cancellable,
GError **error) G_GNUC_WARN_UNUSED_RESULT;
gboolean
fwupd_client_update_metadata_bytes(FwupdClient *self,
const gchar *remote_id,
GBytes *metadata,
GBytes *signature,
GCancellable *cancellable,
GError **error) G_GNUC_WARN_UNUSED_RESULT;
gboolean
fwupd_client_refresh_remote(FwupdClient *self,
FwupdRemote *remote,
GCancellable *cancellable,
GError **error) G_GNUC_WARN_UNUSED_RESULT;
gboolean
fwupd_client_modify_remote(FwupdClient *self,
const gchar *remote_id,
const gchar *key,
const gchar *value,
GCancellable *cancellable,
GError **error) G_GNUC_WARN_UNUSED_RESULT;
gboolean
fwupd_client_modify_device(FwupdClient *self,
const gchar *device_id,
const gchar *key,
const gchar *value,
GCancellable *cancellable,
GError **error) G_GNUC_WARN_UNUSED_RESULT;
GHashTable *
fwupd_client_get_report_metadata(FwupdClient *self,
GCancellable *cancellable,
GError **error) G_GNUC_WARN_UNUSED_RESULT;
GPtrArray *
fwupd_client_get_remotes(FwupdClient *self,
GCancellable *cancellable,
GError **error) G_GNUC_WARN_UNUSED_RESULT;
FwupdRemote *
fwupd_client_get_remote_by_id(FwupdClient *self,
const gchar *remote_id,
GCancellable *cancellable,
GError **error) G_GNUC_WARN_UNUSED_RESULT;
gchar **
fwupd_client_get_approved_firmware(FwupdClient *self,
GCancellable *cancellable,
GError **error) G_GNUC_WARN_UNUSED_RESULT;
gboolean
fwupd_client_set_approved_firmware(FwupdClient *self,
gchar **checksums,
GCancellable *cancellable,
GError **error) G_GNUC_WARN_UNUSED_RESULT;
gchar **
fwupd_client_get_blocked_firmware(FwupdClient *self,
GCancellable *cancellable,
GError **error) G_GNUC_WARN_UNUSED_RESULT;
gboolean
fwupd_client_set_blocked_firmware(FwupdClient *self,
gchar **checksums,
GCancellable *cancellable,
GError **error) G_GNUC_WARN_UNUSED_RESULT;
gchar *
fwupd_client_self_sign(FwupdClient *self,
const gchar *value,
FwupdSelfSignFlags flags,
GCancellable *cancellable,
GError **error) G_GNUC_WARN_UNUSED_RESULT;
gboolean
fwupd_client_set_feature_flags(FwupdClient *self,
FwupdFeatureFlags feature_flags,
GCancellable *cancellable,
GError **error) G_GNUC_WARN_UNUSED_RESULT;
GBytes *
fwupd_client_download_bytes(FwupdClient *self,
const gchar *url,
FwupdClientDownloadFlags flags,
GCancellable *cancellable,
GError **error) G_GNUC_WARN_UNUSED_RESULT;
gboolean
fwupd_client_download_file(FwupdClient *self,
const gchar *url,
GFile *file,
FwupdClientDownloadFlags flags,
GCancellable *cancellable,
GError **error) G_GNUC_WARN_UNUSED_RESULT;
GBytes *
fwupd_client_upload_bytes(FwupdClient *self,
const gchar *url,
const gchar *payload,
const gchar *signature,
FwupdClientUploadFlags flags,
GCancellable *cancellable,
GError **error) G_GNUC_WARN_UNUSED_RESULT;
G_END_DECLS