FCmdrServiceBackend

FCmdrServiceBackend — Backend to parse and apply settings

Functions

Properties

FCmdrService * service Read / Write / Construct Only

Types and Values

Object Hierarchy

    GObject
    ╰── FCmdrServiceBackend

Description

A FCmdrServiceBackend parses and applies a section of “settings” data from a FCmdrProfile for a specific desktop configuration system or application.

Functions

fcmdr_service_backend_ref_service ()

FCmdrService *
fcmdr_service_backend_ref_service (FCmdrServiceBackend *backend);

Returns the FCmdrService that instantiated the backend .

The returned FCmdrService is referenced for thread-safety and must be unreferenced with g_object_unref() when finished with it.

Parameters

backend

a FCmdrServiceBackend

 

Returns

a referenced FCmdrService


fcmdr_service_backend_dup_settings ()

JsonNode *
fcmdr_service_backend_dup_settings (FCmdrServiceBackend *backend,
                                    FCmdrProfile *profile);

Convenience function extracts raw JSON data for backend from profile . It does this by matching the backend 's extension name to a member name in the profile 's “settings” data. If no match is found, the function returns NULL. Free the returned JsonNode with json_node_free().

Parameters

backend

a FCmdrServiceBackend

 

profile

a FCmdrProfile

 

Returns

a JsonNode containing settings data, or NULL


fcmdr_service_backend_has_settings ()

gboolean
fcmdr_service_backend_has_settings (FCmdrServiceBackend *backend,
                                    FCmdrProfile *profile);

Convenience function checks whether profile has settings for backend . It does this by matching the backend 's extension name to a member name in the profile 's “settings” data. If a match is found the function returns TRUE.

Parameters

backend

a FCmdrServiceBackend

 

profile

a FCmdrProfile

 

Returns

whether profile has settings for backend


fcmdr_service_backend_apply_profiles ()

void
fcmdr_service_backend_apply_profiles (FCmdrServiceBackend *backend,
                                      GList *profiles);

Applies settings specific to backend from the list of profiles so they take effect. This operation can be expensive, so it's typically only called once after all profiles from all profile sources are loaded.

Parameters

backend

a FCmdrServiceBackend

 

profiles

a GList of FCmdrProfile instances

 

fcmdr_service_backend_filter_profiles ()

GList *
fcmdr_service_backend_filter_profiles (FCmdrServiceBackend *backend,
                                       GList *profiles);

Filters the profiles list, keeping only FCmdrProfile instances that have settings for backend . Discarded FCmdrProfile instances in the list are unreferenced with g_object_unref().

Parameters

backend

a FCmdrServiceBackend

 

profiles

a GList of FCmdrProfile instances

 

Returns

the (possibly changed) start of the profiles list

Types and Values

FCMDR_SERVICE_BACKEND_EXTENSION_POINT_NAME

#define FCMDR_SERVICE_BACKEND_EXTENSION_POINT_NAME "fcmdr-service-backend"

Extension point for handling different types of settings.

When registering extensions for this extension point, the extension name should match a member name that occurs in the “settings” data of a FCmdrProfile, like "org.gnome.gsettings".


struct FCmdrServiceBackend

struct FCmdrServiceBackend;

Contains only private data that should be read and manipulated using the functions below.

Property Details

The “service” property

  “service”                  FCmdrService *

The owner of this backend instance.

Flags: Read / Write / Construct Only