Debian Codegraph @

pkcs11/gkm/gkm-sexp-key.h

raw
1 /*
2 * gnome-sexp_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_SEXP_KEY_H__
22 #define __GKM_SEXP_KEY_H__
23
24 #include <glib-object.h>
25
26 #include "gkm-sexp.h"
27 #include "gkm-object.h"
28 #include "gkm-types.h"
29
30 #define GKM_TYPE_SEXP_KEY (gkm_sexp_key_get_type ())
31 #define GKM_SEXP_KEY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GKM_TYPE_SEXP_KEY, GkmSexpKey))
32 #define GKM_SEXP_KEY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GKM_TYPE_SEXP_KEY, GkmSexpKeyClass))
33 #define GKM_IS_SEXP_KEY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GKM_TYPE_SEXP_KEY))
34 #define GKM_IS_SEXP_KEY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GKM_TYPE_SEXP_KEY))
35 #define GKM_SEXP_KEY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GKM_TYPE_SEXP_KEY, GkmSexpKeyClass))
36
37 typedef struct _GkmSexpKeyClass GkmSexpKeyClass;
38 typedef struct _GkmSexpKeyPrivate GkmSexpKeyPrivate;
39
40 struct _GkmSexpKey {
41 GkmObject parent;
42 GkmSexpKeyPrivate *pv;
43 };
44
45 struct _GkmSexpKeyClass {
46 GkmObjectClass parent_class;
47
48 /* virtual methods */
49
50 GkmSexp* (*acquire_crypto_sexp) (GkmSexpKey *self, GkmSession *session);
51 };
52
53 GType gkm_sexp_key_get_type (void);
54
55 GkmSexp* gkm_sexp_key_get_base (GkmSexpKey *self);
56
57 void gkm_sexp_key_set_base (GkmSexpKey *self,
58 GkmSexp *sexp);
59
60 int gkm_sexp_key_get_algorithm (GkmSexpKey *self);
61
62 CK_RV gkm_sexp_key_set_part (GkmSexpKey *self,
63 int algorithm,
64 const char *part,
65 CK_ATTRIBUTE_PTR attr);
66
67 CK_RV gkm_sexp_key_set_ec_params (GkmSexpKey *self,
68 int algo,
69 CK_ATTRIBUTE_PTR attr);
70
71 CK_RV gkm_sexp_key_set_ec_q (GkmSexpKey *self,
72 int algo,
73 CK_ATTRIBUTE_PTR attr);
74
75 GkmSexp* gkm_sexp_key_acquire_crypto_sexp (GkmSexpKey *self,
76 GkmSession *session);
77
78 #endif /* __GKM_SEXP_KEY_H__ */