4 * Copyright (C) 2001 Ximian, Inc.
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of version 2 of the GNU Lesser General Public
10 * License as published by the Free Software Foundation.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
23 #ifndef _E_PASSWORD_H_
24 #define _E_PASSWORD_H_
27 #include <gtk/gtkwindow.h>
32 initialization is now implicit when you call any of the functions
33 below, although this is only correct if the functions are called
36 e_passwords_shutdown should be called at exit time to synch the
37 password on-disk storage, and to free up in-memory storage. */
38 void e_passwords_init (void);
40 void e_passwords_shutdown (void);
41 void e_passwords_cancel(void);
42 void e_passwords_set_online(int state);
43 void e_passwords_remember_password (const char *component, const char *key);
44 void e_passwords_add_password (const char *key, const char *passwd);
45 char *e_passwords_get_password (const char *component, const char *key);
46 void e_passwords_forget_password (const char *component, const char *key);
47 void e_passwords_forget_passwords (void);
48 void e_passwords_clear_passwords (const char *component);
51 E_PASSWORDS_REMEMBER_NEVER,
52 E_PASSWORDS_REMEMBER_SESSION,
53 E_PASSWORDS_REMEMBER_FOREVER,
54 E_PASSWORDS_REMEMBER_MASK = 0xf,
57 E_PASSWORDS_SECRET = 1<<8,
58 E_PASSWORDS_REPROMPT = 1<<9,
59 E_PASSWORDS_ONLINE = 1<<10, /* only ask if we're online */
60 E_PASSWORDS_DISABLE_REMEMBER = 1<<11, /* disable the 'remember password' checkbox */
61 E_PASSWORDS_PASSPHRASE = 1<<12, /* We are asking a passphrase */
62 } EPasswordsRememberType;
64 char * e_passwords_ask_password (const char *title,
65 const char*component_name, const char *key,
67 EPasswordsRememberType remember_type,
73 #endif /* _E_PASSWORD_H_ */