2011-09-25 06:22:36 +00:00
|
|
|
/* GSecret - GLib wrapper for Secret Service
|
|
|
|
*
|
2012-01-23 16:20:18 +00:00
|
|
|
* Copyright 2012 Red Hat Inc.
|
2011-09-25 06:22:36 +00:00
|
|
|
*
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Lesser General Public License as published
|
|
|
|
* by the Free Software Foundation; either version 2 of the licence or (at
|
|
|
|
* your option) any later version.
|
|
|
|
*
|
|
|
|
* See the included COPYING file for more information.
|
|
|
|
*/
|
|
|
|
|
2012-01-20 14:10:35 +00:00
|
|
|
#ifndef __GSECRET_COLLECTION_H__
|
|
|
|
#define __GSECRET_COLLECTION_H__
|
2011-09-25 06:22:36 +00:00
|
|
|
|
|
|
|
#include <gio/gio.h>
|
|
|
|
|
2012-01-20 14:10:35 +00:00
|
|
|
#include "gsecret-types.h"
|
|
|
|
|
2011-09-25 06:22:36 +00:00
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
2012-01-20 14:10:35 +00:00
|
|
|
#define GSECRET_TYPE_COLLECTION (gsecret_collection_get_type ())
|
|
|
|
#define GSECRET_COLLECTION(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), GSECRET_TYPE_COLLECTION, GSecretCollection))
|
|
|
|
#define GSECRET_COLLECTION_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), GSECRET_TYPE_COLLECTION, GSecretCollectionClass))
|
|
|
|
#define GSECRET_IS_COLLECTION(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), GSECRET_TYPE_COLLECTION))
|
|
|
|
#define GSECRET_IS_COLLECTION_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), GSECRET_TYPE_COLLECTION))
|
|
|
|
#define GSECRET_COLLECTION_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), GSECRET_TYPE_COLLECTION, GSecretCollectionClass))
|
|
|
|
|
|
|
|
typedef struct _GSecretCollectionClass GSecretCollectionClass;
|
|
|
|
typedef struct _GSecretCollectionPrivate GSecretCollectionPrivate;
|
2011-09-25 06:22:36 +00:00
|
|
|
|
2012-01-20 14:10:35 +00:00
|
|
|
struct _GSecretCollection {
|
|
|
|
GDBusProxy parent;
|
|
|
|
GSecretCollectionPrivate *pv;
|
|
|
|
};
|
2011-09-25 06:22:36 +00:00
|
|
|
|
2012-01-20 14:10:35 +00:00
|
|
|
struct _GSecretCollectionClass {
|
2011-09-25 06:22:36 +00:00
|
|
|
GDBusProxyClass parent_class;
|
2012-01-20 14:10:35 +00:00
|
|
|
gpointer padding[8];
|
|
|
|
};
|
2011-09-25 06:22:36 +00:00
|
|
|
|
2012-01-20 14:10:35 +00:00
|
|
|
GType gsecret_collection_get_type (void) G_GNUC_CONST;
|
2011-09-25 06:22:36 +00:00
|
|
|
|
2012-01-20 14:10:35 +00:00
|
|
|
void gsecret_collection_new (GSecretService *service,
|
|
|
|
const gchar *collection_path,
|
|
|
|
GCancellable *cancellable,
|
|
|
|
GAsyncReadyCallback callback,
|
|
|
|
gpointer user_data);
|
2011-09-25 06:22:36 +00:00
|
|
|
|
2012-01-20 14:10:35 +00:00
|
|
|
GSecretCollection * gsecret_collection_new_finish (GAsyncResult *result,
|
|
|
|
GError **error);
|
|
|
|
|
|
|
|
GSecretCollection * gsecret_collection_new_sync (GSecretService *service,
|
|
|
|
const gchar *collection_path,
|
|
|
|
GCancellable *cancellable,
|
|
|
|
GError **error);
|
|
|
|
|
|
|
|
void gsecret_collection_refresh (GSecretCollection *self);
|
|
|
|
|
|
|
|
void gsecret_collection_delete (GSecretCollection *self,
|
|
|
|
GCancellable *cancellable,
|
|
|
|
GAsyncReadyCallback callback,
|
|
|
|
gpointer user_data);
|
|
|
|
|
|
|
|
gboolean gsecret_collection_delete_finish (GSecretCollection *self,
|
|
|
|
GAsyncResult *result,
|
|
|
|
GError **error);
|
|
|
|
|
|
|
|
gboolean gsecret_collection_delete_sync (GSecretCollection *self,
|
|
|
|
GCancellable *cancellable,
|
|
|
|
GError **error);
|
|
|
|
|
|
|
|
GList * gsecret_collection_get_items (GSecretCollection *self);
|
2011-09-25 06:22:36 +00:00
|
|
|
|
2012-01-20 14:10:35 +00:00
|
|
|
gchar * gsecret_collection_get_label (GSecretCollection *self);
|
2011-09-25 06:22:36 +00:00
|
|
|
|
2012-01-20 14:10:35 +00:00
|
|
|
void gsecret_collection_set_label (GSecretCollection *self,
|
|
|
|
const gchar *label,
|
|
|
|
GCancellable *cancellable,
|
|
|
|
GAsyncReadyCallback callback,
|
|
|
|
gpointer user_data);
|
2011-09-25 06:22:36 +00:00
|
|
|
|
2012-01-20 14:10:35 +00:00
|
|
|
gboolean gsecret_collection_set_label_finish (GSecretCollection *self,
|
|
|
|
GAsyncResult *result,
|
|
|
|
GError **error);
|
2011-09-25 06:22:36 +00:00
|
|
|
|
2012-01-20 14:10:35 +00:00
|
|
|
gboolean gsecret_collection_set_label_sync (GSecretCollection *self,
|
|
|
|
const gchar *label,
|
|
|
|
GCancellable *cancellable,
|
|
|
|
GError **error);
|
2011-09-25 06:22:36 +00:00
|
|
|
|
2012-01-20 14:10:35 +00:00
|
|
|
gboolean gsecret_collection_get_locked (GSecretCollection *self);
|
2011-09-25 06:22:36 +00:00
|
|
|
|
2012-01-20 14:10:35 +00:00
|
|
|
guint64 gsecret_collection_get_created (GSecretCollection *self);
|
2011-09-25 06:22:36 +00:00
|
|
|
|
2012-01-20 14:10:35 +00:00
|
|
|
guint64 gsecret_collection_get_modified (GSecretCollection *self);
|
2011-09-25 06:22:36 +00:00
|
|
|
|
|
|
|
G_END_DECLS
|
|
|
|
|
2012-01-20 14:10:35 +00:00
|
|
|
#endif /* __GSECRET_COLLECTION_H___ */
|