Sat, 11 May 2013 15:34:47 +0200
Initial support for keyring settings
|
33965
bd73051d75eb
started writing a header file and some ideas for the API
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
1 | /** |
|
34155
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
2 | * @file keyring.h Keyring API |
|
33965
bd73051d75eb
started writing a header file and some ideas for the API
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
3 | * @ingroup core |
|
bd73051d75eb
started writing a header file and some ideas for the API
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
4 | */ |
|
bd73051d75eb
started writing a header file and some ideas for the API
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
5 | |
|
bd73051d75eb
started writing a header file and some ideas for the API
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
6 | /* purple |
|
bd73051d75eb
started writing a header file and some ideas for the API
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
7 | * |
|
bd73051d75eb
started writing a header file and some ideas for the API
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
8 | * Purple is the legal property of its developers, whose names are too numerous |
|
bd73051d75eb
started writing a header file and some ideas for the API
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
9 | * to list here. Please refer to the COPYRIGHT file distributed with this |
|
bd73051d75eb
started writing a header file and some ideas for the API
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
10 | * source distribution. |
|
bd73051d75eb
started writing a header file and some ideas for the API
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
11 | * |
|
bd73051d75eb
started writing a header file and some ideas for the API
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
12 | * This program is free software; you can redistribute it and/or modify |
|
bd73051d75eb
started writing a header file and some ideas for the API
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
13 | * it under the terms of the GNU General Public License as published by |
|
bd73051d75eb
started writing a header file and some ideas for the API
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
14 | * the Free Software Foundation; either version 2 of the License, or |
|
bd73051d75eb
started writing a header file and some ideas for the API
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
15 | * (at your option) any later version. |
|
bd73051d75eb
started writing a header file and some ideas for the API
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
16 | * |
|
bd73051d75eb
started writing a header file and some ideas for the API
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
17 | * This program is distributed in the hope that it will be useful, |
|
bd73051d75eb
started writing a header file and some ideas for the API
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
bd73051d75eb
started writing a header file and some ideas for the API
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
bd73051d75eb
started writing a header file and some ideas for the API
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
20 | * GNU General Public License for more details. |
|
bd73051d75eb
started writing a header file and some ideas for the API
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
21 | * |
|
bd73051d75eb
started writing a header file and some ideas for the API
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
22 | * You should have received a copy of the GNU General Public License |
|
34044
0a176fe8b867
Clean up comments.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34042
diff
changeset
|
23 | * along with this program; if not, write to the Free Software |
|
34155
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
24 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
|
33965
bd73051d75eb
started writing a header file and some ideas for the API
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
25 | */ |
|
bd73051d75eb
started writing a header file and some ideas for the API
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
26 | |
|
bd73051d75eb
started writing a header file and some ideas for the API
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
27 | #ifndef _PURPLE_KEYRING_H_ |
|
bd73051d75eb
started writing a header file and some ideas for the API
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
28 | #define _PURPLE_KEYRING_H_ |
|
bd73051d75eb
started writing a header file and some ideas for the API
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
29 | |
|
bd73051d75eb
started writing a header file and some ideas for the API
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
30 | #include "account.h" |
|
34185
cb2fe6b04447
Initial support for keyring settings
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34166
diff
changeset
|
31 | #include "request.h" |
|
33965
bd73051d75eb
started writing a header file and some ideas for the API
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
32 | |
|
33982
58a0de711782
Added support for the PURPLE_PLUGIN_FLAG_AUTOLOAD flag, corrected a few bugs and crashed. The compatibility plugin is automatically loaded at startup, and works nicely in compatibility mode (read_sync, write_sync, import, export). Also, I played unsuccessfully with makefiles, so i moved the keyring up one directory. I've finally gotten to the point where I run "make && sudo make install" every now and then.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33981
diff
changeset
|
33 | /** |
|
34155
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
34 | * Default keyring ID. |
|
33982
58a0de711782
Added support for the PURPLE_PLUGIN_FLAG_AUTOLOAD flag, corrected a few bugs and crashed. The compatibility plugin is automatically loaded at startup, and works nicely in compatibility mode (read_sync, write_sync, import, export). Also, I played unsuccessfully with makefiles, so i moved the keyring up one directory. I've finally gotten to the point where I run "make && sudo make install" every now and then.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33981
diff
changeset
|
35 | */ |
|
34093
c8197603fa20
Use better keyring IDs.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34047
diff
changeset
|
36 | #define PURPLE_DEFAULT_KEYRING "keyring-internal" |
|
33982
58a0de711782
Added support for the PURPLE_PLUGIN_FLAG_AUTOLOAD flag, corrected a few bugs and crashed. The compatibility plugin is automatically loaded at startup, and works nicely in compatibility mode (read_sync, write_sync, import, export). Also, I played unsuccessfully with makefiles, so i moved the keyring up one directory. I've finally gotten to the point where I run "make && sudo make install" every now and then.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33981
diff
changeset
|
37 | |
|
34155
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
38 | /** |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
39 | * Keyring subsystem error domain. |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
40 | */ |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
41 | #define PURPLE_KEYRING_ERROR purple_keyring_error_domain() |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
42 | |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
43 | /**************************************************************************/ |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
44 | /** @name Data structures and types */ |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
45 | /**************************************************************************/ |
|
33976
ff88d1340abe
Cleaned up keyring.h, updating it to the latest API ideas. Minor changes in other files. Also wrote doxygen documentation for most of the functions in keyring.h.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33973
diff
changeset
|
46 | /*@{*/ |
|
34155
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
47 | |
|
34034
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
48 | typedef struct _PurpleKeyring PurpleKeyring; |
|
33965
bd73051d75eb
started writing a header file and some ideas for the API
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
49 | |
|
33976
ff88d1340abe
Cleaned up keyring.h, updating it to the latest API ideas. Minor changes in other files. Also wrote doxygen documentation for most of the functions in keyring.h.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33973
diff
changeset
|
50 | /*@}*/ |
|
33965
bd73051d75eb
started writing a header file and some ideas for the API
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
51 | |
|
34155
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
52 | /**************************************************************************/ |
| 34156 | 53 | /** @name Callbacks for keyrings access functions */ |
|
34155
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
54 | /**************************************************************************/ |
|
33976
ff88d1340abe
Cleaned up keyring.h, updating it to the latest API ideas. Minor changes in other files. Also wrote doxygen documentation for most of the functions in keyring.h.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33973
diff
changeset
|
55 | /*@{*/ |
|
33971
96eff57a4349
Fixed warnings
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33970
diff
changeset
|
56 | |
|
96eff57a4349
Fixed warnings
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33970
diff
changeset
|
57 | /** |
|
34044
0a176fe8b867
Clean up comments.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34042
diff
changeset
|
58 | * Callback for once a password is read. |
|
0a176fe8b867
Clean up comments.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34042
diff
changeset
|
59 | * |
|
0a176fe8b867
Clean up comments.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34042
diff
changeset
|
60 | * If there was a problem, the password will be NULL, and the error set. |
|
33973
b193c0e9044b
Fixed problem in async purple_peyring_set_inuse()
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33972
diff
changeset
|
61 | * |
|
34044
0a176fe8b867
Clean up comments.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34042
diff
changeset
|
62 | * @param account The account. |
|
0a176fe8b867
Clean up comments.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34042
diff
changeset
|
63 | * @param password The password. |
|
0a176fe8b867
Clean up comments.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34042
diff
changeset
|
64 | * @param error Error that may have occurred. |
|
34034
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
65 | * @param data Data passed to the callback. |
|
33971
96eff57a4349
Fixed warnings
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33970
diff
changeset
|
66 | */ |
|
34034
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
67 | typedef void (*PurpleKeyringReadCallback)(PurpleAccount *account, |
|
34155
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
68 | const gchar *password, GError *error, gpointer data); |
|
33973
b193c0e9044b
Fixed problem in async purple_peyring_set_inuse()
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33972
diff
changeset
|
69 | |
|
b193c0e9044b
Fixed problem in async purple_peyring_set_inuse()
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33972
diff
changeset
|
70 | /** |
|
34044
0a176fe8b867
Clean up comments.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34042
diff
changeset
|
71 | * Callback for once a password has been stored. |
|
33973
b193c0e9044b
Fixed problem in async purple_peyring_set_inuse()
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33972
diff
changeset
|
72 | * |
|
34044
0a176fe8b867
Clean up comments.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34042
diff
changeset
|
73 | * If there was a problem, the error will be set. |
|
0a176fe8b867
Clean up comments.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34042
diff
changeset
|
74 | * |
|
0a176fe8b867
Clean up comments.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34042
diff
changeset
|
75 | * @param account The account. |
|
0a176fe8b867
Clean up comments.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34042
diff
changeset
|
76 | * @param error Error that may have occurred. |
|
34034
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
77 | * @param data Data passed to the callback. |
|
33973
b193c0e9044b
Fixed problem in async purple_peyring_set_inuse()
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33972
diff
changeset
|
78 | */ |
|
34155
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
79 | typedef void (*PurpleKeyringSaveCallback)(PurpleAccount *account, GError *error, |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
80 | gpointer data); |
|
33973
b193c0e9044b
Fixed problem in async purple_peyring_set_inuse()
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33972
diff
changeset
|
81 | |
|
b193c0e9044b
Fixed problem in async purple_peyring_set_inuse()
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33972
diff
changeset
|
82 | /** |
|
b193c0e9044b
Fixed problem in async purple_peyring_set_inuse()
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33972
diff
changeset
|
83 | * Callback for once the master password for a keyring has been changed. |
|
b193c0e9044b
Fixed problem in async purple_peyring_set_inuse()
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33972
diff
changeset
|
84 | * |
|
34044
0a176fe8b867
Clean up comments.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34042
diff
changeset
|
85 | * @param error Error that has occurred. |
|
34034
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
86 | * @param data Data passed to the callback. |
|
33973
b193c0e9044b
Fixed problem in async purple_peyring_set_inuse()
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33972
diff
changeset
|
87 | */ |
|
34155
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
88 | typedef void (*PurpleKeyringChangeMasterCallback)(GError *error, gpointer data); |
|
33973
b193c0e9044b
Fixed problem in async purple_peyring_set_inuse()
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33972
diff
changeset
|
89 | |
|
33978
2c649fae664e
Final version of the API, corrected, cleaned, and documented.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33976
diff
changeset
|
90 | /** |
|
2c649fae664e
Final version of the API, corrected, cleaned, and documented.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33976
diff
changeset
|
91 | * Callback for when we change the keyring. |
|
2c649fae664e
Final version of the API, corrected, cleaned, and documented.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33976
diff
changeset
|
92 | * |
|
34044
0a176fe8b867
Clean up comments.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34042
diff
changeset
|
93 | * @param error An error that might have occurred. |
|
34034
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
94 | * @param data A pointer to user supplied data. |
|
33978
2c649fae664e
Final version of the API, corrected, cleaned, and documented.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33976
diff
changeset
|
95 | */ |
|
34163
3dfcc838b66b
keyring.c refactoring: purple_keyring_set_inuse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34159
diff
changeset
|
96 | typedef void (*PurpleKeyringSetInUseCallback)(GError *error, gpointer data); |
|
33978
2c649fae664e
Final version of the API, corrected, cleaned, and documented.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33976
diff
changeset
|
97 | |
|
33976
ff88d1340abe
Cleaned up keyring.h, updating it to the latest API ideas. Minor changes in other files. Also wrote doxygen documentation for most of the functions in keyring.h.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33973
diff
changeset
|
98 | /*@}*/ |
|
ff88d1340abe
Cleaned up keyring.h, updating it to the latest API ideas. Minor changes in other files. Also wrote doxygen documentation for most of the functions in keyring.h.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33973
diff
changeset
|
99 | |
|
34155
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
100 | /**************************************************************************/ |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
101 | /** @name Keyrings access functions */ |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
102 | /**************************************************************************/ |
|
33976
ff88d1340abe
Cleaned up keyring.h, updating it to the latest API ideas. Minor changes in other files. Also wrote doxygen documentation for most of the functions in keyring.h.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33973
diff
changeset
|
103 | /*@{*/ |
|
ff88d1340abe
Cleaned up keyring.h, updating it to the latest API ideas. Minor changes in other files. Also wrote doxygen documentation for most of the functions in keyring.h.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33973
diff
changeset
|
104 | |
|
33973
b193c0e9044b
Fixed problem in async purple_peyring_set_inuse()
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33972
diff
changeset
|
105 | /** |
|
34155
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
106 | * Read the password for an account. |
|
34034
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
107 | * |
|
34044
0a176fe8b867
Clean up comments.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34042
diff
changeset
|
108 | * @param account The account. |
|
0a176fe8b867
Clean up comments.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34042
diff
changeset
|
109 | * @param cb A callback for once the password is found. |
|
34034
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
110 | * @param data Data to be passed to the callback. |
|
33976
ff88d1340abe
Cleaned up keyring.h, updating it to the latest API ideas. Minor changes in other files. Also wrote doxygen documentation for most of the functions in keyring.h.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33973
diff
changeset
|
111 | */ |
|
34034
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
112 | typedef void (*PurpleKeyringRead)(PurpleAccount *account, |
|
34155
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
113 | PurpleKeyringReadCallback cb, gpointer data); |
|
33976
ff88d1340abe
Cleaned up keyring.h, updating it to the latest API ideas. Minor changes in other files. Also wrote doxygen documentation for most of the functions in keyring.h.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33973
diff
changeset
|
114 | |
|
ff88d1340abe
Cleaned up keyring.h, updating it to the latest API ideas. Minor changes in other files. Also wrote doxygen documentation for most of the functions in keyring.h.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33973
diff
changeset
|
115 | /** |
|
ff88d1340abe
Cleaned up keyring.h, updating it to the latest API ideas. Minor changes in other files. Also wrote doxygen documentation for most of the functions in keyring.h.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33973
diff
changeset
|
116 | * Store a password in the keyring. |
|
34034
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
117 | * |
|
34044
0a176fe8b867
Clean up comments.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34042
diff
changeset
|
118 | * @param account The account. |
|
34041
75204e58b8ca
Fix const-ness of strings, and silly strdups.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34036
diff
changeset
|
119 | * @param password The password to be stored. If the password is NULL, this |
|
75204e58b8ca
Fix const-ness of strings, and silly strdups.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34036
diff
changeset
|
120 | * means that the keyring should forget about that password. |
|
34044
0a176fe8b867
Clean up comments.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34042
diff
changeset
|
121 | * @param cb A callback for once the password is saved. |
|
0a176fe8b867
Clean up comments.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34042
diff
changeset
|
122 | * @param data Data to be passed to the callback. |
|
33973
b193c0e9044b
Fixed problem in async purple_peyring_set_inuse()
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33972
diff
changeset
|
123 | */ |
|
34155
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
124 | typedef void (*PurpleKeyringSave)(PurpleAccount *account, const gchar *password, |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
125 | PurpleKeyringSaveCallback cb, gpointer data); |
|
33965
bd73051d75eb
started writing a header file and some ideas for the API
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
126 | |
|
33976
ff88d1340abe
Cleaned up keyring.h, updating it to the latest API ideas. Minor changes in other files. Also wrote doxygen documentation for most of the functions in keyring.h.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33973
diff
changeset
|
127 | /** |
|
34138
2bda8642afa3
Early cancelling password requests before quitting
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34127
diff
changeset
|
128 | * Cancel all running requests. |
|
2bda8642afa3
Early cancelling password requests before quitting
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34127
diff
changeset
|
129 | * |
|
2bda8642afa3
Early cancelling password requests before quitting
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34127
diff
changeset
|
130 | * After calling that, all queued requests should run their callbacks (most |
|
2bda8642afa3
Early cancelling password requests before quitting
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34127
diff
changeset
|
131 | * probably, with failure result). |
|
2bda8642afa3
Early cancelling password requests before quitting
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34127
diff
changeset
|
132 | */ |
|
2bda8642afa3
Early cancelling password requests before quitting
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34127
diff
changeset
|
133 | typedef void (*PurpleKeyringCancelRequests)(void); |
|
2bda8642afa3
Early cancelling password requests before quitting
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34127
diff
changeset
|
134 | |
|
2bda8642afa3
Early cancelling password requests before quitting
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34127
diff
changeset
|
135 | /** |
|
33976
ff88d1340abe
Cleaned up keyring.h, updating it to the latest API ideas. Minor changes in other files. Also wrote doxygen documentation for most of the functions in keyring.h.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33973
diff
changeset
|
136 | * Close the keyring. |
|
34044
0a176fe8b867
Clean up comments.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34042
diff
changeset
|
137 | * |
|
34155
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
138 | * This will be called so the keyring can do any cleanup it needs. |
|
33976
ff88d1340abe
Cleaned up keyring.h, updating it to the latest API ideas. Minor changes in other files. Also wrote doxygen documentation for most of the functions in keyring.h.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33973
diff
changeset
|
139 | */ |
|
34155
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
140 | typedef void (*PurpleKeyringClose)(void); |
|
33976
ff88d1340abe
Cleaned up keyring.h, updating it to the latest API ideas. Minor changes in other files. Also wrote doxygen documentation for most of the functions in keyring.h.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33973
diff
changeset
|
141 | |
|
ff88d1340abe
Cleaned up keyring.h, updating it to the latest API ideas. Minor changes in other files. Also wrote doxygen documentation for most of the functions in keyring.h.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33973
diff
changeset
|
142 | /** |
|
34155
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
143 | * Import serialized (and maybe encrypted) password. |
|
34044
0a176fe8b867
Clean up comments.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34042
diff
changeset
|
144 | * |
|
34034
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
145 | * This is not async because it is not meant to prompt for a master password and |
|
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
146 | * decrypt passwords. |
|
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
147 | * |
|
33976
ff88d1340abe
Cleaned up keyring.h, updating it to the latest API ideas. Minor changes in other files. Also wrote doxygen documentation for most of the functions in keyring.h.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33973
diff
changeset
|
148 | * @param account The account. |
|
34041
75204e58b8ca
Fix const-ness of strings, and silly strdups.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34036
diff
changeset
|
149 | * @param mode A keyring specific option that was stored. Can be NULL. |
|
75204e58b8ca
Fix const-ness of strings, and silly strdups.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34036
diff
changeset
|
150 | * @param data Data that was stored. Can be NULL. |
|
34034
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
151 | * |
|
33976
ff88d1340abe
Cleaned up keyring.h, updating it to the latest API ideas. Minor changes in other files. Also wrote doxygen documentation for most of the functions in keyring.h.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33973
diff
changeset
|
152 | * @return TRUE on success, FALSE on failure. |
|
ff88d1340abe
Cleaned up keyring.h, updating it to the latest API ideas. Minor changes in other files. Also wrote doxygen documentation for most of the functions in keyring.h.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33973
diff
changeset
|
153 | */ |
|
34034
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
154 | typedef gboolean (*PurpleKeyringImportPassword)(PurpleAccount *account, |
|
34155
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
155 | const gchar *mode, const gchar *data, GError **error); |
|
33965
bd73051d75eb
started writing a header file and some ideas for the API
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
156 | |
|
33976
ff88d1340abe
Cleaned up keyring.h, updating it to the latest API ideas. Minor changes in other files. Also wrote doxygen documentation for most of the functions in keyring.h.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33973
diff
changeset
|
157 | /** |
|
34155
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
158 | * Export serialized (and maybe encrypted) password. |
|
34034
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
159 | * |
|
34044
0a176fe8b867
Clean up comments.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34042
diff
changeset
|
160 | * @param account The account. |
|
34034
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
161 | * @param mode An option field that can be used by the plugin. This is |
|
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
162 | * expected to be a static string. |
|
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
163 | * @param data The data to be stored in the XML node. This string will be |
|
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
164 | * freed using destroy() once not needed anymore. |
|
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
165 | * @param error Will be set if a problem occured. |
|
33976
ff88d1340abe
Cleaned up keyring.h, updating it to the latest API ideas. Minor changes in other files. Also wrote doxygen documentation for most of the functions in keyring.h.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33973
diff
changeset
|
166 | * @param destroy A function to be called, if non NULL, to free data. |
|
34034
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
167 | * |
|
33976
ff88d1340abe
Cleaned up keyring.h, updating it to the latest API ideas. Minor changes in other files. Also wrote doxygen documentation for most of the functions in keyring.h.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33973
diff
changeset
|
168 | * @return TRUE on success, FALSE on failure. |
|
ff88d1340abe
Cleaned up keyring.h, updating it to the latest API ideas. Minor changes in other files. Also wrote doxygen documentation for most of the functions in keyring.h.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33973
diff
changeset
|
169 | */ |
|
34034
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
170 | typedef gboolean (*PurpleKeyringExportPassword)(PurpleAccount *account, |
|
34155
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
171 | const gchar **mode, gchar **data, GError **error, |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
172 | GDestroyNotify *destroy); |
|
33965
bd73051d75eb
started writing a header file and some ideas for the API
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
173 | |
|
34185
cb2fe6b04447
Initial support for keyring settings
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34166
diff
changeset
|
174 | /* TODO: documentation */ |
|
cb2fe6b04447
Initial support for keyring settings
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34166
diff
changeset
|
175 | typedef PurpleRequestFields * (*PurpleKeyringReadSettings)(void); |
|
cb2fe6b04447
Initial support for keyring settings
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34166
diff
changeset
|
176 | |
|
cb2fe6b04447
Initial support for keyring settings
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34166
diff
changeset
|
177 | /* TODO: documentation */ |
|
cb2fe6b04447
Initial support for keyring settings
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34166
diff
changeset
|
178 | typedef gboolean (*PurpleKeyringApplySettings)(PurpleRequestFields *fields); |
|
cb2fe6b04447
Initial support for keyring settings
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34166
diff
changeset
|
179 | |
|
33976
ff88d1340abe
Cleaned up keyring.h, updating it to the latest API ideas. Minor changes in other files. Also wrote doxygen documentation for most of the functions in keyring.h.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33973
diff
changeset
|
180 | /*@}*/ |
|
ff88d1340abe
Cleaned up keyring.h, updating it to the latest API ideas. Minor changes in other files. Also wrote doxygen documentation for most of the functions in keyring.h.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33973
diff
changeset
|
181 | |
|
34155
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
182 | G_BEGIN_DECLS |
|
33976
ff88d1340abe
Cleaned up keyring.h, updating it to the latest API ideas. Minor changes in other files. Also wrote doxygen documentation for most of the functions in keyring.h.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33973
diff
changeset
|
183 | |
|
34155
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
184 | /**************************************************************************/ |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
185 | /** @name Setting used keyrings */ |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
186 | /**************************************************************************/ |
|
33976
ff88d1340abe
Cleaned up keyring.h, updating it to the latest API ideas. Minor changes in other files. Also wrote doxygen documentation for most of the functions in keyring.h.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33973
diff
changeset
|
187 | /*@{*/ |
|
ff88d1340abe
Cleaned up keyring.h, updating it to the latest API ideas. Minor changes in other files. Also wrote doxygen documentation for most of the functions in keyring.h.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33973
diff
changeset
|
188 | |
|
33987
9beebdbf44d6
Fixed many bugs and crashes in the keyring subsystem.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33984
diff
changeset
|
189 | /** |
|
34155
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
190 | * Find a keyring by an id. |
|
34034
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
191 | * |
|
33987
9beebdbf44d6
Fixed many bugs and crashes in the keyring subsystem.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33984
diff
changeset
|
192 | * @param id The id for the keyring. |
|
34034
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
193 | * |
|
33987
9beebdbf44d6
Fixed many bugs and crashes in the keyring subsystem.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33984
diff
changeset
|
194 | * @return The keyring, or NULL if not found. |
|
9beebdbf44d6
Fixed many bugs and crashes in the keyring subsystem.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33984
diff
changeset
|
195 | */ |
|
34155
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
196 | PurpleKeyring * |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
197 | purple_keyring_find_keyring_by_id(const gchar *id); |
|
33976
ff88d1340abe
Cleaned up keyring.h, updating it to the latest API ideas. Minor changes in other files. Also wrote doxygen documentation for most of the functions in keyring.h.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33973
diff
changeset
|
198 | |
|
ff88d1340abe
Cleaned up keyring.h, updating it to the latest API ideas. Minor changes in other files. Also wrote doxygen documentation for most of the functions in keyring.h.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33973
diff
changeset
|
199 | /** |
|
ff88d1340abe
Cleaned up keyring.h, updating it to the latest API ideas. Minor changes in other files. Also wrote doxygen documentation for most of the functions in keyring.h.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33973
diff
changeset
|
200 | * Get the keyring being used. |
|
ff88d1340abe
Cleaned up keyring.h, updating it to the latest API ideas. Minor changes in other files. Also wrote doxygen documentation for most of the functions in keyring.h.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33973
diff
changeset
|
201 | */ |
|
34155
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
202 | PurpleKeyring * |
|
33981
8c8fe2e5bbcd
dded import/export in account.c, new version of internalkeyring.c, and added stuff to makefiles.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33978
diff
changeset
|
203 | purple_keyring_get_inuse(void); |
|
33976
ff88d1340abe
Cleaned up keyring.h, updating it to the latest API ideas. Minor changes in other files. Also wrote doxygen documentation for most of the functions in keyring.h.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33973
diff
changeset
|
204 | |
|
ff88d1340abe
Cleaned up keyring.h, updating it to the latest API ideas. Minor changes in other files. Also wrote doxygen documentation for most of the functions in keyring.h.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33973
diff
changeset
|
205 | /** |
|
ff88d1340abe
Cleaned up keyring.h, updating it to the latest API ideas. Minor changes in other files. Also wrote doxygen documentation for most of the functions in keyring.h.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33973
diff
changeset
|
206 | * Set the keyring to use. This function will move all passwords from |
|
34155
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
207 | * the old keyring to the new one. |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
208 | * |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
209 | * If it fails, it will cancel all changes, close the new keyring, and notify |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
210 | * the callback. If it succeeds, it will remove all passwords from the old safe |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
211 | * and close that safe. |
|
34034
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
212 | * |
|
33976
ff88d1340abe
Cleaned up keyring.h, updating it to the latest API ideas. Minor changes in other files. Also wrote doxygen documentation for most of the functions in keyring.h.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33973
diff
changeset
|
213 | * @param newkeyring The new keyring to use. |
|
34034
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
214 | * @param force FALSE if the change can be cancelled. If this is TRUE and |
|
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
215 | * an error occurs, data might be lost. |
|
34044
0a176fe8b867
Clean up comments.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34042
diff
changeset
|
216 | * @param cb A callback for once the change is complete. |
|
0a176fe8b867
Clean up comments.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34042
diff
changeset
|
217 | * @param data Data to be passed to the callback. |
|
33976
ff88d1340abe
Cleaned up keyring.h, updating it to the latest API ideas. Minor changes in other files. Also wrote doxygen documentation for most of the functions in keyring.h.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33973
diff
changeset
|
218 | */ |
|
ff88d1340abe
Cleaned up keyring.h, updating it to the latest API ideas. Minor changes in other files. Also wrote doxygen documentation for most of the functions in keyring.h.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33973
diff
changeset
|
219 | void |
|
34155
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
220 | purple_keyring_set_inuse(PurpleKeyring *newkeyring, gboolean force, |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
221 | PurpleKeyringSetInUseCallback cb, gpointer data); |
|
33978
2c649fae664e
Final version of the API, corrected, cleaned, and documented.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33976
diff
changeset
|
222 | |
|
33976
ff88d1340abe
Cleaned up keyring.h, updating it to the latest API ideas. Minor changes in other files. Also wrote doxygen documentation for most of the functions in keyring.h.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33973
diff
changeset
|
223 | /** |
|
ff88d1340abe
Cleaned up keyring.h, updating it to the latest API ideas. Minor changes in other files. Also wrote doxygen documentation for most of the functions in keyring.h.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33973
diff
changeset
|
224 | * Register a keyring plugin. |
|
34034
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
225 | * |
|
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
226 | * @param keyring The keyring to register. |
|
33976
ff88d1340abe
Cleaned up keyring.h, updating it to the latest API ideas. Minor changes in other files. Also wrote doxygen documentation for most of the functions in keyring.h.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33973
diff
changeset
|
227 | */ |
|
34033
910f2ed3988b
Remove trailing whitespace.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34029
diff
changeset
|
228 | void |
|
34034
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
229 | purple_keyring_register(PurpleKeyring *keyring); |
|
33976
ff88d1340abe
Cleaned up keyring.h, updating it to the latest API ideas. Minor changes in other files. Also wrote doxygen documentation for most of the functions in keyring.h.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33973
diff
changeset
|
230 | |
|
ff88d1340abe
Cleaned up keyring.h, updating it to the latest API ideas. Minor changes in other files. Also wrote doxygen documentation for most of the functions in keyring.h.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33973
diff
changeset
|
231 | /** |
|
34044
0a176fe8b867
Clean up comments.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34042
diff
changeset
|
232 | * Unregister a keyring plugin. |
|
0a176fe8b867
Clean up comments.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34042
diff
changeset
|
233 | * |
|
0a176fe8b867
Clean up comments.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34042
diff
changeset
|
234 | * In case the keyring is in use, passwords will be moved to a fallback safe, |
|
0a176fe8b867
Clean up comments.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34042
diff
changeset
|
235 | * and the keyring to unregister will be properly closed. |
|
34034
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
236 | * |
|
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
237 | * @param keyring The keyring to unregister. |
|
33976
ff88d1340abe
Cleaned up keyring.h, updating it to the latest API ideas. Minor changes in other files. Also wrote doxygen documentation for most of the functions in keyring.h.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33973
diff
changeset
|
238 | */ |
|
34033
910f2ed3988b
Remove trailing whitespace.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34029
diff
changeset
|
239 | void |
|
34034
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
240 | purple_keyring_unregister(PurpleKeyring *keyring); |
|
33976
ff88d1340abe
Cleaned up keyring.h, updating it to the latest API ideas. Minor changes in other files. Also wrote doxygen documentation for most of the functions in keyring.h.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33973
diff
changeset
|
241 | |
|
34155
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
242 | /** |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
243 | * Returns a GList containing the IDs and names of the registered |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
244 | * keyrings. |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
245 | * |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
246 | * @return The list of IDs and names. |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
247 | */ |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
248 | GList * |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
249 | purple_keyring_get_options(void); |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
250 | |
|
33976
ff88d1340abe
Cleaned up keyring.h, updating it to the latest API ideas. Minor changes in other files. Also wrote doxygen documentation for most of the functions in keyring.h.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33973
diff
changeset
|
251 | /*@}*/ |
|
33971
96eff57a4349
Fixed warnings
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33970
diff
changeset
|
252 | |
|
34155
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
253 | /**************************************************************************/ |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
254 | /** @name Keyring plugin wrappers */ |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
255 | /**************************************************************************/ |
|
33976
ff88d1340abe
Cleaned up keyring.h, updating it to the latest API ideas. Minor changes in other files. Also wrote doxygen documentation for most of the functions in keyring.h.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33973
diff
changeset
|
256 | /*@{*/ |
|
33968
ca1e1985b5f2
update on keyring code
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33967
diff
changeset
|
257 | |
|
33976
ff88d1340abe
Cleaned up keyring.h, updating it to the latest API ideas. Minor changes in other files. Also wrote doxygen documentation for most of the functions in keyring.h.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33973
diff
changeset
|
258 | /** |
|
34155
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
259 | * Import serialized (and maybe encrypted) password into current keyring. |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
260 | * |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
261 | * It's used by account.c while reading a password from xml. |
|
34034
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
262 | * |
|
34157
c67266e97d75
Don't drop exported passwords, when keyring plugin is not loadable
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34156
diff
changeset
|
263 | * @param account The account. |
|
c67266e97d75
Don't drop exported passwords, when keyring plugin is not loadable
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34156
diff
changeset
|
264 | * @param keyring_id The plugin ID that was stored in the xml file. Can be NULL. |
|
c67266e97d75
Don't drop exported passwords, when keyring plugin is not loadable
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34156
diff
changeset
|
265 | * @param mode A keyring specific option that was stored. Can be NULL. |
|
c67266e97d75
Don't drop exported passwords, when keyring plugin is not loadable
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34156
diff
changeset
|
266 | * @param data Data that was stored, can be NULL. |
|
34034
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
267 | * |
|
33981
8c8fe2e5bbcd
dded import/export in account.c, new version of internalkeyring.c, and added stuff to makefiles.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33978
diff
changeset
|
268 | * @return TRUE if the input was accepted, FALSE otherwise. |
|
33976
ff88d1340abe
Cleaned up keyring.h, updating it to the latest API ideas. Minor changes in other files. Also wrote doxygen documentation for most of the functions in keyring.h.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33973
diff
changeset
|
269 | */ |
|
34155
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
270 | gboolean |
|
34157
c67266e97d75
Don't drop exported passwords, when keyring plugin is not loadable
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34156
diff
changeset
|
271 | purple_keyring_import_password(PurpleAccount *account, const gchar *keyring_id, |
|
34155
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
272 | const gchar *mode, const gchar *data, GError **error); |
|
33967
9fac87349244
wrote more of the API and plaintext plugin. commit so i can revert, non-working code.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33966
diff
changeset
|
273 | |
|
9fac87349244
wrote more of the API and plaintext plugin. commit so i can revert, non-working code.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33966
diff
changeset
|
274 | /** |
|
34155
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
275 | * Export serialized (and maybe encrypted) password out of current keyring. |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
276 | * |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
277 | * It's used by account.c while syncing accounts to xml. |
|
34034
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
278 | * |
|
34157
c67266e97d75
Don't drop exported passwords, when keyring plugin is not loadable
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34156
diff
changeset
|
279 | * @param account The account for which we want the info. |
|
c67266e97d75
Don't drop exported passwords, when keyring plugin is not loadable
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34156
diff
changeset
|
280 | * @param keyring_id The plugin id to be stored in the XML node. This will be |
|
c67266e97d75
Don't drop exported passwords, when keyring plugin is not loadable
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34156
diff
changeset
|
281 | * NULL or a string that can be considered static. |
|
c67266e97d75
Don't drop exported passwords, when keyring plugin is not loadable
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34156
diff
changeset
|
282 | * @param mode An option field that can be used by the plugin. This will |
|
c67266e97d75
Don't drop exported passwords, when keyring plugin is not loadable
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34156
diff
changeset
|
283 | * be NULL or a string that can be considered static. |
|
c67266e97d75
Don't drop exported passwords, when keyring plugin is not loadable
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34156
diff
changeset
|
284 | * @param data The data to be stored in the XML node. This string must be |
|
c67266e97d75
Don't drop exported passwords, when keyring plugin is not loadable
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34156
diff
changeset
|
285 | * freed using destroy() once not needed anymore if it is not |
|
c67266e97d75
Don't drop exported passwords, when keyring plugin is not loadable
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34156
diff
changeset
|
286 | * NULL. |
|
c67266e97d75
Don't drop exported passwords, when keyring plugin is not loadable
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34156
diff
changeset
|
287 | * @param error Will be set if a problem occured. |
|
c67266e97d75
Don't drop exported passwords, when keyring plugin is not loadable
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34156
diff
changeset
|
288 | * @param destroy A function to be called, if non NULL, to free data. |
|
34034
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
289 | * |
|
33981
8c8fe2e5bbcd
dded import/export in account.c, new version of internalkeyring.c, and added stuff to makefiles.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33978
diff
changeset
|
290 | * @return TRUE if the info was exported successfully, FALSE otherwise. |
|
33967
9fac87349244
wrote more of the API and plaintext plugin. commit so i can revert, non-working code.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33966
diff
changeset
|
291 | */ |
|
33981
8c8fe2e5bbcd
dded import/export in account.c, new version of internalkeyring.c, and added stuff to makefiles.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33978
diff
changeset
|
292 | gboolean |
|
34157
c67266e97d75
Don't drop exported passwords, when keyring plugin is not loadable
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34156
diff
changeset
|
293 | purple_keyring_export_password(PurpleAccount *account, const gchar **keyring_id, |
|
34155
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
294 | const gchar **mode, gchar **data, GError **error, |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
295 | GDestroyNotify *destroy); |
|
33976
ff88d1340abe
Cleaned up keyring.h, updating it to the latest API ideas. Minor changes in other files. Also wrote doxygen documentation for most of the functions in keyring.h.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33973
diff
changeset
|
296 | |
|
ff88d1340abe
Cleaned up keyring.h, updating it to the latest API ideas. Minor changes in other files. Also wrote doxygen documentation for most of the functions in keyring.h.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33973
diff
changeset
|
297 | /** |
|
34155
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
298 | * Read a password from the current keyring. |
|
34028
a3050b6df38e
Remove deprecated API since we're targeting 3.0.0 here. Don't mind the
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34013
diff
changeset
|
299 | * |
|
34044
0a176fe8b867
Clean up comments.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34042
diff
changeset
|
300 | * @param account The account. |
|
0a176fe8b867
Clean up comments.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34042
diff
changeset
|
301 | * @param cb A callback for once the password is read. |
|
0a176fe8b867
Clean up comments.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34042
diff
changeset
|
302 | * @param data Data passed to the callback. |
|
33976
ff88d1340abe
Cleaned up keyring.h, updating it to the latest API ideas. Minor changes in other files. Also wrote doxygen documentation for most of the functions in keyring.h.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33973
diff
changeset
|
303 | */ |
|
34033
910f2ed3988b
Remove trailing whitespace.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34029
diff
changeset
|
304 | void |
|
34028
a3050b6df38e
Remove deprecated API since we're targeting 3.0.0 here. Don't mind the
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34013
diff
changeset
|
305 | purple_keyring_get_password(PurpleAccount *account, |
|
34155
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
306 | PurpleKeyringReadCallback cb, gpointer data); |
|
33976
ff88d1340abe
Cleaned up keyring.h, updating it to the latest API ideas. Minor changes in other files. Also wrote doxygen documentation for most of the functions in keyring.h.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33973
diff
changeset
|
307 | |
|
ff88d1340abe
Cleaned up keyring.h, updating it to the latest API ideas. Minor changes in other files. Also wrote doxygen documentation for most of the functions in keyring.h.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33973
diff
changeset
|
308 | /** |
|
34155
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
309 | * Save a password to the current keyring. |
|
34028
a3050b6df38e
Remove deprecated API since we're targeting 3.0.0 here. Don't mind the
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34013
diff
changeset
|
310 | * |
|
34044
0a176fe8b867
Clean up comments.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34042
diff
changeset
|
311 | * @param account The account. |
|
33976
ff88d1340abe
Cleaned up keyring.h, updating it to the latest API ideas. Minor changes in other files. Also wrote doxygen documentation for most of the functions in keyring.h.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33973
diff
changeset
|
312 | * @param password The password to save. |
|
34028
a3050b6df38e
Remove deprecated API since we're targeting 3.0.0 here. Don't mind the
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34013
diff
changeset
|
313 | * @param cb A callback for once the password is saved. |
|
34044
0a176fe8b867
Clean up comments.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34042
diff
changeset
|
314 | * @param data Data to be passed to the callback. |
|
33976
ff88d1340abe
Cleaned up keyring.h, updating it to the latest API ideas. Minor changes in other files. Also wrote doxygen documentation for most of the functions in keyring.h.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33973
diff
changeset
|
315 | */ |
|
34033
910f2ed3988b
Remove trailing whitespace.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34029
diff
changeset
|
316 | void |
|
34155
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
317 | purple_keyring_set_password(PurpleAccount *account, const gchar *password, |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
318 | PurpleKeyringSaveCallback cb, gpointer data); |
|
33976
ff88d1340abe
Cleaned up keyring.h, updating it to the latest API ideas. Minor changes in other files. Also wrote doxygen documentation for most of the functions in keyring.h.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33973
diff
changeset
|
319 | |
|
34185
cb2fe6b04447
Initial support for keyring settings
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34166
diff
changeset
|
320 | /* TODO: documentation */ |
|
cb2fe6b04447
Initial support for keyring settings
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34166
diff
changeset
|
321 | PurpleRequestFields * |
|
cb2fe6b04447
Initial support for keyring settings
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34166
diff
changeset
|
322 | purple_keyring_read_settings(void); |
|
cb2fe6b04447
Initial support for keyring settings
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34166
diff
changeset
|
323 | |
|
cb2fe6b04447
Initial support for keyring settings
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34166
diff
changeset
|
324 | /* TODO: documentation */ |
|
cb2fe6b04447
Initial support for keyring settings
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34166
diff
changeset
|
325 | gboolean |
|
cb2fe6b04447
Initial support for keyring settings
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34166
diff
changeset
|
326 | purple_keyring_apply_settings(PurpleRequestFields *fields); |
|
33976
ff88d1340abe
Cleaned up keyring.h, updating it to the latest API ideas. Minor changes in other files. Also wrote doxygen documentation for most of the functions in keyring.h.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33973
diff
changeset
|
327 | |
|
ff88d1340abe
Cleaned up keyring.h, updating it to the latest API ideas. Minor changes in other files. Also wrote doxygen documentation for most of the functions in keyring.h.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33973
diff
changeset
|
328 | /*@}*/ |
|
ff88d1340abe
Cleaned up keyring.h, updating it to the latest API ideas. Minor changes in other files. Also wrote doxygen documentation for most of the functions in keyring.h.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33973
diff
changeset
|
329 | |
|
34155
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
330 | /**************************************************************************/ |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
331 | /** @name PurpleKeyring accessors */ |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
332 | /**************************************************************************/ |
|
33976
ff88d1340abe
Cleaned up keyring.h, updating it to the latest API ideas. Minor changes in other files. Also wrote doxygen documentation for most of the functions in keyring.h.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33973
diff
changeset
|
333 | /*@{*/ |
|
ff88d1340abe
Cleaned up keyring.h, updating it to the latest API ideas. Minor changes in other files. Also wrote doxygen documentation for most of the functions in keyring.h.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33973
diff
changeset
|
334 | |
|
34155
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
335 | /** |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
336 | * Creates a new keyring wrapper. |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
337 | */ |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
338 | PurpleKeyring * |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
339 | purple_keyring_new(void); |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
340 | |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
341 | /** |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
342 | * Frees all data allocated with purple_keyring_new. |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
343 | * |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
344 | * @param keyring Keyring wrapper struct. |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
345 | */ |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
346 | void |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
347 | purple_keyring_free(PurpleKeyring *keyring); |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
348 | |
|
34158
166870f3adf8
keyring.c refactoring - internal structs
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34157
diff
changeset
|
349 | /** |
|
166870f3adf8
keyring.c refactoring - internal structs
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34157
diff
changeset
|
350 | * Gets friendly user name. |
|
166870f3adf8
keyring.c refactoring - internal structs
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34157
diff
changeset
|
351 | * |
|
166870f3adf8
keyring.c refactoring - internal structs
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34157
diff
changeset
|
352 | * @param keyring The keyring. |
|
166870f3adf8
keyring.c refactoring - internal structs
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34157
diff
changeset
|
353 | * @return Friendly user name. |
|
166870f3adf8
keyring.c refactoring - internal structs
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34157
diff
changeset
|
354 | */ |
|
34155
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
355 | const gchar * |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
356 | purple_keyring_get_name(const PurpleKeyring *keyring); |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
357 | |
|
34158
166870f3adf8
keyring.c refactoring - internal structs
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34157
diff
changeset
|
358 | /** |
|
166870f3adf8
keyring.c refactoring - internal structs
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34157
diff
changeset
|
359 | * Gets keyring ID. |
|
166870f3adf8
keyring.c refactoring - internal structs
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34157
diff
changeset
|
360 | * |
|
166870f3adf8
keyring.c refactoring - internal structs
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34157
diff
changeset
|
361 | * @param keyring The keyring. |
|
166870f3adf8
keyring.c refactoring - internal structs
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34157
diff
changeset
|
362 | * @return Keyring ID. |
|
166870f3adf8
keyring.c refactoring - internal structs
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34157
diff
changeset
|
363 | */ |
|
34155
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
364 | const gchar * |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
365 | purple_keyring_get_id(const PurpleKeyring *keyring); |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
366 | |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
367 | PurpleKeyringRead |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
368 | purple_keyring_get_read_password(const PurpleKeyring *keyring); |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
369 | |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
370 | PurpleKeyringSave |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
371 | purple_keyring_get_save_password(const PurpleKeyring *keyring); |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
372 | |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
373 | PurpleKeyringCancelRequests |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
374 | purple_keyring_get_cancel_requests(const PurpleKeyring *keyring); |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
375 | |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
376 | PurpleKeyringClose |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
377 | purple_keyring_get_close_keyring(const PurpleKeyring *keyring); |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
378 | |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
379 | PurpleKeyringImportPassword |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
380 | purple_keyring_get_import_password(const PurpleKeyring *keyring); |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
381 | |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
382 | PurpleKeyringExportPassword |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
383 | purple_keyring_get_export_password(const PurpleKeyring *keyring); |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
384 | |
|
34185
cb2fe6b04447
Initial support for keyring settings
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34166
diff
changeset
|
385 | PurpleKeyringReadSettings |
|
cb2fe6b04447
Initial support for keyring settings
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34166
diff
changeset
|
386 | purple_keyring_get_read_settings(const PurpleKeyring *keyring); |
|
cb2fe6b04447
Initial support for keyring settings
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34166
diff
changeset
|
387 | |
|
cb2fe6b04447
Initial support for keyring settings
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34166
diff
changeset
|
388 | PurpleKeyringApplySettings |
|
cb2fe6b04447
Initial support for keyring settings
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34166
diff
changeset
|
389 | purple_keyring_get_apply_settings(const PurpleKeyring *keyring); |
|
cb2fe6b04447
Initial support for keyring settings
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34166
diff
changeset
|
390 | |
|
34166
8be287b0d6be
keyring.c refactoring: registering, unregistering
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34163
diff
changeset
|
391 | /** |
|
8be287b0d6be
keyring.c refactoring: registering, unregistering
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34163
diff
changeset
|
392 | * Sets friendly user name. |
|
8be287b0d6be
keyring.c refactoring: registering, unregistering
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34163
diff
changeset
|
393 | * |
|
8be287b0d6be
keyring.c refactoring: registering, unregistering
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34163
diff
changeset
|
394 | * This field is required. |
|
8be287b0d6be
keyring.c refactoring: registering, unregistering
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34163
diff
changeset
|
395 | * |
|
8be287b0d6be
keyring.c refactoring: registering, unregistering
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34163
diff
changeset
|
396 | * @param keyring The keyring. |
|
8be287b0d6be
keyring.c refactoring: registering, unregistering
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34163
diff
changeset
|
397 | * @param name Friendly user name. |
|
8be287b0d6be
keyring.c refactoring: registering, unregistering
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34163
diff
changeset
|
398 | */ |
|
34155
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
399 | void |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
400 | purple_keyring_set_name(PurpleKeyring *keyring, const gchar *name); |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
401 | |
|
34166
8be287b0d6be
keyring.c refactoring: registering, unregistering
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34163
diff
changeset
|
402 | /** |
|
8be287b0d6be
keyring.c refactoring: registering, unregistering
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34163
diff
changeset
|
403 | * Sets keyring ID. |
|
8be287b0d6be
keyring.c refactoring: registering, unregistering
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34163
diff
changeset
|
404 | * |
|
8be287b0d6be
keyring.c refactoring: registering, unregistering
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34163
diff
changeset
|
405 | * This field is required. |
|
8be287b0d6be
keyring.c refactoring: registering, unregistering
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34163
diff
changeset
|
406 | * |
|
8be287b0d6be
keyring.c refactoring: registering, unregistering
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34163
diff
changeset
|
407 | * @param keyring The keyring. |
|
8be287b0d6be
keyring.c refactoring: registering, unregistering
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34163
diff
changeset
|
408 | * @param name Keyring ID. |
|
8be287b0d6be
keyring.c refactoring: registering, unregistering
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34163
diff
changeset
|
409 | */ |
|
34155
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
410 | void |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
411 | purple_keyring_set_id(PurpleKeyring *keyring, const gchar *id); |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
412 | |
|
34166
8be287b0d6be
keyring.c refactoring: registering, unregistering
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34163
diff
changeset
|
413 | /** |
|
8be287b0d6be
keyring.c refactoring: registering, unregistering
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34163
diff
changeset
|
414 | * Sets read password method. |
|
8be287b0d6be
keyring.c refactoring: registering, unregistering
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34163
diff
changeset
|
415 | * |
|
8be287b0d6be
keyring.c refactoring: registering, unregistering
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34163
diff
changeset
|
416 | * This field is required. |
|
8be287b0d6be
keyring.c refactoring: registering, unregistering
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34163
diff
changeset
|
417 | * |
|
8be287b0d6be
keyring.c refactoring: registering, unregistering
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34163
diff
changeset
|
418 | * @param keyring The keyring. |
|
8be287b0d6be
keyring.c refactoring: registering, unregistering
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34163
diff
changeset
|
419 | * @param read_cb Read password method. |
|
8be287b0d6be
keyring.c refactoring: registering, unregistering
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34163
diff
changeset
|
420 | */ |
|
34155
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
421 | void |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
422 | purple_keyring_set_read_password(PurpleKeyring *keyring, |
|
34159
c47b85d03439
keyring.c refactoring - order up function implementations
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34158
diff
changeset
|
423 | PurpleKeyringRead read_cb); |
|
34155
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
424 | |
|
34166
8be287b0d6be
keyring.c refactoring: registering, unregistering
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34163
diff
changeset
|
425 | /** |
|
8be287b0d6be
keyring.c refactoring: registering, unregistering
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34163
diff
changeset
|
426 | * Sets save password method. |
|
8be287b0d6be
keyring.c refactoring: registering, unregistering
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34163
diff
changeset
|
427 | * |
|
8be287b0d6be
keyring.c refactoring: registering, unregistering
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34163
diff
changeset
|
428 | * This field is required. |
|
8be287b0d6be
keyring.c refactoring: registering, unregistering
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34163
diff
changeset
|
429 | * |
|
8be287b0d6be
keyring.c refactoring: registering, unregistering
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34163
diff
changeset
|
430 | * @param keyring The keyring. |
|
8be287b0d6be
keyring.c refactoring: registering, unregistering
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34163
diff
changeset
|
431 | * @param save_cb Save password method. |
|
8be287b0d6be
keyring.c refactoring: registering, unregistering
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34163
diff
changeset
|
432 | */ |
|
34155
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
433 | void |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
434 | purple_keyring_set_save_password(PurpleKeyring *keyring, |
|
34159
c47b85d03439
keyring.c refactoring - order up function implementations
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34158
diff
changeset
|
435 | PurpleKeyringSave save_cb); |
|
33967
9fac87349244
wrote more of the API and plaintext plugin. commit so i can revert, non-working code.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33966
diff
changeset
|
436 | |
|
34155
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
437 | void |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
438 | purple_keyring_set_cancel_requests(PurpleKeyring *keyring, |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
439 | PurpleKeyringCancelRequests cancel_requests); |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
440 | |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
441 | void |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
442 | purple_keyring_set_close_keyring(PurpleKeyring *keyring, |
|
34159
c47b85d03439
keyring.c refactoring - order up function implementations
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34158
diff
changeset
|
443 | PurpleKeyringClose close_cb); |
|
34155
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
444 | |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
445 | void |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
446 | purple_keyring_set_import_password(PurpleKeyring *keyring, |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
447 | PurpleKeyringImportPassword import_password); |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
448 | |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
449 | void |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
450 | purple_keyring_set_export_password(PurpleKeyring *keyring, |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
451 | PurpleKeyringExportPassword export_password); |
|
33967
9fac87349244
wrote more of the API and plaintext plugin. commit so i can revert, non-working code.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33966
diff
changeset
|
452 | |
|
34185
cb2fe6b04447
Initial support for keyring settings
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34166
diff
changeset
|
453 | void |
|
cb2fe6b04447
Initial support for keyring settings
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34166
diff
changeset
|
454 | purple_keyring_set_read_settings(PurpleKeyring *keyring, |
|
cb2fe6b04447
Initial support for keyring settings
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34166
diff
changeset
|
455 | PurpleKeyringReadSettings read_settings); |
|
cb2fe6b04447
Initial support for keyring settings
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34166
diff
changeset
|
456 | |
|
cb2fe6b04447
Initial support for keyring settings
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34166
diff
changeset
|
457 | void |
|
cb2fe6b04447
Initial support for keyring settings
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34166
diff
changeset
|
458 | purple_keyring_set_apply_settings(PurpleKeyring *keyring, |
|
cb2fe6b04447
Initial support for keyring settings
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34166
diff
changeset
|
459 | PurpleKeyringApplySettings apply_settings); |
|
cb2fe6b04447
Initial support for keyring settings
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34166
diff
changeset
|
460 | |
|
33976
ff88d1340abe
Cleaned up keyring.h, updating it to the latest API ideas. Minor changes in other files. Also wrote doxygen documentation for most of the functions in keyring.h.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33973
diff
changeset
|
461 | /*@}*/ |
|
33966
09490ce8a695
updated the internal keyring plugin, added a few comments in libpurple for future reference.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33965
diff
changeset
|
462 | |
|
34155
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
463 | /**************************************************************************/ |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
464 | /** @name Error Codes */ |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
465 | /**************************************************************************/ |
|
33976
ff88d1340abe
Cleaned up keyring.h, updating it to the latest API ideas. Minor changes in other files. Also wrote doxygen documentation for most of the functions in keyring.h.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33973
diff
changeset
|
466 | /*@{*/ |
|
33966
09490ce8a695
updated the internal keyring plugin, added a few comments in libpurple for future reference.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33965
diff
changeset
|
467 | |
|
33973
b193c0e9044b
Fixed problem in async purple_peyring_set_inuse()
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33972
diff
changeset
|
468 | /** |
|
34155
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
469 | * Gets keyring subsystem error domain. |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
470 | * |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
471 | * @return keyring subsystem error domain. |
|
33973
b193c0e9044b
Fixed problem in async purple_peyring_set_inuse()
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33972
diff
changeset
|
472 | */ |
|
34155
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
473 | GQuark |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
474 | purple_keyring_error_domain(void); |
|
33966
09490ce8a695
updated the internal keyring plugin, added a few comments in libpurple for future reference.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33965
diff
changeset
|
475 | |
|
34155
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
476 | /** |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
477 | * Error codes for keyring subsystem. |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
478 | */ |
|
33973
b193c0e9044b
Fixed problem in async purple_peyring_set_inuse()
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33972
diff
changeset
|
479 | enum PurpleKeyringError |
|
33967
9fac87349244
wrote more of the API and plaintext plugin. commit so i can revert, non-working code.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33966
diff
changeset
|
480 | { |
|
34154
857c361d3791
Refine keyring error coded
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34143
diff
changeset
|
481 | PURPLE_KEYRING_ERROR_UNKNOWN = 0, /**< Unknown error. */ |
|
857c361d3791
Refine keyring error coded
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34143
diff
changeset
|
482 | |
|
857c361d3791
Refine keyring error coded
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34143
diff
changeset
|
483 | PURPLE_KEYRING_ERROR_NOKEYRING = 10, /**< No keyring configured. */ |
|
857c361d3791
Refine keyring error coded
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34143
diff
changeset
|
484 | PURPLE_KEYRING_ERROR_INTERNAL, /**< Internal keyring system error. */ |
|
857c361d3791
Refine keyring error coded
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34143
diff
changeset
|
485 | PURPLE_KEYRING_ERROR_BACKENDFAIL, /**< Failed to communicate with the backend or internal backend error. */ |
|
857c361d3791
Refine keyring error coded
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34143
diff
changeset
|
486 | |
|
857c361d3791
Refine keyring error coded
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34143
diff
changeset
|
487 | PURPLE_KEYRING_ERROR_NOPASSWORD = 20, /**< No password stored for the specified account. */ |
|
857c361d3791
Refine keyring error coded
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34143
diff
changeset
|
488 | PURPLE_KEYRING_ERROR_ACCESSDENIED, /**< Access denied for the specified keyring or entry. */ |
|
857c361d3791
Refine keyring error coded
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34143
diff
changeset
|
489 | PURPLE_KEYRING_ERROR_CANCELLED /**< Operation was cancelled. */ |
|
33973
b193c0e9044b
Fixed problem in async purple_peyring_set_inuse()
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33972
diff
changeset
|
490 | }; |
|
33968
ca1e1985b5f2
update on keyring code
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33967
diff
changeset
|
491 | |
|
34044
0a176fe8b867
Clean up comments.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34042
diff
changeset
|
492 | /*}@*/ |
|
0a176fe8b867
Clean up comments.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34042
diff
changeset
|
493 | |
|
34155
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
494 | /**************************************************************************/ |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
495 | /** @name Keyring Subsystem */ |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
496 | /**************************************************************************/ |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
497 | /*@{*/ |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
498 | |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
499 | /** |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
500 | * Initializes the keyring subsystem. |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
501 | */ |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
502 | void |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
503 | purple_keyring_init(void); |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
504 | |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
505 | /** |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
506 | * Uninitializes the keyring subsystem. |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
507 | */ |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
508 | void |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
509 | purple_keyring_uninit(void); |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
510 | |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
511 | /** |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
512 | * Returns the keyring subsystem handle. |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
513 | * |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
514 | * @return The keyring subsystem handle. |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
515 | */ |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
516 | void * |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
517 | purple_keyring_get_handle(void); |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
518 | |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
519 | /*}@*/ |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
520 | |
|
567c48f9658c
Refactor the keyring API
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34154
diff
changeset
|
521 | G_END_DECLS |
|
34044
0a176fe8b867
Clean up comments.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34042
diff
changeset
|
522 | |
|
33968
ca1e1985b5f2
update on keyring code
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33967
diff
changeset
|
523 | #endif /* _PURPLE_KEYRING_H_ */ |