aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ephy-form-auth-data.h
diff options
context:
space:
mode:
authorCarlos Garcia Campos <cgarcia@igalia.com>2013-03-09 20:57:09 +0800
committerCarlos Garcia Campos <carlosgc@gnome.org>2013-03-12 17:01:34 +0800
commit2499031072e275e68ad8dc1cb9bd0a53397a5e5a (patch)
treeb94479df9e1470d6855a7bbb4e5b2e0b37fcfa19 /lib/ephy-form-auth-data.h
parent78b70aa84bb94f5097d40ffbb461aefcbbaeb979 (diff)
downloadgsoc2013-epiphany-2499031072e275e68ad8dc1cb9bd0a53397a5e5a.tar
gsoc2013-epiphany-2499031072e275e68ad8dc1cb9bd0a53397a5e5a.tar.gz
gsoc2013-epiphany-2499031072e275e68ad8dc1cb9bd0a53397a5e5a.tar.bz2
gsoc2013-epiphany-2499031072e275e68ad8dc1cb9bd0a53397a5e5a.tar.lz
gsoc2013-epiphany-2499031072e275e68ad8dc1cb9bd0a53397a5e5a.tar.xz
gsoc2013-epiphany-2499031072e275e68ad8dc1cb9bd0a53397a5e5a.tar.zst
gsoc2013-epiphany-2499031072e275e68ad8dc1cb9bd0a53397a5e5a.zip
lib: Move auth data query/store methods from ephy-profile-utils to a new file
Move to ephy-form-auth-data and renamed accordingly.
Diffstat (limited to 'lib/ephy-form-auth-data.h')
-rw-r--r--lib/ephy-form-auth-data.h59
1 files changed, 59 insertions, 0 deletions
diff --git a/lib/ephy-form-auth-data.h b/lib/ephy-form-auth-data.h
new file mode 100644
index 000000000..5bd3bfdf3
--- /dev/null
+++ b/lib/ephy-form-auth-data.h
@@ -0,0 +1,59 @@
+/*
+ * Copyright © 2013 Igalia S.L.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef EPHY_FORM_AUTH_DATA_H
+#define EPHY_FORM_AUTH_DATA_H
+
+#define SECRET_API_SUBJECT_TO_CHANGE
+
+#include <glib.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"
+
+void ephy_form_auth_data_store (const char *uri,
+ const char *form_username,
+ const char *form_password,
+ const char *username,
+ const char *password,
+ GAsyncReadyCallback callback,
+ gpointer userdata);
+
+gboolean ephy_form_auth_data_store_finish (GAsyncResult *result,
+ GError **error);
+
+typedef void (*EphyFormAuthDataQueryCallback) (const char *username,
+ const char *password,
+ gpointer user_data);
+
+void ephy_form_auth_data_query (const char *uri,
+ const char *form_username,
+ const char *form_password,
+ EphyFormAuthDataQueryCallback callback,
+ gpointer user_data,
+ GDestroyNotify destroy_data);
+
+const SecretSchema *ephy_form_auth_data_get_password_schema (void) G_GNUC_CONST;
+
+#define EPHY_FORM_PASSWORD_SCHEMA ephy_form_auth_data_get_password_schema ()
+
+#endif