summaryrefslogtreecommitdiff
path: root/engine/dconf-engine.h
Commit message (Collapse)AuthorAgeFilesLines
* gdbus: Unref cached GDBusConnection objects when the connection is closedAndre Moreira Magalhaes2019-08-071-0/+11
| | | | | | | | | | | | | | | | | This change fixes the dbus-leak tests by dropping the cached GDBusConnection objects references when the bus connection is closed. The issue was introduced with recent changes made to GLib[1] where invoking g_test_dbus_down() will fail after a timeout if the GDBusConnection object for the session bus leaks. Given g_test_dbus_down() will first close the connection before checking for leaks unreffing the object when the connection is closed should fix the issue. [1] https://gitlab.gnome.org/GNOME/glib/merge_requests/963 Signed-off-by: Andre Moreira Magalhaes <andre@endlessm.com>
* Engine: extend subscriptions state to account for multiple client ↵Daniel Playfair Cal2018-08-141-11/+0
| | | | | | | | | | | | | | subscriptions to the same path Remove accidental whitespace change Simplify branching in watch_fast and unwatch_fast Indentation fixes Store the subscription counts directly in the hash table pointer instead of mallocing ints Add documentation comments for new utility functions
* Engine: track in progress watch handles to avoid spurious changed signals ↵Daniel Playfair Cal2018-07-131-0/+11
| | | | for the root path
* engine: some internal const-correctness changesAllison Ryan Lortie2015-12-161-1/+1
| | | | | | | There is no reason that the read_through queue should not be 'const', so expose it as such. https://bugzilla.gnome.org/show_bug.cgi?id=759128
* engine: merge _read and _read_user_value()Allison Ryan Lortie2015-12-161-5/+2
| | | | | | | Delete the separate dconf_engine_read_user_value() and merge its functionality into dconf_engine_read() by adding a flags field. https://bugzilla.gnome.org/show_bug.cgi?id=759128
* engine, client: add list_locks() operationAllison Ryan Lortie2015-11-301-0/+5
| | | | | | | Add an API to dconf-engine (and exposed via DConfClient) for getting a list of locks that are present in a given dconf profile. https://bugzilla.gnome.org/show_bug.cgi?id=758864
* Updated FSF's addressDaniel Mustieles2014-01-311-3/+1
|
* engine: add support for WritabilityNotifyRyan Lortie2013-11-261-0/+1
| | | | | Wire through WritabilityNotify signals from the engine. This has been unimplemented for a very long time...
* engine: add 'profile' argument to constructorRyan Lortie2013-11-261-1/+2
| | | | | | | Allow specifying a profile when calling dconf_engine_new(). This will allow us to avoid setting/unsetting the DCONF_PROFILE environment in testcases from contexts where other threads may be reading from the environment.
* Add DCONF_ERROR error domainRyan Lortie2013-11-251-8/+0
| | | | | | | | | Add a DCONF_ERROR error domain with associated DConfError enum type. Use this instead of the adhoc approach that we've been taking up to this point. https://bugzilla.gnome.org/show_bug.cgi?id=704638
* GSettings: implement _read_user_value()Ryan Lortie2013-10-281-0/+5
| | | | | | | | | | | | Implement g_settings_backend_read_user_value() in DConfSettingsBackend. This will help us support g_settings_get_user_value() properly. We add a new engine API to support this as well. It takes a read_through queue, even though we don't bother using that from DConfSettingsBackend. https://bugzilla.gnome.org/show_bug.cgi?id=668233
* engine/: drop DConfChangesetListRyan Lortie2012-10-021-2/+2
| | | | | | It's really just a GQueue... https://bugzilla.gnome.org/show_bug.cgi?id=685316
* engine: bring back origin_tag logicRyan Lortie2012-07-151-0/+2
| | | | | | | | | The GSettings backend still wants to use this and it does us no harm to have it on the engine API (which is only visible internally). Adjust the various consumers of the engine to the new API. Thanks to Rui Matos for reminding me about this...
* dbus test: add function to initialise for testingRyan Lortie2012-07-111-0/+2
| | | | | | | We were hardcoding g_type_init() in the D-Bus testcase because the GDBus backend depended on that happening. That is not true for the libdbus-1 backend, so split it out into a separate function implemeneted by the backend.
* engine: add dconf_call_handle_get_expected_type()Ryan Lortie2012-07-111-0/+2
| | | | | | We were storing the expected type of the reply in the call handle already but not really doing anything with it. Provide an API to access it.
* Reimplement sync() functionalityRyan Lortie2012-07-101-0/+4
| | | | | | | | | Add dconf_engine_sync() that does the same thing as the code in the GSettings backend used to do, in a cleaner way. Update the GSettings backend to use the new call. Add a new call to DConfClient wrapping the engine call as well.
* Implement change signalsRyan Lortie2012-07-021-2/+3
| | | | | | | | | | | | | | | | Support receiving and properly exposing change notifications. This required some changes to improve the thread-safety of destroying a DConfEngine. It is possible that a signal would be arriving (in the worker thread) at the exact instant that a DConfEngine was being destroyed (from the finalize of the DConfClient or DConfSettingsBackend). This could lead to the object being accessed after it was finalized. We can avoid this by using weak references and by being more careful about when the DConfEngine is freed (by taking a ref to it in the signal handler and releasing it when done).
* Massively reorganise the client-sideRyan Lortie2012-07-021-87/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit represents a rather complete rethinking of DConfEngine. - the different kinds of sources are now properly abstracted. This will make landing NFS support substantially easier. - there is now substantially more internal documentation - DConfEngineMessage is gone and replaced with ordinary function calls to be implemented by the D-Bus glue code - the GDBus glue has been factored out and is now shared between the client library and GSettings - the "outstanding" queue logic from the GSettings backend is now in the engine - all changes now go through a single API that accepts a (new) DConfChangeset object. Currently this only supports the current operations (ie: setting and resetting). In the future this object will also support the directory operations required by GSettingsList and will be the basis for the new approach to implementing the 'delayed' GSettingsBackend (which will be the method by which those two concepts can co-exist). The (internal) API of the engine changed substantially. This caused the following: - the libdconf client library has been rewritten in C. Most of the complicated aspects of it (that made it more convenience to use Vala) are now gone. - during the rewrite of libdconf, the DConfClient API changed a bit to look more like a proper GObject. It now makes GIO-style use of thread-default main contexts and uses GObject signals for notifications (instead of hand-rolled callbacks). - the GSettings backend has been substantially simplified (the "outstanding" logic is gone). No externally-visible changes. - the dbus-1 backend has taken a copy of the old engine code for now until it can be ported to the new engine and sufficiently tested. No externally-visible changes. - the dconf commandline tool and dconf-editor required minor changes to adjust to the DConfClient API changes There is a substantial amount of cleaning up and finishing of work to be done. There are many stubs remaining. There are likely still a large number of bugs.
* engine: drop some dead filesRyan Lortie2012-02-051-3/+0
|
* drop unused dconf_engine_interpret_reply()Ryan Lortie2011-10-191-8/+0
|
* Remove "service func" logicRyan Lortie2011-09-111-5/+1
| | | | | | This was required to support the case where the dconf client was unable to determine the cache directory for itself. Since we now use the XDG runtime directory, this is redundant.
* Remove 'set lock' support from dconfRyan Lortie2011-09-111-6/+0
| | | | | | | | | | | | | | | | | | The dconf service can not presently be run at the system level and it doesn't make sense to support locks on user-level databases. It also became clear that most distributors and sysadmins would rather work directly with text files anyway, so we supported that directly instead. For this reason, 'set lock' support has never been properly implemented. All the plumbing was added for it though, which means we have it appearing on the API of the client library and documented in the help of the commandline tool. This is misleading, since these functions do nothing at all (and actually contain bugs anyway since their do-nothingness was never actually tested). For now, we rip out these functions. We can add them back later if we decide to support this properly.
* client-side lockdown supportRyan Lortie2011-05-061-0/+6
| | | | | | | | | Support lockdown on the client side for GSettings. For performance reasons only lockdown of specific keys (not entire subpaths) is supported at the moment. This may change in the future if we can find a way to make large numbers of related GVDB lookups sufficiently performant.
* Add G_GNUC_INTERNAL to symbolsRyan Lortie2011-01-251-0/+20
| | | | We're being sloppy about symbol exports. Clean that up.
* Reduce GDBus abuseRyan Lortie2010-12-181-9/+37
| | | | Use our own private thread instead
* More cleanups and gtk-doc fill-inRyan Lortie2010-08-031-3/+1
|
* set_lock -> set_locked and cleanup gtk-docRyan Lortie2010-08-031-1/+1
| | | | | | | | Rename set_lock to set_locked again (and same SetLock -> SetLocked). Add missing gtk-doc bits, clean up some that are no longer there. Bump gtk-doc dependency.
* port client library to ValaRyan Lortie2010-07-191-15/+20
| | | | | | | | | | | | - the API is now completely implemented - update 'engine' API to be vala-bindable without annotations - update GSettings backend to new engine API - drop the readtype non-sense - build/api fixups for editor and commandline tool
* header cleanupRyan Lortie2010-07-181-3/+24
|
* assorted client API cleanups, vala port of 'dconf'Ryan Lortie2010-07-181-2/+2
|
* Actually read from system databasesRyan Lortie2010-07-181-0/+1
|
* Many improvementsRyan Lortie2010-07-151-3/+6
| | | | | | | | | | | | | | | | | | | | | | | - support the notion of 'profiles' This is how we will configure layering of databases in dconf. It's not wired-up yet (except to choose the name of the user database). - support multiple writers in the service Using the (very freshly API-broken) GDBus subtree support. Introspection returns the names of existing databases, but any object path can be used to create a new database. - support the start of the 'shm' file Used to prevent the reader from reopening the gvdb every time. dconf reads now involve zero system calls in the usual case. The server is queried on startup for the location of the shm files. By default, this is in ~/.cache/dconf/ for now. This won't work properly on NFS, but it's a start.
* Switch from sequence numbers to tag stringsRyan Lortie2010-06-101-1/+9
|
* 'list' updatesRyan Lortie2010-05-241-1/+2
| | | | | - move to new GSettingsBackend API - add 'length' parameter, update callers
* Adapt to GDBus API changesRyan Lortie2010-05-241-1/+1
|
* proper CFLAGS, distcheck fixesRyan Lortie2010-05-231-3/+12
|
* more client library API, exposed by cmdline toolRyan Lortie2010-05-231-8/+2
|
* begin laying async support for DConfClientRyan Lortie2010-05-231-7/+7
|
* flesh out the APIs a bitRyan Lortie2010-05-231-9/+13
| | | | | - add a sync set() call to client API - GCancellable/GErrorify some APIs
* refactor, add client library, add 'dconf' commandRyan Lortie2010-05-221-10/+3
| | | | Only very preliminary functionality for all of these.
* rename client to engineRyan Lortie2010-05-211-0/+74