Mercurial > pidgin
annotate libpurple/connection.h @ 21403:0f029f9a75e1
Make PidginMiniDialog do more things right when used as a GtkContainer. _add,
_remove and _foreach are now based on PidginMiniDialog.contents, which means
functions like gtk_container_get_children() are too.
author | Will Thompson <will.thompson@collabora.co.uk> |
---|---|
date | Sun, 04 Nov 2007 15:54:49 +0000 |
parents | 2daec6b5bbca |
children | 56a608b80fda |
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 |
15822 | 30 typedef struct _PurpleConnection PurpleConnection; |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
31 |
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 * 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
|
34 */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
35 typedef enum |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
36 { |
15822 | 37 PURPLE_CONNECTION_HTML = 0x0001, /**< Connection sends/receives in 'HTML'. */ |
38 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
|
39 background colors. */ |
15822 | 40 PURPLE_CONNECTION_AUTO_RESP = 0x0004, /**< Send auto responses when away. */ |
41 PURPLE_CONNECTION_FORMATTING_WBFO = 0x0008, /**< The text buffer must be formatted as a whole */ | |
42 PURPLE_CONNECTION_NO_NEWLINES = 0x0010, /**< No new lines are allowed in outgoing messages */ | |
43 PURPLE_CONNECTION_NO_FONTSIZE = 0x0020, /**< Connection does not send/receive font sizes */ | |
44 PURPLE_CONNECTION_NO_URLDESC = 0x0040, /**< Connection does not support descriptions with links */ | |
45 PURPLE_CONNECTION_NO_IMAGES = 0x0080, /**< Connection does not support sending of images */ | |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
46 |
15822 | 47 } PurpleConnectionFlags; |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
48 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
49 typedef enum |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
50 { |
15822 | 51 PURPLE_DISCONNECTED = 0, /**< Disconnected. */ |
52 PURPLE_CONNECTED, /**< Connected. */ | |
53 PURPLE_CONNECTING /**< Connecting. */ | |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
54 |
15822 | 55 } PurpleConnectionState; |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
56 |
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
|
57 /** Possible errors that can cause a connection to be closed. |
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
|
58 * @since 2.3.0 |
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
|
59 */ |
20064
4da314b1e53e
Create a PurpleDisconnectReason enum (which happens to be identical to
Will Thompson <will.thompson@collabora.co.uk>
parents:
19697
diff
changeset
|
60 typedef enum |
4da314b1e53e
Create a PurpleDisconnectReason enum (which happens to be identical to
Will Thompson <will.thompson@collabora.co.uk>
parents:
19697
diff
changeset
|
61 { |
20114
a465779350aa
Clarified the meaning of PURPLE_REASON_NETWORK_ERROR and
Will Thompson <will.thompson@collabora.co.uk>
parents:
20110
diff
changeset
|
62 /** 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
|
63 * 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
|
64 * data). |
a465779350aa
Clarified the meaning of PURPLE_REASON_NETWORK_ERROR and
Will Thompson <will.thompson@collabora.co.uk>
parents:
20110
diff
changeset
|
65 */ |
21358 | 66 PURPLE_CONNECTION_ERROR_NETWORK_ERROR = 0, |
20114
a465779350aa
Clarified the meaning of PURPLE_REASON_NETWORK_ERROR and
Will Thompson <will.thompson@collabora.co.uk>
parents:
20110
diff
changeset
|
67 /** The username or password (or some other credential) was incorrect. |
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_AUTHENTICATION_FAILED = 1, |
20114
a465779350aa
Clarified the meaning of PURPLE_REASON_NETWORK_ERROR and
Will Thompson <will.thompson@collabora.co.uk>
parents:
20110
diff
changeset
|
70 /** 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
|
71 * server offered. |
a465779350aa
Clarified the meaning of PURPLE_REASON_NETWORK_ERROR and
Will Thompson <will.thompson@collabora.co.uk>
parents:
20110
diff
changeset
|
72 */ |
21358 | 73 PURPLE_CONNECTION_ERROR_AUTHENTICATION_IMPOSSIBLE = 2, |
20792
682543aced31
Split the "you don't have SSL support" meaning of
Will Thompson <will.thompson@collabora.co.uk>
parents:
20128
diff
changeset
|
74 /** 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
|
75 * SSL. |
682543aced31
Split the "you don't have SSL support" meaning of
Will Thompson <will.thompson@collabora.co.uk>
parents:
20128
diff
changeset
|
76 */ |
21358 | 77 PURPLE_CONNECTION_ERROR_NO_SSL_SUPPORT = 3, |
20792
682543aced31
Split the "you don't have SSL support" meaning of
Will Thompson <will.thompson@collabora.co.uk>
parents:
20128
diff
changeset
|
78 /** 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
|
79 * 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
|
80 * 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
|
81 */ |
21358 | 82 PURPLE_CONNECTION_ERROR_ENCRYPTION_ERROR = 4, |
20064
4da314b1e53e
Create a PurpleDisconnectReason enum (which happens to be identical to
Will Thompson <will.thompson@collabora.co.uk>
parents:
19697
diff
changeset
|
83 /** 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
|
84 * 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
|
85 */ |
21358 | 86 PURPLE_CONNECTION_ERROR_NAME_IN_USE = 5, |
20064
4da314b1e53e
Create a PurpleDisconnectReason enum (which happens to be identical to
Will Thompson <will.thompson@collabora.co.uk>
parents:
19697
diff
changeset
|
87 |
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
|
88 /** The username/server/other preference for the account isn't valid. |
57e9d1ecefff
Rename PURPLE_REASON_INVALID_USERNAME to PURPLE_REASON_INVALID_SETTINGS, so it
Will Thompson <will.thompson@collabora.co.uk>
parents:
20115
diff
changeset
|
89 * For instance, on IRC the screen name cannot contain white space. |
57e9d1ecefff
Rename PURPLE_REASON_INVALID_USERNAME to PURPLE_REASON_INVALID_SETTINGS, so it
Will Thompson <will.thompson@collabora.co.uk>
parents:
20115
diff
changeset
|
90 * This reason should not be used for incorrect passwords etc: use |
21358 | 91 * #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
|
92 * |
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
|
93 * @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
|
94 * 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
|
95 * 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
|
96 */ |
21358 | 97 PURPLE_CONNECTION_ERROR_INVALID_SETTINGS = 6, |
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
|
98 |
20064
4da314b1e53e
Create a PurpleDisconnectReason enum (which happens to be identical to
Will Thompson <will.thompson@collabora.co.uk>
parents:
19697
diff
changeset
|
99 /** The server did not provide a SSL certificate. */ |
21358 | 100 PURPLE_CONNECTION_ERROR_CERT_NOT_PROVIDED = 7, |
20064
4da314b1e53e
Create a PurpleDisconnectReason enum (which happens to be identical to
Will Thompson <will.thompson@collabora.co.uk>
parents:
19697
diff
changeset
|
101 /** The server's SSL certificate could not be trusted. */ |
21358 | 102 PURPLE_CONNECTION_ERROR_CERT_UNTRUSTED = 8, |
20064
4da314b1e53e
Create a PurpleDisconnectReason enum (which happens to be identical to
Will Thompson <will.thompson@collabora.co.uk>
parents:
19697
diff
changeset
|
103 /** The server's SSL certificate has expired. */ |
21358 | 104 PURPLE_CONNECTION_ERROR_CERT_EXPIRED = 9, |
20064
4da314b1e53e
Create a PurpleDisconnectReason enum (which happens to be identical to
Will Thompson <will.thompson@collabora.co.uk>
parents:
19697
diff
changeset
|
105 /** The server's SSL certificate is not yet valid. */ |
21358 | 106 PURPLE_CONNECTION_ERROR_CERT_NOT_ACTIVATED = 10, |
20064
4da314b1e53e
Create a PurpleDisconnectReason enum (which happens to be identical to
Will Thompson <will.thompson@collabora.co.uk>
parents:
19697
diff
changeset
|
107 /** The server's SSL certificate did not match its hostname. */ |
21358 | 108 PURPLE_CONNECTION_ERROR_CERT_HOSTNAME_MISMATCH = 11, |
20064
4da314b1e53e
Create a PurpleDisconnectReason enum (which happens to be identical to
Will Thompson <will.thompson@collabora.co.uk>
parents:
19697
diff
changeset
|
109 /** 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
|
110 * fingerprint. |
4da314b1e53e
Create a PurpleDisconnectReason enum (which happens to be identical to
Will Thompson <will.thompson@collabora.co.uk>
parents:
19697
diff
changeset
|
111 */ |
21358 | 112 PURPLE_CONNECTION_ERROR_CERT_FINGERPRINT_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
|
113 /** The server's SSL certificate is self-signed. */ |
21358 | 114 PURPLE_CONNECTION_ERROR_CERT_SELF_SIGNED = 13, |
20064
4da314b1e53e
Create a PurpleDisconnectReason enum (which happens to be identical to
Will Thompson <will.thompson@collabora.co.uk>
parents:
19697
diff
changeset
|
115 /** 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
|
116 */ |
21358 | 117 PURPLE_CONNECTION_ERROR_CERT_OTHER_ERROR = 14, |
20065
a1c47a5f07f4
Remove non-error PurpleDisconnectReasons, and add PURPLE_REASON_OTHER_ERROR
Will Thompson <will.thompson@collabora.co.uk>
parents:
20064
diff
changeset
|
118 |
a1c47a5f07f4
Remove non-error PurpleDisconnectReasons, and add PURPLE_REASON_OTHER_ERROR
Will Thompson <will.thompson@collabora.co.uk>
parents:
20064
diff
changeset
|
119 /** Some other error occured which fits into none of the other |
a1c47a5f07f4
Remove non-error PurpleDisconnectReasons, and add PURPLE_REASON_OTHER_ERROR
Will Thompson <will.thompson@collabora.co.uk>
parents:
20064
diff
changeset
|
120 * categories. |
a1c47a5f07f4
Remove non-error PurpleDisconnectReasons, and add PURPLE_REASON_OTHER_ERROR
Will Thompson <will.thompson@collabora.co.uk>
parents:
20064
diff
changeset
|
121 */ |
21357
5a3242b676ad
rlaager suggested using the last element of the PurpleDisconnectReason enum
Will Thompson <will.thompson@collabora.co.uk>
parents:
20893
diff
changeset
|
122 /* purple_connection_error_reason() in connection.c uses the fact that |
5a3242b676ad
rlaager suggested using the last element of the PurpleDisconnectReason enum
Will Thompson <will.thompson@collabora.co.uk>
parents:
20893
diff
changeset
|
123 * 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
|
124 * 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
|
125 */ |
21358 | 126 PURPLE_CONNECTION_ERROR_OTHER_ERROR = 15 |
127 } PurpleConnectionError; | |
20064
4da314b1e53e
Create a PurpleDisconnectReason enum (which happens to be identical to
Will Thompson <will.thompson@collabora.co.uk>
parents:
19697
diff
changeset
|
128 |
21374
71c1f2da4ff2
PurpleConnectionErrorPair is a better name for struct { PurpleConnectionError;
Will Thompson <will.thompson@collabora.co.uk>
parents:
21360
diff
changeset
|
129 /** 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
|
130 typedef struct |
71c1f2da4ff2
PurpleConnectionErrorPair is a better name for struct { PurpleConnectionError;
Will Thompson <will.thompson@collabora.co.uk>
parents:
21360
diff
changeset
|
131 { |
71c1f2da4ff2
PurpleConnectionErrorPair is a better name for struct { PurpleConnectionError;
Will Thompson <will.thompson@collabora.co.uk>
parents:
21360
diff
changeset
|
132 /** The type of error. */ |
71c1f2da4ff2
PurpleConnectionErrorPair is a better name for struct { PurpleConnectionError;
Will Thompson <will.thompson@collabora.co.uk>
parents:
21360
diff
changeset
|
133 PurpleConnectionError type; |
71c1f2da4ff2
PurpleConnectionErrorPair is a better name for struct { PurpleConnectionError;
Will Thompson <will.thompson@collabora.co.uk>
parents:
21360
diff
changeset
|
134 /** 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
|
135 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
|
136 } PurpleConnectionErrorInfo; |
21374
71c1f2da4ff2
PurpleConnectionErrorPair is a better name for struct { PurpleConnectionError;
Will Thompson <will.thompson@collabora.co.uk>
parents:
21360
diff
changeset
|
137 |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
138 #include <time.h> |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
139 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
140 #include "account.h" |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
141 #include "plugin.h" |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
142 #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
|
143 #include "sslconn.h" |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
144 |
18835
3750e2e176cb
Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <will.thompson@collabora.co.uk>
parents:
18118
diff
changeset
|
145 /** Connection UI operations. Used to notify the user of changes to |
3750e2e176cb
Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <will.thompson@collabora.co.uk>
parents:
18118
diff
changeset
|
146 * connections, such as being disconnected, and to respond to the |
3750e2e176cb
Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <will.thompson@collabora.co.uk>
parents:
18118
diff
changeset
|
147 * underlying network connection appearing and disappearing. UIs should |
3750e2e176cb
Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <will.thompson@collabora.co.uk>
parents:
18118
diff
changeset
|
148 * call #purple_connections_set_ui_ops() with an instance of this struct. |
3750e2e176cb
Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <will.thompson@collabora.co.uk>
parents:
18118
diff
changeset
|
149 * |
3750e2e176cb
Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <will.thompson@collabora.co.uk>
parents:
18118
diff
changeset
|
150 * @see @ref ui-ops |
3750e2e176cb
Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <will.thompson@collabora.co.uk>
parents:
18118
diff
changeset
|
151 */ |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
152 typedef struct |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
153 { |
18835
3750e2e176cb
Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <will.thompson@collabora.co.uk>
parents:
18118
diff
changeset
|
154 /** When an account is connecting, this operation is called to notify |
3750e2e176cb
Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <will.thompson@collabora.co.uk>
parents:
18118
diff
changeset
|
155 * the UI of what is happening, as well as which @a step out of @a |
3750e2e176cb
Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <will.thompson@collabora.co.uk>
parents:
18118
diff
changeset
|
156 * step_count has been reached (which might be displayed as a progress |
3750e2e176cb
Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <will.thompson@collabora.co.uk>
parents:
18118
diff
changeset
|
157 * bar). |
20066
95b2b7a39585
Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <will.thompson@collabora.co.uk>
parents:
20065
diff
changeset
|
158 * @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
|
159 */ |
3750e2e176cb
Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <will.thompson@collabora.co.uk>
parents:
18118
diff
changeset
|
160 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
|
161 const char *text, |
3750e2e176cb
Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <will.thompson@collabora.co.uk>
parents:
18118
diff
changeset
|
162 size_t step, |
3750e2e176cb
Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <will.thompson@collabora.co.uk>
parents:
18118
diff
changeset
|
163 size_t step_count); |
20066
95b2b7a39585
Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <will.thompson@collabora.co.uk>
parents:
20065
diff
changeset
|
164 |
18835
3750e2e176cb
Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <will.thompson@collabora.co.uk>
parents:
18118
diff
changeset
|
165 /** Called when a connection is established (just before the |
3750e2e176cb
Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <will.thompson@collabora.co.uk>
parents:
18118
diff
changeset
|
166 * @ref signed-on signal). |
3750e2e176cb
Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <will.thompson@collabora.co.uk>
parents:
18118
diff
changeset
|
167 */ |
15822 | 168 void (*connected)(PurpleConnection *gc); |
18835
3750e2e176cb
Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <will.thompson@collabora.co.uk>
parents:
18118
diff
changeset
|
169 /** Called when a connection is ended (between the @ref signing-off |
3750e2e176cb
Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <will.thompson@collabora.co.uk>
parents:
18118
diff
changeset
|
170 * and @ref signed-off signals). |
3750e2e176cb
Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <will.thompson@collabora.co.uk>
parents:
18118
diff
changeset
|
171 */ |
15822 | 172 void (*disconnected)(PurpleConnection *gc); |
20066
95b2b7a39585
Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <will.thompson@collabora.co.uk>
parents:
20065
diff
changeset
|
173 |
18835
3750e2e176cb
Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <will.thompson@collabora.co.uk>
parents:
18118
diff
changeset
|
174 /** Used to display connection-specific notices. (Pidgin's Gtk user |
3750e2e176cb
Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <will.thompson@collabora.co.uk>
parents:
18118
diff
changeset
|
175 * interface implements this as a no-op; #purple_connection_notice(), |
3750e2e176cb
Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <will.thompson@collabora.co.uk>
parents:
18118
diff
changeset
|
176 * which uses this operation, is not used by any of the protocols |
3750e2e176cb
Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <will.thompson@collabora.co.uk>
parents:
18118
diff
changeset
|
177 * shipped with libpurple.) |
3750e2e176cb
Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <will.thompson@collabora.co.uk>
parents:
18118
diff
changeset
|
178 */ |
15822 | 179 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
|
180 |
18835
3750e2e176cb
Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <will.thompson@collabora.co.uk>
parents:
18118
diff
changeset
|
181 /** Called when an error causes a connection to be disconnected. |
3750e2e176cb
Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <will.thompson@collabora.co.uk>
parents:
18118
diff
changeset
|
182 * Called before #disconnected. |
3750e2e176cb
Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <will.thompson@collabora.co.uk>
parents:
18118
diff
changeset
|
183 * @param text a localized error message. |
20066
95b2b7a39585
Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <will.thompson@collabora.co.uk>
parents:
20065
diff
changeset
|
184 * @see #purple_connection_error |
95b2b7a39585
Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <will.thompson@collabora.co.uk>
parents:
20065
diff
changeset
|
185 * @deprecated in favour of |
95b2b7a39585
Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <will.thompson@collabora.co.uk>
parents:
20065
diff
changeset
|
186 * #PurpleConnectionUiOps.report_disconnect_reason. |
18835
3750e2e176cb
Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <will.thompson@collabora.co.uk>
parents:
18118
diff
changeset
|
187 */ |
15822 | 188 void (*report_disconnect)(PurpleConnection *gc, const char *text); |
20066
95b2b7a39585
Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <will.thompson@collabora.co.uk>
parents:
20065
diff
changeset
|
189 |
18835
3750e2e176cb
Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <will.thompson@collabora.co.uk>
parents:
18118
diff
changeset
|
190 /** Called when libpurple discovers that the computer's network |
3750e2e176cb
Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <will.thompson@collabora.co.uk>
parents:
18118
diff
changeset
|
191 * connection is active. On Linux, this uses Network Manager if |
3750e2e176cb
Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <will.thompson@collabora.co.uk>
parents:
18118
diff
changeset
|
192 * available; on Windows, it uses Win32's network change notification |
3750e2e176cb
Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <will.thompson@collabora.co.uk>
parents:
18118
diff
changeset
|
193 * infrastructure. |
3750e2e176cb
Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <will.thompson@collabora.co.uk>
parents:
18118
diff
changeset
|
194 */ |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
195 void (*network_connected)(); |
18835
3750e2e176cb
Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <will.thompson@collabora.co.uk>
parents:
18118
diff
changeset
|
196 /** Called when libpurple discovers that the computer's network |
3750e2e176cb
Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <will.thompson@collabora.co.uk>
parents:
18118
diff
changeset
|
197 * connection has gone away. |
3750e2e176cb
Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <will.thompson@collabora.co.uk>
parents:
18118
diff
changeset
|
198 */ |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
199 void (*network_disconnected)(); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
200 |
20820
bc3c5daaf7aa
Update report_disconnect_reason documentation to match reality. Also include
Will Thompson <will.thompson@collabora.co.uk>
parents:
20818
diff
changeset
|
201 /** Called when an error causes a connection to be disconnected. |
bc3c5daaf7aa
Update report_disconnect_reason documentation to match reality. Also include
Will Thompson <will.thompson@collabora.co.uk>
parents:
20818
diff
changeset
|
202 * Called before #disconnected. This op is intended to replace |
bc3c5daaf7aa
Update report_disconnect_reason documentation to match reality. Also include
Will Thompson <will.thompson@collabora.co.uk>
parents:
20818
diff
changeset
|
203 * #report_disconnect. If both are implemented, this will be called |
bc3c5daaf7aa
Update report_disconnect_reason documentation to match reality. Also include
Will Thompson <will.thompson@collabora.co.uk>
parents:
20818
diff
changeset
|
204 * first; however, there's no real reason to implement both. |
20066
95b2b7a39585
Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <will.thompson@collabora.co.uk>
parents:
20065
diff
changeset
|
205 * @param reason why the connection ended, if known, or |
21358 | 206 * #PURPLE_CONNECTION_ERROR_OTHER_ERROR, if not. |
20066
95b2b7a39585
Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <will.thompson@collabora.co.uk>
parents:
20065
diff
changeset
|
207 * @param text a localized message describing the disconnection |
95b2b7a39585
Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <will.thompson@collabora.co.uk>
parents:
20065
diff
changeset
|
208 * in more detail to the user. |
95b2b7a39585
Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <will.thompson@collabora.co.uk>
parents:
20065
diff
changeset
|
209 * @see #purple_connection_error_reason |
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
|
210 * @since 2.3.0 |
20066
95b2b7a39585
Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <will.thompson@collabora.co.uk>
parents:
20065
diff
changeset
|
211 */ |
95b2b7a39585
Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <will.thompson@collabora.co.uk>
parents:
20065
diff
changeset
|
212 void (*report_disconnect_reason)(PurpleConnection *gc, |
21358 | 213 PurpleConnectionError reason, |
20066
95b2b7a39585
Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <will.thompson@collabora.co.uk>
parents:
20065
diff
changeset
|
214 const char *text); |
95b2b7a39585
Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <will.thompson@collabora.co.uk>
parents:
20065
diff
changeset
|
215 |
16664
516f14bef90e
Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents:
15822
diff
changeset
|
216 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
|
217 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
|
218 void (*_purple_reserved3)(void); |
15822 | 219 } PurpleConnectionUiOps; |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
220 |
15822 | 221 struct _PurpleConnection |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
222 { |
15822 | 223 PurplePlugin *prpl; /**< The protocol plugin. */ |
224 PurpleConnectionFlags flags; /**< Connection flags. */ | |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
225 |
15822 | 226 PurpleConnectionState state; /**< The connection state. */ |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
227 |
15822 | 228 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
|
229 char *password; /**< The password used. */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
230 int inpa; /**< The input watcher. */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
231 |
20813
66e7b104b4ea
rlaager pointed out that purple_connection_error_reason should be setting
Will Thompson <will.thompson@collabora.co.uk>
parents:
20812
diff
changeset
|
232 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
|
233 (#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
|
234 #PURPLE_CONV_TYPE_CHAT). */ |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
235 void *proto_data; /**< Protocol-specific data. */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
236 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
237 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
|
238 guint keepalive; /**< Keep-alive. */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
239 |
20813
66e7b104b4ea
rlaager pointed out that purple_connection_error_reason should be setting
Will Thompson <will.thompson@collabora.co.uk>
parents:
20812
diff
changeset
|
240 /** 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
|
241 * 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
|
242 * reconnected (incorrect password, etc.). prpls should rely on |
66e7b104b4ea
rlaager pointed out that purple_connection_error_reason should be setting
Will Thompson <will.thompson@collabora.co.uk>
parents:
20812
diff
changeset
|
243 * purple_connection_error_reason() to set this for them rather than |
66e7b104b4ea
rlaager pointed out that purple_connection_error_reason should be setting
Will Thompson <will.thompson@collabora.co.uk>
parents:
20812
diff
changeset
|
244 * setting it themselves. |
21358 | 245 * @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
|
246 */ |
66e7b104b4ea
rlaager pointed out that purple_connection_error_reason should be setting
Will Thompson <will.thompson@collabora.co.uk>
parents:
20812
diff
changeset
|
247 gboolean wants_to_die; |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
248 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
249 guint disconnect_timeout; /**< Timer used for nasty stack tricks */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
250 }; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
251 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
252 #ifdef __cplusplus |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
253 extern "C" { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
254 #endif |
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 /**************************************************************************/ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
257 /** @name Connection API */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
258 /**************************************************************************/ |
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 |
21241
d8990c20cbee
Mark some libpurple-internal functions as deprecated to further help keep
Richard Laager <rlaager@wiktel.com>
parents:
20799
diff
changeset
|
261 #ifndef PURPLE_DISABLE_DEPRECATED |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
262 /** |
15822 | 263 * This function should only be called by purple_account_connect() |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
264 * in account.c. If you're trying to sign on an account, use that |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
265 * function instead. |
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 * Creates a connection to the specified account and either connects |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
268 * or attempts to register a new account. If you are logging in, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
269 * the connection uses the current active status for this account. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
270 * So if you want to sign on as "away," for example, you need to |
15822 | 271 * have called purple_account_set_status(account, "away"). |
272 * (And this will call purple_account_connect() automatically). | |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
273 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
274 * @param account The account the connection should be connecting to. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
275 * @param regist Whether we are registering a new account or just |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
276 * trying to do a normal signon. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
277 * @param password The password to use. |
21241
d8990c20cbee
Mark some libpurple-internal functions as deprecated to further help keep
Richard Laager <rlaager@wiktel.com>
parents:
20799
diff
changeset
|
278 * |
d8990c20cbee
Mark some libpurple-internal functions as deprecated to further help keep
Richard Laager <rlaager@wiktel.com>
parents:
20799
diff
changeset
|
279 * @deprecated As this is internal, we should make it private in 3.0.0. |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
280 */ |
15822 | 281 void purple_connection_new(PurpleAccount *account, gboolean regist, |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
282 const char *password); |
21241
d8990c20cbee
Mark some libpurple-internal functions as deprecated to further help keep
Richard Laager <rlaager@wiktel.com>
parents:
20799
diff
changeset
|
283 #endif |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
284 |
21241
d8990c20cbee
Mark some libpurple-internal functions as deprecated to further help keep
Richard Laager <rlaager@wiktel.com>
parents:
20799
diff
changeset
|
285 #ifndef PURPLE_DISABLE_DEPRECATED |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
286 /** |
18703
033b128f7c21
Added unregistering XMPP accounts. This requires a new prpl-struct entry, but I got an ok for that on the mailing list.
Andreas Monitzer <pidgin@monitzer.com>
parents:
18118
diff
changeset
|
287 * This function should only be called by purple_account_unregister() |
033b128f7c21
Added unregistering XMPP accounts. This requires a new prpl-struct entry, but I got an ok for that on the mailing list.
Andreas Monitzer <pidgin@monitzer.com>
parents:
18118
diff
changeset
|
288 * in account.c. |
033b128f7c21
Added unregistering XMPP accounts. This requires a new prpl-struct entry, but I got an ok for that on the mailing list.
Andreas Monitzer <pidgin@monitzer.com>
parents:
18118
diff
changeset
|
289 * |
033b128f7c21
Added unregistering XMPP accounts. This requires a new prpl-struct entry, but I got an ok for that on the mailing list.
Andreas Monitzer <pidgin@monitzer.com>
parents:
18118
diff
changeset
|
290 * Tries to unregister the account on the server. If the account is not |
033b128f7c21
Added unregistering XMPP accounts. This requires a new prpl-struct entry, but I got an ok for that on the mailing list.
Andreas Monitzer <pidgin@monitzer.com>
parents:
18118
diff
changeset
|
291 * connected, also creates a new connection. |
033b128f7c21
Added unregistering XMPP accounts. This requires a new prpl-struct entry, but I got an ok for that on the mailing list.
Andreas Monitzer <pidgin@monitzer.com>
parents:
18118
diff
changeset
|
292 * |
033b128f7c21
Added unregistering XMPP accounts. This requires a new prpl-struct entry, but I got an ok for that on the mailing list.
Andreas Monitzer <pidgin@monitzer.com>
parents:
18118
diff
changeset
|
293 * @param account The account to unregister |
033b128f7c21
Added unregistering XMPP accounts. This requires a new prpl-struct entry, but I got an ok for that on the mailing list.
Andreas Monitzer <pidgin@monitzer.com>
parents:
18118
diff
changeset
|
294 * @param password The password to use. |
21241
d8990c20cbee
Mark some libpurple-internal functions as deprecated to further help keep
Richard Laager <rlaager@wiktel.com>
parents:
20799
diff
changeset
|
295 * @param cb Optional callback to be called when unregistration is complete |
d8990c20cbee
Mark some libpurple-internal functions as deprecated to further help keep
Richard Laager <rlaager@wiktel.com>
parents:
20799
diff
changeset
|
296 * @param user_data user data to pass to the callback |
d8990c20cbee
Mark some libpurple-internal functions as deprecated to further help keep
Richard Laager <rlaager@wiktel.com>
parents:
20799
diff
changeset
|
297 * |
d8990c20cbee
Mark some libpurple-internal functions as deprecated to further help keep
Richard Laager <rlaager@wiktel.com>
parents:
20799
diff
changeset
|
298 * @deprecated As this is internal, we should make it private in 3.0.0. |
18703
033b128f7c21
Added unregistering XMPP accounts. This requires a new prpl-struct entry, but I got an ok for that on the mailing list.
Andreas Monitzer <pidgin@monitzer.com>
parents:
18118
diff
changeset
|
299 */ |
18920
2a9d60d7af82
Implemented a callback for unregistering, mirroring the registration callback. Since this is a new API, I can do it properly by passing it right in the unregister function call, instead of having a separate function for setting it.
Andreas Monitzer <pidgin@monitzer.com>
parents:
18703
diff
changeset
|
300 void purple_connection_new_unregister(PurpleAccount *account, const char *password, PurpleAccountUnregistrationCb cb, void *user_data); |
21241
d8990c20cbee
Mark some libpurple-internal functions as deprecated to further help keep
Richard Laager <rlaager@wiktel.com>
parents:
20799
diff
changeset
|
301 #endif |
18703
033b128f7c21
Added unregistering XMPP accounts. This requires a new prpl-struct entry, but I got an ok for that on the mailing list.
Andreas Monitzer <pidgin@monitzer.com>
parents:
18118
diff
changeset
|
302 |
21241
d8990c20cbee
Mark some libpurple-internal functions as deprecated to further help keep
Richard Laager <rlaager@wiktel.com>
parents:
20799
diff
changeset
|
303 #ifndef PURPLE_DISABLE_DEPRECATED |
18703
033b128f7c21
Added unregistering XMPP accounts. This requires a new prpl-struct entry, but I got an ok for that on the mailing list.
Andreas Monitzer <pidgin@monitzer.com>
parents:
18118
diff
changeset
|
304 /** |
15822 | 305 * Disconnects and destroys a PurpleConnection. |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
306 * |
15822 | 307 * This function should only be called by purple_account_disconnect() |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
308 * in account.c. If you're trying to sign off an account, use that |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
309 * function instead. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
310 * |
15822 | 311 * @param gc The purple connection to destroy. |
21241
d8990c20cbee
Mark some libpurple-internal functions as deprecated to further help keep
Richard Laager <rlaager@wiktel.com>
parents:
20799
diff
changeset
|
312 * |
d8990c20cbee
Mark some libpurple-internal functions as deprecated to further help keep
Richard Laager <rlaager@wiktel.com>
parents:
20799
diff
changeset
|
313 * @deprecated As this is internal, we should make it private in 3.0.0. |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
314 */ |
15822 | 315 void purple_connection_destroy(PurpleConnection *gc); |
21241
d8990c20cbee
Mark some libpurple-internal functions as deprecated to further help keep
Richard Laager <rlaager@wiktel.com>
parents:
20799
diff
changeset
|
316 #endif |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
317 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
318 /** |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
319 * 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
|
320 * 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
|
321 * 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
|
322 * 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
|
323 * your status, then the account is online. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
324 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
325 * @param gc The connection. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
326 * @param state The connection state. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
327 */ |
15822 | 328 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
|
329 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
330 /** |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
331 * Sets the connection's account. |
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 * @param gc The connection. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
334 * @param account The account. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
335 */ |
15822 | 336 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
|
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 * Sets the connection's displayed name. |
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 * @param name The displayed name. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
343 */ |
15822 | 344 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
|
345 |
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 * Returns the connection state. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
348 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
349 * @param gc The connection. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
350 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
351 * @return The connection state. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
352 */ |
15822 | 353 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
|
354 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
355 /** |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
356 * 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
|
357 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
358 * @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
|
359 */ |
15822 | 360 #define PURPLE_CONNECTION_IS_CONNECTED(gc) \ |
361 (gc->state == PURPLE_CONNECTED) | |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
362 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
363 /** |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
364 * Returns the connection's account. |
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 * @param gc The connection. |
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 * @return The connection's account. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
369 */ |
15822 | 370 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
|
371 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
372 /** |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
373 * Returns the connection's password. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
374 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
375 * @param gc The connection. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
376 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
377 * @return The connection's password. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
378 */ |
15822 | 379 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
|
380 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
381 /** |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
382 * Returns the connection's displayed name. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
383 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
384 * @param gc The connection. |
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 * @return The connection's displayed name. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
387 */ |
15822 | 388 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
|
389 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
390 /** |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
391 * Updates the connection progress. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
392 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
393 * @param gc The connection. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
394 * @param text Information on the current step. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
395 * @param step The current step. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
396 * @param count The total number of steps. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
397 */ |
15822 | 398 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
|
399 size_t step, size_t count); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
400 |
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 * Displays a connection-specific notice. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
403 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
404 * @param gc The connection. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
405 * @param text The notice text. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
406 */ |
15822 | 407 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
|
408 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
409 /** |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
410 * Closes a connection with an error. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
411 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
412 * @param gc The connection. |
21359
fe57b8062249
Document that the char * parameter of purple_connection_error{,_reason} may
Will Thompson <will.thompson@collabora.co.uk>
parents:
21358
diff
changeset
|
413 * @param reason The error text, which may not be @c NULL. |
20066
95b2b7a39585
Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <will.thompson@collabora.co.uk>
parents:
20065
diff
changeset
|
414 * @deprecated in favour of #purple_connection_error_reason. Calling |
95b2b7a39585
Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <will.thompson@collabora.co.uk>
parents:
20065
diff
changeset
|
415 * @c purple_connection_error(gc, text) is equivalent to calling |
20813
66e7b104b4ea
rlaager pointed out that purple_connection_error_reason should be setting
Will Thompson <will.thompson@collabora.co.uk>
parents:
20812
diff
changeset
|
416 * @c purple_connection_error_reason(gc, reason, text) where @c reason is |
21358 | 417 * #PURPLE_CONNECTION_ERROR_OTHER_ERROR if @c gc->wants_to_die is @c TRUE, and |
418 * #PURPLE_CONNECTION_ERROR_NETWORK_ERROR if not. (This is to keep | |
419 * auto-reconnection behaviour the same when using old prpls which don't use | |
420 * reasons yet.) | |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
421 */ |
15822 | 422 void purple_connection_error(PurpleConnection *gc, const char *reason); |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
423 |
20066
95b2b7a39585
Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <will.thompson@collabora.co.uk>
parents:
20065
diff
changeset
|
424 /** |
21359
fe57b8062249
Document that the char * parameter of purple_connection_error{,_reason} may
Will Thompson <will.thompson@collabora.co.uk>
parents:
21358
diff
changeset
|
425 * 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
|
426 * 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
|
427 * #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
|
428 * backwards-compatibility. |
20066
95b2b7a39585
Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <will.thompson@collabora.co.uk>
parents:
20065
diff
changeset
|
429 * |
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
|
430 * @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
|
431 * @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
|
432 * @param description a non-@c NULL localized description of the error. |
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
|
433 * @since 2.3.0 |
20066
95b2b7a39585
Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <will.thompson@collabora.co.uk>
parents:
20065
diff
changeset
|
434 */ |
95b2b7a39585
Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <will.thompson@collabora.co.uk>
parents:
20065
diff
changeset
|
435 void |
95b2b7a39585
Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <will.thompson@collabora.co.uk>
parents:
20065
diff
changeset
|
436 purple_connection_error_reason (PurpleConnection *gc, |
21358 | 437 PurpleConnectionError reason, |
20066
95b2b7a39585
Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <will.thompson@collabora.co.uk>
parents:
20065
diff
changeset
|
438 const char *description); |
95b2b7a39585
Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <will.thompson@collabora.co.uk>
parents:
20065
diff
changeset
|
439 |
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
|
440 /** |
20115
a68d51d60177
Create purple_connection_ssl_error(), which converts a PurpleSslErrorType
Will Thompson <will.thompson@collabora.co.uk>
parents:
20114
diff
changeset
|
441 * Closes a connection due to an SSL error; this is basically a shortcut to |
21358 | 442 * turning the #PurpleSslErrorType into a #PurpleConnectionError and a |
20115
a68d51d60177
Create purple_connection_ssl_error(), which converts a PurpleSslErrorType
Will Thompson <will.thompson@collabora.co.uk>
parents:
20114
diff
changeset
|
443 * human-readable string and then calling purple_connection_error_reason(). |
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
|
444 * @since 2.3.0 |
20115
a68d51d60177
Create purple_connection_ssl_error(), which converts a PurpleSslErrorType
Will Thompson <will.thompson@collabora.co.uk>
parents:
20114
diff
changeset
|
445 */ |
a68d51d60177
Create purple_connection_ssl_error(), which converts a PurpleSslErrorType
Will Thompson <will.thompson@collabora.co.uk>
parents:
20114
diff
changeset
|
446 void |
a68d51d60177
Create purple_connection_ssl_error(), which converts a PurpleSslErrorType
Will Thompson <will.thompson@collabora.co.uk>
parents:
20114
diff
changeset
|
447 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
|
448 PurpleSslErrorType ssl_error); |
a68d51d60177
Create purple_connection_ssl_error(), which converts a PurpleSslErrorType
Will Thompson <will.thompson@collabora.co.uk>
parents:
20114
diff
changeset
|
449 |
a68d51d60177
Create purple_connection_ssl_error(), which converts a PurpleSslErrorType
Will Thompson <will.thompson@collabora.co.uk>
parents:
20114
diff
changeset
|
450 /** |
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
|
451 * 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
|
452 * 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
|
453 * 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
|
454 * 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
|
455 * 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
|
456 * 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
|
457 * is @c FALSE. On the other hand, |
21358 | 458 * #PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED probably indicates a |
459 * 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
|
460 * <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
|
461 * (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
|
462 * |
143c6f34c6eb
Create purple_connection_reason_is_fatal, which is basically a replacement for
Will Thompson <will.thompson@collabora.co.uk>
parents:
20066
diff
changeset
|
463 * (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
|
464 * |
20818
c560286daede
Clarify the documentation of the return value of
Will Thompson <will.thompson@collabora.co.uk>
parents:
20813
diff
changeset
|
465 * @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
|
466 * @c FALSE otherwise. |
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
|
467 * @since 2.3.0 |
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
|
468 */ |
143c6f34c6eb
Create purple_connection_reason_is_fatal, which is basically a replacement for
Will Thompson <will.thompson@collabora.co.uk>
parents:
20066
diff
changeset
|
469 gboolean |
21358 | 470 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
|
471 |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
472 /*@}*/ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
473 |
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 /** @name Connections API */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
476 /**************************************************************************/ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
477 /*@{*/ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
478 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
479 /** |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
480 * Disconnects from all connections. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
481 */ |
15822 | 482 void purple_connections_disconnect_all(void); |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
483 |
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 * 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
|
486 * 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
|
487 * |
18118
ab6d2763b8d8
Re-fix the DBus list handling code by killing const GList* / const GSList*
Richard Laager <rlaager@wiktel.com>
parents:
18063
diff
changeset
|
488 * @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
|
489 */ |
18063
926ccb104da0
disapproval of revision '1411afd7660760db59966c3a9f18e2adab8eb27e'
Richard Laager <rlaager@wiktel.com>
parents:
18058
diff
changeset
|
490 GList *purple_connections_get_all(void); |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
491 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
492 /** |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
493 * 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
|
494 * |
18118
ab6d2763b8d8
Re-fix the DBus list handling code by killing const GList* / const GSList*
Richard Laager <rlaager@wiktel.com>
parents:
18063
diff
changeset
|
495 * @constreturn A list of connecting connections. |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
496 */ |
18063
926ccb104da0
disapproval of revision '1411afd7660760db59966c3a9f18e2adab8eb27e'
Richard Laager <rlaager@wiktel.com>
parents:
18058
diff
changeset
|
497 GList *purple_connections_get_connecting(void); |
15373
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 /** |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
500 * 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
|
501 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
502 * @return @c TRUE if gc is valid. |
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 /* |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
505 * 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
|
506 * a gross fix for a crashy problem. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
507 */ |
18063
926ccb104da0
disapproval of revision '1411afd7660760db59966c3a9f18e2adab8eb27e'
Richard Laager <rlaager@wiktel.com>
parents:
18058
diff
changeset
|
508 #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
|
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 |
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 /** @name UI Registration Functions */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
514 /**************************************************************************/ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
515 /*@{*/ |
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 * 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
|
519 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
520 * @param ops The UI operations structure. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
521 */ |
15822 | 522 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
|
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 * 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
|
526 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
527 * @return The UI operations structure in use. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
528 */ |
15822 | 529 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
|
530 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
531 /*@}*/ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
532 |
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 /** @name Connections Subsystem */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
535 /**************************************************************************/ |
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 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
538 /** |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
539 * Initializes the connections subsystem. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
540 */ |
15822 | 541 void purple_connections_init(void); |
15373
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 /** |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
544 * Uninitializes the connections subsystem. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
545 */ |
15822 | 546 void purple_connections_uninit(void); |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
547 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
548 /** |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
549 * Returns the handle to the connections subsystem. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
550 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
551 * @return The connections subsystem handle. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
552 */ |
15822 | 553 void *purple_connections_get_handle(void); |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
554 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
555 /*@}*/ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
556 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
557 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
558 #ifdef __cplusplus |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
559 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
560 #endif |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
561 |
15822 | 562 #endif /* _PURPLE_CONNECTION_H_ */ |