| 1 |
/* |
| 2 |
* gnome-keyring |
| 3 |
* |
| 4 |
* Copyright (C) 2010 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_TRUST_H__ |
| 22 |
#define __GKM_TRUST_H__ |
| 23 |
|
| 24 |
#include <glib-object.h> |
| 25 |
|
| 26 |
#include "gkm-object.h" |
| 27 |
|
| 28 |
typedef enum _GkmTrustLevel { |
| 29 |
GKM_TRUST_UNKNOWN = 0, |
| 30 |
GKM_TRUST_DISTRUSTED = 1, |
| 31 |
GKM_TRUST_TRUSTED = 2, |
| 32 |
GKM_TRUST_ANCHOR = 3, |
| 33 |
} GkmTrustLevel; |
| 34 |
|
| 35 |
#define GKM_FACTORY_TRUST (gkm_trust_get_factory ()) |
| 36 |
#define GKM_TYPE_TRUST (gkm_trust_get_type ()) |
| 37 |
#define GKM_TRUST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GKM_TYPE_TRUST, GkmTrust)) |
| 38 |
#define GKM_TRUST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GKM_TYPE_TRUST, GkmTrustClass)) |
| 39 |
#define GKM_IS_TRUST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GKM_TYPE_TRUST)) |
| 40 |
#define GKM_IS_TRUST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GKM_TYPE_TRUST)) |
| 41 |
#define GKM_TRUST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GKM_TYPE_TRUST, GkmTrustClass)) |
| 42 |
|
| 43 |
typedef struct _GkmTrustClass GkmTrustClass; |
| 44 |
typedef struct _GkmTrustPrivate GkmTrustPrivate; |
| 45 |
|
| 46 |
struct _GkmTrust { |
| 47 |
GkmObject parent; |
| 48 |
GkmTrustPrivate *pv; |
| 49 |
}; |
| 50 |
|
| 51 |
struct _GkmTrustClass { |
| 52 |
GkmObjectClass parent_class; |
| 53 |
|
| 54 |
GkmTrustLevel (*get_trust_level) (GkmTrust *self, const gchar *purpose); |
| 55 |
}; |
| 56 |
|
| 57 |
GType gkm_trust_get_type (void); |
| 58 |
|
| 59 |
GkmTrustLevel gkm_trust_get_level_for_purpose (GkmTrust *self, const gchar *purpose); |
| 60 |
|
| 61 |
#endif /* __GKM_TRUST_H__ */ |