Debian Codegraph @

pkcs11/secret-store/gkm-secret-object.h

raw
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_OBJECT_H__
22 #define __GKM_SECRET_OBJECT_H__
23
24 #include "gkm-secret-types.h"
25
26 #include "gkm/gkm-object.h"
27
28 #include <glib-object.h>
29
30 #define GKM_TYPE_SECRET_OBJECT (gkm_secret_object_get_type ())
31 #define GKM_SECRET_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GKM_TYPE_SECRET_OBJECT, GkmSecretObject))
32 #define GKM_SECRET_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GKM_TYPE_SECRET_OBJECT, GkmSecretObjectClass))
33 #define GKM_IS_SECRET_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GKM_TYPE_SECRET_OBJECT))
34 #define GKM_IS_SECRET_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GKM_TYPE_SECRET_OBJECT))
35 #define GKM_SECRET_OBJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GKM_TYPE_SECRET_OBJECT, GkmSecretObjectClass))
36
37 typedef struct _GkmSecretObjectClass GkmSecretObjectClass;
38 typedef struct _GkmSecretObjectPrivate GkmSecretObjectPrivate;
39
40 struct _GkmSecretObject {
41 GkmObject parent;
42 GkmSecretObjectPrivate *pv;
43 };
44 struct _GkmSecretObjectClass {
45 GkmObjectClass parent_class;
46 GHashTable *identifiers;
47
48 gboolean (*is_locked) (GkmSecretObject *self, GkmSession *session);
49
50 };
51
52 GType gkm_secret_object_get_type (void);
53
54 const gchar* gkm_secret_object_get_identifier (GkmSecretObject *self);
55
56 const gchar* gkm_secret_object_get_label (GkmSecretObject *self);
57
58 void gkm_secret_object_set_label (GkmSecretObject *self,
59 const gchar *label);
60
61 glong gkm_secret_object_get_created (GkmSecretObject *self);
62
63 void gkm_secret_object_set_created (GkmSecretObject *self,
64 glong value);
65
66 void gkm_secret_object_mark_created (GkmSecretObject *self);
67
68 glong gkm_secret_object_get_modified (GkmSecretObject *self);
69
70 void gkm_secret_object_set_modified (GkmSecretObject *self,
71 glong value);
72
73 void gkm_secret_object_begin_modified (GkmSecretObject *self,
74 GkmTransaction *transaction);
75
76 gboolean gkm_secret_object_is_locked (GkmSecretObject *self,
77 GkmSession *session);
78
79 void gkm_secret_object_class_unique_identifiers (GkmSecretObjectClass *klass);
80
81 gchar* gkm_secret_object_anonymous_identifier (void);
82
83 #endif /* __GKM_SECRET_OBJECT_H__ */