Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: third_party/libsecret/secret-service.h

Issue 1922563002: Created BUILD.gn for libsecret (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Corrected source set Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/libsecret/secret-schemas.h ('k') | third_party/libsecret/secret-types.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /* libsecret - GLib wrapper for Secret Service
2 *
3 * Copyright 2011 Collabora Ltd.
4 * Copyright 2012 Red Hat Inc.
5 *
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.
10 *
11 * See the included COPYING file for more information.
12 *
13 * Author: Stef Walter <stefw@gnome.org>
14 */
15
16 #if !defined (__SECRET_INSIDE_HEADER__) && !defined (SECRET_COMPILATION)
17 #error "Only <libsecret/secret.h> can be included directly."
18 #endif
19
20 #ifndef __SECRET_SERVICE_H__
21 #define __SECRET_SERVICE_H__
22
23 #include <gio/gio.h>
24
25 #include "secret-prompt.h"
26 #include "secret-schema.h"
27 #include "secret-types.h"
28 #include "secret-value.h"
29
30 G_BEGIN_DECLS
31
32 typedef enum {
33 SECRET_SERVICE_NONE = 0,
34 SECRET_SERVICE_OPEN_SESSION = 1 << 1,
35 SECRET_SERVICE_LOAD_COLLECTIONS = 1 << 2,
36 } SecretServiceFlags;
37
38 typedef enum {
39 SECRET_SEARCH_NONE = 0,
40 SECRET_SEARCH_ALL = 1 << 1,
41 SECRET_SEARCH_UNLOCK = 1 << 2,
42 SECRET_SEARCH_LOAD_SECRETS = 1 << 3,
43 } SecretSearchFlags;
44
45 #define SECRET_TYPE_SERVICE (secret_service_get_type ())
46 #define SECRET_SERVICE(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), SECR ET_TYPE_SERVICE, SecretService))
47 #define SECRET_SERVICE_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), SECRET _TYPE_SERVICE, SecretServiceClass))
48 #define SECRET_IS_SERVICE(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), SECR ET_TYPE_SERVICE))
49 #define SECRET_IS_SERVICE_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), SECRET _TYPE_SERVICE))
50 #define SECRET_SERVICE_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), SECRE T_TYPE_SERVICE, SecretServiceClass))
51
52 typedef struct _SecretCollection SecretCollection;
53 typedef struct _SecretService SecretService;
54 typedef struct _SecretServiceClass SecretServiceClass;
55 typedef struct _SecretServicePrivate SecretServicePrivate;
56
57 struct _SecretService {
58 GDBusProxy parent;
59
60 /*< private >*/
61 SecretServicePrivate *pv;
62 };
63
64 struct _SecretServiceClass {
65 GDBusProxyClass parent_class;
66
67 GType collection_gtype;
68 GType item_gtype;
69
70 GVariant * (* prompt_sync) (SecretService *self,
71 SecretPrompt *prompt,
72 GCancellable *cancellable,
73 const GVariantType *return_type,
74 GError **error);
75
76 void (* prompt_async) (SecretService *self,
77 SecretPrompt *prompt,
78 const GVariantType *return_type,
79 GCancellable *cancellable,
80 GAsyncReadyCallback callback,
81 gpointer user_data);
82
83 GVariant * (* prompt_finish) (SecretService *self,
84 GAsyncResult *result,
85 GError **error);
86
87 GType (* get_collection_gtype) (SecretService *self);
88
89 GType (* get_item_gtype) (SecretService *self);
90
91 /*< private >*/
92 gpointer padding[14];
93 };
94
95 GType secret_service_get_type (void) G_GNUC_ CONST;
96
97 GType secret_service_get_collection_gtype (SecretService *self);
98
99 GType secret_service_get_item_gtype (SecretService *self);
100
101 void secret_service_get (SecretService Flags flags,
102 GCancellable *cancellable,
103 GAsyncReadyCa llback callback,
104 gpointer user _data);
105
106 SecretService * secret_service_get_finish (GAsyncResult *result,
107 GError **erro r);
108
109 SecretService * secret_service_get_sync (SecretService Flags flags,
110 GCancellable *cancellable,
111 GError **erro r);
112
113 void secret_service_disconnect (void);
114
115 void secret_service_open (GType service _gtype,
116 const gchar * service_bus_name,
117 SecretService Flags flags,
118 GCancellable *cancellable,
119 GAsyncReadyCa llback callback,
120 gpointer user _data);
121
122 SecretService * secret_service_open_finish (GAsyncResult *result,
123 GError **erro r);
124
125 SecretService * secret_service_open_sync (GType service _gtype,
126 const gchar * service_bus_name,
127 SecretService Flags flags,
128 GCancellable *cancellable,
129 GError **erro r);
130
131 SecretServiceFlags secret_service_get_flags (SecretService *self);
132
133 const gchar * secret_service_get_session_algorithms (SecretService *self);
134
135 GList * secret_service_get_collections (SecretService *self);
136
137 void secret_service_ensure_session (SecretService *self,
138 GCancellable *cancellable,
139 GAsyncReadyCa llback callback,
140 gpointer user _data);
141
142 gboolean secret_service_ensure_session_finish (SecretService *self,
143 GAsyncResult *result,
144 GError **erro r);
145
146 gboolean secret_service_ensure_session_sync (SecretService *self,
147 GCancellable *cancellable,
148 GError **erro r);
149
150 void secret_service_load_collections (SecretService *self,
151 GCancellable *cancellable,
152 GAsyncReadyCa llback callback,
153 gpointer user _data);
154
155 gboolean secret_service_load_collections_finish (SecretService *self,
156 GAsyncResult *result,
157 GError **erro r);
158
159 gboolean secret_service_load_collections_sync (SecretService *self,
160 GCancellable *cancellable,
161 GError **erro r);
162
163 GVariant * secret_service_prompt_sync (SecretService *self,
164 SecretPrompt *prompt,
165 GCancellable *cancellable,
166 const GVarian tType *return_type,
167 GError **erro r);
168
169 void secret_service_prompt (SecretService *self,
170 SecretPrompt *prompt,
171 const GVarian tType *return_type,
172 GCancellable *cancellable,
173 GAsyncReadyCa llback callback,
174 gpointer user _data);
175
176 GVariant * secret_service_prompt_finish (SecretService *self,
177 GAsyncResult *result,
178 GError **erro r);
179
180 void secret_service_search (SecretService *service,
181 const SecretS chema *schema,
182 GHashTable *a ttributes,
183 SecretSearchF lags flags,
184 GCancellable *cancellable,
185 GAsyncReadyCa llback callback,
186 gpointer user _data);
187
188 GList * secret_service_search_finish (SecretService *service,
189 GAsyncResult *result,
190 GError **erro r);
191
192 GList * secret_service_search_sync (SecretService *service,
193 const SecretS chema *schema,
194 GHashTable *a ttributes,
195 SecretSearchF lags flags,
196 GCancellable *cancellable,
197 GError **erro r);
198
199 void secret_service_lock (SecretService *service,
200 GList *object s,
201 GCancellable *cancellable,
202 GAsyncReadyCa llback callback,
203 gpointer user _data);
204
205 gint secret_service_lock_finish (SecretService *service,
206 GAsyncResult *result,
207 GList **locke d,
208 GError **erro r);
209
210 gint secret_service_lock_sync (SecretService *service,
211 GList *object s,
212 GCancellable *cancellable,
213 GList **locke d,
214 GError **erro r);
215
216 void secret_service_unlock (SecretService *service,
217 GList *object s,
218 GCancellable *cancellable,
219 GAsyncReadyCa llback callback,
220 gpointer user _data);
221
222 gint secret_service_unlock_finish (SecretService *service,
223 GAsyncResult *result,
224 GList **unloc ked,
225 GError **erro r);
226
227 gint secret_service_unlock_sync (SecretService *service,
228 GList *object s,
229 GCancellable *cancellable,
230 GList **unloc ked,
231 GError **erro r);
232
233 void secret_service_store (SecretService *service,
234 const SecretS chema *schema,
235 GHashTable *a ttributes,
236 const gchar * collection,
237 const gchar * label,
238 SecretValue * value,
239 GCancellable *cancellable,
240 GAsyncReadyCa llback callback,
241 gpointer user _data);
242
243 gboolean secret_service_store_finish (SecretService *service,
244 GAsyncResult *result,
245 GError **erro r);
246
247 gboolean secret_service_store_sync (SecretService *service,
248 const SecretS chema *schema,
249 GHashTable *a ttributes,
250 const gchar * collection,
251 const gchar * label,
252 SecretValue * value,
253 GCancellable *cancellable,
254 GError **erro r);
255
256 void secret_service_lookup (SecretService *service,
257 const SecretS chema *schema,
258 GHashTable *a ttributes,
259 GCancellable *cancellable,
260 GAsyncReadyCa llback callback,
261 gpointer user _data);
262
263 SecretValue * secret_service_lookup_finish (SecretService *service,
264 GAsyncResult *result,
265 GError **erro r);
266
267 SecretValue * secret_service_lookup_sync (SecretService *service,
268 const SecretS chema *schema,
269 GHashTable *a ttributes,
270 GCancellable *cancellable,
271 GError **erro r);
272
273 void secret_service_clear (SecretService *service,
274 const SecretS chema *schema,
275 GHashTable *a ttributes,
276 GCancellable *cancellable,
277 GAsyncReadyCa llback callback,
278 gpointer user _data);
279
280 gboolean secret_service_clear_finish (SecretService *service,
281 GAsyncResult *result,
282 GError **erro r);
283
284 gboolean secret_service_clear_sync (SecretService *service,
285 const SecretS chema *schema,
286 GHashTable *a ttributes,
287 GCancellable *cancellable,
288 GError **erro r);
289
290 void secret_service_set_alias (SecretService *service,
291 const gchar * alias,
292 SecretCollect ion *collection,
293 GCancellable *cancellable,
294 GAsyncReadyCa llback callback,
295 gpointer user _data);
296
297 gboolean secret_service_set_alias_finish (SecretService *service,
298 GAsyncResult *result,
299 GError **erro r);
300
301 gboolean secret_service_set_alias_sync (SecretService *service,
302 const gchar * alias,
303 SecretCollect ion *collection,
304 GCancellable *cancellable,
305 GError **erro r);
306
307 G_END_DECLS
308
309 #endif /* __SECRET_SERVICE_H___ */
OLDNEW
« no previous file with comments | « third_party/libsecret/secret-schemas.h ('k') | third_party/libsecret/secret-types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698