Mercurial > pidgin
annotate libpurple/connection.h @ 32443:16925948a003
Use accessor functions where available.
author | Elliott Sales de Andrade <qulogic@pidgin.im> |
---|---|
date | Wed, 04 Jan 2012 02:34:24 +0000 |
parents | 98520ee78f12 |
children |
rev | line source |
---|---|
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1 /** |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
2 * @file connection.h Connection API |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
3 * @ingroup core |
20799
f296be2a1039
All the links to libpurple signal pages were in the comment containing the
Will Thompson <will.thompson@collabora.co.uk>
parents:
20074
diff
changeset
|
4 * @see @ref connection-signals |
20074
6bf32c9e15a7
remove gpl boilerplate from doxygen docs
Sean Egan <seanegan@gmail.com>
parents:
19697
diff
changeset
|
5 */ |
6bf32c9e15a7
remove gpl boilerplate from doxygen docs
Sean Egan <seanegan@gmail.com>
parents:
19697
diff
changeset
|
6 |
6bf32c9e15a7
remove gpl boilerplate from doxygen docs
Sean Egan <seanegan@gmail.com>
parents:
19697
diff
changeset
|
7 /* purple |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
8 * |
15822 | 9 * Purple is the legal property of its developers, whose names are too numerous |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
10 * to list here. Please refer to the COPYRIGHT file distributed with this |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
11 * source distribution. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
12 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
13 * This program is free software; you can redistribute it and/or modify |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
14 * it under the terms of the GNU General Public License as published by |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
15 * the Free Software Foundation; either version 2 of the License, or |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
16 * (at your option) any later version. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
17 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
18 * This program is distributed in the hope that it will be useful, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
21 * GNU General Public License for more details. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
22 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
23 * You should have received a copy of the GNU General Public License |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
24 * along with this program; if not, write to the Free Software |
19681
44b4e8bd759b
The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
18835
diff
changeset
|
25 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
26 */ |
15822 | 27 #ifndef _PURPLE_CONNECTION_H_ |
28 #define _PURPLE_CONNECTION_H_ | |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
29 |
23372
0efa36fe7d7c
Sprinkle @copydoc around to squash "ref could not be resolved" Doxygen warnings,
Will Thompson <will.thompson@collabora.co.uk>
parents:
23131
diff
changeset
|
30 /** @copydoc _PurpleConnection */ |
15822 | 31 typedef struct _PurpleConnection PurpleConnection; |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
32 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
33 /** |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
34 * Flags to change behavior of the client for a given connection. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
35 */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
36 typedef enum |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
37 { |
15822 | 38 PURPLE_CONNECTION_HTML = 0x0001, /**< Connection sends/receives in 'HTML'. */ |
39 PURPLE_CONNECTION_NO_BGCOLOR = 0x0002, /**< Connection does not send/receive | |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
40 background colors. */ |
15822 | 41 PURPLE_CONNECTION_AUTO_RESP = 0x0004, /**< Send auto responses when away. */ |
42 PURPLE_CONNECTION_FORMATTING_WBFO = 0x0008, /**< The text buffer must be formatted as a whole */ | |
43 PURPLE_CONNECTION_NO_NEWLINES = 0x0010, /**< No new lines are allowed in outgoing messages */ | |
44 PURPLE_CONNECTION_NO_FONTSIZE = 0x0020, /**< Connection does not send/receive font sizes */ | |
25921
d25cbbea7fe5
Add @since 2.6.0 doxygen comments to some of our new functions, and
Mark Doliner <mark@kingant.net>
parents:
25871
diff
changeset
|
45 PURPLE_CONNECTION_NO_URLDESC = 0x0040, /**< Connection does not support descriptions with links */ |
15822 | 46 PURPLE_CONNECTION_NO_IMAGES = 0x0080, /**< Connection does not support sending of images */ |
29529
3e5bb4e2334c
Added PurpleConnection flags to determine support for moods and mood messages.
Marcus Lundblad <ml@update.uu.se>
parents:
29294
diff
changeset
|
47 PURPLE_CONNECTION_ALLOW_CUSTOM_SMILEY = 0x0100, /**< Connection supports sending and receiving custom smileys */ |
3e5bb4e2334c
Added PurpleConnection flags to determine support for moods and mood messages.
Marcus Lundblad <ml@update.uu.se>
parents:
29294
diff
changeset
|
48 PURPLE_CONNECTION_SUPPORT_MOODS = 0x0200, /**< Connection supports setting moods */ |
3e5bb4e2334c
Added PurpleConnection flags to determine support for moods and mood messages.
Marcus Lundblad <ml@update.uu.se>
parents:
29294
diff
changeset
|
49 PURPLE_CONNECTION_SUPPORT_MOOD_MESSAGES = 0x0400 /**< Connection supports setting a message on moods */ |
15822 | 50 } PurpleConnectionFlags; |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
51 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
52 typedef enum |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
53 { |
15822 | 54 PURPLE_DISCONNECTED = 0, /**< Disconnected. */ |
55 PURPLE_CONNECTED, /**< Connected. */ | |
56 PURPLE_CONNECTING /**< Connecting. */ | |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
57 |
15822 | 58 } PurpleConnectionState; |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
59 |
25921
d25cbbea7fe5
Add @since 2.6.0 doxygen comments to some of our new functions, and
Mark Doliner <mark@kingant.net>
parents:
25871
diff
changeset
|
60 /** |
d25cbbea7fe5
Add @since 2.6.0 doxygen comments to some of our new functions, and
Mark Doliner <mark@kingant.net>
parents:
25871
diff
changeset
|
61 * Possible errors that can cause a connection to be closed. |
20893
c521b0f72a7b
Add "@since 2.3.0" annotations to the new API, as advocated by rlaager.
Will Thompson <will.thompson@collabora.co.uk>
parents:
20821
diff
changeset
|
62 */ |
20064
4da314b1e53e
Create a PurpleDisconnectReason enum (which happens to be identical to
Will Thompson <will.thompson@collabora.co.uk>
parents:
19697
diff
changeset
|
63 typedef enum |
4da314b1e53e
Create a PurpleDisconnectReason enum (which happens to be identical to
Will Thompson <will.thompson@collabora.co.uk>
parents:
19697
diff
changeset
|
64 { |
20114
a465779350aa
Clarified the meaning of PURPLE_REASON_NETWORK_ERROR and
Will Thompson <will.thompson@collabora.co.uk>
parents:
20110
diff
changeset
|
65 /** There was an error sending or receiving on the network socket, or |
a465779350aa
Clarified the meaning of PURPLE_REASON_NETWORK_ERROR and
Will Thompson <will.thompson@collabora.co.uk>
parents:
20110
diff
changeset
|
66 * there was some protocol error (such as the server sending malformed |
a465779350aa
Clarified the meaning of PURPLE_REASON_NETWORK_ERROR and
Will Thompson <will.thompson@collabora.co.uk>
parents:
20110
diff
changeset
|
67 * data). |
a465779350aa
Clarified the meaning of PURPLE_REASON_NETWORK_ERROR and
Will Thompson <will.thompson@collabora.co.uk>
parents:
20110
diff
changeset
|
68 */ |
21358 | 69 PURPLE_CONNECTION_ERROR_NETWORK_ERROR = 0, |
21422
56a608b80fda
Add PURPLE_CONNECTION_ERROR_{INVALID_USERNAME,INCORRECT_PASSWORD}, to be used
Will Thompson <will.thompson@collabora.co.uk>
parents:
21392
diff
changeset
|
70 /** The username supplied was not valid. */ |
56a608b80fda
Add PURPLE_CONNECTION_ERROR_{INVALID_USERNAME,INCORRECT_PASSWORD}, to be used
Will Thompson <will.thompson@collabora.co.uk>
parents:
21392
diff
changeset
|
71 PURPLE_CONNECTION_ERROR_INVALID_USERNAME = 1, |
56a608b80fda
Add PURPLE_CONNECTION_ERROR_{INVALID_USERNAME,INCORRECT_PASSWORD}, to be used
Will Thompson <will.thompson@collabora.co.uk>
parents:
21392
diff
changeset
|
72 /** The username, password or some other credential was incorrect. Use |
21426
8ffb65f3c0e9
Clarify PURPLE_CONNECTION_ERROR_INVALID_USERNAME slightly.
Will Thompson <will.thompson@collabora.co.uk>
parents:
21424
diff
changeset
|
73 * #PURPLE_CONNECTION_ERROR_INVALID_USERNAME instead if the username |
25961
375f82b53e95
Fix a minor whitespace inconsistency.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
25925
diff
changeset
|
74 * is known to be invalid. |
20114
a465779350aa
Clarified the meaning of PURPLE_REASON_NETWORK_ERROR and
Will Thompson <will.thompson@collabora.co.uk>
parents:
20110
diff
changeset
|
75 */ |
21424
ba061949650c
I don't think that incorrect passwords can be helpfully distinguished from
Will Thompson <will.thompson@collabora.co.uk>
parents:
21422
diff
changeset
|
76 PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED = 2, |
20114
a465779350aa
Clarified the meaning of PURPLE_REASON_NETWORK_ERROR and
Will Thompson <will.thompson@collabora.co.uk>
parents:
20110
diff
changeset
|
77 /** libpurple doesn't speak any of the authentication methods the |
a465779350aa
Clarified the meaning of PURPLE_REASON_NETWORK_ERROR and
Will Thompson <will.thompson@collabora.co.uk>
parents:
20110
diff
changeset
|
78 * server offered. |
a465779350aa
Clarified the meaning of PURPLE_REASON_NETWORK_ERROR and
Will Thompson <will.thompson@collabora.co.uk>
parents:
20110
diff
changeset
|
79 */ |
21424
ba061949650c
I don't think that incorrect passwords can be helpfully distinguished from
Will Thompson <will.thompson@collabora.co.uk>
parents:
21422
diff
changeset
|
80 PURPLE_CONNECTION_ERROR_AUTHENTICATION_IMPOSSIBLE = 3, |
20792
682543aced31
Split the "you don't have SSL support" meaning of
Will Thompson <will.thompson@collabora.co.uk>
parents:
20128
diff
changeset
|
81 /** libpurple was built without SSL support, and the connection needs |
682543aced31
Split the "you don't have SSL support" meaning of
Will Thompson <will.thompson@collabora.co.uk>
parents:
20128
diff
changeset
|
82 * SSL. |
682543aced31
Split the "you don't have SSL support" meaning of
Will Thompson <will.thompson@collabora.co.uk>
parents:
20128
diff
changeset
|
83 */ |
21424
ba061949650c
I don't think that incorrect passwords can be helpfully distinguished from
Will Thompson <will.thompson@collabora.co.uk>
parents:
21422
diff
changeset
|
84 PURPLE_CONNECTION_ERROR_NO_SSL_SUPPORT = 4, |
20792
682543aced31
Split the "you don't have SSL support" meaning of
Will Thompson <will.thompson@collabora.co.uk>
parents:
20128
diff
changeset
|
85 /** There was an error negotiating SSL on this connection, or the |
682543aced31
Split the "you don't have SSL support" meaning of
Will Thompson <will.thompson@collabora.co.uk>
parents:
20128
diff
changeset
|
86 * server does not support encryption but an account option was set to |
682543aced31
Split the "you don't have SSL support" meaning of
Will Thompson <will.thompson@collabora.co.uk>
parents:
20128
diff
changeset
|
87 * require it. |
20064
4da314b1e53e
Create a PurpleDisconnectReason enum (which happens to be identical to
Will Thompson <will.thompson@collabora.co.uk>
parents:
19697
diff
changeset
|
88 */ |
21424
ba061949650c
I don't think that incorrect passwords can be helpfully distinguished from
Will Thompson <will.thompson@collabora.co.uk>
parents:
21422
diff
changeset
|
89 PURPLE_CONNECTION_ERROR_ENCRYPTION_ERROR = 5, |
20064
4da314b1e53e
Create a PurpleDisconnectReason enum (which happens to be identical to
Will Thompson <will.thompson@collabora.co.uk>
parents:
19697
diff
changeset
|
90 /** Someone is already connected to the server using the name you are |
4da314b1e53e
Create a PurpleDisconnectReason enum (which happens to be identical to
Will Thompson <will.thompson@collabora.co.uk>
parents:
19697
diff
changeset
|
91 * trying to connect with. |
4da314b1e53e
Create a PurpleDisconnectReason enum (which happens to be identical to
Will Thompson <will.thompson@collabora.co.uk>
parents:
19697
diff
changeset
|
92 */ |
21424
ba061949650c
I don't think that incorrect passwords can be helpfully distinguished from
Will Thompson <will.thompson@collabora.co.uk>
parents:
21422
diff
changeset
|
93 PURPLE_CONNECTION_ERROR_NAME_IN_USE = 6, |
20064
4da314b1e53e
Create a PurpleDisconnectReason enum (which happens to be identical to
Will Thompson <will.thompson@collabora.co.uk>
parents:
19697
diff
changeset
|
94 |
20128
57e9d1ecefff
Rename PURPLE_REASON_INVALID_USERNAME to PURPLE_REASON_INVALID_SETTINGS, so it
Will Thompson <will.thompson@collabora.co.uk>
parents:
20115
diff
changeset
|
95 /** The username/server/other preference for the account isn't valid. |
25925
6e1967b0f90b
Change "screen name" to "username" or "buddy name" in a whole bunch of
Mark Doliner <mark@kingant.net>
parents:
25921
diff
changeset
|
96 * For instance, on IRC the username cannot contain white space. |
20128
57e9d1ecefff
Rename PURPLE_REASON_INVALID_USERNAME to PURPLE_REASON_INVALID_SETTINGS, so it
Will Thompson <will.thompson@collabora.co.uk>
parents:
20115
diff
changeset
|
97 * This reason should not be used for incorrect passwords etc: use |
21358 | 98 * #PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED for that. |
20128
57e9d1ecefff
Rename PURPLE_REASON_INVALID_USERNAME to PURPLE_REASON_INVALID_SETTINGS, so it
Will Thompson <will.thompson@collabora.co.uk>
parents:
20115
diff
changeset
|
99 * |
20110
ed4c1053c3da
Add PURPLE_REASON_INVALID_USERNAME, which should go away as soon as there's
Will Thompson <will.thompson@collabora.co.uk>
parents:
20107
diff
changeset
|
100 * @todo This reason really shouldn't be necessary. Usernames and |
ed4c1053c3da
Add PURPLE_REASON_INVALID_USERNAME, which should go away as soon as there's
Will Thompson <will.thompson@collabora.co.uk>
parents:
20107
diff
changeset
|
101 * other account preferences should be validated when the |
ed4c1053c3da
Add PURPLE_REASON_INVALID_USERNAME, which should go away as soon as there's
Will Thompson <will.thompson@collabora.co.uk>
parents:
20107
diff
changeset
|
102 * account is created. |
ed4c1053c3da
Add PURPLE_REASON_INVALID_USERNAME, which should go away as soon as there's
Will Thompson <will.thompson@collabora.co.uk>
parents:
20107
diff
changeset
|
103 */ |
21424
ba061949650c
I don't think that incorrect passwords can be helpfully distinguished from
Will Thompson <will.thompson@collabora.co.uk>
parents:
21422
diff
changeset
|
104 PURPLE_CONNECTION_ERROR_INVALID_SETTINGS = 7, |
20110
ed4c1053c3da
Add PURPLE_REASON_INVALID_USERNAME, which should go away as soon as there's
Will Thompson <will.thompson@collabora.co.uk>
parents:
20107
diff
changeset
|
105 |
20064
4da314b1e53e
Create a PurpleDisconnectReason enum (which happens to be identical to
Will Thompson <will.thompson@collabora.co.uk>
parents:
19697
diff
changeset
|
106 /** The server did not provide a SSL certificate. */ |
21424
ba061949650c
I don't think that incorrect passwords can be helpfully distinguished from
Will Thompson <will.thompson@collabora.co.uk>
parents:
21422
diff
changeset
|
107 PURPLE_CONNECTION_ERROR_CERT_NOT_PROVIDED = 8, |
20064
4da314b1e53e
Create a PurpleDisconnectReason enum (which happens to be identical to
Will Thompson <will.thompson@collabora.co.uk>
parents:
19697
diff
changeset
|
108 /** The server's SSL certificate could not be trusted. */ |
21424
ba061949650c
I don't think that incorrect passwords can be helpfully distinguished from
Will Thompson <will.thompson@collabora.co.uk>
parents:
21422
diff
changeset
|
109 PURPLE_CONNECTION_ERROR_CERT_UNTRUSTED = 9, |
20064
4da314b1e53e
Create a PurpleDisconnectReason enum (which happens to be identical to
Will Thompson <will.thompson@collabora.co.uk>
parents:
19697
diff
changeset
|
110 /** The server's SSL certificate has expired. */ |
21424
ba061949650c
I don't think that incorrect passwords can be helpfully distinguished from
Will Thompson <will.thompson@collabora.co.uk>
parents:
21422
diff
changeset
|
111 PURPLE_CONNECTION_ERROR_CERT_EXPIRED = 10, |
20064
4da314b1e53e
Create a PurpleDisconnectReason enum (which happens to be identical to
Will Thompson <will.thompson@collabora.co.uk>
parents:
19697
diff
changeset
|
112 /** The server's SSL certificate is not yet valid. */ |
21424
ba061949650c
I don't think that incorrect passwords can be helpfully distinguished from
Will Thompson <will.thompson@collabora.co.uk>
parents:
21422
diff
changeset
|
113 PURPLE_CONNECTION_ERROR_CERT_NOT_ACTIVATED = 11, |
20064
4da314b1e53e
Create a PurpleDisconnectReason enum (which happens to be identical to
Will Thompson <will.thompson@collabora.co.uk>
parents:
19697
diff
changeset
|
114 /** The server's SSL certificate did not match its hostname. */ |
21424
ba061949650c
I don't think that incorrect passwords can be helpfully distinguished from
Will Thompson <will.thompson@collabora.co.uk>
parents:
21422
diff
changeset
|
115 PURPLE_CONNECTION_ERROR_CERT_HOSTNAME_MISMATCH = 12, |
20064
4da314b1e53e
Create a PurpleDisconnectReason enum (which happens to be identical to
Will Thompson <will.thompson@collabora.co.uk>
parents:
19697
diff
changeset
|
116 /** The server's SSL certificate does not have the expected |
4da314b1e53e
Create a PurpleDisconnectReason enum (which happens to be identical to
Will Thompson <will.thompson@collabora.co.uk>
parents:
19697
diff
changeset
|
117 * fingerprint. |
4da314b1e53e
Create a PurpleDisconnectReason enum (which happens to be identical to
Will Thompson <will.thompson@collabora.co.uk>
parents:
19697
diff
changeset
|
118 */ |
21424
ba061949650c
I don't think that incorrect passwords can be helpfully distinguished from
Will Thompson <will.thompson@collabora.co.uk>
parents:
21422
diff
changeset
|
119 PURPLE_CONNECTION_ERROR_CERT_FINGERPRINT_MISMATCH = 13, |
20064
4da314b1e53e
Create a PurpleDisconnectReason enum (which happens to be identical to
Will Thompson <will.thompson@collabora.co.uk>
parents:
19697
diff
changeset
|
120 /** The server's SSL certificate is self-signed. */ |
21424
ba061949650c
I don't think that incorrect passwords can be helpfully distinguished from
Will Thompson <will.thompson@collabora.co.uk>
parents:
21422
diff
changeset
|
121 PURPLE_CONNECTION_ERROR_CERT_SELF_SIGNED = 14, |
20064
4da314b1e53e
Create a PurpleDisconnectReason enum (which happens to be identical to
Will Thompson <will.thompson@collabora.co.uk>
parents:
19697
diff
changeset
|
122 /** There was some other error validating the server's SSL certificate. |
4da314b1e53e
Create a PurpleDisconnectReason enum (which happens to be identical to
Will Thompson <will.thompson@collabora.co.uk>
parents:
19697
diff
changeset
|
123 */ |
21424
ba061949650c
I don't think that incorrect passwords can be helpfully distinguished from
Will Thompson <will.thompson@collabora.co.uk>
parents:
21422
diff
changeset
|
124 PURPLE_CONNECTION_ERROR_CERT_OTHER_ERROR = 15, |
20065
a1c47a5f07f4
Remove non-error PurpleDisconnectReasons, and add PURPLE_REASON_OTHER_ERROR
Will Thompson <will.thompson@collabora.co.uk>
parents:
20064
diff
changeset
|
125 |
23374
85fc34efe733
Fix occurred to be spelled correctly. Thanks to bruce89 for noticing. Fixes #6096.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
23372
diff
changeset
|
126 /** Some other error occurred which fits into none of the other |
20065
a1c47a5f07f4
Remove non-error PurpleDisconnectReasons, and add PURPLE_REASON_OTHER_ERROR
Will Thompson <will.thompson@collabora.co.uk>
parents:
20064
diff
changeset
|
127 * categories. |
a1c47a5f07f4
Remove non-error PurpleDisconnectReasons, and add PURPLE_REASON_OTHER_ERROR
Will Thompson <will.thompson@collabora.co.uk>
parents:
20064
diff
changeset
|
128 */ |
31872
a5b556ac1de5
Rename purple_connection_error_reason to purple_connection_error
Mark Doliner <mark@kingant.net>
parents:
31871
diff
changeset
|
129 /* purple_connection_error() in connection.c uses the fact that |
21357
5a3242b676ad
rlaager suggested using the last element of the PurpleDisconnectReason enum
Will Thompson <will.thompson@collabora.co.uk>
parents:
20893
diff
changeset
|
130 * this is the last member of the enum when sanity-checking; if other |
5a3242b676ad
rlaager suggested using the last element of the PurpleDisconnectReason enum
Will Thompson <will.thompson@collabora.co.uk>
parents:
20893
diff
changeset
|
131 * reasons are added after it, the check must be updated. |
5a3242b676ad
rlaager suggested using the last element of the PurpleDisconnectReason enum
Will Thompson <will.thompson@collabora.co.uk>
parents:
20893
diff
changeset
|
132 */ |
21424
ba061949650c
I don't think that incorrect passwords can be helpfully distinguished from
Will Thompson <will.thompson@collabora.co.uk>
parents:
21422
diff
changeset
|
133 PURPLE_CONNECTION_ERROR_OTHER_ERROR = 16 |
21358 | 134 } PurpleConnectionError; |
20064
4da314b1e53e
Create a PurpleDisconnectReason enum (which happens to be identical to
Will Thompson <will.thompson@collabora.co.uk>
parents:
19697
diff
changeset
|
135 |
21374
71c1f2da4ff2
PurpleConnectionErrorPair is a better name for struct { PurpleConnectionError;
Will Thompson <will.thompson@collabora.co.uk>
parents:
21360
diff
changeset
|
136 /** Holds the type of an error along with its description. */ |
71c1f2da4ff2
PurpleConnectionErrorPair is a better name for struct { PurpleConnectionError;
Will Thompson <will.thompson@collabora.co.uk>
parents:
21360
diff
changeset
|
137 typedef struct |
71c1f2da4ff2
PurpleConnectionErrorPair is a better name for struct { PurpleConnectionError;
Will Thompson <will.thompson@collabora.co.uk>
parents:
21360
diff
changeset
|
138 { |
71c1f2da4ff2
PurpleConnectionErrorPair is a better name for struct { PurpleConnectionError;
Will Thompson <will.thompson@collabora.co.uk>
parents:
21360
diff
changeset
|
139 /** The type of error. */ |
71c1f2da4ff2
PurpleConnectionErrorPair is a better name for struct { PurpleConnectionError;
Will Thompson <will.thompson@collabora.co.uk>
parents:
21360
diff
changeset
|
140 PurpleConnectionError type; |
71c1f2da4ff2
PurpleConnectionErrorPair is a better name for struct { PurpleConnectionError;
Will Thompson <will.thompson@collabora.co.uk>
parents:
21360
diff
changeset
|
141 /** A localised, human-readable description of the error. */ |
21392
2daec6b5bbca
PurpleConnectionErrorInfo.description should not be const.
Will Thompson <will.thompson@collabora.co.uk>
parents:
21377
diff
changeset
|
142 char *description; |
21377
872068d10eab
Mark pointed out that PurpleConnectionErrorPair is not a very good name for the
Will Thompson <will.thompson@collabora.co.uk>
parents:
21376
diff
changeset
|
143 } PurpleConnectionErrorInfo; |
21374
71c1f2da4ff2
PurpleConnectionErrorPair is a better name for struct { PurpleConnectionError;
Will Thompson <will.thompson@collabora.co.uk>
parents:
21360
diff
changeset
|
144 |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
145 #include <time.h> |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
146 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
147 #include "account.h" |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
148 #include "plugin.h" |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
149 #include "status.h" |
20115
a68d51d60177
Create purple_connection_ssl_error(), which converts a PurpleSslErrorType
Will Thompson <will.thompson@collabora.co.uk>
parents:
20114
diff
changeset
|
150 #include "sslconn.h" |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
151 |
25921
d25cbbea7fe5
Add @since 2.6.0 doxygen comments to some of our new functions, and
Mark Doliner <mark@kingant.net>
parents:
25871
diff
changeset
|
152 /** |
d25cbbea7fe5
Add @since 2.6.0 doxygen comments to some of our new functions, and
Mark Doliner <mark@kingant.net>
parents:
25871
diff
changeset
|
153 * Connection UI operations. Used to notify the user of changes to |
d25cbbea7fe5
Add @since 2.6.0 doxygen comments to some of our new functions, and
Mark Doliner <mark@kingant.net>
parents:
25871
diff
changeset
|
154 * connections, such as being disconnected, and to respond to the |
d25cbbea7fe5
Add @since 2.6.0 doxygen comments to some of our new functions, and
Mark Doliner <mark@kingant.net>
parents:
25871
diff
changeset
|
155 * underlying network connection appearing and disappearing. UIs should |
d25cbbea7fe5
Add @since 2.6.0 doxygen comments to some of our new functions, and
Mark Doliner <mark@kingant.net>
parents:
25871
diff
changeset
|
156 * call #purple_connections_set_ui_ops() with an instance of this struct. |
18835
3750e2e176cb
Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <will.thompson@collabora.co.uk>
parents:
18118
diff
changeset
|
157 * |
25921
d25cbbea7fe5
Add @since 2.6.0 doxygen comments to some of our new functions, and
Mark Doliner <mark@kingant.net>
parents:
25871
diff
changeset
|
158 * @see @ref ui-ops |
18835
3750e2e176cb
Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <will.thompson@collabora.co.uk>
parents:
18118
diff
changeset
|
159 */ |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
160 typedef struct |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
161 { |
25921
d25cbbea7fe5
Add @since 2.6.0 doxygen comments to some of our new functions, and
Mark Doliner <mark@kingant.net>
parents:
25871
diff
changeset
|
162 /** |
d25cbbea7fe5
Add @since 2.6.0 doxygen comments to some of our new functions, and
Mark Doliner <mark@kingant.net>
parents:
25871
diff
changeset
|
163 * When an account is connecting, this operation is called to notify |
d25cbbea7fe5
Add @since 2.6.0 doxygen comments to some of our new functions, and
Mark Doliner <mark@kingant.net>
parents:
25871
diff
changeset
|
164 * the UI of what is happening, as well as which @a step out of @a |
d25cbbea7fe5
Add @since 2.6.0 doxygen comments to some of our new functions, and
Mark Doliner <mark@kingant.net>
parents:
25871
diff
changeset
|
165 * step_count has been reached (which might be displayed as a progress |
d25cbbea7fe5
Add @since 2.6.0 doxygen comments to some of our new functions, and
Mark Doliner <mark@kingant.net>
parents:
25871
diff
changeset
|
166 * bar). |
d25cbbea7fe5
Add @since 2.6.0 doxygen comments to some of our new functions, and
Mark Doliner <mark@kingant.net>
parents:
25871
diff
changeset
|
167 * @see #purple_connection_update_progress |
18835
3750e2e176cb
Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <will.thompson@collabora.co.uk>
parents:
18118
diff
changeset
|
168 */ |
3750e2e176cb
Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <will.thompson@collabora.co.uk>
parents:
18118
diff
changeset
|
169 void (*connect_progress)(PurpleConnection *gc, |
3750e2e176cb
Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <will.thompson@collabora.co.uk>
parents:
18118
diff
changeset
|
170 const char *text, |
3750e2e176cb
Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <will.thompson@collabora.co.uk>
parents:
18118
diff
changeset
|
171 size_t step, |
3750e2e176cb
Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <will.thompson@collabora.co.uk>
parents:
18118
diff
changeset
|
172 size_t step_count); |
20066
95b2b7a39585
Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <will.thompson@collabora.co.uk>
parents:
20065
diff
changeset
|
173 |
25921
d25cbbea7fe5
Add @since 2.6.0 doxygen comments to some of our new functions, and
Mark Doliner <mark@kingant.net>
parents:
25871
diff
changeset
|
174 /** |
d25cbbea7fe5
Add @since 2.6.0 doxygen comments to some of our new functions, and
Mark Doliner <mark@kingant.net>
parents:
25871
diff
changeset
|
175 * Called when a connection is established (just before the |
d25cbbea7fe5
Add @since 2.6.0 doxygen comments to some of our new functions, and
Mark Doliner <mark@kingant.net>
parents:
25871
diff
changeset
|
176 * @ref signed-on signal). |
18835
3750e2e176cb
Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <will.thompson@collabora.co.uk>
parents:
18118
diff
changeset
|
177 */ |
15822 | 178 void (*connected)(PurpleConnection *gc); |
25921
d25cbbea7fe5
Add @since 2.6.0 doxygen comments to some of our new functions, and
Mark Doliner <mark@kingant.net>
parents:
25871
diff
changeset
|
179 |
d25cbbea7fe5
Add @since 2.6.0 doxygen comments to some of our new functions, and
Mark Doliner <mark@kingant.net>
parents:
25871
diff
changeset
|
180 /** |
d25cbbea7fe5
Add @since 2.6.0 doxygen comments to some of our new functions, and
Mark Doliner <mark@kingant.net>
parents:
25871
diff
changeset
|
181 * Called when a connection is ended (between the @ref signing-off |
d25cbbea7fe5
Add @since 2.6.0 doxygen comments to some of our new functions, and
Mark Doliner <mark@kingant.net>
parents:
25871
diff
changeset
|
182 * and @ref signed-off signals). |
18835
3750e2e176cb
Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <will.thompson@collabora.co.uk>
parents:
18118
diff
changeset
|
183 */ |
15822 | 184 void (*disconnected)(PurpleConnection *gc); |
20066
95b2b7a39585
Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <will.thompson@collabora.co.uk>
parents:
20065
diff
changeset
|
185 |
25921
d25cbbea7fe5
Add @since 2.6.0 doxygen comments to some of our new functions, and
Mark Doliner <mark@kingant.net>
parents:
25871
diff
changeset
|
186 /** |
d25cbbea7fe5
Add @since 2.6.0 doxygen comments to some of our new functions, and
Mark Doliner <mark@kingant.net>
parents:
25871
diff
changeset
|
187 * Used to display connection-specific notices. (Pidgin's Gtk user |
d25cbbea7fe5
Add @since 2.6.0 doxygen comments to some of our new functions, and
Mark Doliner <mark@kingant.net>
parents:
25871
diff
changeset
|
188 * interface implements this as a no-op; #purple_connection_notice(), |
d25cbbea7fe5
Add @since 2.6.0 doxygen comments to some of our new functions, and
Mark Doliner <mark@kingant.net>
parents:
25871
diff
changeset
|
189 * which uses this operation, is not used by any of the protocols |
d25cbbea7fe5
Add @since 2.6.0 doxygen comments to some of our new functions, and
Mark Doliner <mark@kingant.net>
parents:
25871
diff
changeset
|
190 * shipped with libpurple.) |
18835
3750e2e176cb
Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <will.thompson@collabora.co.uk>
parents:
18118
diff
changeset
|
191 */ |
15822 | 192 void (*notice)(PurpleConnection *gc, const char *text); |
20066
95b2b7a39585
Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <will.thompson@collabora.co.uk>
parents:
20065
diff
changeset
|
193 |
25921
d25cbbea7fe5
Add @since 2.6.0 doxygen comments to some of our new functions, and
Mark Doliner <mark@kingant.net>
parents:
25871
diff
changeset
|
194 /** |
d25cbbea7fe5
Add @since 2.6.0 doxygen comments to some of our new functions, and
Mark Doliner <mark@kingant.net>
parents:
25871
diff
changeset
|
195 * Called when libpurple discovers that the computer's network |
d25cbbea7fe5
Add @since 2.6.0 doxygen comments to some of our new functions, and
Mark Doliner <mark@kingant.net>
parents:
25871
diff
changeset
|
196 * connection is active. On Linux, this uses Network Manager if |
d25cbbea7fe5
Add @since 2.6.0 doxygen comments to some of our new functions, and
Mark Doliner <mark@kingant.net>
parents:
25871
diff
changeset
|
197 * available; on Windows, it uses Win32's network change notification |
d25cbbea7fe5
Add @since 2.6.0 doxygen comments to some of our new functions, and
Mark Doliner <mark@kingant.net>
parents:
25871
diff
changeset
|
198 * infrastructure. |
18835
3750e2e176cb
Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <will.thompson@collabora.co.uk>
parents:
18118
diff
changeset
|
199 */ |
21968
a463f05b4566
Felipe Contreras, one of our older Crazy Pacth Writers, noticed that these
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21426
diff
changeset
|
200 void (*network_connected)(void); |
25921
d25cbbea7fe5
Add @since 2.6.0 doxygen comments to some of our new functions, and
Mark Doliner <mark@kingant.net>
parents:
25871
diff
changeset
|
201 |
d25cbbea7fe5
Add @since 2.6.0 doxygen comments to some of our new functions, and
Mark Doliner <mark@kingant.net>
parents:
25871
diff
changeset
|
202 /** |
d25cbbea7fe5
Add @since 2.6.0 doxygen comments to some of our new functions, and
Mark Doliner <mark@kingant.net>
parents:
25871
diff
changeset
|
203 * Called when libpurple discovers that the computer's network |
d25cbbea7fe5
Add @since 2.6.0 doxygen comments to some of our new functions, and
Mark Doliner <mark@kingant.net>
parents:
25871
diff
changeset
|
204 * connection has gone away. |
18835
3750e2e176cb
Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <will.thompson@collabora.co.uk>
parents:
18118
diff
changeset
|
205 */ |
21968
a463f05b4566
Felipe Contreras, one of our older Crazy Pacth Writers, noticed that these
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21426
diff
changeset
|
206 void (*network_disconnected)(void); |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
207 |
25921
d25cbbea7fe5
Add @since 2.6.0 doxygen comments to some of our new functions, and
Mark Doliner <mark@kingant.net>
parents:
25871
diff
changeset
|
208 /** |
d25cbbea7fe5
Add @since 2.6.0 doxygen comments to some of our new functions, and
Mark Doliner <mark@kingant.net>
parents:
25871
diff
changeset
|
209 * Called when an error causes a connection to be disconnected. |
31867
af709c6ab032
Remove PurpleConnectionUiOps.report_disconnect
Mark Doliner <mark@kingant.net>
parents:
29529
diff
changeset
|
210 * Called before #disconnected. |
25921
d25cbbea7fe5
Add @since 2.6.0 doxygen comments to some of our new functions, and
Mark Doliner <mark@kingant.net>
parents:
25871
diff
changeset
|
211 * |
31867
af709c6ab032
Remove PurpleConnectionUiOps.report_disconnect
Mark Doliner <mark@kingant.net>
parents:
29529
diff
changeset
|
212 * @param reason why the connection ended, if known, or |
af709c6ab032
Remove PurpleConnectionUiOps.report_disconnect
Mark Doliner <mark@kingant.net>
parents:
29529
diff
changeset
|
213 * #PURPLE_CONNECTION_ERROR_OTHER_ERROR, if not. |
af709c6ab032
Remove PurpleConnectionUiOps.report_disconnect
Mark Doliner <mark@kingant.net>
parents:
29529
diff
changeset
|
214 * @param text a localized message describing the disconnection |
af709c6ab032
Remove PurpleConnectionUiOps.report_disconnect
Mark Doliner <mark@kingant.net>
parents:
29529
diff
changeset
|
215 * in more detail to the user. |
31872
a5b556ac1de5
Rename purple_connection_error_reason to purple_connection_error
Mark Doliner <mark@kingant.net>
parents:
31871
diff
changeset
|
216 * @see #purple_connection_error |
20066
95b2b7a39585
Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <will.thompson@collabora.co.uk>
parents:
20065
diff
changeset
|
217 */ |
31868
c3ea1711c372
Rename the report_disconnect_reason cb function to report_disconnect
Mark Doliner <mark@kingant.net>
parents:
31867
diff
changeset
|
218 void (*report_disconnect)(PurpleConnection *gc, |
c3ea1711c372
Rename the report_disconnect_reason cb function to report_disconnect
Mark Doliner <mark@kingant.net>
parents:
31867
diff
changeset
|
219 PurpleConnectionError reason, |
c3ea1711c372
Rename the report_disconnect_reason cb function to report_disconnect
Mark Doliner <mark@kingant.net>
parents:
31867
diff
changeset
|
220 const char *text); |
20066
95b2b7a39585
Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <will.thompson@collabora.co.uk>
parents:
20065
diff
changeset
|
221 |
16664
516f14bef90e
Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents:
15822
diff
changeset
|
222 void (*_purple_reserved1)(void); |
516f14bef90e
Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents:
15822
diff
changeset
|
223 void (*_purple_reserved2)(void); |
516f14bef90e
Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents:
15822
diff
changeset
|
224 void (*_purple_reserved3)(void); |
15822 | 225 } PurpleConnectionUiOps; |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
226 |
23372
0efa36fe7d7c
Sprinkle @copydoc around to squash "ref could not be resolved" Doxygen warnings,
Will Thompson <will.thompson@collabora.co.uk>
parents:
23131
diff
changeset
|
227 |
0efa36fe7d7c
Sprinkle @copydoc around to squash "ref could not be resolved" Doxygen warnings,
Will Thompson <will.thompson@collabora.co.uk>
parents:
23131
diff
changeset
|
228 /* Represents an active connection on an account. */ |
15822 | 229 struct _PurpleConnection |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
230 { |
15822 | 231 PurplePlugin *prpl; /**< The protocol plugin. */ |
232 PurpleConnectionFlags flags; /**< Connection flags. */ | |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
233 |
15822 | 234 PurpleConnectionState state; /**< The connection state. */ |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
235 |
15822 | 236 PurpleAccount *account; /**< The account being connected to. */ |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
237 char *password; /**< The password used. */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
238 |
20813
66e7b104b4ea
rlaager pointed out that purple_connection_error_reason should be setting
Will Thompson <will.thompson@collabora.co.uk>
parents:
20812
diff
changeset
|
239 GSList *buddy_chats; /**< A list of active chats |
66e7b104b4ea
rlaager pointed out that purple_connection_error_reason should be setting
Will Thompson <will.thompson@collabora.co.uk>
parents:
20812
diff
changeset
|
240 (#PurpleConversation structs of type |
66e7b104b4ea
rlaager pointed out that purple_connection_error_reason should be setting
Will Thompson <will.thompson@collabora.co.uk>
parents:
20812
diff
changeset
|
241 #PURPLE_CONV_TYPE_CHAT). */ |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
242 void *proto_data; /**< Protocol-specific data. */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
243 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
244 char *display_name; /**< How you appear to other people. */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
245 guint keepalive; /**< Keep-alive. */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
246 |
20813
66e7b104b4ea
rlaager pointed out that purple_connection_error_reason should be setting
Will Thompson <will.thompson@collabora.co.uk>
parents:
20812
diff
changeset
|
247 /** Wants to Die state. This is set when the user chooses to log out, or |
66e7b104b4ea
rlaager pointed out that purple_connection_error_reason should be setting
Will Thompson <will.thompson@collabora.co.uk>
parents:
20812
diff
changeset
|
248 * when the protocol is disconnected and should not be automatically |
66e7b104b4ea
rlaager pointed out that purple_connection_error_reason should be setting
Will Thompson <will.thompson@collabora.co.uk>
parents:
20812
diff
changeset
|
249 * reconnected (incorrect password, etc.). prpls should rely on |
31872
a5b556ac1de5
Rename purple_connection_error_reason to purple_connection_error
Mark Doliner <mark@kingant.net>
parents:
31871
diff
changeset
|
250 * purple_connection_error() to set this for them rather than |
20813
66e7b104b4ea
rlaager pointed out that purple_connection_error_reason should be setting
Will Thompson <will.thompson@collabora.co.uk>
parents:
20812
diff
changeset
|
251 * setting it themselves. |
21358 | 252 * @see purple_connection_error_is_fatal |
20813
66e7b104b4ea
rlaager pointed out that purple_connection_error_reason should be setting
Will Thompson <will.thompson@collabora.co.uk>
parents:
20812
diff
changeset
|
253 */ |
66e7b104b4ea
rlaager pointed out that purple_connection_error_reason should be setting
Will Thompson <will.thompson@collabora.co.uk>
parents:
20812
diff
changeset
|
254 gboolean wants_to_die; |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
255 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
256 guint disconnect_timeout; /**< Timer used for nasty stack tricks */ |
22149
252b96b6a32c
Don't send keep-alives if we've received data since in the last KEEPALIVE_INTERVAL seconds
Sean Egan <seanegan@gmail.com>
parents:
21968
diff
changeset
|
257 time_t last_received; /**< When we last received a packet. Set by the |
252b96b6a32c
Don't send keep-alives if we've received data since in the last KEEPALIVE_INTERVAL seconds
Sean Egan <seanegan@gmail.com>
parents:
21968
diff
changeset
|
258 prpl to avoid sending unneeded keepalives */ |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
259 }; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
260 |
32433
98520ee78f12
Use G_BEGIN/END_DECLS in public libpurple files. This was
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
32314
diff
changeset
|
261 G_BEGIN_DECLS |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
262 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
263 /**************************************************************************/ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
264 /** @name Connection API */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
265 /**************************************************************************/ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
266 /*@{*/ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
267 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
268 /** |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
269 * Sets the connection state. PRPLs should call this and pass in |
20813
66e7b104b4ea
rlaager pointed out that purple_connection_error_reason should be setting
Will Thompson <will.thompson@collabora.co.uk>
parents:
20812
diff
changeset
|
270 * the state #PURPLE_CONNECTED when the account is completely |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
271 * signed on. What does it mean to be completely signed on? If |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
272 * the core can call prpl->set_status, and it successfully changes |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
273 * your status, then the account is online. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
274 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
275 * @param gc The connection. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
276 * @param state The connection state. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
277 */ |
15822 | 278 void purple_connection_set_state(PurpleConnection *gc, PurpleConnectionState state); |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
279 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
280 /** |
32305
2ec94166be43
On the way to hiding the PurpleConnection struct.
andrew.victor@mxit.com
parents:
32226
diff
changeset
|
281 * Sets the connection flags. |
2ec94166be43
On the way to hiding the PurpleConnection struct.
andrew.victor@mxit.com
parents:
32226
diff
changeset
|
282 * |
2ec94166be43
On the way to hiding the PurpleConnection struct.
andrew.victor@mxit.com
parents:
32226
diff
changeset
|
283 * @param gc The connection. |
2ec94166be43
On the way to hiding the PurpleConnection struct.
andrew.victor@mxit.com
parents:
32226
diff
changeset
|
284 * @param flags The flags. |
2ec94166be43
On the way to hiding the PurpleConnection struct.
andrew.victor@mxit.com
parents:
32226
diff
changeset
|
285 */ |
2ec94166be43
On the way to hiding the PurpleConnection struct.
andrew.victor@mxit.com
parents:
32226
diff
changeset
|
286 void purple_connection_set_flags(PurpleConnection *gc, PurpleConnectionFlags flags); |
2ec94166be43
On the way to hiding the PurpleConnection struct.
andrew.victor@mxit.com
parents:
32226
diff
changeset
|
287 |
2ec94166be43
On the way to hiding the PurpleConnection struct.
andrew.victor@mxit.com
parents:
32226
diff
changeset
|
288 /** |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
289 * Sets the connection's account. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
290 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
291 * @param gc The connection. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
292 * @param account The account. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
293 */ |
15822 | 294 void purple_connection_set_account(PurpleConnection *gc, PurpleAccount *account); |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
295 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
296 /** |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
297 * Sets the connection's displayed name. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
298 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
299 * @param gc The connection. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
300 * @param name The displayed name. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
301 */ |
15822 | 302 void purple_connection_set_display_name(PurpleConnection *gc, const char *name); |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
303 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
304 /** |
25790
9ded0fb57e1c
Added purple_connection_set_protocol_data and purple_connection_get_protocol_data
Gary Kramlich <grim@reaperworld.com>
parents:
23374
diff
changeset
|
305 * Sets the protocol data for a connection. |
9ded0fb57e1c
Added purple_connection_set_protocol_data and purple_connection_get_protocol_data
Gary Kramlich <grim@reaperworld.com>
parents:
23374
diff
changeset
|
306 * |
9ded0fb57e1c
Added purple_connection_set_protocol_data and purple_connection_get_protocol_data
Gary Kramlich <grim@reaperworld.com>
parents:
23374
diff
changeset
|
307 * @param connection The PurpleConnection. |
9ded0fb57e1c
Added purple_connection_set_protocol_data and purple_connection_get_protocol_data
Gary Kramlich <grim@reaperworld.com>
parents:
23374
diff
changeset
|
308 * @param proto_data The protocol data to set for the connection. |
9ded0fb57e1c
Added purple_connection_set_protocol_data and purple_connection_get_protocol_data
Gary Kramlich <grim@reaperworld.com>
parents:
23374
diff
changeset
|
309 */ |
9ded0fb57e1c
Added purple_connection_set_protocol_data and purple_connection_get_protocol_data
Gary Kramlich <grim@reaperworld.com>
parents:
23374
diff
changeset
|
310 void purple_connection_set_protocol_data(PurpleConnection *connection, void *proto_data); |
9ded0fb57e1c
Added purple_connection_set_protocol_data and purple_connection_get_protocol_data
Gary Kramlich <grim@reaperworld.com>
parents:
23374
diff
changeset
|
311 |
9ded0fb57e1c
Added purple_connection_set_protocol_data and purple_connection_get_protocol_data
Gary Kramlich <grim@reaperworld.com>
parents:
23374
diff
changeset
|
312 /** |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
313 * Returns the connection state. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
314 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
315 * @param gc The connection. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
316 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
317 * @return The connection state. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
318 */ |
15822 | 319 PurpleConnectionState purple_connection_get_state(const PurpleConnection *gc); |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
320 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
321 /** |
32305
2ec94166be43
On the way to hiding the PurpleConnection struct.
andrew.victor@mxit.com
parents:
32226
diff
changeset
|
322 * Returns the connection flags. |
2ec94166be43
On the way to hiding the PurpleConnection struct.
andrew.victor@mxit.com
parents:
32226
diff
changeset
|
323 * |
2ec94166be43
On the way to hiding the PurpleConnection struct.
andrew.victor@mxit.com
parents:
32226
diff
changeset
|
324 * @param gc The connection. |
2ec94166be43
On the way to hiding the PurpleConnection struct.
andrew.victor@mxit.com
parents:
32226
diff
changeset
|
325 * |
2ec94166be43
On the way to hiding the PurpleConnection struct.
andrew.victor@mxit.com
parents:
32226
diff
changeset
|
326 * @return The connection flags. |
2ec94166be43
On the way to hiding the PurpleConnection struct.
andrew.victor@mxit.com
parents:
32226
diff
changeset
|
327 */ |
2ec94166be43
On the way to hiding the PurpleConnection struct.
andrew.victor@mxit.com
parents:
32226
diff
changeset
|
328 PurpleConnectionFlags purple_connection_get_flags(const PurpleConnection *gc); |
2ec94166be43
On the way to hiding the PurpleConnection struct.
andrew.victor@mxit.com
parents:
32226
diff
changeset
|
329 |
2ec94166be43
On the way to hiding the PurpleConnection struct.
andrew.victor@mxit.com
parents:
32226
diff
changeset
|
330 /** |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
331 * Returns TRUE if the account is connected, otherwise returns FALSE. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
332 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
333 * @return TRUE if the account is connected, otherwise returns FALSE. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
334 */ |
15822 | 335 #define PURPLE_CONNECTION_IS_CONNECTED(gc) \ |
22214
2b426862ffbf
Add accessor and update finch to not touch the internals of PurpleConnection.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22149
diff
changeset
|
336 (purple_connection_get_state(gc) == PURPLE_CONNECTED) |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
337 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
338 /** |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
339 * Returns the connection's account. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
340 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
341 * @param gc The connection. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
342 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
343 * @return The connection's account. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
344 */ |
15822 | 345 PurpleAccount *purple_connection_get_account(const PurpleConnection *gc); |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
346 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
347 /** |
22214
2b426862ffbf
Add accessor and update finch to not touch the internals of PurpleConnection.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22149
diff
changeset
|
348 * Returns the protocol plugin managing a connection. |
2b426862ffbf
Add accessor and update finch to not touch the internals of PurpleConnection.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22149
diff
changeset
|
349 * |
2b426862ffbf
Add accessor and update finch to not touch the internals of PurpleConnection.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22149
diff
changeset
|
350 * @param gc The connection. |
2b426862ffbf
Add accessor and update finch to not touch the internals of PurpleConnection.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22149
diff
changeset
|
351 * |
2b426862ffbf
Add accessor and update finch to not touch the internals of PurpleConnection.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22149
diff
changeset
|
352 * @return The protocol plugin. |
2b426862ffbf
Add accessor and update finch to not touch the internals of PurpleConnection.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22149
diff
changeset
|
353 */ |
2b426862ffbf
Add accessor and update finch to not touch the internals of PurpleConnection.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22149
diff
changeset
|
354 PurplePlugin * purple_connection_get_prpl(const PurpleConnection *gc); |
2b426862ffbf
Add accessor and update finch to not touch the internals of PurpleConnection.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22149
diff
changeset
|
355 |
2b426862ffbf
Add accessor and update finch to not touch the internals of PurpleConnection.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22149
diff
changeset
|
356 /** |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
357 * Returns the connection's password. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
358 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
359 * @param gc The connection. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
360 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
361 * @return The connection's password. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
362 */ |
15822 | 363 const char *purple_connection_get_password(const PurpleConnection *gc); |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
364 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
365 /** |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
366 * Returns the connection's displayed name. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
367 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
368 * @param gc The connection. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
369 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
370 * @return The connection's displayed name. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
371 */ |
15822 | 372 const char *purple_connection_get_display_name(const PurpleConnection *gc); |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
373 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
374 /** |
25790
9ded0fb57e1c
Added purple_connection_set_protocol_data and purple_connection_get_protocol_data
Gary Kramlich <grim@reaperworld.com>
parents:
23374
diff
changeset
|
375 * Gets the protocol data from a connection. |
9ded0fb57e1c
Added purple_connection_set_protocol_data and purple_connection_get_protocol_data
Gary Kramlich <grim@reaperworld.com>
parents:
23374
diff
changeset
|
376 * |
9ded0fb57e1c
Added purple_connection_set_protocol_data and purple_connection_get_protocol_data
Gary Kramlich <grim@reaperworld.com>
parents:
23374
diff
changeset
|
377 * @param connection The PurpleConnection. |
9ded0fb57e1c
Added purple_connection_set_protocol_data and purple_connection_get_protocol_data
Gary Kramlich <grim@reaperworld.com>
parents:
23374
diff
changeset
|
378 * |
9ded0fb57e1c
Added purple_connection_set_protocol_data and purple_connection_get_protocol_data
Gary Kramlich <grim@reaperworld.com>
parents:
23374
diff
changeset
|
379 * @return The protocol data for the connection. |
9ded0fb57e1c
Added purple_connection_set_protocol_data and purple_connection_get_protocol_data
Gary Kramlich <grim@reaperworld.com>
parents:
23374
diff
changeset
|
380 */ |
9ded0fb57e1c
Added purple_connection_set_protocol_data and purple_connection_get_protocol_data
Gary Kramlich <grim@reaperworld.com>
parents:
23374
diff
changeset
|
381 void *purple_connection_get_protocol_data(const PurpleConnection *connection); |
9ded0fb57e1c
Added purple_connection_set_protocol_data and purple_connection_get_protocol_data
Gary Kramlich <grim@reaperworld.com>
parents:
23374
diff
changeset
|
382 |
9ded0fb57e1c
Added purple_connection_set_protocol_data and purple_connection_get_protocol_data
Gary Kramlich <grim@reaperworld.com>
parents:
23374
diff
changeset
|
383 /** |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
384 * Updates the connection progress. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
385 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
386 * @param gc The connection. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
387 * @param text Information on the current step. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
388 * @param step The current step. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
389 * @param count The total number of steps. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
390 */ |
15822 | 391 void purple_connection_update_progress(PurpleConnection *gc, const char *text, |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
392 size_t step, size_t count); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
393 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
394 /** |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
395 * Displays a connection-specific notice. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
396 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
397 * @param gc The connection. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
398 * @param text The notice text. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
399 */ |
15822 | 400 void purple_connection_notice(PurpleConnection *gc, const char *text); |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
401 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
402 /** |
21359
fe57b8062249
Document that the char * parameter of purple_connection_error{,_reason} may
Will Thompson <will.thompson@collabora.co.uk>
parents:
21358
diff
changeset
|
403 * Closes a connection with an error and a human-readable description of the |
20813
66e7b104b4ea
rlaager pointed out that purple_connection_error_reason should be setting
Will Thompson <will.thompson@collabora.co.uk>
parents:
20812
diff
changeset
|
404 * error. It also sets @c gc->wants_to_die to the value of |
21376
f5b223d0cb89
Document the gc parameter of purple_connection_error_reason to shut doxygen up.
Will Thompson <will.thompson@collabora.co.uk>
parents:
21374
diff
changeset
|
405 * #purple_connection_error_is_fatal(@a reason), mainly for |
f5b223d0cb89
Document the gc parameter of purple_connection_error_reason to shut doxygen up.
Will Thompson <will.thompson@collabora.co.uk>
parents:
21374
diff
changeset
|
406 * backwards-compatibility. |
20066
95b2b7a39585
Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <will.thompson@collabora.co.uk>
parents:
20065
diff
changeset
|
407 * |
21376
f5b223d0cb89
Document the gc parameter of purple_connection_error_reason to shut doxygen up.
Will Thompson <will.thompson@collabora.co.uk>
parents:
21374
diff
changeset
|
408 * @param gc the connection which is closing. |
20066
95b2b7a39585
Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <will.thompson@collabora.co.uk>
parents:
20065
diff
changeset
|
409 * @param reason why the connection is closing. |
21359
fe57b8062249
Document that the char * parameter of purple_connection_error{,_reason} may
Will Thompson <will.thompson@collabora.co.uk>
parents:
21358
diff
changeset
|
410 * @param description a non-@c NULL localized description of the error. |
20066
95b2b7a39585
Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <will.thompson@collabora.co.uk>
parents:
20065
diff
changeset
|
411 */ |
95b2b7a39585
Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <will.thompson@collabora.co.uk>
parents:
20065
diff
changeset
|
412 void |
31872
a5b556ac1de5
Rename purple_connection_error_reason to purple_connection_error
Mark Doliner <mark@kingant.net>
parents:
31871
diff
changeset
|
413 purple_connection_error(PurpleConnection *gc, |
a5b556ac1de5
Rename purple_connection_error_reason to purple_connection_error
Mark Doliner <mark@kingant.net>
parents:
31871
diff
changeset
|
414 PurpleConnectionError reason, |
a5b556ac1de5
Rename purple_connection_error_reason to purple_connection_error
Mark Doliner <mark@kingant.net>
parents:
31871
diff
changeset
|
415 const char *description); |
20066
95b2b7a39585
Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <will.thompson@collabora.co.uk>
parents:
20065
diff
changeset
|
416 |
20067
143c6f34c6eb
Create purple_connection_reason_is_fatal, which is basically a replacement for
Will Thompson <will.thompson@collabora.co.uk>
parents:
20066
diff
changeset
|
417 /** |
20115
a68d51d60177
Create purple_connection_ssl_error(), which converts a PurpleSslErrorType
Will Thompson <will.thompson@collabora.co.uk>
parents:
20114
diff
changeset
|
418 * Closes a connection due to an SSL error; this is basically a shortcut to |
21358 | 419 * turning the #PurpleSslErrorType into a #PurpleConnectionError and a |
31872
a5b556ac1de5
Rename purple_connection_error_reason to purple_connection_error
Mark Doliner <mark@kingant.net>
parents:
31871
diff
changeset
|
420 * human-readable string and then calling purple_connection_error(). |
20115
a68d51d60177
Create purple_connection_ssl_error(), which converts a PurpleSslErrorType
Will Thompson <will.thompson@collabora.co.uk>
parents:
20114
diff
changeset
|
421 */ |
a68d51d60177
Create purple_connection_ssl_error(), which converts a PurpleSslErrorType
Will Thompson <will.thompson@collabora.co.uk>
parents:
20114
diff
changeset
|
422 void |
a68d51d60177
Create purple_connection_ssl_error(), which converts a PurpleSslErrorType
Will Thompson <will.thompson@collabora.co.uk>
parents:
20114
diff
changeset
|
423 purple_connection_ssl_error (PurpleConnection *gc, |
a68d51d60177
Create purple_connection_ssl_error(), which converts a PurpleSslErrorType
Will Thompson <will.thompson@collabora.co.uk>
parents:
20114
diff
changeset
|
424 PurpleSslErrorType ssl_error); |
a68d51d60177
Create purple_connection_ssl_error(), which converts a PurpleSslErrorType
Will Thompson <will.thompson@collabora.co.uk>
parents:
20114
diff
changeset
|
425 |
a68d51d60177
Create purple_connection_ssl_error(), which converts a PurpleSslErrorType
Will Thompson <will.thompson@collabora.co.uk>
parents:
20114
diff
changeset
|
426 /** |
20067
143c6f34c6eb
Create purple_connection_reason_is_fatal, which is basically a replacement for
Will Thompson <will.thompson@collabora.co.uk>
parents:
20066
diff
changeset
|
427 * Reports whether a disconnection reason is fatal (in which case the account |
143c6f34c6eb
Create purple_connection_reason_is_fatal, which is basically a replacement for
Will Thompson <will.thompson@collabora.co.uk>
parents:
20066
diff
changeset
|
428 * should probably not be automatically reconnected) or transient (so |
20813
66e7b104b4ea
rlaager pointed out that purple_connection_error_reason should be setting
Will Thompson <will.thompson@collabora.co.uk>
parents:
20812
diff
changeset
|
429 * auto-reconnection is a good idea). |
21359
fe57b8062249
Document that the char * parameter of purple_connection_error{,_reason} may
Will Thompson <will.thompson@collabora.co.uk>
parents:
21358
diff
changeset
|
430 * For instance, #PURPLE_CONNECTION_ERROR_NETWORK_ERROR is a temporary error, |
fe57b8062249
Document that the char * parameter of purple_connection_error{,_reason} may
Will Thompson <will.thompson@collabora.co.uk>
parents:
21358
diff
changeset
|
431 * which might be caused by losing the network connection, so <tt> |
fe57b8062249
Document that the char * parameter of purple_connection_error{,_reason} may
Will Thompson <will.thompson@collabora.co.uk>
parents:
21358
diff
changeset
|
432 * purple_connection_error_is_fatal (PURPLE_CONNECTION_ERROR_NETWORK_ERROR)</tt> |
fe57b8062249
Document that the char * parameter of purple_connection_error{,_reason} may
Will Thompson <will.thompson@collabora.co.uk>
parents:
21358
diff
changeset
|
433 * is @c FALSE. On the other hand, |
21358 | 434 * #PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED probably indicates a |
435 * misconfiguration of the account which needs the user to go fix it up, so | |
21359
fe57b8062249
Document that the char * parameter of purple_connection_error{,_reason} may
Will Thompson <will.thompson@collabora.co.uk>
parents:
21358
diff
changeset
|
436 * <tt> purple_connection_error_is_fatal |
fe57b8062249
Document that the char * parameter of purple_connection_error{,_reason} may
Will Thompson <will.thompson@collabora.co.uk>
parents:
21358
diff
changeset
|
437 * (PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED)</tt> is @c TRUE. |
20067
143c6f34c6eb
Create purple_connection_reason_is_fatal, which is basically a replacement for
Will Thompson <will.thompson@collabora.co.uk>
parents:
20066
diff
changeset
|
438 * |
143c6f34c6eb
Create purple_connection_reason_is_fatal, which is basically a replacement for
Will Thompson <will.thompson@collabora.co.uk>
parents:
20066
diff
changeset
|
439 * (This function is meant to replace checking PurpleConnection.wants_to_die.) |
143c6f34c6eb
Create purple_connection_reason_is_fatal, which is basically a replacement for
Will Thompson <will.thompson@collabora.co.uk>
parents:
20066
diff
changeset
|
440 * |
20818
c560286daede
Clarify the documentation of the return value of
Will Thompson <will.thompson@collabora.co.uk>
parents:
20813
diff
changeset
|
441 * @return @c TRUE if the account should not be automatically reconnected, and |
c560286daede
Clarify the documentation of the return value of
Will Thompson <will.thompson@collabora.co.uk>
parents:
20813
diff
changeset
|
442 * @c FALSE otherwise. |
20067
143c6f34c6eb
Create purple_connection_reason_is_fatal, which is basically a replacement for
Will Thompson <will.thompson@collabora.co.uk>
parents:
20066
diff
changeset
|
443 */ |
143c6f34c6eb
Create purple_connection_reason_is_fatal, which is basically a replacement for
Will Thompson <will.thompson@collabora.co.uk>
parents:
20066
diff
changeset
|
444 gboolean |
21358 | 445 purple_connection_error_is_fatal (PurpleConnectionError reason); |
20067
143c6f34c6eb
Create purple_connection_reason_is_fatal, which is basically a replacement for
Will Thompson <will.thompson@collabora.co.uk>
parents:
20066
diff
changeset
|
446 |
32306
50cd80d3554e
Add a purple_connection_update_last_received() function to update the
andrew.victor@mxit.com
parents:
32305
diff
changeset
|
447 /** |
50cd80d3554e
Add a purple_connection_update_last_received() function to update the
andrew.victor@mxit.com
parents:
32305
diff
changeset
|
448 * Indicate that a packet was received on the connection. |
50cd80d3554e
Add a purple_connection_update_last_received() function to update the
andrew.victor@mxit.com
parents:
32305
diff
changeset
|
449 * Set by the prpl to avoid sending unneeded keepalives. |
50cd80d3554e
Add a purple_connection_update_last_received() function to update the
andrew.victor@mxit.com
parents:
32305
diff
changeset
|
450 * |
50cd80d3554e
Add a purple_connection_update_last_received() function to update the
andrew.victor@mxit.com
parents:
32305
diff
changeset
|
451 * @param gc The connection. |
50cd80d3554e
Add a purple_connection_update_last_received() function to update the
andrew.victor@mxit.com
parents:
32305
diff
changeset
|
452 */ |
50cd80d3554e
Add a purple_connection_update_last_received() function to update the
andrew.victor@mxit.com
parents:
32305
diff
changeset
|
453 void purple_connection_update_last_received(PurpleConnection *gc); |
50cd80d3554e
Add a purple_connection_update_last_received() function to update the
andrew.victor@mxit.com
parents:
32305
diff
changeset
|
454 |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
455 /*@}*/ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
456 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
457 /**************************************************************************/ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
458 /** @name Connections API */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
459 /**************************************************************************/ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
460 /*@{*/ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
461 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
462 /** |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
463 * Disconnects from all connections. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
464 */ |
15822 | 465 void purple_connections_disconnect_all(void); |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
466 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
467 /** |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
468 * Returns a list of all active connections. This does not |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
469 * include connections that are in the process of connecting. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
470 * |
18118
ab6d2763b8d8
Re-fix the DBus list handling code by killing const GList* / const GSList*
Richard Laager <rlaager@wiktel.com>
parents:
18063
diff
changeset
|
471 * @constreturn A list of all active connections. |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
472 */ |
18063
926ccb104da0
disapproval of revision '1411afd7660760db59966c3a9f18e2adab8eb27e'
Richard Laager <rlaager@wiktel.com>
parents:
18058
diff
changeset
|
473 GList *purple_connections_get_all(void); |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
474 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
475 /** |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
476 * Returns a list of all connections in the process of connecting. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
477 * |
18118
ab6d2763b8d8
Re-fix the DBus list handling code by killing const GList* / const GSList*
Richard Laager <rlaager@wiktel.com>
parents:
18063
diff
changeset
|
478 * @constreturn A list of connecting connections. |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
479 */ |
18063
926ccb104da0
disapproval of revision '1411afd7660760db59966c3a9f18e2adab8eb27e'
Richard Laager <rlaager@wiktel.com>
parents:
18058
diff
changeset
|
480 GList *purple_connections_get_connecting(void); |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
481 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
482 /** |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
483 * Checks if gc is still a valid pointer to a gc. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
484 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
485 * @return @c TRUE if gc is valid. |
27125
d8afc4ba7ce6
Clarify that PURPLE_CONNECTION_IS_VALID is deprecated, in case it wasn't
Mark Doliner <mark@kingant.net>
parents:
25961
diff
changeset
|
486 * |
d8afc4ba7ce6
Clarify that PURPLE_CONNECTION_IS_VALID is deprecated, in case it wasn't
Mark Doliner <mark@kingant.net>
parents:
25961
diff
changeset
|
487 * @deprecated Do not use this. Instead, cancel your asynchronous request |
d8afc4ba7ce6
Clarify that PURPLE_CONNECTION_IS_VALID is deprecated, in case it wasn't
Mark Doliner <mark@kingant.net>
parents:
25961
diff
changeset
|
488 * when the PurpleConnection is destroyed. |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
489 */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
490 /* |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
491 * TODO: Eventually this bad boy will be removed, because it is |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
492 * a gross fix for a crashy problem. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
493 */ |
18063
926ccb104da0
disapproval of revision '1411afd7660760db59966c3a9f18e2adab8eb27e'
Richard Laager <rlaager@wiktel.com>
parents:
18058
diff
changeset
|
494 #define PURPLE_CONNECTION_IS_VALID(gc) (g_list_find(purple_connections_get_all(), (gc)) != NULL) |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
495 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
496 /*@}*/ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
497 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
498 /**************************************************************************/ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
499 /** @name UI Registration Functions */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
500 /**************************************************************************/ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
501 /*@{*/ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
502 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
503 /** |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
504 * Sets the UI operations structure to be used for connections. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
505 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
506 * @param ops The UI operations structure. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
507 */ |
15822 | 508 void purple_connections_set_ui_ops(PurpleConnectionUiOps *ops); |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
509 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
510 /** |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
511 * Returns the UI operations structure used for connections. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
512 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
513 * @return The UI operations structure in use. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
514 */ |
15822 | 515 PurpleConnectionUiOps *purple_connections_get_ui_ops(void); |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
516 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
517 /*@}*/ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
518 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
519 /**************************************************************************/ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
520 /** @name Connections Subsystem */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
521 /**************************************************************************/ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
522 /*@{*/ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
523 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
524 /** |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
525 * Initializes the connections subsystem. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
526 */ |
15822 | 527 void purple_connections_init(void); |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
528 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
529 /** |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
530 * Uninitializes the connections subsystem. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
531 */ |
15822 | 532 void purple_connections_uninit(void); |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
533 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
534 /** |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
535 * Returns the handle to the connections subsystem. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
536 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
537 * @return The connections subsystem handle. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
538 */ |
15822 | 539 void *purple_connections_get_handle(void); |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
540 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
541 /*@}*/ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
542 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
543 |
32433
98520ee78f12
Use G_BEGIN/END_DECLS in public libpurple files. This was
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
32314
diff
changeset
|
544 G_END_DECLS |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
545 |
15822 | 546 #endif /* _PURPLE_CONNECTION_H_ */ |