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.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __GSECRET_ITEM_H__
|
|
|
|
#define __GSECRET_ITEM_H__
|
|
|
|
|
|
|
|
#include <gio/gio.h>
|
|
|
|
|
|
|
|
#include "gsecret-item.h"
|
2012-01-11 06:44:32 +00:00
|
|
|
#include "gsecret-service.h"
|
2011-09-25 06:22:36 +00:00
|
|
|
#include "gsecret-value.h"
|
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
|
|
|
#define GSECRET_TYPE_ITEM (gsecret_item_get_type ())
|
|
|
|
#define GSECRET_ITEM(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), GSECRET_TYPE_ITEM, GSecretItem))
|
|
|
|
#define GSECRET_ITEM_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), GSECRET_TYPE_ITEM, GSecretItemClass))
|
|
|
|
#define GSECRET_IS_ITEM(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), GSECRET_TYPE_ITEM))
|
|
|
|
#define GSECRET_IS_ITEM_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), GSECRET_TYPE_ITEM))
|
|
|
|
#define GSECRET_ITEM_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), GSECRET_TYPE_ITEM, GSecretItemClass))
|
|
|
|
|
|
|
|
typedef struct _GSecretItemClass GSecretItemClass;
|
2012-01-23 16:20:18 +00:00
|
|
|
typedef struct _GSecretItemPrivate GSecretItemPrivate;
|
2011-09-25 06:22:36 +00:00
|
|
|
|
|
|
|
struct _GSecretItem {
|
|
|
|
GDBusProxy parent_instance;
|
2012-01-23 16:20:18 +00:00
|
|
|
GSecretItemPrivate *pv;;
|
2012-01-20 14:10:35 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct _GSecretItemClass {
|
|
|
|
GDBusProxyClass parent_class;
|
|
|
|
gpointer padding[4];
|
2011-09-25 06:22:36 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
GType gsecret_item_get_type (void) G_GNUC_CONST;
|
|
|
|
|
2012-01-20 14:10:35 +00:00
|
|
|
void gsecret_item_new (GSecretService *service,
|
|
|
|
const gchar *item_path,
|
|
|
|
GCancellable *cancellable,
|
|
|
|
GAsyncReadyCallback callback,
|
|
|
|
gpointer user_data);
|
|
|
|
|
|
|
|
GSecretItem * gsecret_item_new_finish (GAsyncResult *result,
|
|
|
|
GError **error);
|
|
|
|
|
|
|
|
GSecretItem * gsecret_item_new_sync (GSecretService *service,
|
|
|
|
const gchar *item_path,
|
|
|
|
GCancellable *cancellable,
|
|
|
|
GError **error);
|
|
|
|
|
|
|
|
void gsecret_item_refresh (GSecretItem *self);
|
2011-09-25 06:22:36 +00:00
|
|
|
|
|
|
|
void gsecret_item_delete (GSecretItem *self,
|
|
|
|
GCancellable *cancellable,
|
|
|
|
GAsyncReadyCallback callback,
|
|
|
|
gpointer user_data);
|
|
|
|
|
|
|
|
gboolean gsecret_item_delete_finish (GSecretItem *self,
|
|
|
|
GAsyncResult *result,
|
|
|
|
GError **error);
|
|
|
|
|
|
|
|
gboolean gsecret_item_delete_sync (GSecretItem *self,
|
|
|
|
GCancellable *cancellable,
|
|
|
|
GError **error);
|
|
|
|
|
|
|
|
void gsecret_item_get_secret (GSecretItem *self,
|
|
|
|
GCancellable *cancellable,
|
|
|
|
GAsyncReadyCallback callback,
|
|
|
|
gpointer user_data);
|
|
|
|
|
|
|
|
GSecretValue * gsecret_item_get_secret_finish (GSecretItem *self,
|
|
|
|
GAsyncResult *result,
|
|
|
|
GError **error);
|
|
|
|
|
|
|
|
GSecretValue * gsecret_item_get_secret_sync (GSecretItem *self,
|
|
|
|
GCancellable *cancellable,
|
|
|
|
GError **error);
|
|
|
|
|
|
|
|
GHashTable* gsecret_item_get_attributes (GSecretItem *self);
|
|
|
|
|
|
|
|
void gsecret_item_set_attributes (GSecretItem *self,
|
|
|
|
GHashTable *attributes,
|
|
|
|
GCancellable *cancellable,
|
|
|
|
GAsyncReadyCallback callback,
|
|
|
|
gpointer user_data);
|
|
|
|
|
|
|
|
gboolean gsecret_item_set_attributes_finish (GSecretItem *self,
|
|
|
|
GAsyncResult *result,
|
|
|
|
GError **error);
|
|
|
|
|
2012-01-16 14:08:46 +00:00
|
|
|
gboolean gsecret_item_set_attributes_sync (GSecretItem *self,
|
2011-09-25 06:22:36 +00:00
|
|
|
GHashTable *attributes,
|
|
|
|
GCancellable *cancellable,
|
|
|
|
GError **error);
|
|
|
|
|
2012-01-16 14:08:46 +00:00
|
|
|
gchar * gsecret_item_get_label (GSecretItem *self);
|
2011-09-25 06:22:36 +00:00
|
|
|
|
|
|
|
void gsecret_item_set_label (GSecretItem *self,
|
|
|
|
const gchar *label,
|
|
|
|
GCancellable *cancellable,
|
|
|
|
GAsyncReadyCallback callback,
|
|
|
|
gpointer user_data);
|
|
|
|
|
|
|
|
gboolean gsecret_item_set_label_finish (GSecretItem *self,
|
|
|
|
GAsyncResult *result,
|
|
|
|
GError **error);
|
|
|
|
|
2012-01-16 14:08:46 +00:00
|
|
|
gboolean gsecret_item_set_label_sync (GSecretItem *self,
|
2011-09-25 06:22:36 +00:00
|
|
|
const gchar *label,
|
|
|
|
GCancellable *cancellable,
|
|
|
|
GError **error);
|
|
|
|
|
|
|
|
gboolean gsecret_item_get_locked (GSecretItem *self);
|
|
|
|
|
|
|
|
guint64 gsecret_item_get_created (GSecretItem *self);
|
|
|
|
|
|
|
|
guint64 gsecret_item_get_modified (GSecretItem *self);
|
|
|
|
|
|
|
|
G_END_DECLS
|
|
|
|
|
|
|
|
#endif /* __G_ITEM_H___ */
|