summaryrefslogtreecommitdiff
path: root/gck
Commit message (Collapse)AuthorAgeFilesLines
* Stop using GSliceNiels De Graef2023-01-162-15/+15
| | | | | | | | | | | | GLib is discussing deprecating/removing it upstream [1] since it has only limited uses. Next to that, it seems to bork stack traces here when using ASAN (for which you also have to specify `G_SLICE=always-malloc` too). In other words, let's just get rid of using `GSLice` and call the allocation APIs directly. [1]: https://gitlab.gnome.org/GNOME/glib/-/issues/1079
* meson: fix GCK version macrosLubomir Rintel2022-08-081-3/+3
| | | | | | | | | | When build with meson, the GCK version macros went from indicating version 3.34.0 down to version 1.0.0, presumably accidentally. This is not great as it makes GCK_CHECK_VERSION() entirely useless. Let's make sure the newer version have higher version numbers again. Fixes: a705acc3640e ('Support Meson build system')
* Drop Gck list APINiels De Graef2022-07-1712-113/+43
| | | | | | | | | | gck provided some APIs that made working with lists of `GObject`s easier. GLib has for a long time added API that works well enough for the same use case, like `g_list_copy_deep()`, `g_list_free_full()` and more recently also `g_clear_list()`, so use those instead. This commit also bumps the required GLib version to a more modern 2.64 (which is needed for the `g_clear_list()` API).
* meson: Ensure the vala metadata is foundNiels De Graef2022-07-071-0/+0
|
* Drop remaning uses of strptime()Niels De Graef2022-07-071-1/+0
|
* egg: Drop usage of timegm in favor of GDateTimeNiels De Graef2022-07-075-32/+31
|
* gck: Drop pkcs11.vapinielsdg/pkcs11-drop-stuffNiels De Graef2022-06-242-52/+0
| | | | | | | | | It's a Vala-specific thing, and since the header file is coming from p11-kit (see also the previous commit), there's always a chance we ship an outdated version. Projects that were relying on the VAPI file should probably have their own copy, or someone should put it in vala-extra-vapis.
* gck: Drop pkcs11.hNiels De Graef2022-06-242-4/+0
| | | | | Stop shipping our own copy now that we're doing a version bump (see also https://bugzilla.gnome.org/show_bug.cgi?id=680271)
* Replace g_memdup with g_memdup2Niels De Graef2022-06-136-15/+15
|
* Remove symbols filesNiels De Graef2022-06-061-306/+0
| | | | They're unused and outdated.
* build: Make building the Vala bindings optionalMarvin Schmidt2022-04-291-10/+12
|
* meson: Specify version and soversion for all the librariesCorentin Noël2022-04-091-1/+2
| | | | Do not mismatch them.
* gck-password: Use G_DECLARE_FINAL_TYPE to declare the typeCorentin Noël2022-04-092-49/+23
|
* gck-object: Use G_DECLARE_DERIVABLE_TYPE to declare the typeCorentin Noël2022-04-093-92/+84
|
* gck-session: Use G_DECLARE_DERIVABLE_TYPE to declare the typeCorentin Noël2022-04-092-90/+96
|
* gck-slot: Use G_DECLARE_FINAL_TYPE to declare the typeCorentin Noël2022-04-093-62/+27
|
* gck-enumerator: Use G_DECLARE_FINAL_TYPE to declare the typeCorentin Noël2022-04-092-95/+68
| | | | Set the GMutex directly in the structure.
* gck-module: Use G_DECLARE_DERIVABLE_TYPE to declare the typeCorentin Noël2022-04-093-64/+55
|
* gck: Remove floating capabilities to GckAttributesCorentin Noël2022-04-0917-228/+98
| | | | | | | It is not necessary and makes it difficult to interact with GObject introspected languages. Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
* gck: Use the G_DEFINE_QUARK macroCorentin Noël2022-04-093-31/+6
| | | | Automatically define the error quark with this macro.
* gck: use the right namespace for GckUriData methodsCorentin Noël2022-04-095-46/+44
|
* gck: Remove authenticate_slot/object from GckModuleCorentin Noël2022-04-0913-395/+51
| | | | Also remove the compatibility test and objects.
* gcr: Update the inclusion guard to not mention gcr-baseCorentin Noël2022-04-091-0/+3
| | | | Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
* gck-object-cache: Use G_DECLARE_INTERFACE to define the interfaceCorentin Noël2022-04-094-37/+22
| | | | | | | This means that GckObjectCacheIface becomes GckObjectCacheInterface and GCK_OBJECT_CACHE_GET_INTERFACE becomes GCK_OBJECT_CACHE_GET_IFACE. Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
* gck: Remove deprecated headerCorentin Noël2022-04-0912-504/+10
|
* meson: Declare libversion variables and consistently use itCorentin Noël2022-04-081-6/+7
| | | | | | Do not rely on major_version to manually create the library names. Make sure to be consistent and use a single variable for all the library names and folder mentions.
* meson: Fix unknown kw argument in gnome.generate_girJakub Jirutka2022-01-121-1/+0
| | | | | | | | | | | | This argument has been removed in Meson 0.61.0: gck/meson.build:130:2: ERROR: gnome.generate_gir got unknown keyword arguments "packages" https://github.com/mesonbuild/meson/commit/f8fc5cb860465718fe7c79a1bf1fe00659f138de: > The packages argument to gnome.generate_gir was allowed, but never did anything, so stop passing it. Fixes #89
* gck: Fix several annotationsCorentin Noël2021-11-163-7/+7
|
* docs: fix gi-docgen annotationsAbderrahim Kitouni2021-11-141-1/+1
|
* docs: Port from gtk-doc to gi-docgenNiels De Graef2021-11-1011-454/+333
| | | | | | | | | | | | | | gtk-doc has been slowly dying for the past few years. With gi-docgen we have a clear successor in sight to replace the voodoo magic one needs to get the whole documentation setup. See the [gi-docgen tutorial] for more info on how the system works. Since we're now only the C compiler (and GIR) parse the C code, that means we can also get rid of all the special escapes for the # character in PKCS#11. [gi-docgen tutorial]: https://gnome.pages.gitlab.gnome.org/gi-docgen/tutorial.html
* Drop "volatile" for g_once_init_enter locationsbugfix/drop-volatileNiels De Graef2021-05-023-3/+3
| | | | | | | This fixes a few (fatal in gcc 11) warnings, breaking the CI. For the original discussion on why this change is needed, see https://gitlab.gnome.org/GNOME/glib/-/issues/600
* gck-call: Make the API more consistent, making it always handle GckCall pointersMarco Trevisan (Treviño)2021-01-197-71/+133
| | | | | Never return or expect arguments as paramter for gck_call_* functions, instead use gck_call_get_arguments to interact with them when needed
* gck-call: Move cb_object parameter to the async_ready functionsMarco Trevisan (Treviño)2021-01-197-60/+59
| | | | | This is to mimic GTask more and so we can avoid using a temporary task only for temporary storing an object pointer.
* gck-call: Simplify the code by using GTask based implementationMarco Trevisan (Treviño)2021-01-1911-300/+96
| | | | | | | | | | | | | | | | | | | | GckCall uses its own implementation of threads pool to handle the async calls, now that we've GTask this code can be simplified by reusing GLib code. I didn't want to change the API in this commit, even if private not to mix changes together, so the functions still are used as they used to be The main difference is that the async_pre and async_ready prepare a GTask instance, while the async_go starts a thread using the gtask function. Callback functions needed to be adapted to the new GAsyncResult type. Tests needed also some tuning as the underneath task holding a reference to the source object might be finalized at later stage, when the thread-related data is removed, as per this we may wait a bit to check whether a source object gets finalized, this is due to GNOME/GLib#1346.
* Remove Autotools buildNiels De Graef2021-01-161-260/+0
| | | | | We have a modern, saner build system in place with Meson, so let's drop autotools before releasing the next version of gcr.
* gck: Don't use g_assert() in testsNiels De Graef2021-01-159-601/+578
| | | | | | | `g_assert()` can be (accidentally) disabled if someone uses `G_DISABLE_ASSERT` when compiling gcr, so that renders most tests useless. As a nice side effect, we get better error report when something goes wrong in a test.
* gck-object-cache: Port to GTaskNiels De Graef2021-01-121-29/+24
|
* gck-slot: Port from GSimpleAsyncResult to GTaskNiels De Graef2021-01-121-20/+12
| | | | `GSimpleAsyncResult` is deprecated in favor of `GTask`.
* gck-slot: Add gck_slot_token_has_flags() functionMarco Trevisan (Treviño)2020-11-131-0/+39
| | | | | Given that gck_slot_has_flags changed meaning in the previous commit, add back a function that allows to get the slot token flags
* gck-slot: make gck_slot_has_flags to actually check the slot flagsMarco Trevisan (Treviño)2020-11-131-2/+2
| | | | | The function is meant (by name and documentation) to check the slot info flags, but instead it gets and checks the token tags.
* gck-slot: Fix warning string on GckTokenInfo failureMarco Trevisan (Treviño)2020-11-131-1/+1
|
* gck: Cleanup with G_DEFINE_BOXED_TYPENiels De Graef2020-03-315-117/+18
|
* gck-slot: Initialize struct tm to all-zeroesSimon McVittie2020-03-151-1/+3
| | | | | | | | | | | | If the format string for strptime() doesn't include a time zone, then the tm_isdst member will be left uninitialized (see NOTES in Linux strptime(3)). This means we will be off by an hour from the intended time if whatever arbitrary junk is on the stack happens to include a positive value for tm.tm_isdst. Resolves: https://gitlab.gnome.org/GNOME/gcr/issues/42 Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=953981 Signed-off-by: Simon McVittie <smcv@debian.org>
* gck-slot: Improve assertion checksSimon McVittie2020-03-151-50/+49
| | | | | | | | | | | | Make more use of g_assert_cmpint and friends so that the error message indicates more clearly what we were expecting and what we got. This also has the minor benefit that unlike g_assert(), the more test-oriented macros aren't disabled by G_DISABLE_ASSERT, so we don't need to worry about whether we are relying on their side-effects. Helps: #42 Signed-off-by: Simon McVittie <smcv@debian.org>
* Don't use functions which we deprecatedNiels De Graef2020-02-072-2/+2
|
* Mark deprecated functions with G_DEPRECATEDNiels De Graef2020-02-071-0/+21
| | | | | | | If we want applications to switch, deprecation warnings are a good way to make that happen. Fixes https://gitlab.gnome.org/GNOME/gcr/issues/36
* gck: Provide support for g_autoptr for all typesNiels De Graef2020-01-131-0/+32
|
* meson: Add missing feature test macro'sNiels De Graef2020-01-112-0/+3
| | | | | | We needed this for the call to `strptime()` and `timegm()`. Also once we missed a `#include <time.h>`
* meson: Fix pkgconfig RequiresNiels De Graef2020-01-041-0/+1
| | | | | | Meson isn't setting the "Requires" field, so we have to do it manually. Since we don't want to specify each dependency in `glib_deps` as a dependency, we also give each a separate variable.
* gck: Use G_PARAM_STATIC_STRINGSNiels De Graef2020-01-047-25/+39
| | | | | | This prevents some unnecessary string copies, resulting in less memory used and some unnecessary performance overhead being removed. Well, a little bit at least.