[geary/geary-0.12] Remove custom libsecret VAPI in favour of the system-provided one.
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary/geary-0.12] Remove custom libsecret VAPI in favour of the system-provided one.
- Date: Thu, 16 Nov 2017 05:25:42 +0000 (UTC)
commit e3ad2a4242b11c7f079a7734d45e340e87495026
Author: Michael James Gratton <mike vee net>
Date: Thu Oct 26 22:03:24 2017 +1100
Remove custom libsecret VAPI in favour of the system-provided one.
This gives us access to the full libsecret API.
* bindings/vapi/libsecret-1.vapi: Deleted.
* src/client/application/secret-mediator.vala (Object): Use an internal
binding to the missing SCHEMA_COMPAT_NETWORK constant.
bindings/vapi/libsecret-1.vapi | 82 ---------------------------
src/client/application/secret-mediator.vala | 14 +++--
2 files changed, 9 insertions(+), 87 deletions(-)
---
diff --git a/src/client/application/secret-mediator.vala b/src/client/application/secret-mediator.vala
index f3d8d61..f9405eb 100644
--- a/src/client/application/secret-mediator.vala
+++ b/src/client/application/secret-mediator.vala
@@ -22,6 +22,10 @@ public class SecretMediator : Geary.CredentialsMediator, Object {
private Geary.Nonblocking.Mutex dialog_mutex = new Geary.Nonblocking.Mutex();
+ // See Bug 697681
+ [CCode (cheader_filename = "libsecret/secret.h", cname = "SECRET_SCHEMA_COMPAT_NETWORK")]
+ private Secret.Schema SCHEMA_COMPAT_NETWORK;
+
public virtual async string? get_password_async(Geary.Service service,
Geary.AccountInformation account,
@@ -66,13 +70,13 @@ public class SecretMediator : Geary.CredentialsMediator, Object {
// Remove legacy formats
// <= 0.11
yield Secret.password_clear(
- Secret.SCHEMA_COMPAT_NETWORK,
+ SCHEMA_COMPAT_NETWORK,
cancellable,
"user", get_legacy_user(service, account.primary_mailbox.address)
);
// <= 0.6
yield Secret.password_clear(
- Secret.SCHEMA_COMPAT_NETWORK,
+ SCHEMA_COMPAT_NETWORK,
cancellable,
"user", get_legacy_user(service, credentials.user)
);
@@ -190,7 +194,7 @@ public class SecretMediator : Geary.CredentialsMediator, Object {
throws Error {
// <= 0.11
string? password = yield Secret.password_lookup(
- Secret.SCHEMA_COMPAT_NETWORK,
+ SCHEMA_COMPAT_NETWORK,
cancellable,
"user", get_legacy_user(service, account.primary_mailbox.address)
);
@@ -200,7 +204,7 @@ public class SecretMediator : Geary.CredentialsMediator, Object {
Geary.Credentials creds = get_credentials(service, account);
string user = get_legacy_user(service, creds.user);
password = yield Secret.password_lookup(
- Secret.SCHEMA_COMPAT_NETWORK,
+ SCHEMA_COMPAT_NETWORK,
cancellable,
"user", user
);
@@ -208,7 +212,7 @@ public class SecretMediator : Geary.CredentialsMediator, Object {
// Clear the old password
if (password != null) {
yield Secret.password_clear(
- Secret.SCHEMA_COMPAT_NETWORK,
+ SCHEMA_COMPAT_NETWORK,
cancellable,
"user", user
);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]