Wed, 13 May 2009 20:29:03 +0000
Support custom smileys in MUCs (when all participants support BoB and a maximum
of 10 participants are in the chat).
Always announce support for BoB, since disable custom smileys will still turn
off fetching them, and BoB can be used for other purposes further on.
|
8790
3d6d2e2f6296
[gaim-migrate @ 9552]
Jonathan Champ <royanee@users.sourceforge.net>
parents:
8737
diff
changeset
|
1 | /** |
| 5872 | 2 | * @file internal.h Internal definitions and includes |
|
6371
e92b66ee5518
[gaim-migrate @ 6876]
Christian Hammond <chipx86@chipx86.com>
parents:
6170
diff
changeset
|
3 | * @ingroup core |
|
20147
66f05a854eee
applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
4 | */ |
|
66f05a854eee
applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
5 | |
|
66f05a854eee
applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
6 | /* purple |
| 5872 | 7 | * |
| 15884 | 8 | * Purple is the legal property of its developers, whose names are too numerous |
| 8046 | 9 | * to list here. Please refer to the COPYRIGHT file distributed with this |
| 10 | * source distribution. | |
|
11137
cf40226ddff7
[gaim-migrate @ 13201]
Mark Doliner <markdoliner@pidgin.im>
parents:
10589
diff
changeset
|
11 | * |
| 5872 | 12 | * This program is free software; you can redistribute it and/or modify |
| 13 | * it under the terms of the GNU General Public License as published by | |
| 14 | * the Free Software Foundation; either version 2 of the License, or | |
| 15 | * (at your option) any later version. | |
| 16 | * | |
| 17 | * This program is distributed in the hope that it will be useful, | |
| 18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 20 | * GNU General Public License for more details. | |
| 21 | * | |
| 22 | * You should have received a copy of the GNU General Public License | |
| 23 | * along with this program; if not, write to the Free Software | |
|
19859
71d37b57eff2
The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
19742
diff
changeset
|
24 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
| 5872 | 25 | */ |
| 15884 | 26 | #ifndef _PURPLE_INTERNAL_H_ |
| 27 | #define _PURPLE_INTERNAL_H_ | |
| 5872 | 28 | |
| 29 | #ifdef HAVE_CONFIG_H | |
|
6371
e92b66ee5518
[gaim-migrate @ 6876]
Christian Hammond <chipx86@chipx86.com>
parents:
6170
diff
changeset
|
30 | # include <config.h> |
| 5872 | 31 | #endif |
| 32 | ||
|
19742
4e76841db5c0
Fix compilation on SkyOS. This patch is from Peter Speybrouk, a.k.a.
Ethan Blanton <elb@pidgin.im>
parents:
18609
diff
changeset
|
33 | /* for SIOCGIFCONF in SKYOS */ |
|
4e76841db5c0
Fix compilation on SkyOS. This patch is from Peter Speybrouk, a.k.a.
Ethan Blanton <elb@pidgin.im>
parents:
18609
diff
changeset
|
34 | #ifdef SKYOS |
|
4e76841db5c0
Fix compilation on SkyOS. This patch is from Peter Speybrouk, a.k.a.
Ethan Blanton <elb@pidgin.im>
parents:
18609
diff
changeset
|
35 | #include <net/sockios.h> |
|
4e76841db5c0
Fix compilation on SkyOS. This patch is from Peter Speybrouk, a.k.a.
Ethan Blanton <elb@pidgin.im>
parents:
18609
diff
changeset
|
36 | #endif |
|
9999
86e89e1dee10
[gaim-migrate @ 10913]
Mark Doliner <markdoliner@pidgin.im>
parents:
8793
diff
changeset
|
37 | /* |
|
86e89e1dee10
[gaim-migrate @ 10913]
Mark Doliner <markdoliner@pidgin.im>
parents:
8793
diff
changeset
|
38 | * If we're using NLS, make sure gettext works. If not, then define |
|
86e89e1dee10
[gaim-migrate @ 10913]
Mark Doliner <markdoliner@pidgin.im>
parents:
8793
diff
changeset
|
39 | * dummy macros in place of the normal gettext macros. |
|
86e89e1dee10
[gaim-migrate @ 10913]
Mark Doliner <markdoliner@pidgin.im>
parents:
8793
diff
changeset
|
40 | * |
|
86e89e1dee10
[gaim-migrate @ 10913]
Mark Doliner <markdoliner@pidgin.im>
parents:
8793
diff
changeset
|
41 | * Also, the perl XS config.h file sometimes defines _ So we need to |
|
86e89e1dee10
[gaim-migrate @ 10913]
Mark Doliner <markdoliner@pidgin.im>
parents:
8793
diff
changeset
|
42 | * make sure _ isn't already defined before trying to define it. |
|
86e89e1dee10
[gaim-migrate @ 10913]
Mark Doliner <markdoliner@pidgin.im>
parents:
8793
diff
changeset
|
43 | * |
|
86e89e1dee10
[gaim-migrate @ 10913]
Mark Doliner <markdoliner@pidgin.im>
parents:
8793
diff
changeset
|
44 | * The Singular/Plural/Number ngettext dummy definition below was |
|
86e89e1dee10
[gaim-migrate @ 10913]
Mark Doliner <markdoliner@pidgin.im>
parents:
8793
diff
changeset
|
45 | * taken from an email to the texinfo mailing list by Manuel Guerrero. |
|
86e89e1dee10
[gaim-migrate @ 10913]
Mark Doliner <markdoliner@pidgin.im>
parents:
8793
diff
changeset
|
46 | * Thank you Manuel, and thank you Alex's good friend Google. |
|
86e89e1dee10
[gaim-migrate @ 10913]
Mark Doliner <markdoliner@pidgin.im>
parents:
8793
diff
changeset
|
47 | */ |
| 5872 | 48 | #ifdef ENABLE_NLS |
|
8737
b9f8de95d6bb
[gaim-migrate @ 9492]
Mark Doliner <markdoliner@pidgin.im>
parents:
8735
diff
changeset
|
49 | # include <locale.h> |
| 5872 | 50 | # include <libintl.h> |
|
16124
8e5e3e9ada60
Hopefully prevent libpurple causing problems for 3rd party UIs if they also
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
15929
diff
changeset
|
51 | # define _(String) ((const char *)dgettext(PACKAGE, String)) |
| 5872 | 52 | # ifdef gettext_noop |
| 53 | # define N_(String) gettext_noop (String) | |
| 54 | # else | |
| 55 | # define N_(String) (String) | |
| 56 | # endif | |
| 57 | #else | |
| 8730 | 58 | # include <locale.h> |
| 5872 | 59 | # define N_(String) (String) |
|
9999
86e89e1dee10
[gaim-migrate @ 10913]
Mark Doliner <markdoliner@pidgin.im>
parents:
8793
diff
changeset
|
60 | # ifndef _ |
|
14342
9059c7771ef1
[gaim-migrate @ 16965]
Mark Doliner <markdoliner@pidgin.im>
parents:
14333
diff
changeset
|
61 | # define _(String) ((const char *)String) |
|
9999
86e89e1dee10
[gaim-migrate @ 10913]
Mark Doliner <markdoliner@pidgin.im>
parents:
8793
diff
changeset
|
62 | # endif |
|
13107
704041197f4d
[gaim-migrate @ 15468]
Richard Laager <rlaager@pidgin.im>
parents:
13105
diff
changeset
|
63 | # define ngettext(Singular, Plural, Number) ((Number == 1) ? ((const char *)Singular) : ((const char *)Plural)) |
|
16124
8e5e3e9ada60
Hopefully prevent libpurple causing problems for 3rd party UIs if they also
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
15929
diff
changeset
|
64 | # define dngettext(Domain, Singular, Plural, Number) ((Number == 1) ? ((const char *)Singular) : ((const char *)Plural)) |
| 5872 | 65 | #endif |
| 66 | ||
| 67 | #ifdef HAVE_ENDIAN_H | |
| 68 | # include <endian.h> | |
| 69 | #endif | |
| 70 | ||
| 71 | #define MSG_LEN 2048 | |
| 72 | /* The above should normally be the same as BUF_LEN, | |
|
8735
01248ea222d3
[gaim-migrate @ 9490]
Jonathan Champ <royanee@users.sourceforge.net>
parents:
8730
diff
changeset
|
73 | * but just so we're explicitly asking for the max message |
| 5872 | 74 | * length. */ |
| 75 | #define BUF_LEN MSG_LEN | |
| 76 | #define BUF_LONG BUF_LEN * 2 | |
| 77 | ||
| 78 | #include <sys/stat.h> | |
| 79 | #include <sys/types.h> | |
|
5912
32619a71edd2
[gaim-migrate @ 6344]
Herman Bloggs <herman@bluedigits.com>
parents:
5872
diff
changeset
|
80 | #ifndef _WIN32 |
|
14333
13d7807ae88c
[gaim-migrate @ 16954]
Daniel Atallah <datallah@pidgin.im>
parents:
14254
diff
changeset
|
81 | #include <sys/time.h> |
| 5872 | 82 | #include <sys/wait.h> |
| 13875 | 83 | #include <sys/time.h> |
|
5912
32619a71edd2
[gaim-migrate @ 6344]
Herman Bloggs <herman@bluedigits.com>
parents:
5872
diff
changeset
|
84 | #endif |
| 5872 | 85 | #include <ctype.h> |
| 86 | #include <errno.h> | |
| 87 | #include <fcntl.h> | |
| 88 | #include <math.h> | |
| 89 | #include <stdio.h> | |
| 90 | #include <stdlib.h> | |
| 91 | #include <string.h> | |
| 92 | #include <time.h> | |
| 93 | ||
| 94 | #ifdef HAVE_ICONV | |
| 95 | #include <iconv.h> | |
| 96 | #endif | |
| 97 | ||
| 98 | #ifdef HAVE_LANGINFO_CODESET | |
| 99 | #include <langinfo.h> | |
| 100 | #endif | |
| 101 | ||
|
18609
3512a0bda029
gmodule.h is needed in internal.h for GLIB_CHECK_VERSION() to be defined; this is independent of whether PURPLE_PLUGINS is defined.
Evan Schoenberg <evands@pidgin.im>
parents:
18549
diff
changeset
|
102 | #include <gmodule.h> |
|
3512a0bda029
gmodule.h is needed in internal.h for GLIB_CHECK_VERSION() to be defined; this is independent of whether PURPLE_PLUGINS is defined.
Evan Schoenberg <evands@pidgin.im>
parents:
18549
diff
changeset
|
103 | |
| 15884 | 104 | #ifdef PURPLE_PLUGINS |
|
25888
d0fdd378a635
Remove trailing whitespace
Mark Doliner <markdoliner@pidgin.im>
parents:
24569
diff
changeset
|
105 | # ifdef HAVE_DLFCN_H |
| 5872 | 106 | # include <dlfcn.h> |
| 107 | # endif | |
| 108 | #endif | |
| 109 | ||
|
5912
32619a71edd2
[gaim-migrate @ 6344]
Herman Bloggs <herman@bluedigits.com>
parents:
5872
diff
changeset
|
110 | #ifndef _WIN32 |
| 5872 | 111 | # include <netinet/in.h> |
| 112 | # include <sys/socket.h> | |
| 6170 | 113 | # include <arpa/inet.h> |
| 5872 | 114 | # include <sys/un.h> |
| 115 | # include <sys/utsname.h> | |
| 116 | # include <netdb.h> | |
| 117 | # include <signal.h> | |
| 118 | # include <unistd.h> | |
| 119 | #endif | |
| 120 | ||
|
18549
e7465df778db
We don't want to be using MAXPATHLEN except for backwards compatibility.
Richard Laager <rlaager@pidgin.im>
parents:
18267
diff
changeset
|
121 | /* MAXPATHLEN should only be used with readlink() on glib < 2.4.0. For |
|
e7465df778db
We don't want to be using MAXPATHLEN except for backwards compatibility.
Richard Laager <rlaager@pidgin.im>
parents:
18267
diff
changeset
|
122 | * anything else, use g_file_read_link() or other dynamic functions. This is |
|
e7465df778db
We don't want to be using MAXPATHLEN except for backwards compatibility.
Richard Laager <rlaager@pidgin.im>
parents:
18267
diff
changeset
|
123 | * important because Hurd has no hard limits on path length. */ |
|
e7465df778db
We don't want to be using MAXPATHLEN except for backwards compatibility.
Richard Laager <rlaager@pidgin.im>
parents:
18267
diff
changeset
|
124 | #if !GLIB_CHECK_VERSION(2,4,0) |
|
e7465df778db
We don't want to be using MAXPATHLEN except for backwards compatibility.
Richard Laager <rlaager@pidgin.im>
parents:
18267
diff
changeset
|
125 | # ifndef MAXPATHLEN |
|
e7465df778db
We don't want to be using MAXPATHLEN except for backwards compatibility.
Richard Laager <rlaager@pidgin.im>
parents:
18267
diff
changeset
|
126 | # ifdef PATH_MAX |
|
e7465df778db
We don't want to be using MAXPATHLEN except for backwards compatibility.
Richard Laager <rlaager@pidgin.im>
parents:
18267
diff
changeset
|
127 | # define MAXPATHLEN PATH_MAX |
|
e7465df778db
We don't want to be using MAXPATHLEN except for backwards compatibility.
Richard Laager <rlaager@pidgin.im>
parents:
18267
diff
changeset
|
128 | # else |
|
e7465df778db
We don't want to be using MAXPATHLEN except for backwards compatibility.
Richard Laager <rlaager@pidgin.im>
parents:
18267
diff
changeset
|
129 | # define MAXPATHLEN 1024 |
|
e7465df778db
We don't want to be using MAXPATHLEN except for backwards compatibility.
Richard Laager <rlaager@pidgin.im>
parents:
18267
diff
changeset
|
130 | # endif |
|
18267
076446fd04a3
Bring back MAXPATHLEN (which was always guaranteed to be defined earlier
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
18265
diff
changeset
|
131 | # endif |
|
076446fd04a3
Bring back MAXPATHLEN (which was always guaranteed to be defined earlier
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
18265
diff
changeset
|
132 | #endif |
|
076446fd04a3
Bring back MAXPATHLEN (which was always guaranteed to be defined earlier
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
18265
diff
changeset
|
133 | |
| 5872 | 134 | #ifndef HOST_NAME_MAX |
| 135 | # define HOST_NAME_MAX 255 | |
| 136 | #endif | |
| 137 | ||
| 138 | #include <glib.h> | |
|
14707
3753832fd0de
[gaim-migrate @ 17391]
Mark Doliner <markdoliner@pidgin.im>
parents:
14342
diff
changeset
|
139 | #if !GLIB_CHECK_VERSION(2,4,0) |
|
3753832fd0de
[gaim-migrate @ 17391]
Mark Doliner <markdoliner@pidgin.im>
parents:
14342
diff
changeset
|
140 | # define G_MAXUINT32 ((guint32) 0xffffffff) |
|
3753832fd0de
[gaim-migrate @ 17391]
Mark Doliner <markdoliner@pidgin.im>
parents:
14342
diff
changeset
|
141 | #endif |
|
3753832fd0de
[gaim-migrate @ 17391]
Mark Doliner <markdoliner@pidgin.im>
parents:
14342
diff
changeset
|
142 | |
|
23200
3a7e2f22bad6
Compatibility with older glib versions
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22635
diff
changeset
|
143 | #ifndef G_MAXSIZE |
|
3a7e2f22bad6
Compatibility with older glib versions
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22635
diff
changeset
|
144 | # if GLIB_SIZEOF_LONG == 8 |
|
3a7e2f22bad6
Compatibility with older glib versions
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22635
diff
changeset
|
145 | # define G_MAXSIZE ((gsize) 0xffffffffffffffff) |
|
3a7e2f22bad6
Compatibility with older glib versions
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22635
diff
changeset
|
146 | # else |
|
3a7e2f22bad6
Compatibility with older glib versions
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22635
diff
changeset
|
147 | # define G_MAXSIZE ((gsize) 0xffffffff) |
|
3a7e2f22bad6
Compatibility with older glib versions
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22635
diff
changeset
|
148 | # endif |
|
3a7e2f22bad6
Compatibility with older glib versions
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22635
diff
changeset
|
149 | #endif |
|
3a7e2f22bad6
Compatibility with older glib versions
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22635
diff
changeset
|
150 | |
|
10589
4e10236e06d4
[gaim-migrate @ 11994]
Daniel Atallah <datallah@pidgin.im>
parents:
10588
diff
changeset
|
151 | #if GLIB_CHECK_VERSION(2,6,0) |
|
4e10236e06d4
[gaim-migrate @ 11994]
Daniel Atallah <datallah@pidgin.im>
parents:
10588
diff
changeset
|
152 | # include <glib/gstdio.h> |
|
4e10236e06d4
[gaim-migrate @ 11994]
Daniel Atallah <datallah@pidgin.im>
parents:
10588
diff
changeset
|
153 | #endif |
| 5872 | 154 | |
|
10589
4e10236e06d4
[gaim-migrate @ 11994]
Daniel Atallah <datallah@pidgin.im>
parents:
10588
diff
changeset
|
155 | #if !GLIB_CHECK_VERSION(2,6,0) |
|
4e10236e06d4
[gaim-migrate @ 11994]
Daniel Atallah <datallah@pidgin.im>
parents:
10588
diff
changeset
|
156 | # define g_freopen freopen |
|
4e10236e06d4
[gaim-migrate @ 11994]
Daniel Atallah <datallah@pidgin.im>
parents:
10588
diff
changeset
|
157 | # define g_fopen fopen |
|
4e10236e06d4
[gaim-migrate @ 11994]
Daniel Atallah <datallah@pidgin.im>
parents:
10588
diff
changeset
|
158 | # define g_rmdir rmdir |
|
4e10236e06d4
[gaim-migrate @ 11994]
Daniel Atallah <datallah@pidgin.im>
parents:
10588
diff
changeset
|
159 | # define g_remove remove |
|
4e10236e06d4
[gaim-migrate @ 11994]
Daniel Atallah <datallah@pidgin.im>
parents:
10588
diff
changeset
|
160 | # define g_unlink unlink |
|
4e10236e06d4
[gaim-migrate @ 11994]
Daniel Atallah <datallah@pidgin.im>
parents:
10588
diff
changeset
|
161 | # define g_lstat lstat |
|
4e10236e06d4
[gaim-migrate @ 11994]
Daniel Atallah <datallah@pidgin.im>
parents:
10588
diff
changeset
|
162 | # define g_stat stat |
|
4e10236e06d4
[gaim-migrate @ 11994]
Daniel Atallah <datallah@pidgin.im>
parents:
10588
diff
changeset
|
163 | # define g_mkdir mkdir |
|
4e10236e06d4
[gaim-migrate @ 11994]
Daniel Atallah <datallah@pidgin.im>
parents:
10588
diff
changeset
|
164 | # define g_rename rename |
|
4e10236e06d4
[gaim-migrate @ 11994]
Daniel Atallah <datallah@pidgin.im>
parents:
10588
diff
changeset
|
165 | # define g_open open |
|
4e10236e06d4
[gaim-migrate @ 11994]
Daniel Atallah <datallah@pidgin.im>
parents:
10588
diff
changeset
|
166 | #endif |
|
4e10236e06d4
[gaim-migrate @ 11994]
Daniel Atallah <datallah@pidgin.im>
parents:
10588
diff
changeset
|
167 | |
|
15161
7a392764f0b8
[gaim-migrate @ 17885]
Daniel Atallah <datallah@pidgin.im>
parents:
14974
diff
changeset
|
168 | #if !GLIB_CHECK_VERSION(2,8,0) && !defined _WIN32 |
|
14974
8180f0f2e20c
[gaim-migrate @ 17684]
Daniel Atallah <datallah@pidgin.im>
parents:
14707
diff
changeset
|
169 | # define g_access access |
|
8180f0f2e20c
[gaim-migrate @ 17684]
Daniel Atallah <datallah@pidgin.im>
parents:
14707
diff
changeset
|
170 | #endif |
|
8180f0f2e20c
[gaim-migrate @ 17684]
Daniel Atallah <datallah@pidgin.im>
parents:
14707
diff
changeset
|
171 | |
|
13623
fdac5e9e1a10
[gaim-migrate @ 16008]
Richard Laager <rlaager@pidgin.im>
parents:
13107
diff
changeset
|
172 | #if !GLIB_CHECK_VERSION(2,10,0) |
|
fdac5e9e1a10
[gaim-migrate @ 16008]
Richard Laager <rlaager@pidgin.im>
parents:
13107
diff
changeset
|
173 | # define g_slice_new(type) g_new(type, 1) |
|
fdac5e9e1a10
[gaim-migrate @ 16008]
Richard Laager <rlaager@pidgin.im>
parents:
13107
diff
changeset
|
174 | # define g_slice_new0(type) g_new0(type, 1) |
|
fdac5e9e1a10
[gaim-migrate @ 16008]
Richard Laager <rlaager@pidgin.im>
parents:
13107
diff
changeset
|
175 | # define g_slice_free(type, mem) g_free(mem) |
|
fdac5e9e1a10
[gaim-migrate @ 16008]
Richard Laager <rlaager@pidgin.im>
parents:
13107
diff
changeset
|
176 | #endif |
|
10589
4e10236e06d4
[gaim-migrate @ 11994]
Daniel Atallah <datallah@pidgin.im>
parents:
10588
diff
changeset
|
177 | |
|
14974
8180f0f2e20c
[gaim-migrate @ 17684]
Daniel Atallah <datallah@pidgin.im>
parents:
14707
diff
changeset
|
178 | #ifdef _WIN32 |
|
8180f0f2e20c
[gaim-migrate @ 17684]
Daniel Atallah <datallah@pidgin.im>
parents:
14707
diff
changeset
|
179 | #include "win32dep.h" |
|
8180f0f2e20c
[gaim-migrate @ 17684]
Daniel Atallah <datallah@pidgin.im>
parents:
14707
diff
changeset
|
180 | #endif |
|
8180f0f2e20c
[gaim-migrate @ 17684]
Daniel Atallah <datallah@pidgin.im>
parents:
14707
diff
changeset
|
181 | |
|
10114
7da34f030459
[gaim-migrate @ 11148]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9999
diff
changeset
|
182 | /* ugly ugly ugly */ |
|
7da34f030459
[gaim-migrate @ 11148]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9999
diff
changeset
|
183 | /* This is a workaround for the fact that G_GINT64_MODIFIER and G_GSIZE_FORMAT |
|
7da34f030459
[gaim-migrate @ 11148]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9999
diff
changeset
|
184 | * are only defined in Glib >= 2.4 */ |
|
7da34f030459
[gaim-migrate @ 11148]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9999
diff
changeset
|
185 | #ifndef G_GINT64_MODIFIER |
|
7da34f030459
[gaim-migrate @ 11148]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9999
diff
changeset
|
186 | # if GLIB_SIZEOF_LONG == 8 |
|
7da34f030459
[gaim-migrate @ 11148]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9999
diff
changeset
|
187 | # define G_GINT64_MODIFIER "l" |
|
7da34f030459
[gaim-migrate @ 11148]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9999
diff
changeset
|
188 | # else |
|
7da34f030459
[gaim-migrate @ 11148]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9999
diff
changeset
|
189 | # define G_GINT64_MODIFIER "ll" |
|
7da34f030459
[gaim-migrate @ 11148]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9999
diff
changeset
|
190 | # endif |
|
7da34f030459
[gaim-migrate @ 11148]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9999
diff
changeset
|
191 | #endif |
|
7da34f030459
[gaim-migrate @ 11148]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9999
diff
changeset
|
192 | |
|
22633
fef446de68fe
Fix compiling on older Glib where G_GSIZE_MODIFIER is not defined
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
20603
diff
changeset
|
193 | #ifndef G_GSIZE_MODIFIER |
|
fef446de68fe
Fix compiling on older Glib where G_GSIZE_MODIFIER is not defined
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
20603
diff
changeset
|
194 | # if GLIB_SIZEOF_LONG == 8 |
|
fef446de68fe
Fix compiling on older Glib where G_GSIZE_MODIFIER is not defined
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
20603
diff
changeset
|
195 | # define G_GSIZE_MODIFIER "l" |
|
fef446de68fe
Fix compiling on older Glib where G_GSIZE_MODIFIER is not defined
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
20603
diff
changeset
|
196 | # else |
|
fef446de68fe
Fix compiling on older Glib where G_GSIZE_MODIFIER is not defined
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
20603
diff
changeset
|
197 | # define G_GSIZE_MODIFIER "" |
|
fef446de68fe
Fix compiling on older Glib where G_GSIZE_MODIFIER is not defined
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
20603
diff
changeset
|
198 | # endif |
|
fef446de68fe
Fix compiling on older Glib where G_GSIZE_MODIFIER is not defined
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
20603
diff
changeset
|
199 | #endif |
|
fef446de68fe
Fix compiling on older Glib where G_GSIZE_MODIFIER is not defined
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
20603
diff
changeset
|
200 | |
|
10114
7da34f030459
[gaim-migrate @ 11148]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9999
diff
changeset
|
201 | #ifndef G_GSIZE_FORMAT |
|
7da34f030459
[gaim-migrate @ 11148]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9999
diff
changeset
|
202 | # if GLIB_SIZEOF_LONG == 8 |
|
7da34f030459
[gaim-migrate @ 11148]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9999
diff
changeset
|
203 | # define G_GSIZE_FORMAT "lu" |
|
7da34f030459
[gaim-migrate @ 11148]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9999
diff
changeset
|
204 | # else |
|
7da34f030459
[gaim-migrate @ 11148]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9999
diff
changeset
|
205 | # define G_GSIZE_FORMAT "u" |
|
7da34f030459
[gaim-migrate @ 11148]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9999
diff
changeset
|
206 | # endif |
|
7da34f030459
[gaim-migrate @ 11148]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9999
diff
changeset
|
207 | #endif |
|
5912
32619a71edd2
[gaim-migrate @ 6344]
Herman Bloggs <herman@bluedigits.com>
parents:
5872
diff
changeset
|
208 | |
|
22635
85e0ed3173a6
Fix compiling on older Glib where G_GSSIZE_FORMAT is not defined
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22633
diff
changeset
|
209 | #ifndef G_GSSIZE_FORMAT |
|
85e0ed3173a6
Fix compiling on older Glib where G_GSSIZE_FORMAT is not defined
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22633
diff
changeset
|
210 | # if GLIB_SIZEOF_LONG == 8 |
|
85e0ed3173a6
Fix compiling on older Glib where G_GSSIZE_FORMAT is not defined
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22633
diff
changeset
|
211 | # define G_GSSIZE_FORMAT "li" |
|
85e0ed3173a6
Fix compiling on older Glib where G_GSSIZE_FORMAT is not defined
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22633
diff
changeset
|
212 | # else |
|
85e0ed3173a6
Fix compiling on older Glib where G_GSSIZE_FORMAT is not defined
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22633
diff
changeset
|
213 | # define G_GSSIZE_FORMAT "i" |
|
85e0ed3173a6
Fix compiling on older Glib where G_GSSIZE_FORMAT is not defined
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22633
diff
changeset
|
214 | # endif |
|
85e0ed3173a6
Fix compiling on older Glib where G_GSSIZE_FORMAT is not defined
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22633
diff
changeset
|
215 | #endif |
|
85e0ed3173a6
Fix compiling on older Glib where G_GSSIZE_FORMAT is not defined
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22633
diff
changeset
|
216 | |
|
18265
9f26190d7f46
Move the define in internal.h instead.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18220
diff
changeset
|
217 | #ifndef G_GNUC_NULL_TERMINATED |
|
18267
076446fd04a3
Bring back MAXPATHLEN (which was always guaranteed to be defined earlier
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
18265
diff
changeset
|
218 | # if __GNUC__ >= 4 |
|
076446fd04a3
Bring back MAXPATHLEN (which was always guaranteed to be defined earlier
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
18265
diff
changeset
|
219 | # define G_GNUC_NULL_TERMINATED __attribute__((__sentinel__)) |
|
076446fd04a3
Bring back MAXPATHLEN (which was always guaranteed to be defined earlier
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
18265
diff
changeset
|
220 | # else |
|
076446fd04a3
Bring back MAXPATHLEN (which was always guaranteed to be defined earlier
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
18265
diff
changeset
|
221 | # define G_GNUC_NULL_TERMINATED |
|
076446fd04a3
Bring back MAXPATHLEN (which was always guaranteed to be defined earlier
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
18265
diff
changeset
|
222 | # endif |
|
18265
9f26190d7f46
Move the define in internal.h instead.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18220
diff
changeset
|
223 | #endif |
|
9f26190d7f46
Move the define in internal.h instead.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18220
diff
changeset
|
224 | |
|
26615
2171a9101814
Add G_DEFINE_TYPE compatibility define from gobjectification branch.
Michael Ruprecht <maiku@pidgin.im>
parents:
25888
diff
changeset
|
225 | #include <glib-object.h> |
|
2171a9101814
Add G_DEFINE_TYPE compatibility define from gobjectification branch.
Michael Ruprecht <maiku@pidgin.im>
parents:
25888
diff
changeset
|
226 | |
|
2171a9101814
Add G_DEFINE_TYPE compatibility define from gobjectification branch.
Michael Ruprecht <maiku@pidgin.im>
parents:
25888
diff
changeset
|
227 | #ifndef G_DEFINE_TYPE |
|
2171a9101814
Add G_DEFINE_TYPE compatibility define from gobjectification branch.
Michael Ruprecht <maiku@pidgin.im>
parents:
25888
diff
changeset
|
228 | #define G_DEFINE_TYPE(TypeName, type_name, TYPE_PARENT) \ |
|
2171a9101814
Add G_DEFINE_TYPE compatibility define from gobjectification branch.
Michael Ruprecht <maiku@pidgin.im>
parents:
25888
diff
changeset
|
229 | \ |
|
2171a9101814
Add G_DEFINE_TYPE compatibility define from gobjectification branch.
Michael Ruprecht <maiku@pidgin.im>
parents:
25888
diff
changeset
|
230 | static void type_name##_init (TypeName *self); \ |
|
2171a9101814
Add G_DEFINE_TYPE compatibility define from gobjectification branch.
Michael Ruprecht <maiku@pidgin.im>
parents:
25888
diff
changeset
|
231 | static void type_name##_class_init (TypeName##Class *klass); \ |
|
2171a9101814
Add G_DEFINE_TYPE compatibility define from gobjectification branch.
Michael Ruprecht <maiku@pidgin.im>
parents:
25888
diff
changeset
|
232 | static gpointer type_name##_parent_class = NULL; \ |
|
2171a9101814
Add G_DEFINE_TYPE compatibility define from gobjectification branch.
Michael Ruprecht <maiku@pidgin.im>
parents:
25888
diff
changeset
|
233 | static void type_name##_class_intern_init (gpointer klass) \ |
|
2171a9101814
Add G_DEFINE_TYPE compatibility define from gobjectification branch.
Michael Ruprecht <maiku@pidgin.im>
parents:
25888
diff
changeset
|
234 | { \ |
|
2171a9101814
Add G_DEFINE_TYPE compatibility define from gobjectification branch.
Michael Ruprecht <maiku@pidgin.im>
parents:
25888
diff
changeset
|
235 | type_name##_parent_class = g_type_class_peek_parent (klass); \ |
|
2171a9101814
Add G_DEFINE_TYPE compatibility define from gobjectification branch.
Michael Ruprecht <maiku@pidgin.im>
parents:
25888
diff
changeset
|
236 | type_name##_class_init ((TypeName##Class*) klass); \ |
|
2171a9101814
Add G_DEFINE_TYPE compatibility define from gobjectification branch.
Michael Ruprecht <maiku@pidgin.im>
parents:
25888
diff
changeset
|
237 | } \ |
|
2171a9101814
Add G_DEFINE_TYPE compatibility define from gobjectification branch.
Michael Ruprecht <maiku@pidgin.im>
parents:
25888
diff
changeset
|
238 | \ |
|
2171a9101814
Add G_DEFINE_TYPE compatibility define from gobjectification branch.
Michael Ruprecht <maiku@pidgin.im>
parents:
25888
diff
changeset
|
239 | GType \ |
|
2171a9101814
Add G_DEFINE_TYPE compatibility define from gobjectification branch.
Michael Ruprecht <maiku@pidgin.im>
parents:
25888
diff
changeset
|
240 | type_name##_get_type (void) \ |
|
2171a9101814
Add G_DEFINE_TYPE compatibility define from gobjectification branch.
Michael Ruprecht <maiku@pidgin.im>
parents:
25888
diff
changeset
|
241 | { \ |
|
2171a9101814
Add G_DEFINE_TYPE compatibility define from gobjectification branch.
Michael Ruprecht <maiku@pidgin.im>
parents:
25888
diff
changeset
|
242 | static GType g_define_type_id = 0; \ |
|
2171a9101814
Add G_DEFINE_TYPE compatibility define from gobjectification branch.
Michael Ruprecht <maiku@pidgin.im>
parents:
25888
diff
changeset
|
243 | if (G_UNLIKELY (g_define_type_id == 0)) \ |
|
2171a9101814
Add G_DEFINE_TYPE compatibility define from gobjectification branch.
Michael Ruprecht <maiku@pidgin.im>
parents:
25888
diff
changeset
|
244 | { \ |
|
2171a9101814
Add G_DEFINE_TYPE compatibility define from gobjectification branch.
Michael Ruprecht <maiku@pidgin.im>
parents:
25888
diff
changeset
|
245 | g_define_type_id = \ |
|
2171a9101814
Add G_DEFINE_TYPE compatibility define from gobjectification branch.
Michael Ruprecht <maiku@pidgin.im>
parents:
25888
diff
changeset
|
246 | g_type_register_static_simple (TYPE_PARENT, \ |
|
2171a9101814
Add G_DEFINE_TYPE compatibility define from gobjectification branch.
Michael Ruprecht <maiku@pidgin.im>
parents:
25888
diff
changeset
|
247 | g_intern_static_string (#TypeName), \ |
|
2171a9101814
Add G_DEFINE_TYPE compatibility define from gobjectification branch.
Michael Ruprecht <maiku@pidgin.im>
parents:
25888
diff
changeset
|
248 | sizeof (TypeName##Class), \ |
|
2171a9101814
Add G_DEFINE_TYPE compatibility define from gobjectification branch.
Michael Ruprecht <maiku@pidgin.im>
parents:
25888
diff
changeset
|
249 | (GClassInitFunc)type_name##_class_intern_init, \ |
|
2171a9101814
Add G_DEFINE_TYPE compatibility define from gobjectification branch.
Michael Ruprecht <maiku@pidgin.im>
parents:
25888
diff
changeset
|
250 | sizeof (TypeName), \ |
|
2171a9101814
Add G_DEFINE_TYPE compatibility define from gobjectification branch.
Michael Ruprecht <maiku@pidgin.im>
parents:
25888
diff
changeset
|
251 | (GInstanceInitFunc)type_name##_init, \ |
|
2171a9101814
Add G_DEFINE_TYPE compatibility define from gobjectification branch.
Michael Ruprecht <maiku@pidgin.im>
parents:
25888
diff
changeset
|
252 | (GTypeFlags) 0); \ |
|
2171a9101814
Add G_DEFINE_TYPE compatibility define from gobjectification branch.
Michael Ruprecht <maiku@pidgin.im>
parents:
25888
diff
changeset
|
253 | } \ |
|
2171a9101814
Add G_DEFINE_TYPE compatibility define from gobjectification branch.
Michael Ruprecht <maiku@pidgin.im>
parents:
25888
diff
changeset
|
254 | return g_define_type_id; \ |
|
2171a9101814
Add G_DEFINE_TYPE compatibility define from gobjectification branch.
Michael Ruprecht <maiku@pidgin.im>
parents:
25888
diff
changeset
|
255 | } /* closes type_name##_get_type() */ |
|
2171a9101814
Add G_DEFINE_TYPE compatibility define from gobjectification branch.
Michael Ruprecht <maiku@pidgin.im>
parents:
25888
diff
changeset
|
256 | |
|
2171a9101814
Add G_DEFINE_TYPE compatibility define from gobjectification branch.
Michael Ruprecht <maiku@pidgin.im>
parents:
25888
diff
changeset
|
257 | #endif |
|
2171a9101814
Add G_DEFINE_TYPE compatibility define from gobjectification branch.
Michael Ruprecht <maiku@pidgin.im>
parents:
25888
diff
changeset
|
258 | |
|
13105
8f9c66e4af87
[gaim-migrate @ 15466]
Richard Laager <rlaager@pidgin.im>
parents:
11677
diff
changeset
|
259 | /* Safer ways to work with static buffers. When using non-static |
|
8f9c66e4af87
[gaim-migrate @ 15466]
Richard Laager <rlaager@pidgin.im>
parents:
11677
diff
changeset
|
260 | * buffers, either use g_strdup_* functions (preferred) or use |
|
8f9c66e4af87
[gaim-migrate @ 15466]
Richard Laager <rlaager@pidgin.im>
parents:
11677
diff
changeset
|
261 | * g_strlcpy/g_strlcpy directly. */ |
| 15884 | 262 | #define purple_strlcpy(dest, src) g_strlcpy(dest, src, sizeof(dest)) |
| 263 | #define purple_strlcat(dest, src) g_strlcat(dest, src, sizeof(dest)) | |
|
13105
8f9c66e4af87
[gaim-migrate @ 15466]
Richard Laager <rlaager@pidgin.im>
parents:
11677
diff
changeset
|
264 | |
|
15929
f18159529c60
The last s/purple.sourceforge.net/pidgin.im/ in my local copy. This changes PURPLE_WEBSITE, so stuff should change in the UI all over the place.
Richard Laager <rlaager@pidgin.im>
parents:
15926
diff
changeset
|
265 | #define PURPLE_WEBSITE "http://pidgin.im/" |
| 16967 | 266 | #define PURPLE_DEVEL_WEBSITE "http://developer.pidgin.im/" |
| 5872 | 267 | |
|
24569
5dbd0617a27d
Build everything with the *_DISABLE_DEPRECATED flags set. This allows us
Richard Laager <rlaager@pidgin.im>
parents:
23542
diff
changeset
|
268 | |
|
5dbd0617a27d
Build everything with the *_DISABLE_DEPRECATED flags set. This allows us
Richard Laager <rlaager@pidgin.im>
parents:
23542
diff
changeset
|
269 | /* INTERNAL FUNCTIONS */ |
|
5dbd0617a27d
Build everything with the *_DISABLE_DEPRECATED flags set. This allows us
Richard Laager <rlaager@pidgin.im>
parents:
23542
diff
changeset
|
270 | |
|
5dbd0617a27d
Build everything with the *_DISABLE_DEPRECATED flags set. This allows us
Richard Laager <rlaager@pidgin.im>
parents:
23542
diff
changeset
|
271 | #include "account.h" |
|
5dbd0617a27d
Build everything with the *_DISABLE_DEPRECATED flags set. This allows us
Richard Laager <rlaager@pidgin.im>
parents:
23542
diff
changeset
|
272 | #include "connection.h" |
|
5dbd0617a27d
Build everything with the *_DISABLE_DEPRECATED flags set. This allows us
Richard Laager <rlaager@pidgin.im>
parents:
23542
diff
changeset
|
273 | |
|
16565
f5cd28cc7367
Ref the filenames for account buddy icons on load.
Richard Laager <rlaager@pidgin.im>
parents:
16421
diff
changeset
|
274 | /* This is for the accounts code to notify the buddy icon code that |
|
f5cd28cc7367
Ref the filenames for account buddy icons on load.
Richard Laager <rlaager@pidgin.im>
parents:
16421
diff
changeset
|
275 | * it's done loading. We may want to replace this with a signal. */ |
|
f5cd28cc7367
Ref the filenames for account buddy icons on load.
Richard Laager <rlaager@pidgin.im>
parents:
16421
diff
changeset
|
276 | void |
|
16696
450ba3bd5b63
The GNOME coding guidelines recommend prefixing internal symbols with an underscore.
Richard Laager <rlaager@pidgin.im>
parents:
16565
diff
changeset
|
277 | _purple_buddy_icons_account_loaded_cb(void); |
|
16565
f5cd28cc7367
Ref the filenames for account buddy icons on load.
Richard Laager <rlaager@pidgin.im>
parents:
16421
diff
changeset
|
278 | |
|
16421
f9218e1c4703
The buddy icon code as it stands, with lots of bugs and design flaws.
Richard Laager <rlaager@pidgin.im>
parents:
16158
diff
changeset
|
279 | /* This is for the buddy list to notify the buddy icon code that |
|
f9218e1c4703
The buddy icon code as it stands, with lots of bugs and design flaws.
Richard Laager <rlaager@pidgin.im>
parents:
16158
diff
changeset
|
280 | * it's done loading. We may want to replace this with a signal. */ |
|
f9218e1c4703
The buddy icon code as it stands, with lots of bugs and design flaws.
Richard Laager <rlaager@pidgin.im>
parents:
16158
diff
changeset
|
281 | void |
|
16696
450ba3bd5b63
The GNOME coding guidelines recommend prefixing internal symbols with an underscore.
Richard Laager <rlaager@pidgin.im>
parents:
16565
diff
changeset
|
282 | _purple_buddy_icons_blist_loaded_cb(void); |
|
16421
f9218e1c4703
The buddy icon code as it stands, with lots of bugs and design flaws.
Richard Laager <rlaager@pidgin.im>
parents:
16158
diff
changeset
|
283 | |
|
f9218e1c4703
The buddy icon code as it stands, with lots of bugs and design flaws.
Richard Laager <rlaager@pidgin.im>
parents:
16158
diff
changeset
|
284 | /* This is for the purple_core_migrate() code to tell the buddy |
|
f9218e1c4703
The buddy icon code as it stands, with lots of bugs and design flaws.
Richard Laager <rlaager@pidgin.im>
parents:
16158
diff
changeset
|
285 | * icon subsystem about the old icons directory so it can |
|
f9218e1c4703
The buddy icon code as it stands, with lots of bugs and design flaws.
Richard Laager <rlaager@pidgin.im>
parents:
16158
diff
changeset
|
286 | * migrate any icons in use. */ |
|
f9218e1c4703
The buddy icon code as it stands, with lots of bugs and design flaws.
Richard Laager <rlaager@pidgin.im>
parents:
16158
diff
changeset
|
287 | void |
|
16696
450ba3bd5b63
The GNOME coding guidelines recommend prefixing internal symbols with an underscore.
Richard Laager <rlaager@pidgin.im>
parents:
16565
diff
changeset
|
288 | _purple_buddy_icon_set_old_icons_dir(const char *dirname); |
|
16421
f9218e1c4703
The buddy icon code as it stands, with lots of bugs and design flaws.
Richard Laager <rlaager@pidgin.im>
parents:
16158
diff
changeset
|
289 | |
|
24569
5dbd0617a27d
Build everything with the *_DISABLE_DEPRECATED flags set. This allows us
Richard Laager <rlaager@pidgin.im>
parents:
23542
diff
changeset
|
290 | /** |
|
5dbd0617a27d
Build everything with the *_DISABLE_DEPRECATED flags set. This allows us
Richard Laager <rlaager@pidgin.im>
parents:
23542
diff
changeset
|
291 | * Creates a connection to the specified account and either connects |
|
5dbd0617a27d
Build everything with the *_DISABLE_DEPRECATED flags set. This allows us
Richard Laager <rlaager@pidgin.im>
parents:
23542
diff
changeset
|
292 | * or attempts to register a new account. If you are logging in, |
|
5dbd0617a27d
Build everything with the *_DISABLE_DEPRECATED flags set. This allows us
Richard Laager <rlaager@pidgin.im>
parents:
23542
diff
changeset
|
293 | * the connection uses the current active status for this account. |
|
5dbd0617a27d
Build everything with the *_DISABLE_DEPRECATED flags set. This allows us
Richard Laager <rlaager@pidgin.im>
parents:
23542
diff
changeset
|
294 | * So if you want to sign on as "away," for example, you need to |
|
5dbd0617a27d
Build everything with the *_DISABLE_DEPRECATED flags set. This allows us
Richard Laager <rlaager@pidgin.im>
parents:
23542
diff
changeset
|
295 | * have called purple_account_set_status(account, "away"). |
|
5dbd0617a27d
Build everything with the *_DISABLE_DEPRECATED flags set. This allows us
Richard Laager <rlaager@pidgin.im>
parents:
23542
diff
changeset
|
296 | * (And this will call purple_account_connect() automatically). |
|
5dbd0617a27d
Build everything with the *_DISABLE_DEPRECATED flags set. This allows us
Richard Laager <rlaager@pidgin.im>
parents:
23542
diff
changeset
|
297 | * |
|
5dbd0617a27d
Build everything with the *_DISABLE_DEPRECATED flags set. This allows us
Richard Laager <rlaager@pidgin.im>
parents:
23542
diff
changeset
|
298 | * @note This function should only be called by purple_account_connect() |
|
5dbd0617a27d
Build everything with the *_DISABLE_DEPRECATED flags set. This allows us
Richard Laager <rlaager@pidgin.im>
parents:
23542
diff
changeset
|
299 | * in account.c. If you're trying to sign on an account, use that |
|
5dbd0617a27d
Build everything with the *_DISABLE_DEPRECATED flags set. This allows us
Richard Laager <rlaager@pidgin.im>
parents:
23542
diff
changeset
|
300 | * function instead. |
|
5dbd0617a27d
Build everything with the *_DISABLE_DEPRECATED flags set. This allows us
Richard Laager <rlaager@pidgin.im>
parents:
23542
diff
changeset
|
301 | * |
|
5dbd0617a27d
Build everything with the *_DISABLE_DEPRECATED flags set. This allows us
Richard Laager <rlaager@pidgin.im>
parents:
23542
diff
changeset
|
302 | * @param account The account the connection should be connecting to. |
|
5dbd0617a27d
Build everything with the *_DISABLE_DEPRECATED flags set. This allows us
Richard Laager <rlaager@pidgin.im>
parents:
23542
diff
changeset
|
303 | * @param regist Whether we are registering a new account or just |
|
5dbd0617a27d
Build everything with the *_DISABLE_DEPRECATED flags set. This allows us
Richard Laager <rlaager@pidgin.im>
parents:
23542
diff
changeset
|
304 | * trying to do a normal signon. |
|
5dbd0617a27d
Build everything with the *_DISABLE_DEPRECATED flags set. This allows us
Richard Laager <rlaager@pidgin.im>
parents:
23542
diff
changeset
|
305 | * @param password The password to use. |
|
5dbd0617a27d
Build everything with the *_DISABLE_DEPRECATED flags set. This allows us
Richard Laager <rlaager@pidgin.im>
parents:
23542
diff
changeset
|
306 | */ |
|
5dbd0617a27d
Build everything with the *_DISABLE_DEPRECATED flags set. This allows us
Richard Laager <rlaager@pidgin.im>
parents:
23542
diff
changeset
|
307 | void _purple_connection_new(PurpleAccount *account, gboolean regist, |
|
5dbd0617a27d
Build everything with the *_DISABLE_DEPRECATED flags set. This allows us
Richard Laager <rlaager@pidgin.im>
parents:
23542
diff
changeset
|
308 | const char *password); |
|
5dbd0617a27d
Build everything with the *_DISABLE_DEPRECATED flags set. This allows us
Richard Laager <rlaager@pidgin.im>
parents:
23542
diff
changeset
|
309 | /** |
|
5dbd0617a27d
Build everything with the *_DISABLE_DEPRECATED flags set. This allows us
Richard Laager <rlaager@pidgin.im>
parents:
23542
diff
changeset
|
310 | * Tries to unregister the account on the server. If the account is not |
|
5dbd0617a27d
Build everything with the *_DISABLE_DEPRECATED flags set. This allows us
Richard Laager <rlaager@pidgin.im>
parents:
23542
diff
changeset
|
311 | * connected, also creates a new connection. |
|
5dbd0617a27d
Build everything with the *_DISABLE_DEPRECATED flags set. This allows us
Richard Laager <rlaager@pidgin.im>
parents:
23542
diff
changeset
|
312 | * |
|
5dbd0617a27d
Build everything with the *_DISABLE_DEPRECATED flags set. This allows us
Richard Laager <rlaager@pidgin.im>
parents:
23542
diff
changeset
|
313 | * @note This function should only be called by purple_account_unregister() |
|
5dbd0617a27d
Build everything with the *_DISABLE_DEPRECATED flags set. This allows us
Richard Laager <rlaager@pidgin.im>
parents:
23542
diff
changeset
|
314 | * in account.c. |
|
5dbd0617a27d
Build everything with the *_DISABLE_DEPRECATED flags set. This allows us
Richard Laager <rlaager@pidgin.im>
parents:
23542
diff
changeset
|
315 | * |
|
5dbd0617a27d
Build everything with the *_DISABLE_DEPRECATED flags set. This allows us
Richard Laager <rlaager@pidgin.im>
parents:
23542
diff
changeset
|
316 | * @param account The account to unregister |
|
5dbd0617a27d
Build everything with the *_DISABLE_DEPRECATED flags set. This allows us
Richard Laager <rlaager@pidgin.im>
parents:
23542
diff
changeset
|
317 | * @param password The password to use. |
|
5dbd0617a27d
Build everything with the *_DISABLE_DEPRECATED flags set. This allows us
Richard Laager <rlaager@pidgin.im>
parents:
23542
diff
changeset
|
318 | * @param cb Optional callback to be called when unregistration is complete |
|
5dbd0617a27d
Build everything with the *_DISABLE_DEPRECATED flags set. This allows us
Richard Laager <rlaager@pidgin.im>
parents:
23542
diff
changeset
|
319 | * @param user_data user data to pass to the callback |
|
5dbd0617a27d
Build everything with the *_DISABLE_DEPRECATED flags set. This allows us
Richard Laager <rlaager@pidgin.im>
parents:
23542
diff
changeset
|
320 | */ |
|
5dbd0617a27d
Build everything with the *_DISABLE_DEPRECATED flags set. This allows us
Richard Laager <rlaager@pidgin.im>
parents:
23542
diff
changeset
|
321 | void _purple_connection_new_unregister(PurpleAccount *account, const char *password, |
|
5dbd0617a27d
Build everything with the *_DISABLE_DEPRECATED flags set. This allows us
Richard Laager <rlaager@pidgin.im>
parents:
23542
diff
changeset
|
322 | PurpleAccountUnregistrationCb cb, void *user_data); |
|
5dbd0617a27d
Build everything with the *_DISABLE_DEPRECATED flags set. This allows us
Richard Laager <rlaager@pidgin.im>
parents:
23542
diff
changeset
|
323 | /** |
|
5dbd0617a27d
Build everything with the *_DISABLE_DEPRECATED flags set. This allows us
Richard Laager <rlaager@pidgin.im>
parents:
23542
diff
changeset
|
324 | * Disconnects and destroys a PurpleConnection. |
|
5dbd0617a27d
Build everything with the *_DISABLE_DEPRECATED flags set. This allows us
Richard Laager <rlaager@pidgin.im>
parents:
23542
diff
changeset
|
325 | * |
|
5dbd0617a27d
Build everything with the *_DISABLE_DEPRECATED flags set. This allows us
Richard Laager <rlaager@pidgin.im>
parents:
23542
diff
changeset
|
326 | * @note This function should only be called by purple_account_disconnect() |
|
5dbd0617a27d
Build everything with the *_DISABLE_DEPRECATED flags set. This allows us
Richard Laager <rlaager@pidgin.im>
parents:
23542
diff
changeset
|
327 | * in account.c. If you're trying to sign off an account, use that |
|
5dbd0617a27d
Build everything with the *_DISABLE_DEPRECATED flags set. This allows us
Richard Laager <rlaager@pidgin.im>
parents:
23542
diff
changeset
|
328 | * function instead. |
|
5dbd0617a27d
Build everything with the *_DISABLE_DEPRECATED flags set. This allows us
Richard Laager <rlaager@pidgin.im>
parents:
23542
diff
changeset
|
329 | * |
|
5dbd0617a27d
Build everything with the *_DISABLE_DEPRECATED flags set. This allows us
Richard Laager <rlaager@pidgin.im>
parents:
23542
diff
changeset
|
330 | * @param gc The purple connection to destroy. |
|
5dbd0617a27d
Build everything with the *_DISABLE_DEPRECATED flags set. This allows us
Richard Laager <rlaager@pidgin.im>
parents:
23542
diff
changeset
|
331 | */ |
|
5dbd0617a27d
Build everything with the *_DISABLE_DEPRECATED flags set. This allows us
Richard Laager <rlaager@pidgin.im>
parents:
23542
diff
changeset
|
332 | void _purple_connection_destroy(PurpleConnection *gc); |
|
5dbd0617a27d
Build everything with the *_DISABLE_DEPRECATED flags set. This allows us
Richard Laager <rlaager@pidgin.im>
parents:
23542
diff
changeset
|
333 | |
| 15884 | 334 | #endif /* _PURPLE_INTERNAL_H_ */ |