Sun, 06 Nov 2011 02:50:16 +0000
Clean up comments.
|
33965
bd73051d75eb
started writing a header file and some ideas for the API
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
1 | /** |
|
bd73051d75eb
started writing a header file and some ideas for the API
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
2 | * @file keyring.h Keyring plugin API |
|
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 |
|
33973
b193c0e9044b
Fixed problem in async purple_peyring_set_inuse()
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33972
diff
changeset
|
4 | * |
|
34033
910f2ed3988b
Remove trailing whitespace.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34029
diff
changeset
|
5 | * @todo |
|
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
|
6 | * - Offer a way to prompt the user for a password or for a password change. |
|
33965
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 | |
|
bd73051d75eb
started writing a header file and some ideas for the API
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
9 | /* purple |
|
bd73051d75eb
started writing a header file and some ideas for the API
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
10 | * |
|
bd73051d75eb
started writing a header file and some ideas for the API
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
11 | * 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
|
12 | * 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
|
13 | * source distribution. |
|
bd73051d75eb
started writing a header file and some ideas for the API
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
14 | * |
|
bd73051d75eb
started writing a header file and some ideas for the API
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
15 | * 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
|
16 | * 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
|
17 | * 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
|
18 | * (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
|
19 | * |
|
bd73051d75eb
started writing a header file and some ideas for the API
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
20 | * 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
|
21 | * 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
|
22 | * 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
|
23 | * 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
|
24 | * |
|
bd73051d75eb
started writing a header file and some ideas for the API
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
25 | * 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
|
26 | * along with this program; if not, write to the Free Software |
|
33965
bd73051d75eb
started writing a header file and some ideas for the API
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
27 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
|
bd73051d75eb
started writing a header file and some ideas for the API
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
28 | */ |
|
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 | #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
|
31 | #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
|
32 | |
|
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
|
33 | #include <glib.h> |
|
33965
bd73051d75eb
started writing a header file and some ideas for the API
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
34 | #include "account.h" |
|
bd73051d75eb
started writing a header file and some ideas for the API
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
35 | |
|
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
|
36 | /** |
|
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 | * Default keyring |
|
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
|
38 | */ |
|
34036
bf17ffca901d
Give this a better name.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34034
diff
changeset
|
39 | #define PURPLE_DEFAULT_KEYRING "core-scrouaf-internalkeyring" |
|
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
|
40 | |
|
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
|
41 | /*******************************************************/ |
|
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
|
42 | /** @name data structures and types */ |
|
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
|
43 | /*******************************************************/ |
|
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
|
44 | /*@{*/ |
|
34034
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
45 | 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
|
46 | |
|
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
|
47 | /*@}*/ |
|
33965
bd73051d75eb
started writing a header file and some ideas for the API
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
48 | |
|
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
|
49 | /** |
|
33973
b193c0e9044b
Fixed problem in async purple_peyring_set_inuse()
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33972
diff
changeset
|
50 | * XXX maybe strip a couple GError* if they're not used, |
|
b193c0e9044b
Fixed problem in async purple_peyring_set_inuse()
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33972
diff
changeset
|
51 | * since they should only be interresting for the callback |
|
b193c0e9044b
Fixed problem in async purple_peyring_set_inuse()
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33972
diff
changeset
|
52 | * --> ability to forward errors ? |
|
b193c0e9044b
Fixed problem in async purple_peyring_set_inuse()
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33972
diff
changeset
|
53 | * |
|
b193c0e9044b
Fixed problem in async purple_peyring_set_inuse()
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33972
diff
changeset
|
54 | */ |
|
33965
bd73051d75eb
started writing a header file and some ideas for the API
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
55 | |
|
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
|
56 | /********************************************************/ |
|
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
|
57 | /** @name Callbacks for basic keyring operation */ |
|
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
|
58 | /********************************************************/ |
|
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
|
59 | /*@{*/ |
|
33971
96eff57a4349
Fixed warnings
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33970
diff
changeset
|
60 | |
|
96eff57a4349
Fixed warnings
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33970
diff
changeset
|
61 | /** |
|
34044
0a176fe8b867
Clean up comments.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34042
diff
changeset
|
62 | * Callback for once a password is read. |
|
0a176fe8b867
Clean up comments.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34042
diff
changeset
|
63 | * |
|
0a176fe8b867
Clean up comments.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34042
diff
changeset
|
64 | * 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
|
65 | * |
|
34044
0a176fe8b867
Clean up comments.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34042
diff
changeset
|
66 | * @param account The account. |
|
0a176fe8b867
Clean up comments.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34042
diff
changeset
|
67 | * @param password The password. |
|
0a176fe8b867
Clean up comments.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34042
diff
changeset
|
68 | * @param error Error that may have occurred. |
|
34034
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
69 | * @param data Data passed to the callback. |
|
33971
96eff57a4349
Fixed warnings
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33970
diff
changeset
|
70 | */ |
|
34034
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
71 | typedef void (*PurpleKeyringReadCallback)(PurpleAccount *account, |
|
34041
75204e58b8ca
Fix const-ness of strings, and silly strdups.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34036
diff
changeset
|
72 | const gchar *password, |
|
34034
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
73 | GError *error, |
|
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
74 | gpointer data); |
|
33973
b193c0e9044b
Fixed problem in async purple_peyring_set_inuse()
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33972
diff
changeset
|
75 | |
|
b193c0e9044b
Fixed problem in async purple_peyring_set_inuse()
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33972
diff
changeset
|
76 | /** |
|
34044
0a176fe8b867
Clean up comments.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34042
diff
changeset
|
77 | * 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
|
78 | * |
|
34044
0a176fe8b867
Clean up comments.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34042
diff
changeset
|
79 | * 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
|
80 | * |
|
0a176fe8b867
Clean up comments.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34042
diff
changeset
|
81 | * @param account The account. |
|
0a176fe8b867
Clean up comments.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34042
diff
changeset
|
82 | * @param error Error that may have occurred. |
|
34034
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
83 | * @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
|
84 | */ |
|
34034
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
85 | typedef void (*PurpleKeyringSaveCallback)(PurpleAccount *account, |
|
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
86 | GError *error, |
|
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
87 | gpointer data); |
|
33973
b193c0e9044b
Fixed problem in async purple_peyring_set_inuse()
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33972
diff
changeset
|
88 | |
|
b193c0e9044b
Fixed problem in async purple_peyring_set_inuse()
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33972
diff
changeset
|
89 | /** |
|
b193c0e9044b
Fixed problem in async purple_peyring_set_inuse()
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33972
diff
changeset
|
90 | * 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
|
91 | * |
|
34044
0a176fe8b867
Clean up comments.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34042
diff
changeset
|
92 | * @param result TRUE if the password has been changed, FALSE otherwise. |
|
0a176fe8b867
Clean up comments.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34042
diff
changeset
|
93 | * @param error Error that has occurred. |
|
34034
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
94 | * @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
|
95 | */ |
|
b193c0e9044b
Fixed problem in async purple_peyring_set_inuse()
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33972
diff
changeset
|
96 | typedef void (*PurpleKeyringChangeMasterCallback)(gboolean result, |
|
34034
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
97 | GError *error, |
|
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
98 | gpointer data); |
|
33973
b193c0e9044b
Fixed problem in async purple_peyring_set_inuse()
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33972
diff
changeset
|
99 | |
|
33978
2c649fae664e
Final version of the API, corrected, cleaned, and documented.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33976
diff
changeset
|
100 | /** |
|
2c649fae664e
Final version of the API, corrected, cleaned, and documented.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33976
diff
changeset
|
101 | * 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
|
102 | * |
|
2c649fae664e
Final version of the API, corrected, cleaned, and documented.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33976
diff
changeset
|
103 | * @param keyring The keyring that is in use. |
|
34034
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
104 | * @param result TRUE if the keyring was changed, FALSE otherwise. |
|
34044
0a176fe8b867
Clean up comments.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34042
diff
changeset
|
105 | * @param error An error that might have occurred. |
|
34034
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
106 | * @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
|
107 | */ |
|
34034
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
108 | typedef void (*PurpleKeyringSetInUseCallback)(const PurpleKeyring *keyring, |
|
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
109 | gboolean result, |
|
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
110 | GError *error, |
|
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
111 | gpointer data); |
|
33978
2c649fae664e
Final version of the API, corrected, cleaned, and documented.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33976
diff
changeset
|
112 | |
|
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
|
113 | /*@}*/ |
|
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 | /** @name pointers to the keyring's functions */ |
|
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
|
117 | /********************************************************/ |
|
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
|
118 | /*@{*/ |
|
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
|
119 | |
|
33973
b193c0e9044b
Fixed problem in async purple_peyring_set_inuse()
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33972
diff
changeset
|
120 | /** |
|
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
|
121 | * Read the password for an account |
|
34034
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
122 | * |
|
34044
0a176fe8b867
Clean up comments.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34042
diff
changeset
|
123 | * @param account The account. |
|
0a176fe8b867
Clean up comments.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34042
diff
changeset
|
124 | * @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
|
125 | * @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
|
126 | */ |
|
34034
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
127 | typedef void (*PurpleKeyringRead)(PurpleAccount *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
|
128 | PurpleKeyringReadCallback cb, |
|
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
|
129 | gpointer data); |
|
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
|
130 | |
|
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
|
131 | /** |
|
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
|
132 | * Store a password in the keyring. |
|
34034
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
133 | * |
|
34044
0a176fe8b867
Clean up comments.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34042
diff
changeset
|
134 | * @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
|
135 | * @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
|
136 | * 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
|
137 | * @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
|
138 | * @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
|
139 | */ |
|
34034
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
140 | typedef void (*PurpleKeyringSave)(PurpleAccount *account, |
|
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
141 | const gchar *password, |
|
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
142 | PurpleKeyringSaveCallback cb, |
|
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
143 | 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
|
144 | |
|
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
|
145 | /** |
|
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
|
146 | * Close the keyring. |
|
34044
0a176fe8b867
Clean up comments.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34042
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 | * This will be called so the keyring can do any cleanup it wants. |
|
34034
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
149 | * |
|
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
|
150 | * @param error An error that may occur. |
|
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
|
151 | */ |
|
34034
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
152 | typedef void (*PurpleKeyringClose)(GError **error); |
|
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
|
153 | |
|
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
|
154 | /** |
|
34044
0a176fe8b867
Clean up comments.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34042
diff
changeset
|
155 | * Change the master password for the keyring. |
|
34034
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
156 | * |
|
34044
0a176fe8b867
Clean up comments.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34042
diff
changeset
|
157 | * @param cb A callback for once the master password has been changed. |
|
0a176fe8b867
Clean up comments.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34042
diff
changeset
|
158 | * @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
|
159 | */ |
|
33978
2c649fae664e
Final version of the API, corrected, cleaned, and documented.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33976
diff
changeset
|
160 | typedef void (*PurpleKeyringChangeMaster)(PurpleKeyringChangeMasterCallback cb, |
|
34034
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
161 | gpointer data); |
|
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
|
162 | |
|
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
|
163 | /** |
|
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
|
164 | * Import info on an XML node. |
|
34044
0a176fe8b867
Clean up comments.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34042
diff
changeset
|
165 | * |
|
34034
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
166 | * 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
|
167 | * decrypt passwords. |
|
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
168 | * |
|
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
|
169 | * @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
|
170 | * @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
|
171 | * @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
|
172 | * |
|
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
|
173 | * @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
|
174 | */ |
|
34034
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
175 | typedef gboolean (*PurpleKeyringImportPassword)(PurpleAccount *account, |
|
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
176 | const char *mode, |
|
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
177 | const char *data, |
|
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
178 | 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
|
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 | * Export information that will be stored in an XML node. |
|
34044
0a176fe8b867
Clean up comments.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34042
diff
changeset
|
182 | * |
|
34034
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
183 | * This is not async because it is not meant to prompt for a master password or |
|
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
184 | * encrypt passwords. |
|
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
185 | * |
|
34044
0a176fe8b867
Clean up comments.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34042
diff
changeset
|
186 | * @param account The account. |
|
34034
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
187 | * @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
|
188 | * expected to be a static string. |
|
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
189 | * @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
|
190 | * freed using destroy() once not needed anymore. |
|
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
191 | * @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
|
192 | * @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
|
193 | * |
|
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
|
194 | * @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
|
195 | */ |
|
34034
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
196 | typedef gboolean (*PurpleKeyringExportPassword)(PurpleAccount *account, |
|
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
197 | const char **mode, |
|
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
198 | char **data, |
|
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
199 | GError **error, |
|
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
200 | 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
|
201 | |
|
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
|
202 | /*@}*/ |
|
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
|
203 | |
|
34011
6ae90dd5a3b8
Added #ifdef __cplusplus extern "C" stuff to keyring.h
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33998
diff
changeset
|
204 | #ifdef __cplusplus |
|
6ae90dd5a3b8
Added #ifdef __cplusplus extern "C" stuff to keyring.h
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33998
diff
changeset
|
205 | extern "C" { |
|
6ae90dd5a3b8
Added #ifdef __cplusplus extern "C" stuff to keyring.h
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33998
diff
changeset
|
206 | #endif |
|
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
|
207 | |
|
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
|
208 | /***************************************/ |
|
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
|
209 | /** @name Keyring API */ |
|
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
|
210 | /***************************************/ |
|
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
|
211 | /*@{*/ |
|
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
|
212 | |
|
33987
9beebdbf44d6
Fixed many bugs and crashes in the keyring subsystem.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33984
diff
changeset
|
213 | /** |
|
34041
75204e58b8ca
Fix const-ness of strings, and silly strdups.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34036
diff
changeset
|
214 | * Find a keyring from its keyring id. |
|
34034
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
215 | * |
|
33987
9beebdbf44d6
Fixed many bugs and crashes in the keyring subsystem.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33984
diff
changeset
|
216 | * @param id The id for the keyring. |
|
34034
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
217 | * |
|
33987
9beebdbf44d6
Fixed many bugs and crashes in the keyring subsystem.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33984
diff
changeset
|
218 | * @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
|
219 | */ |
|
34042
c79b32c07390
Remove duplicate function.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34041
diff
changeset
|
220 | PurpleKeyring *purple_keyring_find_keyring_by_id(const char *id); |
|
33987
9beebdbf44d6
Fixed many bugs and crashes in the keyring subsystem.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33984
diff
changeset
|
221 | |
|
9beebdbf44d6
Fixed many bugs and crashes in the keyring subsystem.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33984
diff
changeset
|
222 | /** |
|
9beebdbf44d6
Fixed many bugs and crashes in the keyring subsystem.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33984
diff
changeset
|
223 | * Get a list of id/name pairs (for preferences) |
|
34034
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
224 | * |
|
33987
9beebdbf44d6
Fixed many bugs and crashes in the keyring subsystem.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33984
diff
changeset
|
225 | * @return The list. |
|
9beebdbf44d6
Fixed many bugs and crashes in the keyring subsystem.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33984
diff
changeset
|
226 | */ |
|
34034
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
227 | GList *purple_keyring_get_options(void); |
|
33987
9beebdbf44d6
Fixed many bugs and crashes in the keyring subsystem.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33984
diff
changeset
|
228 | |
|
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
|
229 | /** |
|
33978
2c649fae664e
Final version of the API, corrected, cleaned, and documented.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33976
diff
changeset
|
230 | * Prepare stuff at startup. |
|
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
|
231 | */ |
|
33987
9beebdbf44d6
Fixed many bugs and crashes in the keyring subsystem.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33984
diff
changeset
|
232 | void purple_keyring_init(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
|
233 | |
|
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
|
234 | /** |
|
33978
2c649fae664e
Final version of the API, corrected, cleaned, and documented.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33976
diff
changeset
|
235 | * Do some cleanup. |
|
2c649fae664e
Final version of the API, corrected, cleaned, and documented.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33976
diff
changeset
|
236 | */ |
|
33987
9beebdbf44d6
Fixed many bugs and crashes in the keyring subsystem.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33984
diff
changeset
|
237 | void purple_keyring_uninit(void); |
|
33978
2c649fae664e
Final version of the API, corrected, cleaned, and documented.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33976
diff
changeset
|
238 | |
|
2c649fae664e
Final version of the API, corrected, cleaned, and documented.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33976
diff
changeset
|
239 | /** |
|
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
|
240 | * Get the keyring list. Used by the UI. |
|
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 | */ |
|
34033
910f2ed3988b
Remove trailing whitespace.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34029
diff
changeset
|
242 | const GList * |
|
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
|
243 | purple_keyring_get_keyrings(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
|
244 | |
|
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
|
245 | /** |
|
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
|
246 | * 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
|
247 | */ |
|
34033
910f2ed3988b
Remove trailing whitespace.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34029
diff
changeset
|
248 | const 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
|
249 | 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
|
250 | |
|
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 | /** |
|
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
|
252 | * Set the keyring to use. This function will move all passwords from |
|
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
|
253 | * the old keyring to the new one. If it fails, it will cancel all changes, |
|
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
|
254 | * close the new keyring, and notify the callback. If it succeeds, it will |
|
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
|
255 | * remove all passwords from the old safe and close that safe. |
|
34034
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
256 | * |
|
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
|
257 | * @param newkeyring The new keyring to use. |
|
34034
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
258 | * @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
|
259 | * an error occurs, data might be lost. |
|
34044
0a176fe8b867
Clean up comments.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34042
diff
changeset
|
260 | * @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
|
261 | * @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
|
262 | */ |
|
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
|
263 | void |
|
34034
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
264 | purple_keyring_set_inuse(const PurpleKeyring *newkeyring, |
|
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
265 | gboolean force, |
|
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
266 | PurpleKeyringSetInUseCallback cb, |
|
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
267 | gpointer data); |
|
33978
2c649fae664e
Final version of the API, corrected, cleaned, and documented.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33976
diff
changeset
|
268 | |
|
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 | /** |
|
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
|
270 | * Register a keyring plugin. |
|
34034
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
271 | * |
|
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
272 | * @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
|
273 | */ |
|
34033
910f2ed3988b
Remove trailing whitespace.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34029
diff
changeset
|
274 | void |
|
34034
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
275 | 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
|
276 | |
|
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
|
277 | /** |
|
34044
0a176fe8b867
Clean up comments.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34042
diff
changeset
|
278 | * Unregister a keyring plugin. |
|
0a176fe8b867
Clean up comments.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34042
diff
changeset
|
279 | * |
|
0a176fe8b867
Clean up comments.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34042
diff
changeset
|
280 | * 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
|
281 | * 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
|
282 | * |
|
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
283 | * @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
|
284 | */ |
|
34033
910f2ed3988b
Remove trailing whitespace.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34029
diff
changeset
|
285 | void |
|
34034
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
286 | 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
|
287 | |
|
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
|
288 | /*@}*/ |
|
33971
96eff57a4349
Fixed warnings
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33970
diff
changeset
|
289 | |
|
33965
bd73051d75eb
started writing a header file and some ideas for the API
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
290 | /***************************************/ |
|
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
|
291 | /** @name Keyring plugin wrappers */ |
|
33965
bd73051d75eb
started writing a header file and some ideas for the API
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
292 | /***************************************/ |
|
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
|
293 | /*@{*/ |
|
33968
ca1e1985b5f2
update on keyring code
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33967
diff
changeset
|
294 | |
|
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
|
295 | /** |
|
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 | * 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
|
297 | * |
|
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
298 | * @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
|
299 | * @param keyringid The plugin ID that was stored in the xml file. Can be NULL. |
|
34034
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
300 | * @param mode A keyring specific option that was stored. Can be NULL. |
|
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
301 | * @param data Data that was stored, can be NULL. |
|
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
302 | * |
|
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
|
303 | * @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
|
304 | */ |
|
34034
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
305 | gboolean purple_keyring_import_password(PurpleAccount *account, |
|
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
306 | const char *keyringid, |
|
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
307 | const char *mode, |
|
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
308 | const char *data, |
|
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
309 | 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
|
310 | |
|
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
|
311 | /** |
|
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
|
312 | * used by account.c while syncing accounts |
|
34034
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
313 | * |
|
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
314 | * @param account The account for which we want the info. |
|
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
315 | * @param keyringid The plugin id to be stored in the XML node. This will be |
|
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
316 | * NULL or a string that can be considered static. |
|
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
317 | * @param mode An option field that can be used by the plugin. This will be |
|
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
318 | * NULL or a string that can be considered static. |
|
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
319 | * @param data The data to be stored in the XML node. This string must be |
|
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
320 | * freed using destroy() once not needed anymore if it is not |
|
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
321 | * NULL. |
|
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
322 | * @param error Will be set if a problem occured. |
|
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
323 | * @param destroy A function to be called, if non NULL, to free data. |
|
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
324 | * |
|
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
|
325 | * @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
|
326 | */ |
|
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
|
327 | gboolean |
|
34034
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
328 | purple_keyring_export_password(PurpleAccount *account, |
|
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
329 | const char **keyringid, |
|
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
330 | const char **mode, |
|
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
331 | char **data, |
|
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
332 | GError **error, |
|
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
333 | 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
|
334 | |
|
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
|
335 | /** |
|
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
|
336 | * Read a password from the active safe. |
|
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
|
337 | * |
|
34044
0a176fe8b867
Clean up comments.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34042
diff
changeset
|
338 | * @param account The account. |
|
0a176fe8b867
Clean up comments.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34042
diff
changeset
|
339 | * @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
|
340 | * @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
|
341 | */ |
|
34033
910f2ed3988b
Remove trailing whitespace.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34029
diff
changeset
|
342 | 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
|
343 | purple_keyring_get_password(PurpleAccount *account, |
|
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
|
344 | PurpleKeyringReadCallback cb, |
|
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
|
345 | 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
|
346 | |
|
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
|
347 | /** |
|
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
|
348 | * Set a password to be remembered. |
|
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
|
349 | * |
|
34044
0a176fe8b867
Clean up comments.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34042
diff
changeset
|
350 | * @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
|
351 | * @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
|
352 | * @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
|
353 | * @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
|
354 | */ |
|
34033
910f2ed3988b
Remove trailing whitespace.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34029
diff
changeset
|
355 | 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
|
356 | purple_keyring_set_password(PurpleAccount *account, |
|
34029
059c1270db1f
Remove the silly destroy argument from purple_account_set_password and
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34028
diff
changeset
|
357 | const gchar *password, |
|
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
|
358 | PurpleKeyringSaveCallback cb, |
|
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
|
359 | 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
|
360 | |
|
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
|
361 | /** |
|
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
|
362 | * Close a safe. |
|
34034
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
363 | * |
|
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
|
364 | * @param keyring The safe to close. |
|
34034
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
365 | * @param error Error that might occur. |
|
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
|
366 | */ |
|
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
|
367 | void |
|
34034
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
368 | purple_keyring_close(PurpleKeyring *keyring, GError **error); |
|
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
|
369 | |
|
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
|
370 | /** |
|
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
|
371 | * Change the master password for a safe (if the safe supports it). |
|
34034
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
372 | * |
|
34044
0a176fe8b867
Clean up comments.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34042
diff
changeset
|
373 | * @param cb A callback for once the master password has been changed. |
|
0a176fe8b867
Clean up comments.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34042
diff
changeset
|
374 | * @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
|
375 | */ |
|
34033
910f2ed3988b
Remove trailing whitespace.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34029
diff
changeset
|
376 | 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
|
377 | purple_keyring_change_master(PurpleKeyringChangeMasterCallback cb, |
|
34034
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
378 | 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
|
379 | |
|
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
|
380 | /*@}*/ |
|
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
|
381 | |
|
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
|
382 | /***************************************/ |
|
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
|
383 | /** @name PurpleKeyring Accessors */ |
|
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
|
384 | /***************************************/ |
|
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
|
385 | /*@{*/ |
|
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
|
386 | |
|
34034
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
387 | PurpleKeyring *purple_keyring_new(void); |
|
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
388 | void purple_keyring_free(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
|
389 | |
|
34034
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
390 | const char *purple_keyring_get_name(const PurpleKeyring *info); |
|
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
391 | const char *purple_keyring_get_id(const PurpleKeyring *info); |
|
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
392 | PurpleKeyringRead purple_keyring_get_read_password(const PurpleKeyring *info); |
|
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
393 | PurpleKeyringSave purple_keyring_get_save_password(const PurpleKeyring *info); |
|
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
394 | PurpleKeyringClose purple_keyring_get_close_keyring(const PurpleKeyring *info); |
|
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
395 | PurpleKeyringChangeMaster purple_keyring_get_change_master(const PurpleKeyring *info); |
|
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
396 | PurpleKeyringImportPassword purple_keyring_get_import_password(const PurpleKeyring *info); |
|
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
397 | PurpleKeyringExportPassword purple_keyring_get_export_password(const PurpleKeyring *info); |
|
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
|
398 | |
|
34041
75204e58b8ca
Fix const-ness of strings, and silly strdups.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34036
diff
changeset
|
399 | void purple_keyring_set_name(PurpleKeyring *info, const char *name); |
|
75204e58b8ca
Fix const-ness of strings, and silly strdups.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34036
diff
changeset
|
400 | void purple_keyring_set_id(PurpleKeyring *info, const char *id); |
|
34034
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
401 | void purple_keyring_set_read_password(PurpleKeyring *info, PurpleKeyringRead read); |
|
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
402 | void purple_keyring_set_save_password(PurpleKeyring *info, PurpleKeyringSave save); |
|
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
403 | void purple_keyring_set_close_keyring(PurpleKeyring *info, PurpleKeyringClose close); |
|
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
404 | void purple_keyring_set_change_master(PurpleKeyring *info, PurpleKeyringChangeMaster change_master); |
|
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
405 | void purple_keyring_set_import_password(PurpleKeyring *info, PurpleKeyringImportPassword import_password); |
|
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
406 | void purple_keyring_set_export_password(PurpleKeyring *info, 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
|
407 | |
|
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
|
408 | /*@}*/ |
|
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
|
409 | |
|
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
|
410 | /***************************************/ |
|
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
|
411 | /** @name Error Codes */ |
|
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
|
412 | /***************************************/ |
|
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
|
413 | /*@{*/ |
|
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
|
414 | |
|
33973
b193c0e9044b
Fixed problem in async purple_peyring_set_inuse()
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33972
diff
changeset
|
415 | /** |
|
34033
910f2ed3988b
Remove trailing whitespace.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34029
diff
changeset
|
416 | * Error domain GQuark. |
|
33973
b193c0e9044b
Fixed problem in async purple_peyring_set_inuse()
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33972
diff
changeset
|
417 | * See @ref purple_keyring_error_domain . |
|
b193c0e9044b
Fixed problem in async purple_peyring_set_inuse()
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33972
diff
changeset
|
418 | */ |
|
33970
4b6a0141a242
Fixed syntax and types error. keyring.c and keyring.h will now compile, but will issue warnings with -Wall
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33968
diff
changeset
|
419 | #define ERR_PIDGINKEYRING purple_keyring_error_domain() |
|
33973
b193c0e9044b
Fixed problem in async purple_peyring_set_inuse()
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33972
diff
changeset
|
420 | /** stuff here too */ |
|
33983
317cd0a252c2
Fixed a bunch of bugs/errors, worked on making calls async, on configuration UI, and on Makefiles.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33982
diff
changeset
|
421 | GQuark 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
|
422 | |
|
33973
b193c0e9044b
Fixed problem in async purple_peyring_set_inuse()
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33972
diff
changeset
|
423 | /** error codes for keyrings. */ |
|
b193c0e9044b
Fixed problem in async purple_peyring_set_inuse()
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33972
diff
changeset
|
424 | 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
|
425 | { |
|
34044
0a176fe8b867
Clean up comments.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34042
diff
changeset
|
426 | ERR_OK = 0, /**< No error. */ |
|
0a176fe8b867
Clean up comments.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34042
diff
changeset
|
427 | ERR_NOPASSWD = 1, /**< No stored password. */ |
|
0a176fe8b867
Clean up comments.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34042
diff
changeset
|
428 | ERR_NOACCOUNT, /**< Account not found. */ |
|
0a176fe8b867
Clean up comments.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34042
diff
changeset
|
429 | ERR_WRONGPASS, /**< User submitted wrong password when prompted. */ |
|
0a176fe8b867
Clean up comments.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34042
diff
changeset
|
430 | ERR_WRONGFORMAT, /**< Data passed is not in suitable format. */ |
|
0a176fe8b867
Clean up comments.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34042
diff
changeset
|
431 | ERR_NOKEYRING, /**< No keyring configured. */ |
|
0a176fe8b867
Clean up comments.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34042
diff
changeset
|
432 | ERR_NOCHANNEL, /**< Failed to communicate with the backend */ |
|
0a176fe8b867
Clean up comments.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34042
diff
changeset
|
433 | ERR_INVALID, /**< Invalid input */ |
|
0a176fe8b867
Clean up comments.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34042
diff
changeset
|
434 | ERR_NOCAP, /**< Keyring doesn't support this */ |
|
0a176fe8b867
Clean up comments.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34042
diff
changeset
|
435 | ERR_UNKNOWN /**< Unknown error */ |
|
33973
b193c0e9044b
Fixed problem in async purple_peyring_set_inuse()
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33972
diff
changeset
|
436 | }; |
|
33968
ca1e1985b5f2
update on keyring code
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33967
diff
changeset
|
437 | |
|
34044
0a176fe8b867
Clean up comments.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34042
diff
changeset
|
438 | /*}@*/ |
|
0a176fe8b867
Clean up comments.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34042
diff
changeset
|
439 | |
|
34011
6ae90dd5a3b8
Added #ifdef __cplusplus extern "C" stuff to keyring.h
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33998
diff
changeset
|
440 | #ifdef __cplusplus |
|
6ae90dd5a3b8
Added #ifdef __cplusplus extern "C" stuff to keyring.h
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33998
diff
changeset
|
441 | } |
|
6ae90dd5a3b8
Added #ifdef __cplusplus extern "C" stuff to keyring.h
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33998
diff
changeset
|
442 | #endif |
|
34044
0a176fe8b867
Clean up comments.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34042
diff
changeset
|
443 | |
|
33968
ca1e1985b5f2
update on keyring code
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33967
diff
changeset
|
444 | #endif /* _PURPLE_KEYRING_H_ */ |
|
34034
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
445 |