2
* Copyright (C) 2011 Collabora Ltd.
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU Lesser General Public License as
6
* published by the Free Software Foundation; either version 2.1 of
7
* the License, or (at your option) any later version.
9
* This program is distributed in the hope that it will be useful, but
10
* WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
* Lesser General Public License for more details.
14
* You should have received a copy of the GNU Lesser General Public
15
* License along with this program; if not, write to the Free Software
16
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
19
* Author: Stef Walter <stefw@collabora.co.uk>
22
#if !defined (__GCR_INSIDE_HEADER__) && !defined (GCR_COMPILATION)
23
#error "Only <gcr/gcr.h> or <gcr/gcr-base.h> can be included directly."
26
#ifndef GCR_GNUPG_KEY_H
27
#define GCR_GNUPG_KEY_H
29
#include <glib-object.h>
31
#include "gcr-column.h"
32
#include "gcr-types.h"
36
#define GCR_GNUPG_KEY_COLUMNS (_gcr_gnupg_key_get_columns ())
37
#define GCR_TYPE_GNUPG_KEY (_gcr_gnupg_key_get_type ())
38
#define GCR_GNUPG_KEY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GCR_TYPE_GNUPG_KEY, GcrGnupgKey))
39
#define GCR_GNUPG_KEY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GCR_TYPE_GNUPG_KEY, GcrGnupgKeyClass))
40
#define GCR_IS_GNUPG_KEY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GCR_TYPE_GNUPG_KEY))
41
#define GCR_IS_GNUPG_KEY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GCR_TYPE_GNUPG_KEY))
42
#define GCR_GNUPG_KEY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GCR_TYPE_GNUPG_KEY, GcrGnupgKeyClass))
44
typedef struct _GcrGnupgKey GcrGnupgKey;
45
typedef struct _GcrGnupgKeyClass GcrGnupgKeyClass;
46
typedef struct _GcrGnupgKeyPrivate GcrGnupgKeyPrivate;
51
GcrGnupgKeyPrivate *pv;
54
struct _GcrGnupgKeyClass {
55
GObjectClass parent_class;
58
GType _gcr_gnupg_key_get_type (void);
60
const GcrColumn* _gcr_gnupg_key_get_columns (void);
62
GcrGnupgKey* _gcr_gnupg_key_new (GPtrArray *pubset,
65
const gchar* _gcr_gnupg_key_get_keyid (GcrGnupgKey *self);
67
GPtrArray* _gcr_gnupg_key_get_public_records (GcrGnupgKey *self);
69
void _gcr_gnupg_key_set_public_records (GcrGnupgKey *self,
72
GPtrArray* _gcr_gnupg_key_get_secret_records (GcrGnupgKey *self);
74
void _gcr_gnupg_key_set_secret_records (GcrGnupgKey *self,
77
GIcon* _gcr_gnupg_key_get_icon (GcrGnupgKey *self);
81
#endif /* __GCR_GNUPG_KEY_H__ */