Release version 0.6
authorStef Walter <stefw@gnome.org>
Sat, 14 Jul 2012 06:59:36 +0000 (08:59 +0200)
committerStef Walter <stefw@gnome.org>
Sat, 14 Jul 2012 07:07:20 +0000 (09:07 +0200)
NEWS
configure.ac
docs/reference/libsecret/libsecret-examples.sgml
libsecret/tests/test-clear-password.js [moved from libsecret/tests/test-remove-password.js with 100% similarity]
libsecret/tests/test-clear-password.py [moved from libsecret/tests/test-remove-password.py with 73% similarity]

diff --git a/NEWS b/NEWS
index 81dcb65..4126d09 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,10 @@
+0.6
+ * Rename secret_password_remove() to secret_password_clear()
+   and similar names for related functions.
+ * The secret_attribute_build() functions are stable
+ * The predefined secret schemas are stable
+ * Build fixes
+
 0.5
  * secret_service_remove() removes all unlocked matching items
  * Make sure that we have some attributes when searching
index 24f8154..f49c0c6 100644 (file)
@@ -1,6 +1,6 @@
 AC_PREREQ(2.63)
 
-AC_INIT([libsecret],[0.5],
+AC_INIT([libsecret],[0.6],
         [http://bugzilla.gnome.org/enter_bug.cgi?product=libsecret],
         [libsecret])
 
index 67c3bce..b6f881b 100644 (file)
 
                        <informalexample><programlisting language="c"><![CDATA[
                        static void
-                       on_password_removed (GObject *source,
+                       on_password_cleared (GObject *source,
                                             GAsyncResult *result,
                                             gpointer unused)
                         {
                                GError *error = NULL;
 
-                               gboolean removed = secret_password_remove_finish (result, &error);
+                               gboolean removed = secret_password_clear_finish (result, &error);
 
                                if (error != NULL) {
                                        /* ... handle the failure here */
                         * The variable argument list is the attributes used to later
                         * lookup the password. These attributes must conform to the schema.
                         */
-                       secret_password_remove (EXAMPLE_SCHEMA, NULL, on_password_removed, NULL,
-                                               "string", "nine",
-                                               "even", FALSE,
-                                               NULL);
+                       secret_password_clear (EXAMPLE_SCHEMA, NULL, on_password_cleard, NULL,
+                                              "string", "nine",
+                                              "even", FALSE,
+                                              NULL);
                        ]]></programlisting></informalexample>
 
                        <para>This next example looks up a password synchronously. The function
                         * The variable argument list is the attributes used to later
                         * lookup the password. These attributes must conform to the schema.
                         */
-                       gboolean removed = secret_password_remove_sync (EXAMPLE_SCHEMA, NULL, &error,
-                                                                       "string", "nine",
-                                                                       "even", FALSE,
-                                                                       NULL);
+                       gboolean removed = secret_password_clear_sync (EXAMPLE_SCHEMA, NULL, &error,
+                                                                      "string", "nine",
+                                                                      "even", FALSE,
+                                                                      NULL);
 
                        if (error != NULL) {
                                /* ... handle the failure here */
                        <informalexample><programlisting language="javascript"><![CDATA[
                        const Secret = imports.gi.Secret;
 
-                       function on_password_remove(source, result) {
-                               var removed = Secret.password_remove_finish(result);
+                       function on_password_clear(source, result) {
+                               var removed = Secret.password_clear_finish(result);
                                /* removed will be true if the password was removed */
                        }
 
                        /* The attributes used to lookup which password to remove should conform to the schema. */
-                       Secret.password_remove(EXAMPLE_SCHEMA, { "number": "8", "even": "true" },
-                                              null, on_password_remove);
+                       Secret.password_clear(EXAMPLE_SCHEMA, { "number": "8", "even": "true" },
+                                             null, on_password_clear);
                        ]]></programlisting></informalexample>
 
                        <para>This next example removes a password synchronously. The function
                        const Secret = imports.gi.Secret;
 
                        /* The attributes used to lookup which password to remove should conform to the schema. */
-                       var removed = Secret.password_remove_sync(EXAMPLE_SCHEMA,
-                                                                 { "number": "8", "even": "true" },
-                                                                 null);
+                       var removed = Secret.password_clear_sync(EXAMPLE_SCHEMA,
+                                                                { "number": "8", "even": "true" },
+                                                                null);
 
                        /* removed will be true if the password was removed */
                        ]]></programlisting></informalexample>
                        <informalexample><programlisting language="python"><![CDATA[
                        from gi.repository import Secret
 
-                       def on_password_remove(source, result, unused):
-                               removed = Secret.password_remove_finish(result)
+                       def on_password_clear(source, result, unused):
+                               removed = Secret.password_clear_finish(result)
                                # removed will be true if the password was removed
 
-                       Secret.password_remove(EXAMPLE_SCHEMA, { "number": "8", "even": "true" },
-                                               None, on_password_remove)
+                       Secret.password_clear(EXAMPLE_SCHEMA, { "number": "8", "even": "true" },
+                                              None, on_password_clear)
                        ]]></programlisting></informalexample>
 
                        <para>This next example removes a password synchronously. The function
                        <informalexample><programlisting language="python"><![CDATA[
                        from gi.repository import Secret
 
-                       removed = Secret.password_remove_sync(EXAMPLE_SCHEMA, { "number": "8", "even": "true" }, None)
+                       removed = Secret.password_clear_sync(EXAMPLE_SCHEMA, { "number": "8", "even": "true" }, None)
                        # removed will be true if the password was removed
                        ]]></programlisting></informalexample>
                </section>
                        attributes["string"] = "eight";
                        attributes["even"] = "true";
 
-                       Secret.password_removev.begin (example_schema, attributes, null, (obj, async_res) => {
-                               bool removed = Secret.password_removev.end (async_res);
+                       Secret.password_clearv.begin (example_schema, attributes, null, (obj, async_res) => {
+                               bool removed = Secret.password_clearv.end (async_res);
                        });
                        ]]></programlisting></informalexample>
 
                        attributes["string"] = "eight";
                        attributes["even"] = "true";
 
-                       bool removed = Secret.password_remove_sync (example_schema, null,
-                                                                   "number", 8, "string", "eight", "even", true);
+                       bool removed = Secret.password_clear_sync (example_schema, null,
+                                                                  "number", 8, "string", "eight", "even", true);
                        /* removed will be true if the password was removed */
                        ]]></programlisting></informalexample>
                </section>
similarity index 73%
rename from libsecret/tests/test-remove-password.py
rename to libsecret/tests/test-clear-password.py
index b587c9a..8d01506 100644 (file)
@@ -27,7 +27,7 @@ class TestRemove(unittest.TestCase):
                password = Secret.password_lookup_sync(STORE_SCHEMA, attributes, None)
                self.assertEqual("111", password)
 
-               deleted = Secret.password_remove_sync(STORE_SCHEMA, attributes, None)
+               deleted = Secret.password_clear_sync(STORE_SCHEMA, attributes, None)
                self.assertEqual(True, deleted)
 
        def testSyncNotFound(self):
@@ -36,7 +36,7 @@ class TestRemove(unittest.TestCase):
                password = Secret.password_lookup_sync(STORE_SCHEMA, attributes, None)
                self.assertEqual(None, password)
 
-               deleted = Secret.password_remove_sync(STORE_SCHEMA, attributes, None)
+               deleted = Secret.password_clear_sync(STORE_SCHEMA, attributes, None)
                self.assertEqual(False, deleted)
 
        def testAsynchronous(self):
@@ -44,11 +44,11 @@ class TestRemove(unittest.TestCase):
 
                def on_result_ready(source, result, unused):
                        loop.quit()
-                       deleted = Secret.password_remove_finish(result)
+                       deleted = Secret.password_clear_finish(result)
                        self.assertEquals(True, deleted)
 
-               Secret.password_remove(STORE_SCHEMA, { "number": "2", "string": "two" },
-                                      None, on_result_ready, None)
+               Secret.password_clear(STORE_SCHEMA, { "number": "2", "string": "two" },
+                                     None, on_result_ready, None)
 
                loop.run()
 
@@ -57,11 +57,11 @@ class TestRemove(unittest.TestCase):
 
                def on_result_ready(source, result, unused):
                        loop.quit()
-                       deleted = Secret.password_remove_finish(result)
+                       deleted = Secret.password_clear_finish(result)
                        self.assertEquals(False, deleted)
 
-               Secret.password_remove(STORE_SCHEMA, { "number": "7", "string": "five" },
-                                      None, on_result_ready, None)
+               Secret.password_clear(STORE_SCHEMA, { "number": "7", "string": "five" },
+                                     None, on_result_ready, None)
 
                loop.run()