aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ephy-profile-utils.h
diff options
context:
space:
mode:
authorClaudio Saavedra <csaavedra@igalia.com>2013-02-19 19:16:55 +0800
committerClaudio Saavedra <csaavedra@igalia.com>2013-03-05 14:15:23 +0800
commit1f50ff47f0ea156e43d8b0ef4977f0b5a2e6ce48 (patch)
treea8973325969bfe183bfccd38b21200ef5070ba9d /lib/ephy-profile-utils.h
parente9a3741f4039cfdb9b05ac2caf7cc642fa69b608 (diff)
downloadgsoc2013-epiphany-1f50ff47f0ea156e43d8b0ef4977f0b5a2e6ce48.tar
gsoc2013-epiphany-1f50ff47f0ea156e43d8b0ef4977f0b5a2e6ce48.tar.gz
gsoc2013-epiphany-1f50ff47f0ea156e43d8b0ef4977f0b5a2e6ce48.tar.bz2
gsoc2013-epiphany-1f50ff47f0ea156e43d8b0ef4977f0b5a2e6ce48.tar.lz
gsoc2013-epiphany-1f50ff47f0ea156e43d8b0ef4977f0b5a2e6ce48.tar.xz
gsoc2013-epiphany-1f50ff47f0ea156e43d8b0ef4977f0b5a2e6ce48.tar.zst
gsoc2013-epiphany-1f50ff47f0ea156e43d8b0ef4977f0b5a2e6ce48.zip
ephy-profile-utils: migrate ephy_profile_utils_store/query_form_auth_data() to libsecret
We add a new SecretSchema that is specific to epiphany and intended solely to store passwords for webforms. This is a better approach than hacking the server url in order to store the names of the forms in it. These methods are only used by EphyWebView to store the passwords and to retrieve the password when there is a cache match and by one of the early stages of password migration in the profile-migrator. If only this patch is applied, it is likely that only newly saved patchs will work properly, but others will remain intact. https://bugzilla.gnome.org/show_bug.cgi?id=679918
Diffstat (limited to 'lib/ephy-profile-utils.h')
-rw-r--r--lib/ephy-profile-utils.h39
1 files changed, 27 insertions, 12 deletions
diff --git a/lib/ephy-profile-utils.h b/lib/ephy-profile-utils.h
index 1e9d071db..7e22dd6f8 100644
--- a/lib/ephy-profile-utils.h
+++ b/lib/ephy-profile-utils.h
@@ -20,11 +20,15 @@
#ifndef EPHY_PROFILE_UTILS_H
#define EPHY_PROFILE_UTILS_H
+#define SECRET_API_SUBJECT_TO_CHANGE
+
#include <glib.h>
-#include <gnome-keyring.h>
+#include <libsecret/secret.h>
+#define URI_KEY "uri"
#define FORM_USERNAME_KEY "form_username"
#define FORM_PASSWORD_KEY "form_password"
+#define USERNAME_KEY "username"
#define EPHY_PROFILE_MIGRATION_VERSION 8
@@ -38,18 +42,29 @@ gboolean ephy_profile_utils_set_migration_version (int version);
gboolean ephy_profile_utils_do_migration (const char *profile_directory, int test_to_run, gboolean debug);
-void _ephy_profile_utils_store_form_auth_data (const char *uri,
- const char *form_username,
- const char *form_password,
- const char *username,
- const char *password);
+void _ephy_profile_utils_store_form_auth_data (const char *uri,
+ const char *form_username,
+ const char *form_password,
+ const char *username,
+ const char *password,
+ GAsyncReadyCallback callback,
+ gpointer userdata);
+
+gboolean _ephy_profile_utils_store_form_auth_data_finish (GAsyncResult *result,
+ GError **error);
+
+typedef void (*EphyQueryFormDataCallback) (const char *username, const char *password, gpointer user_data);
void
-_ephy_profile_utils_query_form_auth_data (const char *uri,
- const char *form_username,
- const char *form_password,
- GnomeKeyringOperationGetListCallback callback,
- gpointer data,
- GDestroyNotify destroy_data);
+_ephy_profile_utils_query_form_auth_data (const char *uri,
+ const char *form_username,
+ const char *form_password,
+ EphyQueryFormDataCallback callback,
+ gpointer data,
+ GDestroyNotify destroy_data);
+
+const SecretSchema *ephy_profile_get_form_password_schema (void) G_GNUC_CONST;
+
+#define EPHY_FORM_PASSWORD_SCHEMA ephy_profile_get_form_password_schema ()
#endif