Debian Codegraph @

pkcs11/gnome2-store/gkm-gnome2-storage.h

raw
1 /*
2 * gnome-keyring
3 *
4 * Copyright (C) 2008 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_GNOME2_STORAGE_H__
22 #define __GKM_GNOME2_STORAGE_H__
23
24 #include <glib-object.h>
25
26 #include "gkm/gkm-manager.h"
27 #include "gkm/gkm-secret.h"
28 #include "gkm/gkm-store.h"
29 #include "gkm/gkm-transaction.h"
30
31 #define GKM_TYPE_GNOME2_STORAGE (gkm_gnome2_storage_get_type ())
32 #define GKM_GNOME2_STORAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GKM_TYPE_GNOME2_STORAGE, GkmGnome2Storage))
33 #define GKM_GNOME2_STORAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GKM_TYPE_GNOME2_STORAGE, GkmGnome2StorageClass))
34 #define GKM_IS_GNOME2_STORAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GKM_TYPE_GNOME2_STORAGE))
35 #define GKM_IS_GNOME2_STORAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GKM_TYPE_GNOME2_STORAGE))
36 #define GKM_GNOME2_STORAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GKM_TYPE_GNOME2_STORAGE, GkmGnome2StorageClass))
37
38 typedef struct _GkmGnome2Storage GkmGnome2Storage;
39 typedef struct _GkmGnome2StorageClass GkmGnome2StorageClass;
40
41 struct _GkmGnome2StorageClass {
42 GkmStoreClass parent_class;
43 };
44
45 GType gkm_gnome2_storage_get_type (void);
46
47 GkmGnome2Storage* gkm_gnome2_storage_new (GkmModule *module,
48 const gchar *directory);
49
50 GkmManager* gkm_gnome2_storage_get_manager (GkmGnome2Storage *self);
51
52 const gchar* gkm_gnome2_storage_get_directory (GkmGnome2Storage *self);
53
54 GkmSecret* gkm_gnome2_storage_get_login (GkmGnome2Storage *self);
55
56 gulong gkm_gnome2_storage_token_flags (GkmGnome2Storage *self);
57
58 CK_RV gkm_gnome2_storage_refresh (GkmGnome2Storage *self);
59
60 void gkm_gnome2_storage_create (GkmGnome2Storage *self,
61 GkmTransaction *transaction,
62 GkmObject *object);
63
64 void gkm_gnome2_storage_destroy (GkmGnome2Storage *self,
65 GkmTransaction *transaction,
66 GkmObject *object);
67
68 void gkm_gnome2_storage_relock (GkmGnome2Storage *self,
69 GkmTransaction *transaction,
70 GkmSecret *old_login,
71 GkmSecret *new_login);
72
73 CK_RV gkm_gnome2_storage_unlock (GkmGnome2Storage *self,
74 GkmSecret *login);
75
76 CK_RV gkm_gnome2_storage_lock (GkmGnome2Storage *self);
77
78 #endif /* __GKM_GNOME2_STORAGE_H__ */