1 /* GSecret - GLib wrapper for Secret Service
3 * Copyright 2012 Red Hat Inc.
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 of the licence or (at
8 * your option) any later version.
10 * See the included COPYING file for more information.
13 #ifndef __GSECRET_COLLECTION_H__
14 #define __GSECRET_COLLECTION_H__
18 #include "gsecret-types.h"
22 #define GSECRET_TYPE_COLLECTION (gsecret_collection_get_type ())
23 #define GSECRET_COLLECTION(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), GSECRET_TYPE_COLLECTION, GSecretCollection))
24 #define GSECRET_COLLECTION_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), GSECRET_TYPE_COLLECTION, GSecretCollectionClass))
25 #define GSECRET_IS_COLLECTION(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), GSECRET_TYPE_COLLECTION))
26 #define GSECRET_IS_COLLECTION_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), GSECRET_TYPE_COLLECTION))
27 #define GSECRET_COLLECTION_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), GSECRET_TYPE_COLLECTION, GSecretCollectionClass))
29 typedef struct _GSecretCollectionClass GSecretCollectionClass;
30 typedef struct _GSecretCollectionPrivate GSecretCollectionPrivate;
32 struct _GSecretCollection {
34 GSecretCollectionPrivate *pv;
37 struct _GSecretCollectionClass {
38 GDBusProxyClass parent_class;
42 GType gsecret_collection_get_type (void) G_GNUC_CONST;
44 void gsecret_collection_new (GSecretService *service,
45 const gchar *collection_path,
46 GCancellable *cancellable,
47 GAsyncReadyCallback callback,
50 GSecretCollection * gsecret_collection_new_finish (GAsyncResult *result,
53 GSecretCollection * gsecret_collection_new_sync (GSecretService *service,
54 const gchar *collection_path,
55 GCancellable *cancellable,
58 void gsecret_collection_refresh (GSecretCollection *self);
60 void gsecret_collection_create (GSecretService *service,
63 GCancellable *cancellable,
64 GAsyncReadyCallback callback,
67 GSecretCollection * gsecret_collection_create_finish (GAsyncResult *result,
70 GSecretCollection * gsecret_collection_create_sync (GSecretService *service,
73 GCancellable *cancellable,
76 void gsecret_collection_delete (GSecretCollection *self,
77 GCancellable *cancellable,
78 GAsyncReadyCallback callback,
81 gboolean gsecret_collection_delete_finish (GSecretCollection *self,
85 gboolean gsecret_collection_delete_sync (GSecretCollection *self,
86 GCancellable *cancellable,
89 GList * gsecret_collection_get_items (GSecretCollection *self);
91 gchar * gsecret_collection_get_label (GSecretCollection *self);
93 void gsecret_collection_set_label (GSecretCollection *self,
95 GCancellable *cancellable,
96 GAsyncReadyCallback callback,
99 gboolean gsecret_collection_set_label_finish (GSecretCollection *self,
100 GAsyncResult *result,
103 gboolean gsecret_collection_set_label_sync (GSecretCollection *self,
105 GCancellable *cancellable,
108 gboolean gsecret_collection_get_locked (GSecretCollection *self);
110 guint64 gsecret_collection_get_created (GSecretCollection *self);
112 guint64 gsecret_collection_get_modified (GSecretCollection *self);
116 #endif /* __GSECRET_COLLECTION_H___ */