1 /* libsecret - GLib wrapper for Secret Service
3 * Copyright 2011 Collabora Ltd.
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU Lesser General Public License as published
7 * by the Free Software Foundation; either version 2.1 of the licence or (at
8 * your option) any later version.
10 * See the included COPYING file for more information.
12 * Author: Stef Walter <stefw@gnome.org>
15 #if !defined (__SECRET_INSIDE_HEADER__) && !defined (SECRET_COMPILATION)
16 #error "Only <libsecret/secret.h> can be included directly."
19 #ifndef __SECRET_PASSWORD_H__
20 #define __SECRET_PASSWORD_H__
26 #include "secret-schema.h"
27 #include "secret-types.h"
29 void secret_password_store (const SecretSchema *schema,
30 const gchar *collection,
32 const gchar *password,
33 GCancellable *cancellable,
34 GAsyncReadyCallback callback,
36 ...) G_GNUC_NULL_TERMINATED;
38 void secret_password_storev (const SecretSchema *schema,
39 GHashTable *attributes,
40 const gchar *collection,
42 const gchar *password,
43 GCancellable *cancellable,
44 GAsyncReadyCallback callback,
47 gboolean secret_password_store_finish (GAsyncResult *result,
50 gboolean secret_password_store_sync (const SecretSchema *schema,
51 const gchar *collection,
53 const gchar *password,
54 GCancellable *cancellable,
56 ...) G_GNUC_NULL_TERMINATED;
58 gboolean secret_password_storev_sync (const SecretSchema *schema,
59 GHashTable *attributes,
60 const gchar *collection,
62 const gchar *password,
63 GCancellable *cancellable,
66 void secret_password_lookup (const SecretSchema *schema,
67 GCancellable *cancellable,
68 GAsyncReadyCallback callback,
70 ...) G_GNUC_NULL_TERMINATED;
72 void secret_password_lookupv (const SecretSchema *schema,
73 GHashTable *attributes,
74 GCancellable *cancellable,
75 GAsyncReadyCallback callback,
78 gchar * secret_password_lookup_finish (GAsyncResult *result,
81 gchar * secret_password_lookup_nonpageable_finish (GAsyncResult *result,
84 gchar * secret_password_lookup_sync (const SecretSchema *schema,
85 GCancellable *cancellable,
87 ...) G_GNUC_NULL_TERMINATED;
89 gchar * secret_password_lookup_nonpageable_sync (const SecretSchema *schema,
90 GCancellable *cancellable,
94 gchar * secret_password_lookupv_sync (const SecretSchema *schema,
95 GHashTable *attributes,
96 GCancellable *cancellable,
99 gchar * secret_password_lookupv_nonpageable_sync (const SecretSchema *schema,
100 GHashTable *attributes,
101 GCancellable *cancellable,
104 void secret_password_clear (const SecretSchema *schema,
105 GCancellable *cancellable,
106 GAsyncReadyCallback callback,
108 ...) G_GNUC_NULL_TERMINATED;
110 void secret_password_clearv (const SecretSchema *schema,
111 GHashTable *attributes,
112 GCancellable *cancellable,
113 GAsyncReadyCallback callback,
116 gboolean secret_password_clear_finish (GAsyncResult *result,
119 gboolean secret_password_clear_sync (const SecretSchema* schema,
120 GCancellable *cancellable,
122 ...) G_GNUC_NULL_TERMINATED;
124 gboolean secret_password_clearv_sync (const SecretSchema *schema,
125 GHashTable *attributes,
126 GCancellable *cancellable,
129 void secret_password_free (gchar *password);
131 void secret_password_wipe (gchar *password);
135 #endif /* __SECRET_PASSWORD_H___ */