4
* Copyright (C) 2006 Stefan Walter
6
* This program is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; either version 2 of the License, or
9
* (at your option) any later version.
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14
* See the GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with this program; if not, write to the
17
* Free Software Foundation, Inc.,
18
* 59 Temple Place, Suite 330,
19
* Boston, MA 02111-1307, USA.
23
* SeahorseCredential: Represents a gnome-keyring item
25
* - Derived from SeahorseKey
28
* display-name: (gchar*) The display name for the key.
29
* display-id: (gchar*) The keyid to display.
30
* simple-name: (gchar*) Shortened display name for the key (for use in files etc...).
31
* fingerprint: (gchar*) Displayable fingerprint for the key.
32
* validity: (SeahorseValidity) The key validity.
33
* trust: (SeahorseValidity) Trust for the key.
34
* expires: (gulong) Date this key expires or 0.
35
* length: (gint) The length of the key in bits.
36
* stock-id: (string) The stock icon id.
39
#ifndef __SEAHORSE_GKEYRING_ITEM_H__
40
#define __SEAHORSE_GKEYRING_ITEM_H__
43
#include <gnome-keyring.h>
45
#include "seahorse-gkr-module.h"
47
#include "seahorse-key.h"
48
#include "seahorse-source.h"
51
SEAHORSE_GKEYRING_USE_OTHER,
52
SEAHORSE_GKEYRING_USE_NETWORK,
53
SEAHORSE_GKEYRING_USE_WEB,
54
SEAHORSE_GKEYRING_USE_PGP,
55
SEAHORSE_GKEYRING_USE_SSH,
56
} SeahorseGKeyringUse;
58
#define SEAHORSE_TYPE_GKEYRING_ITEM (seahorse_gkeyring_item_get_type ())
59
#define SEAHORSE_GKEYRING_TYPE_ITEM SEAHORSE_TYPE_GKEYRING_ITEM
60
#define SEAHORSE_GKEYRING_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SEAHORSE_TYPE_GKEYRING_ITEM, SeahorseGKeyringItem))
61
#define SEAHORSE_GKEYRING_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SEAHORSE_TYPE_GKEYRING_ITEM, SeahorseGKeyringItemClass))
62
#define SEAHORSE_IS_GKEYRING_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SEAHORSE_TYPE_GKEYRING_ITEM))
63
#define SEAHORSE_IS_GKEYRING_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SEAHORSE_TYPE_GKEYRING_ITEM))
64
#define SEAHORSE_GKEYRING_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SEAHORSE_TYPE_GKEYRING_ITEM_KEY, SeahorseGKeyringItemClass))
67
typedef struct _SeahorseGKeyringItem SeahorseGKeyringItem;
68
typedef struct _SeahorseGKeyringItemClass SeahorseGKeyringItemClass;
70
struct _SeahorseGKeyringItem {
75
GnomeKeyringItemInfo *info;
76
GnomeKeyringAttributeList *attributes;
80
struct _SeahorseGKeyringItemClass {
81
SeahorseKeyClass parent_class;
84
// TODO: arguments specific to GKeyring Item
85
SeahorseGKeyringItem* seahorse_gkeyring_item_new (SeahorseSource *sksrc,
87
GnomeKeyringItemInfo *info,
88
GnomeKeyringAttributeList *attributes,
91
GType seahorse_gkeyring_item_get_type (void);
93
GQuark seahorse_gkeyring_item_get_cannonical (guint32 item_id);
95
gchar* seahorse_gkeyring_item_get_description (SeahorseGKeyringItem *git);
97
const gchar* seahorse_gkeyring_item_get_attribute (SeahorseGKeyringItem *git,
100
SeahorseGKeyringUse seahorse_gkeyring_item_get_use (SeahorseGKeyringItem *git);
102
#endif /* __SEAHORSE_GKEYRING_ITEM_H__ */