1 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ 2 /* gnome-keyring-private.h - private header for keyring 3 4 Copyright (C) 2003 Red Hat, Inc 5 6 The Gnome Keyring Library is free software; you can redistribute it and/or 7 modify it under the terms of the GNU Library General Public License as 8 published by the Free Software Foundation; either version 2 of the 9 License, or (at your option) any later version. 10 11 The Gnome Keyring Library 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. See the GNU 14 Library General Public License for more details. 15 16 You should have received a copy of the GNU Library General Public 17 License along with the Gnome Library; see the file COPYING.LIB. If not, 18 write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 19 Boston, MA 02111-1307, USA. 20 21 Author: Alexander Larsson <alexl@redhat.com> 22 */ 23 24 #ifndef GNOME_KEYRING_PRIVATE_H 25 #define GNOME_KEYRING_PRIVATE_H 26 27 #include "gnome-keyring.h" 28 29 #include "gkr-callback.h" 30 #include "gkr-operation.h" 31 32 #include <dbus/dbus.h> 33 34 struct GnomeKeyringApplicationRef { 35 char *display_name; 36 char *pathname; 37 }; 38 39 struct GnomeKeyringAccessControl { 40 GnomeKeyringApplicationRef *application; /* null for all */ 41 GnomeKeyringAccessType types_allowed; 42 }; 43 44 struct GnomeKeyringInfo { 45 /* <private> */ 46 gboolean lock_on_idle; 47 guint32 lock_timeout; 48 time_t mtime; 49 time_t ctime; 50 gboolean is_locked; 51 }; 52 53 struct GnomeKeyringItemInfo { 54 GnomeKeyringItemType type; 55 char *display_name; 56 char *secret; 57 time_t mtime; 58 time_t ctime; 59 }; 60 61 void _gnome_keyring_memory_dump (void); 62 extern gboolean gnome_keyring_memory_warning; 63 64 #define BROKEN GNOME_KEYRING_RESULT_IO_ERROR 65 66 #define SECRETS_SERVICE "org.freedesktop.secrets" 67 #define SERVICE_PATH "/org/freedesktop/secrets" 68 #define COLLECTION_INTERFACE "org.freedesktop.Secret.Collection" 69 #define ITEM_INTERFACE "org.freedesktop.Secret.Item" 70 #define PROMPT_INTERFACE "org.freedesktop.Secret.Prompt" 71 #define SERVICE_INTERFACE "org.freedesktop.Secret.Service" 72 #define COLLECTION_PREFIX "/org/freedesktop/secrets/collection/" 73 #define COLLECTION_DEFAULT "/org/freedesktop/secrets/aliases/default" 74 75 #define ERROR_IS_LOCKED "org.freedesktop.Secret.Error.IsLocked" 76 #define ERROR_NO_SESSION "org.freedesktop.Secret.Error.NoSession" 77 #define ERROR_NO_SUCH_OBJECT "org.freedesktop.Secret.Error.NoSuchObject" 78 79 #define NORMAL_ALLOCATOR ((EggBufferAllocator)g_realloc) 80 #define SECURE_ALLOCATOR ((EggBufferAllocator)gnome_keyring_memory_realloc) 81 82 #endif /* GNOME_KEYRING_PRIVATE_H */ 83