Commit Graph

100 Commits

Author SHA1 Message Date
Stef Walter
7098b856b7 Rename the functions that operate on a dbus item path
* They all contain '_dbus_path' in their name
 * Move secret_service_get_session_path() to the paths functionality
 * Move the secret_collection_new() and secret_item_new() functionality
   to the path based section.
2012-07-06 09:27:05 +02:00
Stef Walter
3cb0d8047d Make sure notifications come in for new objects before waiting
* In tests make sure notifications settle down before waiting
   on new notifications. This fixes random test crashes.
 * Using async here means all signals are delivered by the time
   we get the new object.
2012-07-05 23:33:08 +02:00
Stef Walter
600021a30b Accept NULL as a SecretService parameter for many methods
* We use secret_service_get() to lookup the default
   SecretService in these cases.
 * Use this functionality in the secret_password_xxx()
   functions to greatly simplify them.
2012-07-05 23:33:08 +02:00
Stef Walter
153dfcec5f Add secret_collection_load_items()
* And flags to prevent loading of items when creating a
   SecretCollection object
 * Rename secret_service_ensure_collections() to
   secret_service_load_collections()
2012-07-05 23:33:07 +02:00
Stef Walter
3f0c69d862 secret_service_search() accepts a SecretSchema
* For validation and adding the xdg:schema attribute
2012-07-05 23:33:07 +02:00
Stef Walter
889f6d66b7 Make secret_service_search() able to unlock, load secrets
* Turn secret_service_search() and friends into a more convenient
   API, so that callers can get attributes, unlocking, and secrets
   if so desired.
 * Also support retrieving either one secret, or all of them.
2012-07-05 23:33:07 +02:00
Stef Walter
9c44ab0fa2 Update the "Locked" property of items/collections on lock/unlock
* Make sure this property is kept in sync so it can be used
   immediately in the logic to retrieve secrets or other stuff.
 * We don't wait for a PropertiesChanged, which may come later
2012-07-05 23:33:07 +02:00
Stef Walter
012ed7d620 Move secret_service_get_secrets() to secret_item_load_secrets()
* And cache the secrets on the items instead of returning
   them in a GHashtable
2012-07-05 23:33:07 +02:00
Stef Walter
ba7fe4fe8c Fix invalid pre-condition in secret_item_get_service() 2012-07-05 23:33:07 +02:00
Stef Walter
f962662b09 Separate path based functionality
* Move the dbus object path based functionality into its
   own file and own section of the documentation.
2012-07-05 23:33:07 +02:00
Stef Walter
6f4a53f08b Don't continue initialization of SecretService if failed
* Don't open session or load collections on SecretService
   if the first part of the initialization failed
2012-07-05 23:33:07 +02:00
Stef Walter
fc0549d2ab Uninitialize the mutex in SecretService
* Fix resource leak
2012-07-05 23:33:07 +02:00
Stef Walter
49dd623e6e Keep a cached SecretValue on each SecretItem
* This item can be retrieved immediately and loaded asynchronously
 * It can also be loaded during initialization of the SecretItem
   object
2012-07-05 23:33:07 +02:00
Colin Walters
e72c4c5409 build: Remove double usage of $(srcdir)
This is a regression introduced by commit
3bc89a8971.
2012-06-28 11:47:26 -04:00
Stef Walter
89550876ff Remove varargs SecretService methods
* The SecretService methods aren't used as frequently as the
   password methods, and it's not really necessary to have a whole
   bunch of extra varargs functions.
 * Add varargs functions for building a GHashTable of attributes
2012-06-28 13:15:06 +02:00
Evan Nemerson
d0df587f08 Add Vala bindings.
https://bugzilla.gnome.org/show_bug.cgi?id=678846
2012-06-28 12:38:34 +02:00
Evan Nemerson
3bc89a8971 Fix VPATH build. 2012-06-28 10:42:11 +02:00
Stef Walter
526bba24a4 Fix python tests when libsecret is not installed 2012-06-28 10:38:17 +02:00
Stef Walter
30c0afeab1 Add varargs function: secret_schema_new vs. secret_schema_newv
* Rename secret_schema_new to secret_schema_newv which
   accepts a GHashTable
 * Make secret_schema_new accept varargs similar to the
   password functions.
 * This is useful from vala which supports varargs
2012-06-28 10:36:38 +02:00
Stef Walter
f24984880e Fix endless loop when retrieving properties 2012-06-27 16:43:55 +02:00
Stef Walter
d9ec34322d Use the correct 'g-properties-changed' signal 2012-06-27 16:43:37 +02:00
Stef Walter
5e73621f40 Use correct path when initializing a collection 2012-06-27 16:43:14 +02:00
Stef Walter
277e65b87a Call correct method for secret_service_unlock()
* Previously erroneously called "Lock" instead of "Unlock"
2012-06-27 16:42:36 +02:00
Stef Walter
f64cf14f41 Don't dispose SecretItem proxies when they go away
* This is strange behavior and causes unexpected results
   in calling programs
2012-06-27 16:42:04 +02:00
Stef Walter
738b11c14c Proper async behavior for seahorse_collection_delete ()
* The async 'source' object was set to a SecretService
   instead of a SecretCollection in the callback
2012-06-27 16:41:13 +02:00
Stef Walter
463c649ca8 Update the collection 'Items' property correctly
* Problems due to not setting constructing flag when construction
   of SecretCollection completed
2012-06-27 16:39:37 +02:00
Stef Walter
258ef1b8b8 Fix null-pointer dereference
* In the corner case where we don't know about a collection/item
   but receive the CollectionChanged or ItemChanged signal,
   fix use of a null pointer
2012-06-27 16:38:35 +02:00
Stef Walter
9b9db3fb51 Use correct variant signatures for Secret Service signals
* Fix typo for signatures used when receiving CollectionCreated,
   CollectionChanged, CollectionDeleted, ItemCreated, ItemChanged,
   ItemDeleted
2012-06-27 16:36:45 +02:00
Stef Walter
52d455f673 Notify the 'items' and 'collections' properties when udpated
* When SecretCollection updates its 'items' property or
   SecretService 'collections' property notify that these
   have been changed.
2012-06-27 16:33:22 +02:00
Stef Walter
fda131178a Pass service GType to secret_service_new() and friends.
* This allows callers to use a custom SecretService derived
   type with the rest of libsecret
 * The default way to get a SecretService is via secret_service_get()
   which remains simple without the GType parameter
2012-06-27 11:45:09 +02:00
Stef Walter
268f2dfd62 Don't leak extra mock service when running python tests
* Were erroneously starting the mock service when loading
   the python test modules, although already started in setUp()
2012-06-27 07:42:57 +02:00
Stef Walter
1e697f6796 Add SECRET_SCHEMA_NOTE
* A real simple schema for stuff stored by the user.
 * No attributes
2012-06-27 07:42:57 +02:00
Colin Walters
26326a7c8b build: Fix srcdir != builddir 2012-06-25 18:21:33 -04:00
Stef Walter
e13b8c4680 Add methods to get services from collections, items
* Add secret_collection_get_service()
 * Add secret_item_get_service()
2012-06-25 10:17:29 +02:00
Stef Walter
79aab9d941 Add secret_service_read_alias() and secret_service_set_alias()
* Wrappers for Secret Service ReadAlias() and SetAlias() methods
   in various permutations.
2012-06-23 14:47:13 +02:00
Stef Walter
279ea1cc10 Add methods which handle prompts for a DBus object path
* Various prompting methods return the prompt result as
   a GVariant.
 * Added new prompt_path methods to SecretService
2012-06-23 14:22:28 +02:00
Stef Walter
60be863e8e Header path fix 2012-04-27 17:07:44 +02:00
Stef Walter
8e9284b4bc Fix documentation problems 2012-04-27 16:57:36 +02:00
Stef Walter
125289ae45 Fix license header issues
* Update to LGPL 2.1
 * Fix typos in license comments
 * Update FSF address

https://bugzilla.gnome.org/show_bug.cgi?id=673194
2012-03-31 15:33:25 +02:00
Stef Walter
271c4556bd More build fixes for openbsd 2012-03-30 14:59:04 +02:00
Stef Walter
46b6ece949 Add missing 'authtype' attribute to the 'network' schema 2012-03-30 13:56:20 +02:00
Stef Walter
1f5d6567cf Add secret-schemas.h to the 'stable' API 2012-03-30 13:56:16 +02:00
Stef Walter
3fcfe9234e Remove multiple typedef definitions 2012-03-30 13:53:44 +02:00
Kalev Lember
f327460ef5 Fix parallel make
Make doesn't know that 'libmock_service.la' is the same as
'$(top_builddir)/library/tests/libmock_service.la', and fails to
properly order builds when using -jX with parallel make. Fix this by
using 'libmock_service.la' everywhere.

make[4]: *** No rule to make target `../../library/tests/libmock_service.la', needed by `test-value'.  Stop.
2012-03-29 13:58:01 +03:00
Stef Walter
0be598f82c Release version 0.1 2012-03-25 13:54:04 +02:00
Stef Walter
9e49677afa Initialise libgcrypt properly
* This prevents blocking on entropy
2012-03-25 12:36:20 +02:00
Stef Walter
37e6765b8d Use the correct D-Bus service name 2012-03-25 12:24:34 +02:00
Stef Walter
3aa77c6918 Support content type application/octet-stream for passwords
* Older versions of gnome-keyring erroneously set this content type
   for passwords even though they're textual.
 * If we see this content type, then check if the password is textual
   and allow usage as a null-terminated password
2012-03-25 12:23:29 +02:00
Stef Walter
11cc25f4e8 Allow NULL schema for certain service methods
* So that we can work without a schema from the secret-tool
 * Users can handle the schema on their own if desired, using
   the 'Complete API'
2012-03-25 12:22:10 +02:00
Stef Walter
de403fd927 Add secret_password_clear() function
* Useful for clearing passwords in memory
2012-03-25 12:18:24 +02:00