Normally it shouldn't matter too much, but the GIR parser apparently
doesn't like it:
```
/home/niels/gnome/libsecret/libsecret/secret-schema.h:75: syntax error, unexpected ';' in ';' at ';'
/home/niels/gnome/libsecret/libsecret/secret-prompt.h:78: syntax error, unexpected ';' in ';' at ';'
/home/niels/gnome/libsecret/libsecret/secret-value.h:54: syntax error, unexpected ';' in ';' at ';'
/home/niels/gnome/libsecret/libsecret/secret-service.h:307: syntax error, unexpected ';' in ';' at ';'
/home/niels/gnome/libsecret/libsecret/secret-collection.h:176: syntax error, unexpected ';' in ';' at ';'
/home/niels/gnome/libsecret/libsecret/secret-item.h:194: syntax error, unexpected ';' in ';' at ';'
```
g_autoptr() is a macro that was defined in GLib 2.44 that allows for
basic auto-cleanup of variables. One way to add this kind of support
would be through the use of e.g. `G_DECLARE_DERIVABLE_TYPE()` for our
declarations, but this would consitute an ABI break (due to the
`...Private *` field in the public structs). Instead, we can use
`G_DEFINE_AUTOPTR_CLEANUP_FUNC` to manually declare this.
This commit also bumps the minimally required GLib version to 2.44
Initialize the schema_name so that NULL is returned when the schema name
is absent, instead of an uninitialized memory. Mark return value as
nullable to indicate this for introspection and documentation.
Previously there were no functions in the simple API that return the
matched attributes other than the secret value, while there were needs
for augumenting user input with additional information (such as
completing web forms).
This adds a set of functions which wrap secret_service_search*. Note
that the return value is a list of GHashTable not of SecretItem,
because SecretItem is a subclass of GDBusProxy, which we don't want to
expose from the simple API.
Fixes#16
The SECRET_SCHEMA_* extern structs are not introspectable; add a new
accessor function which takes an enum and returns a struct, which is
introspectable.
Mark the old extern structs as (skip), but don’t deprecate them because
they’re still useful from C (if unconventional).
Signed-off-by: Philip Withnall <withnall@endlessm.com>
https://bugzilla.gnome.org/show_bug.cgi?id=697681
If the gnome-keyring D-Bus service is not responding, we wind up freeing
the SearchClosure in an error path without ever creating a SecretService
object. Guard against this.
https://bugzilla.gnome.org/show_bug.cgi?id=787391