| 1 |
/* |
| 2 |
* gnome-keyring |
| 3 |
* |
| 4 |
* Copyright (C) 2009 Stefan Walter |
| 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 |
| 8 |
* published by the Free Software Foundation; either version 2.1 of |
| 9 |
* the License, or (at your option) any later version. |
| 10 |
* |
| 11 |
* This program is distributed in the hope that it will be useful, but |
| 12 |
* WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 14 |
* Lesser General Public License for more details. |
| 15 |
* |
| 16 |
* You should have received a copy of the GNU Lesser General Public |
| 17 |
* License along with this program; if not, see |
| 18 |
* <http://www.gnu.org/licenses/>. |
| 19 |
*/ |
| 20 |
|
| 21 |
#ifndef __GKM_SECRET_DATA_H__ |
| 22 |
#define __GKM_SECRET_DATA_H__ |
| 23 |
|
| 24 |
#include <glib-object.h> |
| 25 |
|
| 26 |
#include "gkm-secret-types.h" |
| 27 |
|
| 28 |
#include "gkm/gkm-types.h" |
| 29 |
|
| 30 |
#define GKM_TYPE_SECRET_DATA (gkm_secret_data_get_type ()) |
| 31 |
#define GKM_SECRET_DATA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GKM_TYPE_SECRET_DATA, GkmSecretData)) |
| 32 |
#define GKM_SECRET_DATA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GKM_TYPE_SECRET_DATA, GkmSecretDataClass)) |
| 33 |
#define GKM_IS_SECRET_DATA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GKM_TYPE_SECRET_DATA)) |
| 34 |
#define GKM_IS_SECRET_DATA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GKM_TYPE_SECRET_DATA)) |
| 35 |
#define GKM_SECRET_DATA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GKM_TYPE_SECRET_DATA, GkmSecretDataClass)) |
| 36 |
|
| 37 |
typedef struct _GkmSecretDataClass GkmSecretDataClass; |
| 38 |
|
| 39 |
struct _GkmSecretDataClass { |
| 40 |
GObjectClass parent_class; |
| 41 |
}; |
| 42 |
|
| 43 |
GType gkm_secret_data_get_type (void); |
| 44 |
|
| 45 |
GkmSecret* gkm_secret_data_get_secret (GkmSecretData *self, |
| 46 |
const gchar *identifier); |
| 47 |
|
| 48 |
const guchar* gkm_secret_data_get_raw (GkmSecretData *self, |
| 49 |
const gchar *identifier, |
| 50 |
gsize *n_result); |
| 51 |
|
| 52 |
void gkm_secret_data_set_secret (GkmSecretData *self, |
| 53 |
const gchar *identifier, |
| 54 |
GkmSecret *secret); |
| 55 |
|
| 56 |
void gkm_secret_data_set_transacted (GkmSecretData *self, |
| 57 |
GkmTransaction *transaction, |
| 58 |
const gchar *identifier, |
| 59 |
GkmSecret *secret); |
| 60 |
|
| 61 |
void gkm_secret_data_remove_secret (GkmSecretData *self, |
| 62 |
const gchar *identifier); |
| 63 |
|
| 64 |
GkmSecret* gkm_secret_data_get_master (GkmSecretData *self); |
| 65 |
|
| 66 |
void gkm_secret_data_set_master (GkmSecretData *self, |
| 67 |
GkmSecret *master); |
| 68 |
|
| 69 |
#endif /* __GKM_SECRET_DATA_H__ */ |