mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-07 10:27:36 +00:00
libfwupd: Add fwupd_client_get_user_agent()
If we set a property, we should probably have a way to read it back...
This commit is contained in:
parent
42577728bb
commit
eba28b6520
@ -3861,6 +3861,26 @@ fwupd_client_set_user_agent (FwupdClient *self, const gchar *user_agent)
|
|||||||
priv->user_agent = g_strdup (user_agent);
|
priv->user_agent = g_strdup (user_agent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* fwupd_client_get_user_agent:
|
||||||
|
* @self: A #FwupdClient
|
||||||
|
*
|
||||||
|
* Gets the string that represents the user agent that is used for
|
||||||
|
* uploading and downloading. The user agent will contain the runtime
|
||||||
|
* version of fwupd somewhere in the provided string.
|
||||||
|
*
|
||||||
|
* Returns: a string, or %NULL for unknown.
|
||||||
|
*
|
||||||
|
* Since: 1.5.2
|
||||||
|
**/
|
||||||
|
const gchar *
|
||||||
|
fwupd_client_get_user_agent (FwupdClient *self)
|
||||||
|
{
|
||||||
|
FwupdClientPrivate *priv = GET_PRIVATE (self);
|
||||||
|
g_return_val_if_fail (FWUPD_IS_CLIENT (self), NULL);
|
||||||
|
return priv->user_agent;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* fwupd_client_set_user_agent_for_package:
|
* fwupd_client_set_user_agent_for_package:
|
||||||
* @self: A #FwupdClient
|
* @self: A #FwupdClient
|
||||||
|
@ -355,6 +355,7 @@ void fwupd_client_set_feature_flags_async (FwupdClient *self,
|
|||||||
gboolean fwupd_client_set_feature_flags_finish (FwupdClient *self,
|
gboolean fwupd_client_set_feature_flags_finish (FwupdClient *self,
|
||||||
GAsyncResult *res,
|
GAsyncResult *res,
|
||||||
GError **error);
|
GError **error);
|
||||||
|
const gchar *fwupd_client_get_user_agent (FwupdClient *self);
|
||||||
void fwupd_client_set_user_agent (FwupdClient *self,
|
void fwupd_client_set_user_agent (FwupdClient *self,
|
||||||
const gchar *user_agent);
|
const gchar *user_agent);
|
||||||
void fwupd_client_set_user_agent_for_package(FwupdClient *self,
|
void fwupd_client_set_user_agent_for_package(FwupdClient *self,
|
||||||
|
@ -616,3 +616,9 @@ LIBFWUPD_1.5.1 {
|
|||||||
fwupd_device_add_child;
|
fwupd_device_add_child;
|
||||||
local: *;
|
local: *;
|
||||||
} LIBFWUPD_1.5.0;
|
} LIBFWUPD_1.5.0;
|
||||||
|
|
||||||
|
LIBFWUPD_1.5.2 {
|
||||||
|
global:
|
||||||
|
fwupd_client_get_user_agent;
|
||||||
|
local: *;
|
||||||
|
} LIBFWUPD_1.5.1;
|
||||||
|
Loading…
Reference in New Issue
Block a user