Release version 0.6

This commit is contained in:
Stef Walter 2012-07-14 08:59:36 +02:00
parent e0ba10ee09
commit 49cdaf5df8
5 changed files with 42 additions and 35 deletions

7
NEWS
View File

@ -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 0.5
* secret_service_remove() removes all unlocked matching items * secret_service_remove() removes all unlocked matching items
* Make sure that we have some attributes when searching * Make sure that we have some attributes when searching

View File

@ -1,6 +1,6 @@
AC_PREREQ(2.63) AC_PREREQ(2.63)
AC_INIT([libsecret],[0.5], AC_INIT([libsecret],[0.6],
[http://bugzilla.gnome.org/enter_bug.cgi?product=libsecret], [http://bugzilla.gnome.org/enter_bug.cgi?product=libsecret],
[libsecret]) [libsecret])

View File

@ -215,13 +215,13 @@
<informalexample><programlisting language="c"><![CDATA[ <informalexample><programlisting language="c"><![CDATA[
static void static void
on_password_removed (GObject *source, on_password_cleared (GObject *source,
GAsyncResult *result, GAsyncResult *result,
gpointer unused) gpointer unused)
{ {
GError *error = NULL; GError *error = NULL;
gboolean removed = secret_password_remove_finish (result, &error); gboolean removed = secret_password_clear_finish (result, &error);
if (error != NULL) { if (error != NULL) {
/* ... handle the failure here */ /* ... handle the failure here */
@ -236,10 +236,10 @@
* The variable argument list is the attributes used to later * The variable argument list is the attributes used to later
* lookup the password. These attributes must conform to the schema. * lookup the password. These attributes must conform to the schema.
*/ */
secret_password_remove (EXAMPLE_SCHEMA, NULL, on_password_removed, NULL, secret_password_clear (EXAMPLE_SCHEMA, NULL, on_password_cleard, NULL,
"string", "nine", "string", "nine",
"even", FALSE, "even", FALSE,
NULL); NULL);
]]></programlisting></informalexample> ]]></programlisting></informalexample>
<para>This next example looks up a password synchronously. The function <para>This next example looks up a password synchronously. The function
@ -253,10 +253,10 @@
* The variable argument list is the attributes used to later * The variable argument list is the attributes used to later
* lookup the password. These attributes must conform to the schema. * lookup the password. These attributes must conform to the schema.
*/ */
gboolean removed = secret_password_remove_sync (EXAMPLE_SCHEMA, NULL, &error, gboolean removed = secret_password_clear_sync (EXAMPLE_SCHEMA, NULL, &error,
"string", "nine", "string", "nine",
"even", FALSE, "even", FALSE,
NULL); NULL);
if (error != NULL) { if (error != NULL) {
/* ... handle the failure here */ /* ... handle the failure here */
@ -423,14 +423,14 @@
<informalexample><programlisting language="javascript"><![CDATA[ <informalexample><programlisting language="javascript"><![CDATA[
const Secret = imports.gi.Secret; const Secret = imports.gi.Secret;
function on_password_remove(source, result) { function on_password_clear(source, result) {
var removed = Secret.password_remove_finish(result); var removed = Secret.password_clear_finish(result);
/* removed will be true if the password was removed */ /* removed will be true if the password was removed */
} }
/* The attributes used to lookup which password to remove should conform to the schema. */ /* The attributes used to lookup which password to remove should conform to the schema. */
Secret.password_remove(EXAMPLE_SCHEMA, { "number": "8", "even": "true" }, Secret.password_clear(EXAMPLE_SCHEMA, { "number": "8", "even": "true" },
null, on_password_remove); null, on_password_clear);
]]></programlisting></informalexample> ]]></programlisting></informalexample>
<para>This next example removes a password synchronously. The function <para>This next example removes a password synchronously. The function
@ -441,9 +441,9 @@
const Secret = imports.gi.Secret; const Secret = imports.gi.Secret;
/* The attributes used to lookup which password to remove should conform to the schema. */ /* The attributes used to lookup which password to remove should conform to the schema. */
var removed = Secret.password_remove_sync(EXAMPLE_SCHEMA, var removed = Secret.password_clear_sync(EXAMPLE_SCHEMA,
{ "number": "8", "even": "true" }, { "number": "8", "even": "true" },
null); null);
/* removed will be true if the password was removed */ /* removed will be true if the password was removed */
]]></programlisting></informalexample> ]]></programlisting></informalexample>
@ -592,12 +592,12 @@
<informalexample><programlisting language="python"><![CDATA[ <informalexample><programlisting language="python"><![CDATA[
from gi.repository import Secret from gi.repository import Secret
def on_password_remove(source, result, unused): def on_password_clear(source, result, unused):
removed = Secret.password_remove_finish(result) removed = Secret.password_clear_finish(result)
# removed will be true if the password was removed # removed will be true if the password was removed
Secret.password_remove(EXAMPLE_SCHEMA, { "number": "8", "even": "true" }, Secret.password_clear(EXAMPLE_SCHEMA, { "number": "8", "even": "true" },
None, on_password_remove) None, on_password_clear)
]]></programlisting></informalexample> ]]></programlisting></informalexample>
<para>This next example removes a password synchronously. The function <para>This next example removes a password synchronously. The function
@ -607,7 +607,7 @@
<informalexample><programlisting language="python"><![CDATA[ <informalexample><programlisting language="python"><![CDATA[
from gi.repository import Secret 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 # removed will be true if the password was removed
]]></programlisting></informalexample> ]]></programlisting></informalexample>
</section> </section>
@ -759,8 +759,8 @@
attributes["string"] = "eight"; attributes["string"] = "eight";
attributes["even"] = "true"; attributes["even"] = "true";
Secret.password_removev.begin (example_schema, attributes, null, (obj, async_res) => { Secret.password_clearv.begin (example_schema, attributes, null, (obj, async_res) => {
bool removed = Secret.password_removev.end (async_res); bool removed = Secret.password_clearv.end (async_res);
}); });
]]></programlisting></informalexample> ]]></programlisting></informalexample>
@ -774,8 +774,8 @@
attributes["string"] = "eight"; attributes["string"] = "eight";
attributes["even"] = "true"; attributes["even"] = "true";
bool removed = Secret.password_remove_sync (example_schema, null, bool removed = Secret.password_clear_sync (example_schema, null,
"number", 8, "string", "eight", "even", true); "number", 8, "string", "eight", "even", true);
/* removed will be true if the password was removed */ /* removed will be true if the password was removed */
]]></programlisting></informalexample> ]]></programlisting></informalexample>
</section> </section>

View File

@ -27,7 +27,7 @@ class TestRemove(unittest.TestCase):
password = Secret.password_lookup_sync(STORE_SCHEMA, attributes, None) password = Secret.password_lookup_sync(STORE_SCHEMA, attributes, None)
self.assertEqual("111", password) 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) self.assertEqual(True, deleted)
def testSyncNotFound(self): def testSyncNotFound(self):
@ -36,7 +36,7 @@ class TestRemove(unittest.TestCase):
password = Secret.password_lookup_sync(STORE_SCHEMA, attributes, None) password = Secret.password_lookup_sync(STORE_SCHEMA, attributes, None)
self.assertEqual(None, password) 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) self.assertEqual(False, deleted)
def testAsynchronous(self): def testAsynchronous(self):
@ -44,11 +44,11 @@ class TestRemove(unittest.TestCase):
def on_result_ready(source, result, unused): def on_result_ready(source, result, unused):
loop.quit() loop.quit()
deleted = Secret.password_remove_finish(result) deleted = Secret.password_clear_finish(result)
self.assertEquals(True, deleted) self.assertEquals(True, deleted)
Secret.password_remove(STORE_SCHEMA, { "number": "2", "string": "two" }, Secret.password_clear(STORE_SCHEMA, { "number": "2", "string": "two" },
None, on_result_ready, None) None, on_result_ready, None)
loop.run() loop.run()
@ -57,11 +57,11 @@ class TestRemove(unittest.TestCase):
def on_result_ready(source, result, unused): def on_result_ready(source, result, unused):
loop.quit() loop.quit()
deleted = Secret.password_remove_finish(result) deleted = Secret.password_clear_finish(result)
self.assertEquals(False, deleted) self.assertEquals(False, deleted)
Secret.password_remove(STORE_SCHEMA, { "number": "7", "string": "five" }, Secret.password_clear(STORE_SCHEMA, { "number": "7", "string": "five" },
None, on_result_ready, None) None, on_result_ready, None)
loop.run() loop.run()