1 /* 2 * Seahorse 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 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. 10 * 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, see <http://www.gnu.org/licenses/>. 17 */ 18 19 #ifndef __SEAHORSE_TYPES_H__ 20 #define __SEAHORSE_TYPES_H__ 21 22 #include <glib.h> 23 #include <glib-object.h> 24 25 #include "libcryptui/cryptui.h" 26 27 G_BEGIN_DECLS 28 29 30 #define SEAHORSE_TYPE_LOCATION (seahorse_location_get_type ()) 31 32 #define SEAHORSE_TYPE_USAGE (seahorse_usage_get_type ()) 33 34 /* 35 * These types should never change. These values are exported via DBUS. In the 36 * case of a key being in multiple locations, the highest location always 'wins'. 37 */ 38 typedef enum { 39 SEAHORSE_LOCATION_INVALID = 0, 40 SEAHORSE_LOCATION_MISSING = 10, 41 SEAHORSE_LOCATION_SEARCHING = 20, 42 SEAHORSE_LOCATION_REMOTE = 50, 43 SEAHORSE_LOCATION_LOCAL = 100 44 } SeahorseLocation; 45 46 GType seahorse_location_get_type (void); 47 48 /* Again, never change these values */ 49 typedef enum { 50 SEAHORSE_USAGE_NONE = 0, 51 SEAHORSE_USAGE_SYMMETRIC_KEY = 1, 52 SEAHORSE_USAGE_PUBLIC_KEY = 2, 53 SEAHORSE_USAGE_PRIVATE_KEY = 3, 54 SEAHORSE_USAGE_CREDENTIALS = 4, 55 SEAHORSE_USAGE_IDENTITY = 5, 56 SEAHORSE_USAGE_OTHER = 10 57 } SeahorseUsage; 58 59 GType seahorse_usage_get_type (void); 60 61 typedef enum { 62 SEAHORSE_FLAG_IS_VALID = CRYPTUI_FLAG_IS_VALID, 63 SEAHORSE_FLAG_CAN_ENCRYPT = CRYPTUI_FLAG_CAN_ENCRYPT, 64 SEAHORSE_FLAG_CAN_SIGN = CRYPTUI_FLAG_CAN_SIGN, 65 SEAHORSE_FLAG_EXPIRED = CRYPTUI_FLAG_EXPIRED, 66 SEAHORSE_FLAG_REVOKED = CRYPTUI_FLAG_REVOKED, 67 SEAHORSE_FLAG_DISABLED = CRYPTUI_FLAG_DISABLED, 68 SEAHORSE_FLAG_TRUSTED = CRYPTUI_FLAG_TRUSTED, 69 SEAHORSE_FLAG_EXPORTABLE = CRYPTUI_FLAG_EXPORTABLE, 70 SEAHORSE_FLAG_DELETABLE = 0x10000000 71 } SeahorseKeyFlags; 72 73 #define SEAHORSE_TAG_INVALID 0 74 75 G_END_DECLS 76 77 #endif 78