summaryrefslogtreecommitdiff
path: root/common
Commit message (Collapse)AuthorAgeFilesLines
* common: Add missing G_BEGIN/END_DECLSwip/issue-23Christian Persch2021-03-033-0/+12
| | | | Fixes: https://gitlab.gnome.org/GNOME/dconf/-/issues/23
* common: factor out dconf_gvdb_utils_table_from_changesetDaniel Playfair Cal2020-12-192-2/+12
|
* common: factor out dconf_gvdb_utils_changeset_from_tableDaniel Playfair Cal2020-12-192-27/+36
|
* move dconf-gvdb-utils from service into commonDaniel Playfair Cal2020-12-193-2/+255
|
* build: Remove libdconf-common-hiddenIñigo Martínez2020-12-191-14/+0
| | | | | | | | | | | `libdconf-common-hidden` is built to hide symbols not necessary in the `gsettings` gio module that only needs to expose `g_io_module_[load|query|unload]` symbols. To achieve this a symbol map along with `version-script` linker flag is used. Thanks to this only the necessary symbols are exposed, building `libdconf-common-hidden` static library is not necessary anymore and the existing dependencies can be used.
* build: Improve libdconf visible symbolsIñigo Martínez2020-12-191-1/+1
| | | | | | | | | | | | | | | | One of the changes in c50f3758d3e5da4f8b244227b211c3c3f454275c that was part of the GNOME/dconf!11 merge request, removed the list of libraries `libdconf` linked with. This was overlooked because meson build files used the same `deps` variable in several files and this make `libdconf` library function to use dependencies from `gsettings` library. Due to this, only `dconf_client_*` symbols where visible in `libdconf`. The set of libraries to link with in `libdconf` has been restored so now all the necessary symbols are visible again. The `link_whole` parameter in both `libdconf_client_dep` and `libdconf_common_dep` has been changed back to `link_with`.
* Changeset: make dconf_changeset_filter_changes filter out key/path resets ↵Daniel Playfair Cal2019-12-291-4/+34
| | | | when appropriate
* Service: filter changesets when performing writes such that changed events ↵Daniel Playfair Cal2019-12-292-15/+58
| | | | are only emitted if new values differ from existing values
* build: Enable G_LOG_USE_STRUCTURED=1Philip Withnall2018-08-161-6/+2
| | | | | | | This enables structured logging for all parts of dconf, which will make it easier to check for certain log messages in the unit tests. Signed-off-by: Philip Withnall <withnall@endlessm.com>
* Use the correct Meson argument for linkingEmmanuele Bassi2018-08-111-1/+1
| | | | | | | | | | | | | Some of the internal static libraries in dconf implement public symbols. This means that they must be linked using `link_whole`, to prevent the linker from hiding unused symbols in there when building the shared libdconf.so. This fixes the build of projects using the dconf API directly, like dconf-editor, in GNOME Continuous. Reviewed-by: nobody Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>
* build: Add trailing commas where necessaryIñigo Martínez2018-08-111-7/+7
| | | | | | Having trailing commas in place means that if another source file or parameter is added to the end of the list or function, there won't be noise when adding the comma to the line above.
* build: Do not make heavy use of project_nameIñigo Martínez2018-08-111-6/+4
| | | | | | | | | The current meson build files make heavy use of meson's `project_name` function. However this makes difficult for any developer to find for given program/library/file names. The project name is also never going to change. Due to this reason these calls have been changed for `dconf` itself.
* build: Fix internal dependenciesIñigo Martínez2018-08-111-0/+10
| | | | | | | | | meson is able to generate internal dependencies for handling built libraries. These internal dependencies depend on other dependencies as well, based on the includes exposed by their headers. This have been fixed by using proper internal dependencies for these libraries.
* build: Avoid building libraries twiceIñigo Martínez2018-08-111-8/+0
| | | | | | | | | | | dconf builts a number of internal static libraries which in some cases are duplicated. This duplication comes from autotools that used to built two libraries for each library, one with PIC enabled and the other one without it. This has been changed to build only one library for each library to be built, except `libdconf-common-hidden` which hides some symbols for the GIO module to be built.
* build: Use get_supported_arguments helperIñigo Martínez2018-08-111-5/+1
| | | | | | | | | meson 0.43.0 comes with a new function in the compiler's object called `get_supported_arguments`, which allows checking multiple optiones at once. This patch bumps meson's version number and also takes advantage of this new feature.
* Add some transfer annotationsXavier Claessens2018-08-081-15/+17
| | | | | | | (Expanded by Philip Withnall <withnall@endlessm.com> to add more annotations and fix prior review comments.) https://bugzilla.gnome.org/show_bug.cgi?id=758903
* Remove .gitignore filesIñigo Martínez2017-10-221-3/+0
| | | | | | | | | | meson does not allow to build source code inside the source code tree, for this reason there is no need for .gitignore files to ignore built files. This patch removes .gitignore files which are no longer needed. https://bugzilla.gnome.org/show_bug.cgi?id=784910
* build: Remove autotoolsIñigo Martínez2017-10-171-23/+0
| | | | | | | To avoid the burden of maintaining multiple build systems, this patch removes autotools support. https://bugzilla.gnome.org/show_bug.cgi?id=784910
* build: Port to meson build systemIñigo Martínez2017-10-172-0/+56
| | | | | | | | meson is a build system focused on speed an ease of use, which helps speeding up the software development. This patch adds meson support along autotools. https://bugzilla.gnome.org/show_bug.cgi?id=784910
* DConfChangeset: add missing 'static' on functionAllison Ryan Lortie2015-12-161-1/+1
|
* engine: add DCONF_READ_DEFAULT_VALUE flagAllison Ryan Lortie2015-12-161-0/+1
| | | | | | | | Add a flag that allows checking the default value without constructing a read_through queue. Make use of this new flag to simplify code in a couple of places. https://bugzilla.gnome.org/show_bug.cgi?id=759128
* engine: merge _read and _read_user_value()Allison Ryan Lortie2015-12-161-0/+6
| | | | | | | 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
* common: rename dconf-error.h to dconf-enums.hAllison Ryan Lortie2015-12-164-3/+3
| | | | | | This will soon contain an extra enum. https://bugzilla.gnome.org/show_bug.cgi?id=759128
* Modernise the headers of dconf-clientAllison Ryan Lortie2015-11-301-0/+2
| | | | | | | Add support for g_autoptr() on DConfClient and DConfChangeset. Switch to using G_DECLARE_FINAL_TYPE in the declaration of DConfClient. https://bugzilla.gnome.org/show_bug.cgi?id=758871
* DConfChangeset: implement dir resets properlyAllison Ryan Lortie2015-11-301-12/+45
| | | | | | | | | | | | | | | | | | If a dir is reset against a DConfChangeset then the result ought to be that all keys under that dir read as NULL (until such a time as they are set to a new value). This is consistent with the (existing) behaviour that a key will read as NULL if it, itself, was reset. In order to make that efficient, we create a separate GHashTable to serve as a cache of all of the directories that have been reset and iterate it whenever we do a key lookup that doesn't have a direct hit. We update (and expand) the test case to reflect this new reality -- the tests actually had a case that relied on the inconsistent behaviour. https://bugzilla.gnome.org/show_bug.cgi?id=744678
* Updated FSF's addressDaniel Mustieles2014-01-316-18/+6
|
* Add DCONF_ERROR error domainRyan Lortie2013-11-254-3/+95
| | | | | | | | | 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
* Add missing "config.h" include everywhereRyan Lortie2013-11-242-0/+4
| | | | We ought to be including this from each .c file.
* DConfChangeset: expose concept of "sealing"Ryan Lortie2013-06-252-6/+45
| | | | | | | | | | | | | | | | DConfChangeset is a partially threadsafe type. when first created, it is mutable and can only be used from one thread. After it is filled in, the intention is that it can be shared between threads as long as it isn't changed. Previously, this transition was made when dconf_changeset_describe() was called. After that, it was not possible to make any more changes. Formalise and document this concept and add an explicit call for it: dconf_changeset_seal(). https://bugzilla.gnome.org/show_bug.cgi?id=703073
* Use G_LOG_DOMAIN in all library componentsRyan Lortie2013-02-211-1/+1
|
* small docs fixesRyan Lortie2013-02-111-1/+1
|
* docs/comments: make some corrections/updatesRyan Lortie2013-02-112-6/+7
| | | | | Many fixes for typos but also some adjustments for the recent refactoring (particularly updating HACKING).
* changeset: add a diff() operation on databasesRyan Lortie2013-01-112-0/+76
|
* DConfChangeset: add "database mode" and change()Ryan Lortie2012-11-082-4/+131
| | | | | | | | | | | | Add a new mode for DConfChangeset to represent the entire contents of a dconf database. Also add a dconf_changeset_change() call to either merge changesets or apply a changeset to a database-mode changeset. Doing this allows us to have only one instance of the algorithm to deal with resets (ie: when resetting '/a/' we must reset all keys starting with '/a/').
* Add dconf_changeset_is_empty()Ryan Lortie2012-10-232-0/+16
|
* tweak public header installationRyan Lortie2012-07-152-5/+6
| | | | | Colin noticed that this was totally broken (from an ostree build). Fix it up.
* DConfChangeset: pointless fiddling with assertsRyan Lortie2012-07-101-2/+3
| | | | | | Adjust the way that an assert is done in order to convince lcov that we have 100% line coverage (since the 'g_assert_not_reached()' wasn't being hit before).
* big docs cleanupRyan Lortie2012-07-104-97/+208
| | | | We're now back at 100% docs coverage with no warnings.
* common/: make 'hidden' variant of libdconf-commonRyan Lortie2012-07-082-1/+5
| | | | | | Compile a version of libdconf-common.a with -fvisibility=hidden. This is included in the GSettings backend to prevent leaking the dconf client library symbols into the global namespace.
* massive Makefile reorganisationRyan Lortie2012-07-081-3/+2
| | | | | | | | | | Clean up the Makefiles and make them as similar as possible. Move CFLAGS to a common point of definition and stop using -I so much. Replace the 'dbus stub' with libdconf-mock.a in tests/. Fill in some stubs for future mock code for shm and gvdb (just to get things compiling for now).
* clean up and factor out the 'shm' codeRyan Lortie2012-07-083-68/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the shm code from the engine and the service and put it in a separate convenience library in shm/. Remove the vestigial shmdir weirdness from the service (since shmdir is now always relative to XDG_RUNTIME_DIR and has been for some time). The purpose of this is so that dconf-engine can be properly unit-tested. dconf-engine now has five points of contact with the world (excluding the users of the engine themselves): - the DCONF_PROFILE environment variable - fopen() of profile files - shm - gvdb - dbus The environment variable is quite easily controlled. fopen() is intercepted in the engine testcase with a interpose of the libc symbol. With this commit now each of dbus, gvdb and shm are implemented in separate utility modules that can be mocked from the testcases.
* dconf_changeset_set: support resetting pathsRyan Lortie2012-07-061-8/+32
| | | | | When someone resets a path with dconf_changeset_set(), delete all keys that are currently under that path in the changeset.
* dconf_changeset_get: allow NULL value out argumentRyan Lortie2012-07-061-1/+3
| | | | | We may be interested in only checking the return value for if a key exists or not.
* DConfChangeset: fix bugs found by testRyan Lortie2012-07-061-3/+17
| | | | Fix a few bugs found by the new testcase.
* .gitignore for common/, gdbus/ and engine/Ryan Lortie2012-07-061-0/+2
|
* DConfChangeset: remove some debug stdout noiseRyan Lortie2012-07-061-9/+0
|
* add gtester supportRyan Lortie2012-07-061-0/+2
|
* Massively reorganise the client-sideRyan Lortie2012-07-022-1/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Add DConfChangeset utility class to common/Ryan Lortie2012-07-013-0/+475
|
* common/: create two convenience librariesRyan Lortie2012-07-011-4/+11
| | | | | | | One -fPIC and one without. This is done instead of pulling the various source files from other Makefiles.