libpurple/plugins/keyrings/internalkeyring.c

Fri, 22 Mar 2013 00:26:10 +0100

author
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
date
Fri, 22 Mar 2013 00:26:10 +0100
branch
soc.2008.masterpassword
changeset 34128
0cbd558ab5e7
parent 34127
51c1bce7f52f
child 34129
52b91b4b8314
permissions
-rw-r--r--

Tidy up internal keyring

33984
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
1 /**
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
2 * @file internalkeyring.c internal keyring
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
3 * @ingroup plugins
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
4 *
34033
910f2ed3988b Remove trailing whitespace.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 34032
diff changeset
5 * @todo
33984
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
6 * cleanup error handling and reporting
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
7 */
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
8
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
9 /* purple
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
10 *
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
11 * Purple is the legal property of its developers, whose names are too numerous
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
12 * to list here. Please refer to the COPYRIGHT file distributed with this
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
13 * source distribution.
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
14 *
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
15 * This program is free software; you can redistribute it and/or modify
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
16 * it under the terms of the GNU General Public License as published by
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
17 * the Free Software Foundation; either version 2 of the License, or
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
18 * (at your option) any later version.
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
19 *
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
20 * This program is distributed in the hope that it will be useful,
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
23 * GNU General Public License for more details.
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
24 *
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
25 * You should have received a copy of the GNU General Public License
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
26 * along with this program ; if not, write to the Free Software
34128
0cbd558ab5e7 Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34127
diff changeset
27 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
33984
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
28 */
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
29
34076
64e389ae5cc3 Clean up headers and stuff.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 34052
diff changeset
30 #include "internal.h"
33984
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
31 #include "account.h"
34076
64e389ae5cc3 Clean up headers and stuff.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 34052
diff changeset
32 #include "debug.h"
33984
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
33 #include "keyring.h"
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
34 #include "plugin.h"
34076
64e389ae5cc3 Clean up headers and stuff.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 34052
diff changeset
35 #include "version.h"
33984
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
36
34034
f508fa47f2ac Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 34033
diff changeset
37 #define INTERNALKEYRING_NAME N_("Internal keyring")
34128
0cbd558ab5e7 Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34127
diff changeset
38 #define INTERNALKEYRING_DESCRIPTION N_("This plugin provides the default" \
0cbd558ab5e7 Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34127
diff changeset
39 " password storage behaviour for libpurple. Password will be stored" \
0cbd558ab5e7 Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34127
diff changeset
40 " unencrypted.")
34093
c8197603fa20 Use better keyring IDs.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 34082
diff changeset
41 #define INTERNALKEYRING_AUTHOR "Scrouaf (scrouaf[at]soc.pidgin.im)"
34036
bf17ffca901d Give this a better name.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 34035
diff changeset
42 #define INTERNALKEYRING_ID PURPLE_DEFAULT_KEYRING
33984
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
43
34128
0cbd558ab5e7 Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34127
diff changeset
44 static gboolean internal_keyring_opened = FALSE;
34034
f508fa47f2ac Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 34033
diff changeset
45 static GHashTable *internal_keyring_passwords = NULL;
f508fa47f2ac Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 34033
diff changeset
46 static PurpleKeyring *keyring_handler = NULL;
33984
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
47
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
48 /***********************************************/
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
49 /* Keyring interface */
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
50 /***********************************************/
34128
0cbd558ab5e7 Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34127
diff changeset
51
34032
2eeafc43c7f2 Rearrange code so we can drop the prototypes. Most of it was already
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 34031
diff changeset
52 static void
34034
f508fa47f2ac Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 34033
diff changeset
53 internal_keyring_open(void)
34032
2eeafc43c7f2 Rearrange code so we can drop the prototypes. Most of it was already
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 34031
diff changeset
54 {
34128
0cbd558ab5e7 Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34127
diff changeset
55 if (internal_keyring_opened)
0cbd558ab5e7 Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34127
diff changeset
56 return;
0cbd558ab5e7 Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34127
diff changeset
57 internal_keyring_opened = TRUE;
0cbd558ab5e7 Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34127
diff changeset
58
34032
2eeafc43c7f2 Rearrange code so we can drop the prototypes. Most of it was already
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 34031
diff changeset
59 internal_keyring_passwords = g_hash_table_new_full(g_direct_hash,
2eeafc43c7f2 Rearrange code so we can drop the prototypes. Most of it was already
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 34031
diff changeset
60 g_direct_equal, NULL, g_free);
2eeafc43c7f2 Rearrange code so we can drop the prototypes. Most of it was already
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 34031
diff changeset
61 }
2eeafc43c7f2 Rearrange code so we can drop the prototypes. Most of it was already
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 34031
diff changeset
62
34033
910f2ed3988b Remove trailing whitespace.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 34032
diff changeset
63 static void
34128
0cbd558ab5e7 Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34127
diff changeset
64 internal_keyring_read(PurpleAccount *account, PurpleKeyringReadCallback cb,
0cbd558ab5e7 Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34127
diff changeset
65 gpointer data)
33984
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
66 {
34041
75204e58b8ca Fix const-ness of strings, and silly strdups.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 34036
diff changeset
67 const char *password;
34034
f508fa47f2ac Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 34033
diff changeset
68 GError *error;
33984
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
69
34128
0cbd558ab5e7 Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34127
diff changeset
70 internal_keyring_open();
33987
9beebdbf44d6 Fixed many bugs and crashes in the keyring subsystem.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents: 33984
diff changeset
71
34051
07742e8210e2 These macros just mask what's going on here.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 34048
diff changeset
72 password = g_hash_table_lookup(internal_keyring_passwords, account);
33984
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
73
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
74 if (password != NULL) {
34127
51c1bce7f52f Tidying debug messages, signals
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34116
diff changeset
75 purple_debug_misc("keyring-internal",
51c1bce7f52f Tidying debug messages, signals
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34116
diff changeset
76 "Got password for account %s (%s).\n",
51c1bce7f52f Tidying debug messages, signals
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34116
diff changeset
77 purple_account_get_username(account),
51c1bce7f52f Tidying debug messages, signals
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34116
diff changeset
78 purple_account_get_protocol_id(account));
34034
f508fa47f2ac Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 34033
diff changeset
79 if (cb != NULL)
33987
9beebdbf44d6 Fixed many bugs and crashes in the keyring subsystem.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents: 33984
diff changeset
80 cb(account, password, NULL, data);
33984
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
81 } else {
34127
51c1bce7f52f Tidying debug messages, signals
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34116
diff changeset
82 purple_debug_misc("keyring-internal",
51c1bce7f52f Tidying debug messages, signals
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34116
diff changeset
83 "No password for account %s (%s).\n",
51c1bce7f52f Tidying debug messages, signals
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34116
diff changeset
84 purple_account_get_username(account),
51c1bce7f52f Tidying debug messages, signals
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34116
diff changeset
85 purple_account_get_protocol_id(account));
34047
c2e68ddbf27c Correctly namespace these keyring errors.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 34041
diff changeset
86 error = g_error_new(PURPLE_KEYRING_ERROR,
34048
2d14a219c886 Make stuff consistent.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 34047
diff changeset
87 PURPLE_KEYRING_ERROR_NOPASSWD, "Password not found.");
34034
f508fa47f2ac Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 34033
diff changeset
88 if (cb != NULL)
33987
9beebdbf44d6 Fixed many bugs and crashes in the keyring subsystem.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents: 33984
diff changeset
89 cb(account, NULL, error, data);
33984
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
90 g_error_free(error);
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
91 }
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
92 }
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
93
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
94 static void
34128
0cbd558ab5e7 Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34127
diff changeset
95 internal_keyring_save(PurpleAccount *account, const gchar *password,
0cbd558ab5e7 Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34127
diff changeset
96 PurpleKeyringSaveCallback cb, gpointer data)
33984
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
97 {
34128
0cbd558ab5e7 Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34127
diff changeset
98 internal_keyring_open();
34127
51c1bce7f52f Tidying debug messages, signals
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34116
diff changeset
99
51c1bce7f52f Tidying debug messages, signals
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34116
diff changeset
100 if (password == NULL)
33984
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
101 g_hash_table_remove(internal_keyring_passwords, account);
34128
0cbd558ab5e7 Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34127
diff changeset
102 else {
0cbd558ab5e7 Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34127
diff changeset
103 g_hash_table_replace(internal_keyring_passwords, account,
0cbd558ab5e7 Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34127
diff changeset
104 g_strdup(password));
0cbd558ab5e7 Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34127
diff changeset
105 }
33987
9beebdbf44d6 Fixed many bugs and crashes in the keyring subsystem.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents: 33984
diff changeset
106
34127
51c1bce7f52f Tidying debug messages, signals
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34116
diff changeset
107 purple_debug_misc("keyring-internal",
51c1bce7f52f Tidying debug messages, signals
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34116
diff changeset
108 "Password %s for account %s (%s).\n",
51c1bce7f52f Tidying debug messages, signals
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34116
diff changeset
109 (password == NULL ? "removed" : "saved"),
51c1bce7f52f Tidying debug messages, signals
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34116
diff changeset
110 purple_account_get_username(account),
51c1bce7f52f Tidying debug messages, signals
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34116
diff changeset
111 purple_account_get_protocol_id(account));
33984
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
112
33987
9beebdbf44d6 Fixed many bugs and crashes in the keyring subsystem.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents: 33984
diff changeset
113 if (cb != NULL)
9beebdbf44d6 Fixed many bugs and crashes in the keyring subsystem.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents: 33984
diff changeset
114 cb(account, NULL, data);
33984
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
115 }
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
116
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
117 static void
34034
f508fa47f2ac Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 34033
diff changeset
118 internal_keyring_close(GError **error)
33984
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
119 {
34128
0cbd558ab5e7 Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34127
diff changeset
120 if (!internal_keyring_opened)
0cbd558ab5e7 Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34127
diff changeset
121 return;
0cbd558ab5e7 Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34127
diff changeset
122 internal_keyring_opened = FALSE;
0cbd558ab5e7 Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34127
diff changeset
123
0cbd558ab5e7 Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34127
diff changeset
124 g_hash_table_destroy(internal_keyring_passwords);
33987
9beebdbf44d6 Fixed many bugs and crashes in the keyring subsystem.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents: 33984
diff changeset
125 internal_keyring_passwords = NULL;
9beebdbf44d6 Fixed many bugs and crashes in the keyring subsystem.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents: 33984
diff changeset
126 }
9beebdbf44d6 Fixed many bugs and crashes in the keyring subsystem.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents: 33984
diff changeset
127
33984
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
128 static gboolean
34128
0cbd558ab5e7 Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34127
diff changeset
129 internal_keyring_import_password(PurpleAccount *account, const char *mode,
0cbd558ab5e7 Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34127
diff changeset
130 const char *data, GError **error)
33984
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
131 {
34128
0cbd558ab5e7 Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34127
diff changeset
132 g_return_val_if_fail(account != NULL, FALSE);
0cbd558ab5e7 Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34127
diff changeset
133 g_return_val_if_fail(data != NULL, FALSE);
0cbd558ab5e7 Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34127
diff changeset
134
0cbd558ab5e7 Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34127
diff changeset
135 internal_keyring_open();
34127
51c1bce7f52f Tidying debug messages, signals
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34116
diff changeset
136
34128
0cbd558ab5e7 Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34127
diff changeset
137 if (mode == NULL)
0cbd558ab5e7 Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34127
diff changeset
138 mode = "cleartext";
33987
9beebdbf44d6 Fixed many bugs and crashes in the keyring subsystem.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents: 33984
diff changeset
139
34128
0cbd558ab5e7 Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34127
diff changeset
140 if (g_strcmp0(mode, "cleartext") == 0) {
0cbd558ab5e7 Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34127
diff changeset
141 g_hash_table_replace(internal_keyring_passwords, account,
0cbd558ab5e7 Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34127
diff changeset
142 g_strdup(data));
33984
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
143 return TRUE;
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
144 } else {
34127
51c1bce7f52f Tidying debug messages, signals
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34116
diff changeset
145 if (error != NULL) {
51c1bce7f52f Tidying debug messages, signals
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34116
diff changeset
146 *error = g_error_new(PURPLE_KEYRING_ERROR,
51c1bce7f52f Tidying debug messages, signals
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34116
diff changeset
147 PURPLE_KEYRING_ERROR_WRONGFORMAT,
51c1bce7f52f Tidying debug messages, signals
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34116
diff changeset
148 "invalid mode");
51c1bce7f52f Tidying debug messages, signals
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34116
diff changeset
149 }
33984
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
150 return FALSE;
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
151 }
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
152 }
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
153
34033
910f2ed3988b Remove trailing whitespace.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 34032
diff changeset
154 static gboolean
34128
0cbd558ab5e7 Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34127
diff changeset
155 internal_keyring_export_password(PurpleAccount *account, const char **mode,
0cbd558ab5e7 Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34127
diff changeset
156 char **data, GError **error, GDestroyNotify *destroy)
33984
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
157 {
34034
f508fa47f2ac Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 34033
diff changeset
158 gchar *password;
33984
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
159
34128
0cbd558ab5e7 Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34127
diff changeset
160 internal_keyring_open();
33987
9beebdbf44d6 Fixed many bugs and crashes in the keyring subsystem.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents: 33984
diff changeset
161
34051
07742e8210e2 These macros just mask what's going on here.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 34048
diff changeset
162 password = g_hash_table_lookup(internal_keyring_passwords, account);
33984
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
163
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
164 if (password == NULL) {
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
165 return FALSE;
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
166 } else {
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
167 *mode = "cleartext";
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
168 *data = g_strdup(password);
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
169 *destroy = g_free;
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
170 return TRUE;
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
171 }
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
172 }
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
173
34128
0cbd558ab5e7 Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34127
diff changeset
174 /***********************************************/
0cbd558ab5e7 Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34127
diff changeset
175 /* Plugin interface */
0cbd558ab5e7 Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34127
diff changeset
176 /***********************************************/
0cbd558ab5e7 Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34127
diff changeset
177
0cbd558ab5e7 Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34127
diff changeset
178 static gboolean
0cbd558ab5e7 Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34127
diff changeset
179 internal_keyring_load(PurplePlugin *plugin)
33984
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
180 {
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
181 keyring_handler = purple_keyring_new();
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
182
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
183 purple_keyring_set_name(keyring_handler, INTERNALKEYRING_NAME);
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
184 purple_keyring_set_id(keyring_handler, INTERNALKEYRING_ID);
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
185 purple_keyring_set_read_password(keyring_handler, internal_keyring_read);
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
186 purple_keyring_set_save_password(keyring_handler, internal_keyring_save);
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
187 purple_keyring_set_close_keyring(keyring_handler, internal_keyring_close);
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
188 purple_keyring_set_import_password(keyring_handler, internal_keyring_import_password);
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
189 purple_keyring_set_export_password(keyring_handler, internal_keyring_export_password);
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
190
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
191 purple_keyring_register(keyring_handler);
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
192
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
193 return TRUE;
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
194 }
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
195
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
196 static gboolean
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
197 internal_keyring_unload(PurplePlugin *plugin)
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
198 {
34128
0cbd558ab5e7 Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34127
diff changeset
199 if (purple_keyring_get_inuse() == keyring_handler) {
0cbd558ab5e7 Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34127
diff changeset
200 purple_debug_warning("keyring-internal",
0cbd558ab5e7 Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34127
diff changeset
201 "keyring in use, cannot unload\n");
34096
3d28c3311ad0 Don't allow unloading a plugin if its keyring is active.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 34095
diff changeset
202 return FALSE;
34128
0cbd558ab5e7 Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34127
diff changeset
203 }
34096
3d28c3311ad0 Don't allow unloading a plugin if its keyring is active.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 34095
diff changeset
204
34128
0cbd558ab5e7 Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34127
diff changeset
205 internal_keyring_close(NULL);
33987
9beebdbf44d6 Fixed many bugs and crashes in the keyring subsystem.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents: 33984
diff changeset
206
34128
0cbd558ab5e7 Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34127
diff changeset
207 purple_keyring_unregister(keyring_handler);
33987
9beebdbf44d6 Fixed many bugs and crashes in the keyring subsystem.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents: 33984
diff changeset
208 purple_keyring_free(keyring_handler);
9beebdbf44d6 Fixed many bugs and crashes in the keyring subsystem.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents: 33984
diff changeset
209 keyring_handler = NULL;
9beebdbf44d6 Fixed many bugs and crashes in the keyring subsystem.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents: 33984
diff changeset
210
33984
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
211 return TRUE;
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
212 }
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
213
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
214 PurplePluginInfo plugininfo =
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
215 {
34128
0cbd558ab5e7 Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34127
diff changeset
216 PURPLE_PLUGIN_MAGIC, /* magic */
0cbd558ab5e7 Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34127
diff changeset
217 PURPLE_MAJOR_VERSION, /* major_version */
0cbd558ab5e7 Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34127
diff changeset
218 PURPLE_MINOR_VERSION, /* minor_version */
0cbd558ab5e7 Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34127
diff changeset
219 PURPLE_PLUGIN_STANDARD, /* type */
0cbd558ab5e7 Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34127
diff changeset
220 NULL, /* ui_requirement */
34116
825c98f8c7f6 Get rid of PURPLE_PLUGIN_FLAG_AUTOLOAD
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34110
diff changeset
221 PURPLE_PLUGIN_FLAG_INVISIBLE, /* flags */
34128
0cbd558ab5e7 Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34127
diff changeset
222 NULL, /* dependencies */
0cbd558ab5e7 Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34127
diff changeset
223 PURPLE_PRIORITY_DEFAULT, /* priority */
0cbd558ab5e7 Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34127
diff changeset
224 INTERNALKEYRING_ID, /* id */
0cbd558ab5e7 Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34127
diff changeset
225 INTERNALKEYRING_NAME, /* name */
0cbd558ab5e7 Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34127
diff changeset
226 DISPLAY_VERSION, /* version */
0cbd558ab5e7 Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34127
diff changeset
227 "Internal Keyring Plugin", /* summary */
0cbd558ab5e7 Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34127
diff changeset
228 INTERNALKEYRING_DESCRIPTION, /* description */
0cbd558ab5e7 Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34127
diff changeset
229 INTERNALKEYRING_AUTHOR, /* author */
0cbd558ab5e7 Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34127
diff changeset
230 PURPLE_WEBSITE, /* homepage */
0cbd558ab5e7 Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34127
diff changeset
231 internal_keyring_load, /* load */
0cbd558ab5e7 Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34127
diff changeset
232 internal_keyring_unload, /* unload */
0cbd558ab5e7 Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34127
diff changeset
233 NULL, /* destroy */
0cbd558ab5e7 Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34127
diff changeset
234 NULL, /* ui_info */
0cbd558ab5e7 Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34127
diff changeset
235 NULL, /* extra_info */
0cbd558ab5e7 Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34127
diff changeset
236 NULL, /* prefs_info */
0cbd558ab5e7 Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34127
diff changeset
237 NULL, /* actions */
0cbd558ab5e7 Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34127
diff changeset
238 NULL, NULL, NULL, NULL /* padding */
33984
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
239 };
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
240
34033
910f2ed3988b Remove trailing whitespace.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 34032
diff changeset
241 static void
33984
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
242 init_plugin(PurplePlugin *plugin)
34033
910f2ed3988b Remove trailing whitespace.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 34032
diff changeset
243 {
33984
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
244 }
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
245
7459475b1495 Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff changeset
246 PURPLE_INIT_PLUGIN(internal_keyring, init_plugin, plugininfo)

mercurial