Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / third_party / libsecret / secret-paths.h
blob0702297fa4e289c24723b6f97a17871c86ef2c60
1 /* libsecret - GLib wrapper for Secret Service
3 * Copyright 2011 Collabora Ltd.
4 * Copyright 2012 Red Hat Inc.
6 * This program is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU Lesser General Public License as published
8 * by the Free Software Foundation; either version 2.1 of the licence or (at
9 * your option) any later version.
11 * See the included COPYING file for more information.
13 * Author: Stef Walter <stefw@gnome.org>
16 #if !defined (__SECRET_INSIDE_HEADER__) && !defined (SECRET_COMPILATION)
17 #error "Only <libsecret/secret.h> can be included directly."
18 #endif
20 #ifndef __SECRET_PATHS_H__
21 #define __SECRET_PATHS_H__
23 #include <gio/gio.h>
25 #include "secret-collection.h"
26 #include "secret-item.h"
27 #include "secret-prompt.h"
28 #include "secret-schema.h"
29 #include "secret-types.h"
30 #include "secret-value.h"
32 G_BEGIN_DECLS
35 void secret_collection_new_for_dbus_path (SecretService *service,
36 const gchar *collection_path,
37 SecretCollectionFlags flags,
38 GCancellable *cancellable,
39 GAsyncReadyCallback callback,
40 gpointer user_data);
42 SecretCollection * secret_collection_new_for_dbus_path_finish (GAsyncResult *result,
43 GError **error);
45 SecretCollection * secret_collection_new_for_dbus_path_sync (SecretService *service,
46 const gchar *collection_path,
47 SecretCollectionFlags flags,
48 GCancellable *cancellable,
49 GError **error);
51 void secret_collection_search_for_dbus_paths (SecretCollection *collection,
52 const SecretSchema *schema,
53 GHashTable *attributes,
54 GCancellable *cancellable,
55 GAsyncReadyCallback callback,
56 gpointer user_data);
58 gchar ** secret_collection_search_for_dbus_paths_finish (SecretCollection *collection,
59 GAsyncResult *result,
60 GError **error);
62 gchar ** secret_collection_search_for_dbus_paths_sync (SecretCollection *collection,
63 const SecretSchema *schema,
64 GHashTable *attributes,
65 GCancellable *cancellable,
66 GError **error);
68 void secret_item_new_for_dbus_path (SecretService *service,
69 const gchar *item_path,
70 SecretItemFlags flags,
71 GCancellable *cancellable,
72 GAsyncReadyCallback callback,
73 gpointer user_data);
75 SecretItem * secret_item_new_for_dbus_path_finish (GAsyncResult *result,
76 GError **error);
78 SecretItem * secret_item_new_for_dbus_path_sync (SecretService *service,
79 const gchar *item_path,
80 SecretItemFlags flags,
81 GCancellable *cancellable,
82 GError **error);
84 const gchar * secret_service_get_session_dbus_path (SecretService *self);
86 void secret_service_search_for_dbus_paths (SecretService *self,
87 const SecretSchema *schema,
88 GHashTable *attributes,
89 GCancellable *cancellable,
90 GAsyncReadyCallback callback,
91 gpointer user_data);
93 gboolean secret_service_search_for_dbus_paths_finish (SecretService *self,
94 GAsyncResult *result,
95 gchar ***unlocked,
96 gchar ***locked,
97 GError **error);
99 gboolean secret_service_search_for_dbus_paths_sync (SecretService *self,
100 const SecretSchema *schema,
101 GHashTable *attributes,
102 GCancellable *cancellable,
103 gchar ***unlocked,
104 gchar ***locked,
105 GError **error);
107 void secret_service_get_secret_for_dbus_path (SecretService *self,
108 const gchar *item_path,
109 GCancellable *cancellable,
110 GAsyncReadyCallback callback,
111 gpointer user_data);
113 SecretValue * secret_service_get_secret_for_dbus_path_finish (SecretService *self,
114 GAsyncResult *result,
115 GError **error);
117 SecretValue * secret_service_get_secret_for_dbus_path_sync (SecretService *self,
118 const gchar *item_path,
119 GCancellable *cancellable,
120 GError **error);
122 void secret_service_get_secrets_for_dbus_paths (SecretService *self,
123 const gchar **item_paths,
124 GCancellable *cancellable,
125 GAsyncReadyCallback callback,
126 gpointer user_data);
128 GHashTable * secret_service_get_secrets_for_dbus_paths_finish (SecretService *self,
129 GAsyncResult *result,
130 GError **error);
132 GHashTable * secret_service_get_secrets_for_dbus_paths_sync (SecretService *self,
133 const gchar **item_paths,
134 GCancellable *cancellable,
135 GError **error);
137 gint secret_service_lock_dbus_paths_sync (SecretService *self,
138 const gchar **paths,
139 GCancellable *cancellable,
140 gchar ***locked,
141 GError **error);
143 void secret_service_lock_dbus_paths (SecretService *self,
144 const gchar **paths,
145 GCancellable *cancellable,
146 GAsyncReadyCallback callback,
147 gpointer user_data);
149 gint secret_service_lock_dbus_paths_finish (SecretService *self,
150 GAsyncResult *result,
151 gchar ***locked,
152 GError **error);
154 gint secret_service_unlock_dbus_paths_sync (SecretService *self,
155 const gchar **paths,
156 GCancellable *cancellable,
157 gchar ***unlocked,
158 GError **error);
160 void secret_service_unlock_dbus_paths (SecretService *self,
161 const gchar **paths,
162 GCancellable *cancellable,
163 GAsyncReadyCallback callback,
164 gpointer user_data);
166 gint secret_service_unlock_dbus_paths_finish (SecretService *self,
167 GAsyncResult *result,
168 gchar ***unlocked,
169 GError **error);
171 GVariant * secret_service_prompt_at_dbus_path_sync (SecretService *self,
172 const gchar *prompt_path,
173 GCancellable *cancellable,
174 const GVariantType *return_type,
175 GError **error);
177 void secret_service_prompt_at_dbus_path (SecretService *self,
178 const gchar *prompt_path,
179 const GVariantType *return_type,
180 GCancellable *cancellable,
181 GAsyncReadyCallback callback,
182 gpointer user_data);
184 GVariant * secret_service_prompt_at_dbus_path_finish (SecretService *self,
185 GAsyncResult *result,
186 GError **error);
188 void secret_service_delete_item_dbus_path (SecretService *self,
189 const gchar *item_path,
190 GCancellable *cancellable,
191 GAsyncReadyCallback callback,
192 gpointer user_data);
194 gboolean secret_service_delete_item_dbus_path_finish (SecretService *self,
195 GAsyncResult *result,
196 GError **error);
198 gboolean secret_service_delete_item_dbus_path_sync (SecretService *self,
199 const gchar *item_path,
200 GCancellable *cancellable,
201 GError **error);
203 void secret_service_create_collection_dbus_path (SecretService *self,
204 GHashTable *properties,
205 const gchar *alias,
206 SecretCollectionCreateFlags flags,
207 GCancellable *cancellable,
208 GAsyncReadyCallback callback,
209 gpointer user_data);
211 gchar * secret_service_create_collection_dbus_path_finish (SecretService *self,
212 GAsyncResult *result,
213 GError **error);
215 gchar * secret_service_create_collection_dbus_path_sync (SecretService *self,
216 GHashTable *properties,
217 const gchar *alias,
218 SecretCollectionCreateFlags flags,
219 GCancellable *cancellable,
220 GError **error);
222 void secret_service_create_item_dbus_path (SecretService *self,
223 const gchar *collection_path,
224 GHashTable *properties,
225 SecretValue *value,
226 SecretItemCreateFlags flags,
227 GCancellable *cancellable,
228 GAsyncReadyCallback callback,
229 gpointer user_data);
231 gchar * secret_service_create_item_dbus_path_finish (SecretService *self,
232 GAsyncResult *result,
233 GError **error);
235 gchar * secret_service_create_item_dbus_path_sync (SecretService *self,
236 const gchar *collection_path,
237 GHashTable *properties,
238 SecretValue *value,
239 SecretItemCreateFlags flags,
240 GCancellable *cancellable,
241 GError **error);
243 void secret_service_read_alias_dbus_path (SecretService *self,
244 const gchar *alias,
245 GCancellable *cancellable,
246 GAsyncReadyCallback callback,
247 gpointer user_data);
249 gchar * secret_service_read_alias_dbus_path_finish (SecretService *self,
250 GAsyncResult *result,
251 GError **error);
253 gchar * secret_service_read_alias_dbus_path_sync (SecretService *self,
254 const gchar *alias,
255 GCancellable *cancellable,
256 GError **error);
258 void secret_service_set_alias_to_dbus_path (SecretService *self,
259 const gchar *alias,
260 const gchar *collection_path,
261 GCancellable *cancellable,
262 GAsyncReadyCallback callback,
263 gpointer user_data);
265 gboolean secret_service_set_alias_to_dbus_path_finish (SecretService *self,
266 GAsyncResult *result,
267 GError **error);
269 gboolean secret_service_set_alias_to_dbus_path_sync (SecretService *self,
270 const gchar *alias,
271 const gchar *collection_path,
272 GCancellable *cancellable,
273 GError **error);
275 GVariant * secret_service_encode_dbus_secret (SecretService *service,
276 SecretValue *value);
278 SecretValue * secret_service_decode_dbus_secret (SecretService *service,
279 GVariant *value);
281 G_END_DECLS
283 #endif /* __SECRET_SERVICE_H___ */