Commit Graph

7 Commits

Author SHA1 Message Date
Julian Bouzas
464f1de641 m-default-nodes: free default nodes when disabling plugin 2021-06-07 11:33:21 -04:00
George Kiagiadakis
38f7483793 state: remove support for groups and propagate save errors
There is no real use for groups in our API. Just use the name of
the file as the default group and be done with it...
Storing multiple groups with this API is problematic because it
forces flushing the file to disk multiple times, one for each group,
and it's just more performant if we use a prefix in the keys
to implement some form of logical separation.

This commit also makes the GKeyFile a temporary object. As we
always load the file from the file system in _load()
and we always replace its contents with a new dictionary in _save(),
there is no point in keeping the keyfile's internal data structures
stored in memory.

Save errors are now also propagated to adhere to the programming
practices of GObject
2021-06-04 18:36:19 +03:00
George Kiagiadakis
9a103c5787 m-default-nodes: restore configured values on the metadata at startup 2021-03-31 15:20:06 +03:00
George Kiagiadakis
0ecefcb55d policy-node: use default-nodes-api plugin 2021-03-31 13:10:13 +03:00
George Kiagiadakis
8cf8eb6b76 m-default-nodes: move common code to a new header 2021-03-31 13:10:13 +03:00
George Kiagiadakis
0a53ddd4ad m-default-nodes: add properties to control storage method and interval
Do not use WpState at all when use-persistent-storage=FALSE; keep all
the configured default nodes in memory and forget them upon restart
2021-03-31 13:10:13 +03:00
George Kiagiadakis
a0876bb275 modules: rename default-metadata to default-nodes and enable it always in the config 2021-03-31 13:10:13 +03:00