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."
20 #ifndef __SECRET_PATHS_H__
21 #define __SECRET_PATHS_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"
35 void secret_collection_new_for_dbus_path (SecretService
*service
,
36 const gchar
*collection_path
,
37 SecretCollectionFlags flags
,
38 GCancellable
*cancellable
,
39 GAsyncReadyCallback callback
,
42 SecretCollection
* secret_collection_new_for_dbus_path_finish (GAsyncResult
*result
,
45 SecretCollection
* secret_collection_new_for_dbus_path_sync (SecretService
*service
,
46 const gchar
*collection_path
,
47 SecretCollectionFlags flags
,
48 GCancellable
*cancellable
,
51 void secret_collection_search_for_dbus_paths (SecretCollection
*collection
,
52 const SecretSchema
*schema
,
53 GHashTable
*attributes
,
54 GCancellable
*cancellable
,
55 GAsyncReadyCallback callback
,
58 gchar
** secret_collection_search_for_dbus_paths_finish (SecretCollection
*collection
,
62 gchar
** secret_collection_search_for_dbus_paths_sync (SecretCollection
*collection
,
63 const SecretSchema
*schema
,
64 GHashTable
*attributes
,
65 GCancellable
*cancellable
,
68 void secret_item_new_for_dbus_path (SecretService
*service
,
69 const gchar
*item_path
,
70 SecretItemFlags flags
,
71 GCancellable
*cancellable
,
72 GAsyncReadyCallback callback
,
75 SecretItem
* secret_item_new_for_dbus_path_finish (GAsyncResult
*result
,
78 SecretItem
* secret_item_new_for_dbus_path_sync (SecretService
*service
,
79 const gchar
*item_path
,
80 SecretItemFlags flags
,
81 GCancellable
*cancellable
,
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
,
93 gboolean
secret_service_search_for_dbus_paths_finish (SecretService
*self
,
99 gboolean
secret_service_search_for_dbus_paths_sync (SecretService
*self
,
100 const SecretSchema
*schema
,
101 GHashTable
*attributes
,
102 GCancellable
*cancellable
,
107 void secret_service_get_secret_for_dbus_path (SecretService
*self
,
108 const gchar
*item_path
,
109 GCancellable
*cancellable
,
110 GAsyncReadyCallback callback
,
113 SecretValue
* secret_service_get_secret_for_dbus_path_finish (SecretService
*self
,
114 GAsyncResult
*result
,
117 SecretValue
* secret_service_get_secret_for_dbus_path_sync (SecretService
*self
,
118 const gchar
*item_path
,
119 GCancellable
*cancellable
,
122 void secret_service_get_secrets_for_dbus_paths (SecretService
*self
,
123 const gchar
**item_paths
,
124 GCancellable
*cancellable
,
125 GAsyncReadyCallback callback
,
128 GHashTable
* secret_service_get_secrets_for_dbus_paths_finish (SecretService
*self
,
129 GAsyncResult
*result
,
132 GHashTable
* secret_service_get_secrets_for_dbus_paths_sync (SecretService
*self
,
133 const gchar
**item_paths
,
134 GCancellable
*cancellable
,
137 gint
secret_service_lock_dbus_paths_sync (SecretService
*self
,
139 GCancellable
*cancellable
,
143 void secret_service_lock_dbus_paths (SecretService
*self
,
145 GCancellable
*cancellable
,
146 GAsyncReadyCallback callback
,
149 gint
secret_service_lock_dbus_paths_finish (SecretService
*self
,
150 GAsyncResult
*result
,
154 gint
secret_service_unlock_dbus_paths_sync (SecretService
*self
,
156 GCancellable
*cancellable
,
160 void secret_service_unlock_dbus_paths (SecretService
*self
,
162 GCancellable
*cancellable
,
163 GAsyncReadyCallback callback
,
166 gint
secret_service_unlock_dbus_paths_finish (SecretService
*self
,
167 GAsyncResult
*result
,
171 GVariant
* secret_service_prompt_at_dbus_path_sync (SecretService
*self
,
172 const gchar
*prompt_path
,
173 GCancellable
*cancellable
,
174 const GVariantType
*return_type
,
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
,
184 GVariant
* secret_service_prompt_at_dbus_path_finish (SecretService
*self
,
185 GAsyncResult
*result
,
188 void secret_service_delete_item_dbus_path (SecretService
*self
,
189 const gchar
*item_path
,
190 GCancellable
*cancellable
,
191 GAsyncReadyCallback callback
,
194 gboolean
secret_service_delete_item_dbus_path_finish (SecretService
*self
,
195 GAsyncResult
*result
,
198 gboolean
secret_service_delete_item_dbus_path_sync (SecretService
*self
,
199 const gchar
*item_path
,
200 GCancellable
*cancellable
,
203 void secret_service_create_collection_dbus_path (SecretService
*self
,
204 GHashTable
*properties
,
206 SecretCollectionCreateFlags flags
,
207 GCancellable
*cancellable
,
208 GAsyncReadyCallback callback
,
211 gchar
* secret_service_create_collection_dbus_path_finish (SecretService
*self
,
212 GAsyncResult
*result
,
215 gchar
* secret_service_create_collection_dbus_path_sync (SecretService
*self
,
216 GHashTable
*properties
,
218 SecretCollectionCreateFlags flags
,
219 GCancellable
*cancellable
,
222 void secret_service_create_item_dbus_path (SecretService
*self
,
223 const gchar
*collection_path
,
224 GHashTable
*properties
,
226 SecretItemCreateFlags flags
,
227 GCancellable
*cancellable
,
228 GAsyncReadyCallback callback
,
231 gchar
* secret_service_create_item_dbus_path_finish (SecretService
*self
,
232 GAsyncResult
*result
,
235 gchar
* secret_service_create_item_dbus_path_sync (SecretService
*self
,
236 const gchar
*collection_path
,
237 GHashTable
*properties
,
239 SecretItemCreateFlags flags
,
240 GCancellable
*cancellable
,
243 void secret_service_read_alias_dbus_path (SecretService
*self
,
245 GCancellable
*cancellable
,
246 GAsyncReadyCallback callback
,
249 gchar
* secret_service_read_alias_dbus_path_finish (SecretService
*self
,
250 GAsyncResult
*result
,
253 gchar
* secret_service_read_alias_dbus_path_sync (SecretService
*self
,
255 GCancellable
*cancellable
,
258 void secret_service_set_alias_to_dbus_path (SecretService
*self
,
260 const gchar
*collection_path
,
261 GCancellable
*cancellable
,
262 GAsyncReadyCallback callback
,
265 gboolean
secret_service_set_alias_to_dbus_path_finish (SecretService
*self
,
266 GAsyncResult
*result
,
269 gboolean
secret_service_set_alias_to_dbus_path_sync (SecretService
*self
,
271 const gchar
*collection_path
,
272 GCancellable
*cancellable
,
275 GVariant
* secret_service_encode_dbus_secret (SecretService
*service
,
278 SecretValue
* secret_service_decode_dbus_secret (SecretService
*service
,
283 #endif /* __SECRET_SERVICE_H___ */