| Top |
GsPluginLoader * gs_plugin_loader_new (GDBusConnection *session_bus_connection,GDBusConnection *system_bus_connection);
Create a new GsPluginLoader.
The D-Bus connection arguments should typically be NULL, and only be
non-NULL when doing unit tests.
session_bus_connection |
a D-Bus session bus
connection to use, or |
[nullable][transfer none] |
system_bus_connection |
a D-Bus system bus
connection to use, or |
[nullable][transfer none] |
Since: 43
void gs_plugin_loader_job_process_async (GsPluginLoader *plugin_loader,GsPluginJob *plugin_job,GCancellable *cancellable,GAsyncReadyCallback callback,gpointer user_data);
This method calls all plugins.
If the GsPluginLoader is still being set up, this function will wait until setup is complete before running.
GsAppList * gs_plugin_loader_job_process_finish (GsPluginLoader *plugin_loader,GAsyncResult *res,GError **error);
gboolean gs_plugin_loader_job_action_finish (GsPluginLoader *plugin_loader,GAsyncResult *res,GError **error);
void gs_plugin_loader_setup_async (GsPluginLoader *plugin_loader,const gchar * const *allowlist,const gchar * const *blocklist,GCancellable *cancellable,GAsyncReadyCallback callback,gpointer user_data);
Sets up the plugin loader ready for use.
plugin_loader |
||
allowlist |
list of plugin names, or |
|
blocklist |
list of plugin names, or |
|
cancellable |
A GCancellable, or |
|
callback |
callback to indicate completion of the asynchronous operation |
|
user_data |
data to pass to |
Since: 42
gboolean gs_plugin_loader_setup_finish (GsPluginLoader *plugin_loader,GAsyncResult *result,GError **error);
Finish an asynchronous setup operation started with
gs_plugin_loader_setup_async().
plugin_loader |
||
result |
result of the asynchronous operation |
|
error |
return location for a GError, or |
Since: 42
void gs_plugin_loader_shutdown (GsPluginLoader *plugin_loader,GCancellable *cancellable);
Shut down the plugins.
This blocks until the operation is complete. It may be refactored in future to be asynchronous.
Since: 42
gboolean gs_plugin_loader_get_enabled (GsPluginLoader *plugin_loader,const gchar *plugin_name);
void gs_plugin_loader_add_location (GsPluginLoader *plugin_loader,const gchar *location);
void gs_plugin_loader_set_scale (GsPluginLoader *plugin_loader,guint scale);
GsAppList *
gs_plugin_loader_get_pending (GsPluginLoader *plugin_loader);
gboolean
gs_plugin_loader_get_allow_updates (GsPluginLoader *plugin_loader);
gboolean
gs_plugin_loader_get_network_available
(GsPluginLoader *plugin_loader);
gboolean
gs_plugin_loader_get_network_metered (GsPluginLoader *plugin_loader);
gboolean
gs_plugin_loader_get_power_saver (GsPluginLoader *plugin_loader);
gboolean
gs_plugin_loader_get_game_mode (GsPluginLoader *plugin_loader);
gboolean gs_plugin_loader_get_plugin_supported (GsPluginLoader *plugin_loader,const gchar *function_name);
This function returns TRUE if the symbol is found in any enabled plugin.
GPtrArray *
gs_plugin_loader_get_plugins (GsPluginLoader *plugin_loader);
Get the set of currently loaded plugins.
This includes disabled plugins, which should be checked for using
gs_plugin_get_enabled().
This is intended to be used by internal gnome-software code. Plugin and UI code should typically use GsPluginJob to run operations.
Since: 42
void gs_plugin_loader_add_event (GsPluginLoader *plugin_loader,GsPluginEvent *event);
GPtrArray *
gs_plugin_loader_get_events (GsPluginLoader *plugin_loader);
Gets all plugin events, even ones that are not active or visible anymore.
GsPluginEvent *
gs_plugin_loader_get_event_default (GsPluginLoader *plugin_loader);
Gets an active plugin event where active means that it was not been already dismissed by the user.
void
gs_plugin_loader_remove_events (GsPluginLoader *plugin_loader);
Removes all plugin events from the loader. This function should only be called from the self tests.
void gs_plugin_loader_app_create_async (GsPluginLoader *plugin_loader,const gchar *unique_id,GCancellable *cancellable,GAsyncReadyCallback callback,gpointer user_data);
Create a GsApp identified by unique_id
asynchronously.
Finish the call with gs_plugin_loader_app_create_finish().
If the GsPluginLoader is still being set up, this function will wait until setup is complete before running.
plugin_loader |
||
unique_id |
a unique_id |
|
cancellable |
a GCancellable, or |
|
callback |
function to call when complete |
|
user_data |
user data to pass to |
Since: 41
GsApp * gs_plugin_loader_app_create_finish (GsPluginLoader *plugin_loader,GAsyncResult *res,GError **error);
Finishes call to gs_plugin_loader_app_create_async().
Since: 41
void gs_plugin_loader_get_system_app_async (GsPluginLoader *plugin_loader,GCancellable *cancellable,GAsyncReadyCallback callback,gpointer user_data);
Get the application that represents the currently installed OS
asynchronously. Finish the call with gs_plugin_loader_get_system_app_finish().
plugin_loader |
||
cancellable |
a GCancellable, or |
|
callback |
function to call when complete |
|
user_data |
user data to pass to |
Since: 41
GsApp * gs_plugin_loader_get_system_app_finish (GsPluginLoader *plugin_loader,GAsyncResult *res,GError **error);
Finishes call to gs_plugin_loader_get_system_app_async().
Since: 41
GsOdrsProvider *
gs_plugin_loader_get_odrs_provider (GsPluginLoader *plugin_loader);
Get the singleton GsOdrsProvider which provides access to ratings and reviews data from ODRS.
Since: 41
void
gs_plugin_loader_clear_caches (GsPluginLoader *plugin_loader);
GsPlugin * gs_plugin_loader_find_plugin (GsPluginLoader *plugin_loader,const gchar *plugin_name);
void gs_plugin_loader_set_max_parallel_ops (GsPluginLoader *plugin_loader,guint max_ops);
Sets the number of maximum number of queued operations (install/update/upgrade-download)
to be processed at a time. If max_ops
is 0, then it will set the default maximum number.
GsJobManager *
gs_plugin_loader_get_job_manager (GsPluginLoader *plugin_loader);
Get the job manager singleton.
Since: 44
GsCategoryManager *
gs_plugin_loader_get_category_manager (GsPluginLoader *plugin_loader);
Get the category manager singleton.
Since: 40
void gs_plugin_loader_claim_error (GsPluginLoader *plugin_loader,GsPlugin *plugin,GsPluginAction action,GsApp *app,gboolean interactive,const GError *error);
Convert the error
into a plugin event and add it to the queue.
The plugin
is used only if the error
contains a reference
to a concrete application, in which case any cached application
overrides the passed in app
.
The GS_PLUGIN_ERROR_CANCELLED and G_IO_ERROR_CANCELLED errors
are automatically ignored.
plugin_loader |
||
plugin |
a GsPlugin to get an application from, or |
[nullable] |
action |
a GsPluginAction associated with the |
|
app |
a GsApp for the event, or |
[nullable] |
interactive |
whether to set interactive flag |
|
error |
a GError to claim |
Since: 41
void gs_plugin_loader_claim_job_error (GsPluginLoader *plugin_loader,GsPlugin *plugin,GsPluginJob *job,const GError *error);
The same as gs_plugin_loader_claim_error(), only reads the information
from the job
.
plugin_loader |
||
plugin |
a GsPlugin to get an application from, or |
[nullable] |
job |
a GsPluginJob for the |
|
error |
a GError to claim |
Since: 41
gboolean gs_plugin_loader_app_is_valid (GsApp *app,GsPluginRefineFlags flags);
gboolean gs_plugin_loader_app_is_compatible (GsPluginLoader *plugin_loader,GsApp *app);
void gs_plugin_loader_run_adopt (GsPluginLoader *plugin_loader,GsAppList *list);
Call the gs_plugin_adopt_app() function on each plugin on each app in list
to try and find the plugin which should manage each app.
This function is intended to be used by internal gnome-software code.
Since: 42
void
gs_plugin_loader_emit_updates_changed (GsPluginLoader *self);
Emits the “updates-changed” signal in the nearest idle in the main thread.
Since: 43