1 | /* |
---|
2 | * e-passwords.h |
---|
3 | * |
---|
4 | * Copyright (C) 2001 Ximian, Inc. |
---|
5 | */ |
---|
6 | |
---|
7 | /* |
---|
8 | * This program is free software; you can redistribute it and/or |
---|
9 | * modify it under the terms of version 2 of the GNU General Public |
---|
10 | * License as published by the Free Software Foundation. |
---|
11 | * |
---|
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 General Public License for more details. |
---|
16 | * |
---|
17 | * You should have received a copy of the GNU General Public License |
---|
18 | * along with this program; if not, write to the Free Software |
---|
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 |
---|
20 | * USA. |
---|
21 | */ |
---|
22 | |
---|
23 | #ifndef _E_PASSWORD_H_ |
---|
24 | #define _E_PASSWORD_H_ |
---|
25 | |
---|
26 | #include <glib.h> |
---|
27 | #include <bonobo/bonobo-ui-component.h> |
---|
28 | #include <gtk/gtkwindow.h> |
---|
29 | |
---|
30 | #ifdef __cplusplus |
---|
31 | extern "C" { |
---|
32 | #pragma } |
---|
33 | #endif /* __cplusplus */ |
---|
34 | |
---|
35 | void e_passwords_init (const char *component); |
---|
36 | void e_passwords_shutdown (void); |
---|
37 | |
---|
38 | void e_passwords_remember_password (const char *key); |
---|
39 | void e_passwords_add_password (const char *key, const char *passwd); |
---|
40 | char *e_passwords_get_password (const char *key); |
---|
41 | void e_passwords_forget_password (const char *key); |
---|
42 | void e_passwords_forget_passwords (void); |
---|
43 | void e_passwords_clear_component_passwords (void); |
---|
44 | |
---|
45 | typedef enum { |
---|
46 | E_PASSWORDS_DO_NOT_REMEMBER, |
---|
47 | E_PASSWORDS_REMEMBER_FOR_SESSION, |
---|
48 | E_PASSWORDS_REMEMBER_FOREVER |
---|
49 | } EPasswordsRememberType; |
---|
50 | |
---|
51 | char * e_passwords_ask_password (const char *title, const char *key, |
---|
52 | const char *prompt, gboolean secret, |
---|
53 | EPasswordsRememberType remember_type, |
---|
54 | gboolean *remember, |
---|
55 | GtkWindow *parent); |
---|
56 | |
---|
57 | #ifdef __cplusplus |
---|
58 | } |
---|
59 | #endif /* __cplusplus */ |
---|
60 | |
---|
61 | #endif /* _E_PASSWORD_H_ */ |
---|