libpurple/connection.h

Sun, 28 Oct 2007 18:03:14 +0000

author
Will Thompson <resiak@pidgin.im>
date
Sun, 28 Oct 2007 18:03:14 +0000
branch
cpw.resiak.disconnectreason
changeset 21297
9c34edc92ad2
parent 21295
46659b1bf31f
child 21298
d0d9cfaf3fe7
permissions
-rw-r--r--

Document the gc parameter of purple_connection_error_reason to shut doxygen up.

5563
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1 /**
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
2 * @file connection.h Connection API
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
3 * @ingroup core
20889
3d0ef192f98c All the links to libpurple signal pages were in the comment containing the
Will Thompson <resiak@pidgin.im>
parents: 20147
diff changeset
4 * @see @ref connection-signals
20147
66f05a854eee applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents: 19897
diff changeset
5 */
66f05a854eee applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents: 19897
diff changeset
6
66f05a854eee applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents: 19897
diff changeset
7 /* purple
5563
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
8 *
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
9 * Purple is the legal property of its developers, whose names are too numerous
8046
c581b20a47d6 [gaim-migrate @ 8730]
Sean Egan <seanegan@pidgin.im>
parents: 7122
diff changeset
10 * to list here. Please refer to the COPYRIGHT file distributed with this
c581b20a47d6 [gaim-migrate @ 8730]
Sean Egan <seanegan@pidgin.im>
parents: 7122
diff changeset
11 * source distribution.
6460
fc288e7221ca [gaim-migrate @ 6969]
Christian Hammond <chipx86@chipx86.com>
parents: 6393
diff changeset
12 *
5563
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
13 * This program is free software; you can redistribute it and/or modify
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
14 * it under the terms of the GNU General Public License as published by
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
15 * the Free Software Foundation; either version 2 of the License, or
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
16 * (at your option) any later version.
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
17 *
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
18 * This program is distributed in the hope that it will be useful,
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
21 * GNU General Public License for more details.
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
22 *
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
23 * You should have received a copy of the GNU General Public License
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
24 * along with this program; if not, write to the Free Software
19859
71d37b57eff2 The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 19128
diff changeset
25 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
5563
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
26 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
27 #ifndef _PURPLE_CONNECTION_H_
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
28 #define _PURPLE_CONNECTION_H_
5563
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
29
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
30 typedef struct _PurpleConnection PurpleConnection;
5563
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
31
6622
277eb0b14653 [gaim-migrate @ 7146]
Robert McQueen <robot101@debian.org>
parents: 6605
diff changeset
32 /**
277eb0b14653 [gaim-migrate @ 7146]
Robert McQueen <robot101@debian.org>
parents: 6605
diff changeset
33 * Flags to change behavior of the client for a given connection.
277eb0b14653 [gaim-migrate @ 7146]
Robert McQueen <robot101@debian.org>
parents: 6605
diff changeset
34 */
277eb0b14653 [gaim-migrate @ 7146]
Robert McQueen <robot101@debian.org>
parents: 6605
diff changeset
35 typedef enum
277eb0b14653 [gaim-migrate @ 7146]
Robert McQueen <robot101@debian.org>
parents: 6605
diff changeset
36 {
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
37 PURPLE_CONNECTION_HTML = 0x0001, /**< Connection sends/receives in 'HTML'. */
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
38 PURPLE_CONNECTION_NO_BGCOLOR = 0x0002, /**< Connection does not send/receive
6982
12f08de92674 [gaim-migrate @ 7538]
Mark Doliner <markdoliner@pidgin.im>
parents: 6724
diff changeset
39 background colors. */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
40 PURPLE_CONNECTION_AUTO_RESP = 0x0004, /**< Send auto responses when away. */
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
41 PURPLE_CONNECTION_FORMATTING_WBFO = 0x0008, /**< The text buffer must be formatted as a whole */
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
42 PURPLE_CONNECTION_NO_NEWLINES = 0x0010, /**< No new lines are allowed in outgoing messages */
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
43 PURPLE_CONNECTION_NO_FONTSIZE = 0x0020, /**< Connection does not send/receive font sizes */
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
44 PURPLE_CONNECTION_NO_URLDESC = 0x0040, /**< Connection does not support descriptions with links */
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
45 PURPLE_CONNECTION_NO_IMAGES = 0x0080, /**< Connection does not support sending of images */
10008
1de3454a0dca [gaim-migrate @ 10925]
Mark Doliner <markdoliner@pidgin.im>
parents: 9981
diff changeset
46
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
47 } PurpleConnectionFlags;
5872
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5733
diff changeset
48
5563
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
49 typedef enum
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
50 {
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
51 PURPLE_DISCONNECTED = 0, /**< Disconnected. */
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
52 PURPLE_CONNECTED, /**< Connected. */
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
53 PURPLE_CONNECTING /**< Connecting. */
5563
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
54
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
55 } PurpleConnectionState;
5563
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
56
21161
2ac0dff512ae Add "@since 2.3.0" annotations to the new API, as advocated by rlaager.
Will Thompson <resiak@pidgin.im>
parents: 21157
diff changeset
57 /** Possible errors that can cause a connection to be closed.
2ac0dff512ae Add "@since 2.3.0" annotations to the new API, as advocated by rlaager.
Will Thompson <resiak@pidgin.im>
parents: 21157
diff changeset
58 * @since 2.3.0
2ac0dff512ae Add "@since 2.3.0" annotations to the new API, as advocated by rlaager.
Will Thompson <resiak@pidgin.im>
parents: 21157
diff changeset
59 */
20428
5526fe433c91 Create a PurpleDisconnectReason enum (which happens to be identical to
Will Thompson <resiak@pidgin.im>
parents: 19897
diff changeset
60 typedef enum
5526fe433c91 Create a PurpleDisconnectReason enum (which happens to be identical to
Will Thompson <resiak@pidgin.im>
parents: 19897
diff changeset
61 {
20442
97e2d532c2ac Clarified the meaning of PURPLE_REASON_NETWORK_ERROR and
Will Thompson <resiak@pidgin.im>
parents: 20438
diff changeset
62 /** There was an error sending or receiving on the network socket, or
97e2d532c2ac Clarified the meaning of PURPLE_REASON_NETWORK_ERROR and
Will Thompson <resiak@pidgin.im>
parents: 20438
diff changeset
63 * there was some protocol error (such as the server sending malformed
97e2d532c2ac Clarified the meaning of PURPLE_REASON_NETWORK_ERROR and
Will Thompson <resiak@pidgin.im>
parents: 20438
diff changeset
64 * data).
97e2d532c2ac Clarified the meaning of PURPLE_REASON_NETWORK_ERROR and
Will Thompson <resiak@pidgin.im>
parents: 20438
diff changeset
65 */
21279
40685e1f50ca Rename:
Will Thompson <resiak@pidgin.im>
parents: 21278
diff changeset
66 PURPLE_CONNECTION_ERROR_NETWORK_ERROR = 0,
20442
97e2d532c2ac Clarified the meaning of PURPLE_REASON_NETWORK_ERROR and
Will Thompson <resiak@pidgin.im>
parents: 20438
diff changeset
67 /** The username or password (or some other credential) was incorrect.
97e2d532c2ac Clarified the meaning of PURPLE_REASON_NETWORK_ERROR and
Will Thompson <resiak@pidgin.im>
parents: 20438
diff changeset
68 */
21279
40685e1f50ca Rename:
Will Thompson <resiak@pidgin.im>
parents: 21278
diff changeset
69 PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED = 1,
20442
97e2d532c2ac Clarified the meaning of PURPLE_REASON_NETWORK_ERROR and
Will Thompson <resiak@pidgin.im>
parents: 20438
diff changeset
70 /** libpurple doesn't speak any of the authentication methods the
97e2d532c2ac Clarified the meaning of PURPLE_REASON_NETWORK_ERROR and
Will Thompson <resiak@pidgin.im>
parents: 20438
diff changeset
71 * server offered.
97e2d532c2ac Clarified the meaning of PURPLE_REASON_NETWORK_ERROR and
Will Thompson <resiak@pidgin.im>
parents: 20438
diff changeset
72 */
21279
40685e1f50ca Rename:
Will Thompson <resiak@pidgin.im>
parents: 21278
diff changeset
73 PURPLE_CONNECTION_ERROR_AUTHENTICATION_IMPOSSIBLE = 2,
20882
04bbf1786e15 Split the "you don't have SSL support" meaning of
Will Thompson <resiak@pidgin.im>
parents: 20456
diff changeset
74 /** libpurple was built without SSL support, and the connection needs
04bbf1786e15 Split the "you don't have SSL support" meaning of
Will Thompson <resiak@pidgin.im>
parents: 20456
diff changeset
75 * SSL.
04bbf1786e15 Split the "you don't have SSL support" meaning of
Will Thompson <resiak@pidgin.im>
parents: 20456
diff changeset
76 */
21279
40685e1f50ca Rename:
Will Thompson <resiak@pidgin.im>
parents: 21278
diff changeset
77 PURPLE_CONNECTION_ERROR_NO_SSL_SUPPORT = 3,
20882
04bbf1786e15 Split the "you don't have SSL support" meaning of
Will Thompson <resiak@pidgin.im>
parents: 20456
diff changeset
78 /** There was an error negotiating SSL on this connection, or the
04bbf1786e15 Split the "you don't have SSL support" meaning of
Will Thompson <resiak@pidgin.im>
parents: 20456
diff changeset
79 * server does not support encryption but an account option was set to
04bbf1786e15 Split the "you don't have SSL support" meaning of
Will Thompson <resiak@pidgin.im>
parents: 20456
diff changeset
80 * require it.
20428
5526fe433c91 Create a PurpleDisconnectReason enum (which happens to be identical to
Will Thompson <resiak@pidgin.im>
parents: 19897
diff changeset
81 */
21279
40685e1f50ca Rename:
Will Thompson <resiak@pidgin.im>
parents: 21278
diff changeset
82 PURPLE_CONNECTION_ERROR_ENCRYPTION_ERROR = 4,
20428
5526fe433c91 Create a PurpleDisconnectReason enum (which happens to be identical to
Will Thompson <resiak@pidgin.im>
parents: 19897
diff changeset
83 /** Someone is already connected to the server using the name you are
5526fe433c91 Create a PurpleDisconnectReason enum (which happens to be identical to
Will Thompson <resiak@pidgin.im>
parents: 19897
diff changeset
84 * trying to connect with.
5526fe433c91 Create a PurpleDisconnectReason enum (which happens to be identical to
Will Thompson <resiak@pidgin.im>
parents: 19897
diff changeset
85 */
21279
40685e1f50ca Rename:
Will Thompson <resiak@pidgin.im>
parents: 21278
diff changeset
86 PURPLE_CONNECTION_ERROR_NAME_IN_USE = 5,
20428
5526fe433c91 Create a PurpleDisconnectReason enum (which happens to be identical to
Will Thompson <resiak@pidgin.im>
parents: 19897
diff changeset
87
20456
77550b97ebf2 Rename PURPLE_REASON_INVALID_USERNAME to PURPLE_REASON_INVALID_SETTINGS, so it
Will Thompson <resiak@pidgin.im>
parents: 20443
diff changeset
88 /** The username/server/other preference for the account isn't valid.
77550b97ebf2 Rename PURPLE_REASON_INVALID_USERNAME to PURPLE_REASON_INVALID_SETTINGS, so it
Will Thompson <resiak@pidgin.im>
parents: 20443
diff changeset
89 * For instance, on IRC the screen name cannot contain white space.
77550b97ebf2 Rename PURPLE_REASON_INVALID_USERNAME to PURPLE_REASON_INVALID_SETTINGS, so it
Will Thompson <resiak@pidgin.im>
parents: 20443
diff changeset
90 * This reason should not be used for incorrect passwords etc: use
21279
40685e1f50ca Rename:
Will Thompson <resiak@pidgin.im>
parents: 21278
diff changeset
91 * #PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED for that.
20456
77550b97ebf2 Rename PURPLE_REASON_INVALID_USERNAME to PURPLE_REASON_INVALID_SETTINGS, so it
Will Thompson <resiak@pidgin.im>
parents: 20443
diff changeset
92 *
20438
cbb156152b0e Add PURPLE_REASON_INVALID_USERNAME, which should go away as soon as there's
Will Thompson <resiak@pidgin.im>
parents: 20434
diff changeset
93 * @todo This reason really shouldn't be necessary. Usernames and
cbb156152b0e Add PURPLE_REASON_INVALID_USERNAME, which should go away as soon as there's
Will Thompson <resiak@pidgin.im>
parents: 20434
diff changeset
94 * other account preferences should be validated when the
cbb156152b0e Add PURPLE_REASON_INVALID_USERNAME, which should go away as soon as there's
Will Thompson <resiak@pidgin.im>
parents: 20434
diff changeset
95 * account is created.
cbb156152b0e Add PURPLE_REASON_INVALID_USERNAME, which should go away as soon as there's
Will Thompson <resiak@pidgin.im>
parents: 20434
diff changeset
96 */
21279
40685e1f50ca Rename:
Will Thompson <resiak@pidgin.im>
parents: 21278
diff changeset
97 PURPLE_CONNECTION_ERROR_INVALID_SETTINGS = 6,
20438
cbb156152b0e Add PURPLE_REASON_INVALID_USERNAME, which should go away as soon as there's
Will Thompson <resiak@pidgin.im>
parents: 20434
diff changeset
98
20428
5526fe433c91 Create a PurpleDisconnectReason enum (which happens to be identical to
Will Thompson <resiak@pidgin.im>
parents: 19897
diff changeset
99 /** The server did not provide a SSL certificate. */
21279
40685e1f50ca Rename:
Will Thompson <resiak@pidgin.im>
parents: 21278
diff changeset
100 PURPLE_CONNECTION_ERROR_CERT_NOT_PROVIDED = 7,
20428
5526fe433c91 Create a PurpleDisconnectReason enum (which happens to be identical to
Will Thompson <resiak@pidgin.im>
parents: 19897
diff changeset
101 /** The server's SSL certificate could not be trusted. */
21279
40685e1f50ca Rename:
Will Thompson <resiak@pidgin.im>
parents: 21278
diff changeset
102 PURPLE_CONNECTION_ERROR_CERT_UNTRUSTED = 8,
20428
5526fe433c91 Create a PurpleDisconnectReason enum (which happens to be identical to
Will Thompson <resiak@pidgin.im>
parents: 19897
diff changeset
103 /** The server's SSL certificate has expired. */
21279
40685e1f50ca Rename:
Will Thompson <resiak@pidgin.im>
parents: 21278
diff changeset
104 PURPLE_CONNECTION_ERROR_CERT_EXPIRED = 9,
20428
5526fe433c91 Create a PurpleDisconnectReason enum (which happens to be identical to
Will Thompson <resiak@pidgin.im>
parents: 19897
diff changeset
105 /** The server's SSL certificate is not yet valid. */
21279
40685e1f50ca Rename:
Will Thompson <resiak@pidgin.im>
parents: 21278
diff changeset
106 PURPLE_CONNECTION_ERROR_CERT_NOT_ACTIVATED = 10,
20428
5526fe433c91 Create a PurpleDisconnectReason enum (which happens to be identical to
Will Thompson <resiak@pidgin.im>
parents: 19897
diff changeset
107 /** The server's SSL certificate did not match its hostname. */
21279
40685e1f50ca Rename:
Will Thompson <resiak@pidgin.im>
parents: 21278
diff changeset
108 PURPLE_CONNECTION_ERROR_CERT_HOSTNAME_MISMATCH = 11,
20428
5526fe433c91 Create a PurpleDisconnectReason enum (which happens to be identical to
Will Thompson <resiak@pidgin.im>
parents: 19897
diff changeset
109 /** The server's SSL certificate does not have the expected
5526fe433c91 Create a PurpleDisconnectReason enum (which happens to be identical to
Will Thompson <resiak@pidgin.im>
parents: 19897
diff changeset
110 * fingerprint.
5526fe433c91 Create a PurpleDisconnectReason enum (which happens to be identical to
Will Thompson <resiak@pidgin.im>
parents: 19897
diff changeset
111 */
21279
40685e1f50ca Rename:
Will Thompson <resiak@pidgin.im>
parents: 21278
diff changeset
112 PURPLE_CONNECTION_ERROR_CERT_FINGERPRINT_MISMATCH = 12,
20428
5526fe433c91 Create a PurpleDisconnectReason enum (which happens to be identical to
Will Thompson <resiak@pidgin.im>
parents: 19897
diff changeset
113 /** The server's SSL certificate is self-signed. */
21279
40685e1f50ca Rename:
Will Thompson <resiak@pidgin.im>
parents: 21278
diff changeset
114 PURPLE_CONNECTION_ERROR_CERT_SELF_SIGNED = 13,
20428
5526fe433c91 Create a PurpleDisconnectReason enum (which happens to be identical to
Will Thompson <resiak@pidgin.im>
parents: 19897
diff changeset
115 /** There was some other error validating the server's SSL certificate.
5526fe433c91 Create a PurpleDisconnectReason enum (which happens to be identical to
Will Thompson <resiak@pidgin.im>
parents: 19897
diff changeset
116 */
21279
40685e1f50ca Rename:
Will Thompson <resiak@pidgin.im>
parents: 21278
diff changeset
117 PURPLE_CONNECTION_ERROR_CERT_OTHER_ERROR = 14,
20429
0e840b026c82 Remove non-error PurpleDisconnectReasons, and add PURPLE_REASON_OTHER_ERROR
Will Thompson <resiak@pidgin.im>
parents: 20428
diff changeset
118
0e840b026c82 Remove non-error PurpleDisconnectReasons, and add PURPLE_REASON_OTHER_ERROR
Will Thompson <resiak@pidgin.im>
parents: 20428
diff changeset
119 /** Some other error occured which fits into none of the other
0e840b026c82 Remove non-error PurpleDisconnectReasons, and add PURPLE_REASON_OTHER_ERROR
Will Thompson <resiak@pidgin.im>
parents: 20428
diff changeset
120 * categories.
0e840b026c82 Remove non-error PurpleDisconnectReasons, and add PURPLE_REASON_OTHER_ERROR
Will Thompson <resiak@pidgin.im>
parents: 20428
diff changeset
121 */
21278
19f6ce8ee4ad rlaager suggested using the last element of the PurpleDisconnectReason enum
Will Thompson <resiak@pidgin.im>
parents: 21161
diff changeset
122 /* purple_connection_error_reason() in connection.c uses the fact that
19f6ce8ee4ad rlaager suggested using the last element of the PurpleDisconnectReason enum
Will Thompson <resiak@pidgin.im>
parents: 21161
diff changeset
123 * this is the last member of the enum when sanity-checking; if other
19f6ce8ee4ad rlaager suggested using the last element of the PurpleDisconnectReason enum
Will Thompson <resiak@pidgin.im>
parents: 21161
diff changeset
124 * reasons are added after it, the check must be updated.
19f6ce8ee4ad rlaager suggested using the last element of the PurpleDisconnectReason enum
Will Thompson <resiak@pidgin.im>
parents: 21161
diff changeset
125 */
21279
40685e1f50ca Rename:
Will Thompson <resiak@pidgin.im>
parents: 21278
diff changeset
126 PURPLE_CONNECTION_ERROR_OTHER_ERROR = 15
40685e1f50ca Rename:
Will Thompson <resiak@pidgin.im>
parents: 21278
diff changeset
127 } PurpleConnectionError;
20428
5526fe433c91 Create a PurpleDisconnectReason enum (which happens to be identical to
Will Thompson <resiak@pidgin.im>
parents: 19897
diff changeset
128
21295
46659b1bf31f PurpleConnectionErrorPair is a better name for struct { PurpleConnectionError;
Will Thompson <resiak@pidgin.im>
parents: 21281
diff changeset
129 /** Holds the type of an error along with its description. */
46659b1bf31f PurpleConnectionErrorPair is a better name for struct { PurpleConnectionError;
Will Thompson <resiak@pidgin.im>
parents: 21281
diff changeset
130 typedef struct
46659b1bf31f PurpleConnectionErrorPair is a better name for struct { PurpleConnectionError;
Will Thompson <resiak@pidgin.im>
parents: 21281
diff changeset
131 {
46659b1bf31f PurpleConnectionErrorPair is a better name for struct { PurpleConnectionError;
Will Thompson <resiak@pidgin.im>
parents: 21281
diff changeset
132 /** The type of error. */
46659b1bf31f PurpleConnectionErrorPair is a better name for struct { PurpleConnectionError;
Will Thompson <resiak@pidgin.im>
parents: 21281
diff changeset
133 PurpleConnectionError type;
46659b1bf31f PurpleConnectionErrorPair is a better name for struct { PurpleConnectionError;
Will Thompson <resiak@pidgin.im>
parents: 21281
diff changeset
134 /** A localised, human-readable description of the error. */
46659b1bf31f PurpleConnectionErrorPair is a better name for struct { PurpleConnectionError;
Will Thompson <resiak@pidgin.im>
parents: 21281
diff changeset
135 const char *description;
46659b1bf31f PurpleConnectionErrorPair is a better name for struct { PurpleConnectionError;
Will Thompson <resiak@pidgin.im>
parents: 21281
diff changeset
136 } PurpleConnectionErrorPair;
46659b1bf31f PurpleConnectionErrorPair is a better name for struct { PurpleConnectionError;
Will Thompson <resiak@pidgin.im>
parents: 21281
diff changeset
137
10021
5aa380278a15 [gaim-migrate @ 10946]
Mark Doliner <markdoliner@pidgin.im>
parents: 10008
diff changeset
138 #include <time.h>
5aa380278a15 [gaim-migrate @ 10946]
Mark Doliner <markdoliner@pidgin.im>
parents: 10008
diff changeset
139
5944
f19df037ac58 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
140 #include "account.h"
f19df037ac58 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
141 #include "plugin.h"
10400
5f11925078e5 [gaim-migrate @ 11631]
Sean Egan <seanegan@pidgin.im>
parents: 10352
diff changeset
142 #include "status.h"
20443
7487bb69ae76 Create purple_connection_ssl_error(), which converts a PurpleSslErrorType
Will Thompson <resiak@pidgin.im>
parents: 20442
diff changeset
143 #include "sslconn.h"
5944
f19df037ac58 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
144
19128
871e26c75048 Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <resiak@pidgin.im>
parents: 18190
diff changeset
145 /** Connection UI operations. Used to notify the user of changes to
871e26c75048 Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <resiak@pidgin.im>
parents: 18190
diff changeset
146 * connections, such as being disconnected, and to respond to the
871e26c75048 Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <resiak@pidgin.im>
parents: 18190
diff changeset
147 * underlying network connection appearing and disappearing. UIs should
871e26c75048 Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <resiak@pidgin.im>
parents: 18190
diff changeset
148 * call #purple_connections_set_ui_ops() with an instance of this struct.
871e26c75048 Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <resiak@pidgin.im>
parents: 18190
diff changeset
149 *
871e26c75048 Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <resiak@pidgin.im>
parents: 18190
diff changeset
150 * @see @ref ui-ops
871e26c75048 Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <resiak@pidgin.im>
parents: 18190
diff changeset
151 */
5563
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
152 typedef struct
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
153 {
19128
871e26c75048 Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <resiak@pidgin.im>
parents: 18190
diff changeset
154 /** When an account is connecting, this operation is called to notify
871e26c75048 Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <resiak@pidgin.im>
parents: 18190
diff changeset
155 * the UI of what is happening, as well as which @a step out of @a
871e26c75048 Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <resiak@pidgin.im>
parents: 18190
diff changeset
156 * step_count has been reached (which might be displayed as a progress
871e26c75048 Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <resiak@pidgin.im>
parents: 18190
diff changeset
157 * bar).
20430
bb30dff3da21 Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <resiak@pidgin.im>
parents: 20429
diff changeset
158 * @see #purple_connection_update_progress
19128
871e26c75048 Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <resiak@pidgin.im>
parents: 18190
diff changeset
159 */
871e26c75048 Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <resiak@pidgin.im>
parents: 18190
diff changeset
160 void (*connect_progress)(PurpleConnection *gc,
871e26c75048 Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <resiak@pidgin.im>
parents: 18190
diff changeset
161 const char *text,
871e26c75048 Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <resiak@pidgin.im>
parents: 18190
diff changeset
162 size_t step,
871e26c75048 Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <resiak@pidgin.im>
parents: 18190
diff changeset
163 size_t step_count);
20430
bb30dff3da21 Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <resiak@pidgin.im>
parents: 20429
diff changeset
164
19128
871e26c75048 Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <resiak@pidgin.im>
parents: 18190
diff changeset
165 /** Called when a connection is established (just before the
871e26c75048 Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <resiak@pidgin.im>
parents: 18190
diff changeset
166 * @ref signed-on signal).
871e26c75048 Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <resiak@pidgin.im>
parents: 18190
diff changeset
167 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
168 void (*connected)(PurpleConnection *gc);
19128
871e26c75048 Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <resiak@pidgin.im>
parents: 18190
diff changeset
169 /** Called when a connection is ended (between the @ref signing-off
871e26c75048 Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <resiak@pidgin.im>
parents: 18190
diff changeset
170 * and @ref signed-off signals).
871e26c75048 Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <resiak@pidgin.im>
parents: 18190
diff changeset
171 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
172 void (*disconnected)(PurpleConnection *gc);
20430
bb30dff3da21 Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <resiak@pidgin.im>
parents: 20429
diff changeset
173
19128
871e26c75048 Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <resiak@pidgin.im>
parents: 18190
diff changeset
174 /** Used to display connection-specific notices. (Pidgin's Gtk user
871e26c75048 Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <resiak@pidgin.im>
parents: 18190
diff changeset
175 * interface implements this as a no-op; #purple_connection_notice(),
871e26c75048 Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <resiak@pidgin.im>
parents: 18190
diff changeset
176 * which uses this operation, is not used by any of the protocols
871e26c75048 Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <resiak@pidgin.im>
parents: 18190
diff changeset
177 * shipped with libpurple.)
871e26c75048 Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <resiak@pidgin.im>
parents: 18190
diff changeset
178 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
179 void (*notice)(PurpleConnection *gc, const char *text);
20430
bb30dff3da21 Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <resiak@pidgin.im>
parents: 20429
diff changeset
180
19128
871e26c75048 Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <resiak@pidgin.im>
parents: 18190
diff changeset
181 /** Called when an error causes a connection to be disconnected.
871e26c75048 Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <resiak@pidgin.im>
parents: 18190
diff changeset
182 * Called before #disconnected.
871e26c75048 Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <resiak@pidgin.im>
parents: 18190
diff changeset
183 * @param text a localized error message.
20430
bb30dff3da21 Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <resiak@pidgin.im>
parents: 20429
diff changeset
184 * @see #purple_connection_error
bb30dff3da21 Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <resiak@pidgin.im>
parents: 20429
diff changeset
185 * @deprecated in favour of
bb30dff3da21 Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <resiak@pidgin.im>
parents: 20429
diff changeset
186 * #PurpleConnectionUiOps.report_disconnect_reason.
19128
871e26c75048 Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <resiak@pidgin.im>
parents: 18190
diff changeset
187 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
188 void (*report_disconnect)(PurpleConnection *gc, const char *text);
20430
bb30dff3da21 Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <resiak@pidgin.im>
parents: 20429
diff changeset
189
19128
871e26c75048 Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <resiak@pidgin.im>
parents: 18190
diff changeset
190 /** Called when libpurple discovers that the computer's network
871e26c75048 Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <resiak@pidgin.im>
parents: 18190
diff changeset
191 * connection is active. On Linux, this uses Network Manager if
871e26c75048 Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <resiak@pidgin.im>
parents: 18190
diff changeset
192 * available; on Windows, it uses Win32's network change notification
871e26c75048 Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <resiak@pidgin.im>
parents: 18190
diff changeset
193 * infrastructure.
871e26c75048 Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <resiak@pidgin.im>
parents: 18190
diff changeset
194 */
14758
13b9adc9efd2 [gaim-migrate @ 17448]
Sean Egan <seanegan@pidgin.im>
parents: 14341
diff changeset
195 void (*network_connected)();
19128
871e26c75048 Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <resiak@pidgin.im>
parents: 18190
diff changeset
196 /** Called when libpurple discovers that the computer's network
871e26c75048 Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <resiak@pidgin.im>
parents: 18190
diff changeset
197 * connection has gone away.
871e26c75048 Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <resiak@pidgin.im>
parents: 18190
diff changeset
198 */
14758
13b9adc9efd2 [gaim-migrate @ 17448]
Sean Egan <seanegan@pidgin.im>
parents: 14341
diff changeset
199 void (*network_disconnected)();
5563
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
200
21156
c47055d4ce2a Update report_disconnect_reason documentation to match reality. Also include
Will Thompson <resiak@pidgin.im>
parents: 21154
diff changeset
201 /** Called when an error causes a connection to be disconnected.
c47055d4ce2a Update report_disconnect_reason documentation to match reality. Also include
Will Thompson <resiak@pidgin.im>
parents: 21154
diff changeset
202 * Called before #disconnected. This op is intended to replace
c47055d4ce2a Update report_disconnect_reason documentation to match reality. Also include
Will Thompson <resiak@pidgin.im>
parents: 21154
diff changeset
203 * #report_disconnect. If both are implemented, this will be called
c47055d4ce2a Update report_disconnect_reason documentation to match reality. Also include
Will Thompson <resiak@pidgin.im>
parents: 21154
diff changeset
204 * first; however, there's no real reason to implement both.
20430
bb30dff3da21 Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <resiak@pidgin.im>
parents: 20429
diff changeset
205 * @param reason why the connection ended, if known, or
21279
40685e1f50ca Rename:
Will Thompson <resiak@pidgin.im>
parents: 21278
diff changeset
206 * #PURPLE_CONNECTION_ERROR_OTHER_ERROR, if not.
20430
bb30dff3da21 Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <resiak@pidgin.im>
parents: 20429
diff changeset
207 * @param text a localized message describing the disconnection
bb30dff3da21 Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <resiak@pidgin.im>
parents: 20429
diff changeset
208 * in more detail to the user.
bb30dff3da21 Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <resiak@pidgin.im>
parents: 20429
diff changeset
209 * @see #purple_connection_error_reason
21161
2ac0dff512ae Add "@since 2.3.0" annotations to the new API, as advocated by rlaager.
Will Thompson <resiak@pidgin.im>
parents: 21157
diff changeset
210 * @since 2.3.0
20430
bb30dff3da21 Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <resiak@pidgin.im>
parents: 20429
diff changeset
211 */
bb30dff3da21 Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <resiak@pidgin.im>
parents: 20429
diff changeset
212 void (*report_disconnect_reason)(PurpleConnection *gc,
21279
40685e1f50ca Rename:
Will Thompson <resiak@pidgin.im>
parents: 21278
diff changeset
213 PurpleConnectionError reason,
20430
bb30dff3da21 Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <resiak@pidgin.im>
parents: 20429
diff changeset
214 const char *text);
bb30dff3da21 Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <resiak@pidgin.im>
parents: 20429
diff changeset
215
16743
1ce5ffe12e2a Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents: 15884
diff changeset
216 void (*_purple_reserved1)(void);
1ce5ffe12e2a Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents: 15884
diff changeset
217 void (*_purple_reserved2)(void);
1ce5ffe12e2a Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents: 15884
diff changeset
218 void (*_purple_reserved3)(void);
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
219 } PurpleConnectionUiOps;
5563
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
220
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
221 struct _PurpleConnection
5563
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
222 {
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
223 PurplePlugin *prpl; /**< The protocol plugin. */
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
224 PurpleConnectionFlags flags; /**< Connection flags. */
5563
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
225
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
226 PurpleConnectionState state; /**< The connection state. */
5563
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
227
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
228 PurpleAccount *account; /**< The account being connected to. */
10740
a1cb6b819a21 [gaim-migrate @ 12342]
Mark Doliner <markdoliner@pidgin.im>
parents: 10738
diff changeset
229 char *password; /**< The password used. */
5563
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
230 int inpa; /**< The input watcher. */
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
231
21149
160a0845b527 rlaager pointed out that purple_connection_error_reason should be setting
Will Thompson <resiak@pidgin.im>
parents: 21148
diff changeset
232 GSList *buddy_chats; /**< A list of active chats
160a0845b527 rlaager pointed out that purple_connection_error_reason should be setting
Will Thompson <resiak@pidgin.im>
parents: 21148
diff changeset
233 (#PurpleConversation structs of type
160a0845b527 rlaager pointed out that purple_connection_error_reason should be setting
Will Thompson <resiak@pidgin.im>
parents: 21148
diff changeset
234 #PURPLE_CONV_TYPE_CHAT). */
5563
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
235 void *proto_data; /**< Protocol-specific data. */
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
236
14341
e67646af66ab [gaim-migrate @ 16964]
Mark Doliner <markdoliner@pidgin.im>
parents: 14254
diff changeset
237 char *display_name; /**< How you appear to other people. */
10745
04039e970a30 [gaim-migrate @ 12347]
Mark Doliner <markdoliner@pidgin.im>
parents: 10742
diff changeset
238 guint keepalive; /**< Keep-alive. */
5563
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
239
21149
160a0845b527 rlaager pointed out that purple_connection_error_reason should be setting
Will Thompson <resiak@pidgin.im>
parents: 21148
diff changeset
240 /** Wants to Die state. This is set when the user chooses to log out, or
160a0845b527 rlaager pointed out that purple_connection_error_reason should be setting
Will Thompson <resiak@pidgin.im>
parents: 21148
diff changeset
241 * when the protocol is disconnected and should not be automatically
160a0845b527 rlaager pointed out that purple_connection_error_reason should be setting
Will Thompson <resiak@pidgin.im>
parents: 21148
diff changeset
242 * reconnected (incorrect password, etc.). prpls should rely on
160a0845b527 rlaager pointed out that purple_connection_error_reason should be setting
Will Thompson <resiak@pidgin.im>
parents: 21148
diff changeset
243 * purple_connection_error_reason() to set this for them rather than
160a0845b527 rlaager pointed out that purple_connection_error_reason should be setting
Will Thompson <resiak@pidgin.im>
parents: 21148
diff changeset
244 * setting it themselves.
21279
40685e1f50ca Rename:
Will Thompson <resiak@pidgin.im>
parents: 21278
diff changeset
245 * @see purple_connection_error_is_fatal
21149
160a0845b527 rlaager pointed out that purple_connection_error_reason should be setting
Will Thompson <resiak@pidgin.im>
parents: 21148
diff changeset
246 */
160a0845b527 rlaager pointed out that purple_connection_error_reason should be setting
Will Thompson <resiak@pidgin.im>
parents: 21148
diff changeset
247 gboolean wants_to_die;
5563
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
248
6393
b845f8d02597 [gaim-migrate @ 6898]
Nathan Walp <nwalp@pidgin.im>
parents: 6109
diff changeset
249 guint disconnect_timeout; /**< Timer used for nasty stack tricks */
5563
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
250 };
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
251
5944
f19df037ac58 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
252 #ifdef __cplusplus
f19df037ac58 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
253 extern "C" {
f19df037ac58 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
254 #endif
f19df037ac58 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
255
f19df037ac58 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
256 /**************************************************************************/
f19df037ac58 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
257 /** @name Connection API */
f19df037ac58 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
258 /**************************************************************************/
6488
6a47a95e4dbb [gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents: 6485
diff changeset
259 /*@{*/
5944
f19df037ac58 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
260
21230
1084c074d116 Mark some libpurple-internal functions as deprecated to further help keep
Richard Laager <rlaager@pidgin.im>
parents: 20889
diff changeset
261 #ifndef PURPLE_DISABLE_DEPRECATED
5563
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
262 /**
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
263 * This function should only be called by purple_account_connect()
10740
a1cb6b819a21 [gaim-migrate @ 12342]
Mark Doliner <markdoliner@pidgin.im>
parents: 10738
diff changeset
264 * in account.c. If you're trying to sign on an account, use that
a1cb6b819a21 [gaim-migrate @ 12342]
Mark Doliner <markdoliner@pidgin.im>
parents: 10738
diff changeset
265 * function instead.
a1cb6b819a21 [gaim-migrate @ 12342]
Mark Doliner <markdoliner@pidgin.im>
parents: 10738
diff changeset
266 *
a1cb6b819a21 [gaim-migrate @ 12342]
Mark Doliner <markdoliner@pidgin.im>
parents: 10738
diff changeset
267 * Creates a connection to the specified account and either connects
a1cb6b819a21 [gaim-migrate @ 12342]
Mark Doliner <markdoliner@pidgin.im>
parents: 10738
diff changeset
268 * or attempts to register a new account. If you are logging in,
a1cb6b819a21 [gaim-migrate @ 12342]
Mark Doliner <markdoliner@pidgin.im>
parents: 10738
diff changeset
269 * the connection uses the current active status for this account.
a1cb6b819a21 [gaim-migrate @ 12342]
Mark Doliner <markdoliner@pidgin.im>
parents: 10738
diff changeset
270 * So if you want to sign on as "away," for example, you need to
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
271 * have called purple_account_set_status(account, "away").
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
272 * (And this will call purple_account_connect() automatically).
5563
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
273 *
10758
b4554ec8d126 [gaim-migrate @ 12361]
Mark Doliner <markdoliner@pidgin.im>
parents: 10745
diff changeset
274 * @param account The account the connection should be connecting to.
b4554ec8d126 [gaim-migrate @ 12361]
Mark Doliner <markdoliner@pidgin.im>
parents: 10745
diff changeset
275 * @param regist Whether we are registering a new account or just
b4554ec8d126 [gaim-migrate @ 12361]
Mark Doliner <markdoliner@pidgin.im>
parents: 10745
diff changeset
276 * trying to do a normal signon.
10740
a1cb6b819a21 [gaim-migrate @ 12342]
Mark Doliner <markdoliner@pidgin.im>
parents: 10738
diff changeset
277 * @param password The password to use.
21230
1084c074d116 Mark some libpurple-internal functions as deprecated to further help keep
Richard Laager <rlaager@pidgin.im>
parents: 20889
diff changeset
278 *
1084c074d116 Mark some libpurple-internal functions as deprecated to further help keep
Richard Laager <rlaager@pidgin.im>
parents: 20889
diff changeset
279 * @deprecated As this is internal, we should make it private in 3.0.0.
5563
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
280 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
281 void purple_connection_new(PurpleAccount *account, gboolean regist,
10740
a1cb6b819a21 [gaim-migrate @ 12342]
Mark Doliner <markdoliner@pidgin.im>
parents: 10738
diff changeset
282 const char *password);
21230
1084c074d116 Mark some libpurple-internal functions as deprecated to further help keep
Richard Laager <rlaager@pidgin.im>
parents: 20889
diff changeset
283 #endif
5563
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
284
21230
1084c074d116 Mark some libpurple-internal functions as deprecated to further help keep
Richard Laager <rlaager@pidgin.im>
parents: 20889
diff changeset
285 #ifndef PURPLE_DISABLE_DEPRECATED
5563
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
286 /**
18912
606597744812 Added unregistering XMPP accounts. This requires a new prpl-struct entry, but I got an ok for that on the mailing list.
Andreas Monitzer <am@adiumx.com>
parents: 18190
diff changeset
287 * This function should only be called by purple_account_unregister()
606597744812 Added unregistering XMPP accounts. This requires a new prpl-struct entry, but I got an ok for that on the mailing list.
Andreas Monitzer <am@adiumx.com>
parents: 18190
diff changeset
288 * in account.c.
606597744812 Added unregistering XMPP accounts. This requires a new prpl-struct entry, but I got an ok for that on the mailing list.
Andreas Monitzer <am@adiumx.com>
parents: 18190
diff changeset
289 *
606597744812 Added unregistering XMPP accounts. This requires a new prpl-struct entry, but I got an ok for that on the mailing list.
Andreas Monitzer <am@adiumx.com>
parents: 18190
diff changeset
290 * Tries to unregister the account on the server. If the account is not
606597744812 Added unregistering XMPP accounts. This requires a new prpl-struct entry, but I got an ok for that on the mailing list.
Andreas Monitzer <am@adiumx.com>
parents: 18190
diff changeset
291 * connected, also creates a new connection.
606597744812 Added unregistering XMPP accounts. This requires a new prpl-struct entry, but I got an ok for that on the mailing list.
Andreas Monitzer <am@adiumx.com>
parents: 18190
diff changeset
292 *
606597744812 Added unregistering XMPP accounts. This requires a new prpl-struct entry, but I got an ok for that on the mailing list.
Andreas Monitzer <am@adiumx.com>
parents: 18190
diff changeset
293 * @param account The account to unregister
606597744812 Added unregistering XMPP accounts. This requires a new prpl-struct entry, but I got an ok for that on the mailing list.
Andreas Monitzer <am@adiumx.com>
parents: 18190
diff changeset
294 * @param password The password to use.
21230
1084c074d116 Mark some libpurple-internal functions as deprecated to further help keep
Richard Laager <rlaager@pidgin.im>
parents: 20889
diff changeset
295 * @param cb Optional callback to be called when unregistration is complete
1084c074d116 Mark some libpurple-internal functions as deprecated to further help keep
Richard Laager <rlaager@pidgin.im>
parents: 20889
diff changeset
296 * @param user_data user data to pass to the callback
1084c074d116 Mark some libpurple-internal functions as deprecated to further help keep
Richard Laager <rlaager@pidgin.im>
parents: 20889
diff changeset
297 *
1084c074d116 Mark some libpurple-internal functions as deprecated to further help keep
Richard Laager <rlaager@pidgin.im>
parents: 20889
diff changeset
298 * @deprecated As this is internal, we should make it private in 3.0.0.
18912
606597744812 Added unregistering XMPP accounts. This requires a new prpl-struct entry, but I got an ok for that on the mailing list.
Andreas Monitzer <am@adiumx.com>
parents: 18190
diff changeset
299 */
18994
310e9d853e2b 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 <am@adiumx.com>
parents: 18912
diff changeset
300 void purple_connection_new_unregister(PurpleAccount *account, const char *password, PurpleAccountUnregistrationCb cb, void *user_data);
21230
1084c074d116 Mark some libpurple-internal functions as deprecated to further help keep
Richard Laager <rlaager@pidgin.im>
parents: 20889
diff changeset
301 #endif
18912
606597744812 Added unregistering XMPP accounts. This requires a new prpl-struct entry, but I got an ok for that on the mailing list.
Andreas Monitzer <am@adiumx.com>
parents: 18190
diff changeset
302
21230
1084c074d116 Mark some libpurple-internal functions as deprecated to further help keep
Richard Laager <rlaager@pidgin.im>
parents: 20889
diff changeset
303 #ifndef PURPLE_DISABLE_DEPRECATED
18912
606597744812 Added unregistering XMPP accounts. This requires a new prpl-struct entry, but I got an ok for that on the mailing list.
Andreas Monitzer <am@adiumx.com>
parents: 18190
diff changeset
304 /**
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
305 * Disconnects and destroys a PurpleConnection.
13976
2543396bd00e [gaim-migrate @ 16414]
Mark Doliner <markdoliner@pidgin.im>
parents: 12272
diff changeset
306 *
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
307 * This function should only be called by purple_account_disconnect()
13976
2543396bd00e [gaim-migrate @ 16414]
Mark Doliner <markdoliner@pidgin.im>
parents: 12272
diff changeset
308 * in account.c. If you're trying to sign off an account, use that
10738
63ca8277c234 [gaim-migrate @ 12340]
Mark Doliner <markdoliner@pidgin.im>
parents: 10665
diff changeset
309 * function instead.
63ca8277c234 [gaim-migrate @ 12340]
Mark Doliner <markdoliner@pidgin.im>
parents: 10665
diff changeset
310 *
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
311 * @param gc The purple connection to destroy.
21230
1084c074d116 Mark some libpurple-internal functions as deprecated to further help keep
Richard Laager <rlaager@pidgin.im>
parents: 20889
diff changeset
312 *
1084c074d116 Mark some libpurple-internal functions as deprecated to further help keep
Richard Laager <rlaager@pidgin.im>
parents: 20889
diff changeset
313 * @deprecated As this is internal, we should make it private in 3.0.0.
5563
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
314 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
315 void purple_connection_destroy(PurpleConnection *gc);
21230
1084c074d116 Mark some libpurple-internal functions as deprecated to further help keep
Richard Laager <rlaager@pidgin.im>
parents: 20889
diff changeset
316 #endif
6581
dd89eb44f0ee [gaim-migrate @ 7103]
Nathan Walp <nwalp@pidgin.im>
parents: 6488
diff changeset
317
dd89eb44f0ee [gaim-migrate @ 7103]
Nathan Walp <nwalp@pidgin.im>
parents: 6488
diff changeset
318 /**
11718
90804d019837 [gaim-migrate @ 14009]
Mark Doliner <markdoliner@pidgin.im>
parents: 10758
diff changeset
319 * Sets the connection state. PRPLs should call this and pass in
21149
160a0845b527 rlaager pointed out that purple_connection_error_reason should be setting
Will Thompson <resiak@pidgin.im>
parents: 21148
diff changeset
320 * the state #PURPLE_CONNECTED when the account is completely
11718
90804d019837 [gaim-migrate @ 14009]
Mark Doliner <markdoliner@pidgin.im>
parents: 10758
diff changeset
321 * signed on. What does it mean to be completely signed on? If
90804d019837 [gaim-migrate @ 14009]
Mark Doliner <markdoliner@pidgin.im>
parents: 10758
diff changeset
322 * the core can call prpl->set_status, and it successfully changes
90804d019837 [gaim-migrate @ 14009]
Mark Doliner <markdoliner@pidgin.im>
parents: 10758
diff changeset
323 * your status, then the account is online.
5563
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
324 *
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
325 * @param gc The connection.
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
326 * @param state The connection state.
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
327 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
328 void purple_connection_set_state(PurpleConnection *gc, PurpleConnectionState state);
5563
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
329
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
330 /**
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
331 * Sets the connection's account.
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
332 *
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
333 * @param gc The connection.
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
334 * @param account The account.
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
335 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
336 void purple_connection_set_account(PurpleConnection *gc, PurpleAccount *account);
5563
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
337
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
338 /**
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
339 * Sets the connection's displayed name.
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
340 *
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
341 * @param gc The connection.
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
342 * @param name The displayed name.
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
343 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
344 void purple_connection_set_display_name(PurpleConnection *gc, const char *name);
5563
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
345
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
346 /**
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
347 * Returns the connection state.
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
348 *
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
349 * @param gc The connection.
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
350 *
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
351 * @return The connection state.
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
352 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
353 PurpleConnectionState purple_connection_get_state(const PurpleConnection *gc);
5563
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
354
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
355 /**
9019
b9a333b36763 [gaim-migrate @ 9795]
Mark Doliner <markdoliner@pidgin.im>
parents: 8735
diff changeset
356 * Returns TRUE if the account is connected, otherwise returns FALSE.
b9a333b36763 [gaim-migrate @ 9795]
Mark Doliner <markdoliner@pidgin.im>
parents: 8735
diff changeset
357 *
b9a333b36763 [gaim-migrate @ 9795]
Mark Doliner <markdoliner@pidgin.im>
parents: 8735
diff changeset
358 * @return TRUE if the account is connected, otherwise returns FALSE.
b9a333b36763 [gaim-migrate @ 9795]
Mark Doliner <markdoliner@pidgin.im>
parents: 8735
diff changeset
359 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
360 #define PURPLE_CONNECTION_IS_CONNECTED(gc) \
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
361 (gc->state == PURPLE_CONNECTED)
9019
b9a333b36763 [gaim-migrate @ 9795]
Mark Doliner <markdoliner@pidgin.im>
parents: 8735
diff changeset
362
b9a333b36763 [gaim-migrate @ 9795]
Mark Doliner <markdoliner@pidgin.im>
parents: 8735
diff changeset
363 /**
5563
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
364 * Returns the connection's account.
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
365 *
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
366 * @param gc The connection.
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
367 *
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
368 * @return The connection's account.
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
369 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
370 PurpleAccount *purple_connection_get_account(const PurpleConnection *gc);
5563
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
371
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
372 /**
10740
a1cb6b819a21 [gaim-migrate @ 12342]
Mark Doliner <markdoliner@pidgin.im>
parents: 10738
diff changeset
373 * Returns the connection's password.
a1cb6b819a21 [gaim-migrate @ 12342]
Mark Doliner <markdoliner@pidgin.im>
parents: 10738
diff changeset
374 *
a1cb6b819a21 [gaim-migrate @ 12342]
Mark Doliner <markdoliner@pidgin.im>
parents: 10738
diff changeset
375 * @param gc The connection.
a1cb6b819a21 [gaim-migrate @ 12342]
Mark Doliner <markdoliner@pidgin.im>
parents: 10738
diff changeset
376 *
a1cb6b819a21 [gaim-migrate @ 12342]
Mark Doliner <markdoliner@pidgin.im>
parents: 10738
diff changeset
377 * @return The connection's password.
a1cb6b819a21 [gaim-migrate @ 12342]
Mark Doliner <markdoliner@pidgin.im>
parents: 10738
diff changeset
378 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
379 const char *purple_connection_get_password(const PurpleConnection *gc);
10740
a1cb6b819a21 [gaim-migrate @ 12342]
Mark Doliner <markdoliner@pidgin.im>
parents: 10738
diff changeset
380
a1cb6b819a21 [gaim-migrate @ 12342]
Mark Doliner <markdoliner@pidgin.im>
parents: 10738
diff changeset
381 /**
5563
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
382 * Returns the connection's displayed name.
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
383 *
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
384 * @param gc The connection.
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
385 *
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
386 * @return The connection's displayed name.
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
387 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
388 const char *purple_connection_get_display_name(const PurpleConnection *gc);
5563
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
389
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
390 /**
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
391 * Updates the connection progress.
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
392 *
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
393 * @param gc The connection.
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
394 * @param text Information on the current step.
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
395 * @param step The current step.
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
396 * @param count The total number of steps.
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
397 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
398 void purple_connection_update_progress(PurpleConnection *gc, const char *text,
5563
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
399 size_t step, size_t count);
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
400
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
401 /**
5571
b709464f507e [gaim-migrate @ 5973]
Christian Hammond <chipx86@chipx86.com>
parents: 5564
diff changeset
402 * Displays a connection-specific notice.
b709464f507e [gaim-migrate @ 5973]
Christian Hammond <chipx86@chipx86.com>
parents: 5564
diff changeset
403 *
b709464f507e [gaim-migrate @ 5973]
Christian Hammond <chipx86@chipx86.com>
parents: 5564
diff changeset
404 * @param gc The connection.
b709464f507e [gaim-migrate @ 5973]
Christian Hammond <chipx86@chipx86.com>
parents: 5564
diff changeset
405 * @param text The notice text.
b709464f507e [gaim-migrate @ 5973]
Christian Hammond <chipx86@chipx86.com>
parents: 5564
diff changeset
406 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
407 void purple_connection_notice(PurpleConnection *gc, const char *text);
5571
b709464f507e [gaim-migrate @ 5973]
Christian Hammond <chipx86@chipx86.com>
parents: 5564
diff changeset
408
b709464f507e [gaim-migrate @ 5973]
Christian Hammond <chipx86@chipx86.com>
parents: 5564
diff changeset
409 /**
5564
1779a1bfbdb8 [gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents: 5563
diff changeset
410 * Closes a connection with an error.
1779a1bfbdb8 [gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents: 5563
diff changeset
411 *
1779a1bfbdb8 [gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents: 5563
diff changeset
412 * @param gc The connection.
21280
2db787ddddf8 Document that the char * parameter of purple_connection_error{,_reason} may
Will Thompson <resiak@pidgin.im>
parents: 21279
diff changeset
413 * @param reason The error text, which may not be @c NULL.
20430
bb30dff3da21 Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <resiak@pidgin.im>
parents: 20429
diff changeset
414 * @deprecated in favour of #purple_connection_error_reason. Calling
bb30dff3da21 Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <resiak@pidgin.im>
parents: 20429
diff changeset
415 * @c purple_connection_error(gc, text) is equivalent to calling
21149
160a0845b527 rlaager pointed out that purple_connection_error_reason should be setting
Will Thompson <resiak@pidgin.im>
parents: 21148
diff changeset
416 * @c purple_connection_error_reason(gc, reason, text) where @c reason is
21279
40685e1f50ca Rename:
Will Thompson <resiak@pidgin.im>
parents: 21278
diff changeset
417 * #PURPLE_CONNECTION_ERROR_OTHER_ERROR if @c gc->wants_to_die is @c TRUE, and
40685e1f50ca Rename:
Will Thompson <resiak@pidgin.im>
parents: 21278
diff changeset
418 * #PURPLE_CONNECTION_ERROR_NETWORK_ERROR if not. (This is to keep
40685e1f50ca Rename:
Will Thompson <resiak@pidgin.im>
parents: 21278
diff changeset
419 * auto-reconnection behaviour the same when using old prpls which don't use
40685e1f50ca Rename:
Will Thompson <resiak@pidgin.im>
parents: 21278
diff changeset
420 * reasons yet.)
5564
1779a1bfbdb8 [gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents: 5563
diff changeset
421 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
422 void purple_connection_error(PurpleConnection *gc, const char *reason);
5564
1779a1bfbdb8 [gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents: 5563
diff changeset
423
20430
bb30dff3da21 Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <resiak@pidgin.im>
parents: 20429
diff changeset
424 /**
21280
2db787ddddf8 Document that the char * parameter of purple_connection_error{,_reason} may
Will Thompson <resiak@pidgin.im>
parents: 21279
diff changeset
425 * Closes a connection with an error and a human-readable description of the
21149
160a0845b527 rlaager pointed out that purple_connection_error_reason should be setting
Will Thompson <resiak@pidgin.im>
parents: 21148
diff changeset
426 * error. It also sets @c gc->wants_to_die to the value of
21297
9c34edc92ad2 Document the gc parameter of purple_connection_error_reason to shut doxygen up.
Will Thompson <resiak@pidgin.im>
parents: 21295
diff changeset
427 * #purple_connection_error_is_fatal(@a reason), mainly for
9c34edc92ad2 Document the gc parameter of purple_connection_error_reason to shut doxygen up.
Will Thompson <resiak@pidgin.im>
parents: 21295
diff changeset
428 * backwards-compatibility.
20430
bb30dff3da21 Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <resiak@pidgin.im>
parents: 20429
diff changeset
429 *
21297
9c34edc92ad2 Document the gc parameter of purple_connection_error_reason to shut doxygen up.
Will Thompson <resiak@pidgin.im>
parents: 21295
diff changeset
430 * @param gc the connection which is closing.
20430
bb30dff3da21 Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <resiak@pidgin.im>
parents: 20429
diff changeset
431 * @param reason why the connection is closing.
21280
2db787ddddf8 Document that the char * parameter of purple_connection_error{,_reason} may
Will Thompson <resiak@pidgin.im>
parents: 21279
diff changeset
432 * @param description a non-@c NULL localized description of the error.
21161
2ac0dff512ae Add "@since 2.3.0" annotations to the new API, as advocated by rlaager.
Will Thompson <resiak@pidgin.im>
parents: 21157
diff changeset
433 * @since 2.3.0
20430
bb30dff3da21 Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <resiak@pidgin.im>
parents: 20429
diff changeset
434 */
bb30dff3da21 Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <resiak@pidgin.im>
parents: 20429
diff changeset
435 void
bb30dff3da21 Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <resiak@pidgin.im>
parents: 20429
diff changeset
436 purple_connection_error_reason (PurpleConnection *gc,
21279
40685e1f50ca Rename:
Will Thompson <resiak@pidgin.im>
parents: 21278
diff changeset
437 PurpleConnectionError reason,
20430
bb30dff3da21 Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <resiak@pidgin.im>
parents: 20429
diff changeset
438 const char *description);
bb30dff3da21 Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <resiak@pidgin.im>
parents: 20429
diff changeset
439
20431
49979e453876 Create purple_connection_reason_is_fatal, which is basically a replacement for
Will Thompson <resiak@pidgin.im>
parents: 20430
diff changeset
440 /**
20443
7487bb69ae76 Create purple_connection_ssl_error(), which converts a PurpleSslErrorType
Will Thompson <resiak@pidgin.im>
parents: 20442
diff changeset
441 * Closes a connection due to an SSL error; this is basically a shortcut to
21279
40685e1f50ca Rename:
Will Thompson <resiak@pidgin.im>
parents: 21278
diff changeset
442 * turning the #PurpleSslErrorType into a #PurpleConnectionError and a
20443
7487bb69ae76 Create purple_connection_ssl_error(), which converts a PurpleSslErrorType
Will Thompson <resiak@pidgin.im>
parents: 20442
diff changeset
443 * human-readable string and then calling purple_connection_error_reason().
21161
2ac0dff512ae Add "@since 2.3.0" annotations to the new API, as advocated by rlaager.
Will Thompson <resiak@pidgin.im>
parents: 21157
diff changeset
444 * @since 2.3.0
20443
7487bb69ae76 Create purple_connection_ssl_error(), which converts a PurpleSslErrorType
Will Thompson <resiak@pidgin.im>
parents: 20442
diff changeset
445 */
7487bb69ae76 Create purple_connection_ssl_error(), which converts a PurpleSslErrorType
Will Thompson <resiak@pidgin.im>
parents: 20442
diff changeset
446 void
7487bb69ae76 Create purple_connection_ssl_error(), which converts a PurpleSslErrorType
Will Thompson <resiak@pidgin.im>
parents: 20442
diff changeset
447 purple_connection_ssl_error (PurpleConnection *gc,
7487bb69ae76 Create purple_connection_ssl_error(), which converts a PurpleSslErrorType
Will Thompson <resiak@pidgin.im>
parents: 20442
diff changeset
448 PurpleSslErrorType ssl_error);
7487bb69ae76 Create purple_connection_ssl_error(), which converts a PurpleSslErrorType
Will Thompson <resiak@pidgin.im>
parents: 20442
diff changeset
449
7487bb69ae76 Create purple_connection_ssl_error(), which converts a PurpleSslErrorType
Will Thompson <resiak@pidgin.im>
parents: 20442
diff changeset
450 /**
20431
49979e453876 Create purple_connection_reason_is_fatal, which is basically a replacement for
Will Thompson <resiak@pidgin.im>
parents: 20430
diff changeset
451 * Reports whether a disconnection reason is fatal (in which case the account
49979e453876 Create purple_connection_reason_is_fatal, which is basically a replacement for
Will Thompson <resiak@pidgin.im>
parents: 20430
diff changeset
452 * should probably not be automatically reconnected) or transient (so
21149
160a0845b527 rlaager pointed out that purple_connection_error_reason should be setting
Will Thompson <resiak@pidgin.im>
parents: 21148
diff changeset
453 * auto-reconnection is a good idea).
21280
2db787ddddf8 Document that the char * parameter of purple_connection_error{,_reason} may
Will Thompson <resiak@pidgin.im>
parents: 21279
diff changeset
454 * For instance, #PURPLE_CONNECTION_ERROR_NETWORK_ERROR is a temporary error,
2db787ddddf8 Document that the char * parameter of purple_connection_error{,_reason} may
Will Thompson <resiak@pidgin.im>
parents: 21279
diff changeset
455 * which might be caused by losing the network connection, so <tt>
2db787ddddf8 Document that the char * parameter of purple_connection_error{,_reason} may
Will Thompson <resiak@pidgin.im>
parents: 21279
diff changeset
456 * purple_connection_error_is_fatal (PURPLE_CONNECTION_ERROR_NETWORK_ERROR)</tt>
2db787ddddf8 Document that the char * parameter of purple_connection_error{,_reason} may
Will Thompson <resiak@pidgin.im>
parents: 21279
diff changeset
457 * is @c FALSE. On the other hand,
21279
40685e1f50ca Rename:
Will Thompson <resiak@pidgin.im>
parents: 21278
diff changeset
458 * #PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED probably indicates a
40685e1f50ca Rename:
Will Thompson <resiak@pidgin.im>
parents: 21278
diff changeset
459 * misconfiguration of the account which needs the user to go fix it up, so
21280
2db787ddddf8 Document that the char * parameter of purple_connection_error{,_reason} may
Will Thompson <resiak@pidgin.im>
parents: 21279
diff changeset
460 * <tt> purple_connection_error_is_fatal
2db787ddddf8 Document that the char * parameter of purple_connection_error{,_reason} may
Will Thompson <resiak@pidgin.im>
parents: 21279
diff changeset
461 * (PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED)</tt> is @c TRUE.
20431
49979e453876 Create purple_connection_reason_is_fatal, which is basically a replacement for
Will Thompson <resiak@pidgin.im>
parents: 20430
diff changeset
462 *
49979e453876 Create purple_connection_reason_is_fatal, which is basically a replacement for
Will Thompson <resiak@pidgin.im>
parents: 20430
diff changeset
463 * (This function is meant to replace checking PurpleConnection.wants_to_die.)
49979e453876 Create purple_connection_reason_is_fatal, which is basically a replacement for
Will Thompson <resiak@pidgin.im>
parents: 20430
diff changeset
464 *
21154
be1799decdb7 Clarify the documentation of the return value of
Will Thompson <resiak@pidgin.im>
parents: 21149
diff changeset
465 * @return @c TRUE if the account should not be automatically reconnected, and
be1799decdb7 Clarify the documentation of the return value of
Will Thompson <resiak@pidgin.im>
parents: 21149
diff changeset
466 * @c FALSE otherwise.
21161
2ac0dff512ae Add "@since 2.3.0" annotations to the new API, as advocated by rlaager.
Will Thompson <resiak@pidgin.im>
parents: 21157
diff changeset
467 * @since 2.3.0
20431
49979e453876 Create purple_connection_reason_is_fatal, which is basically a replacement for
Will Thompson <resiak@pidgin.im>
parents: 20430
diff changeset
468 */
49979e453876 Create purple_connection_reason_is_fatal, which is basically a replacement for
Will Thompson <resiak@pidgin.im>
parents: 20430
diff changeset
469 gboolean
21279
40685e1f50ca Rename:
Will Thompson <resiak@pidgin.im>
parents: 21278
diff changeset
470 purple_connection_error_is_fatal (PurpleConnectionError reason);
20431
49979e453876 Create purple_connection_reason_is_fatal, which is basically a replacement for
Will Thompson <resiak@pidgin.im>
parents: 20430
diff changeset
471
5944
f19df037ac58 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
472 /*@}*/
f19df037ac58 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
473
f19df037ac58 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
474 /**************************************************************************/
f19df037ac58 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
475 /** @name Connections API */
f19df037ac58 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
476 /**************************************************************************/
f19df037ac58 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
477 /*@{*/
f19df037ac58 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
478
5564
1779a1bfbdb8 [gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents: 5563
diff changeset
479 /**
5563
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
480 * Disconnects from all connections.
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
481 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
482 void purple_connections_disconnect_all(void);
5563
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
483
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
484 /**
10352
802e7ab5b838 [gaim-migrate @ 11569]
Mark Doliner <markdoliner@pidgin.im>
parents: 10272
diff changeset
485 * Returns a list of all active connections. This does not
802e7ab5b838 [gaim-migrate @ 11569]
Mark Doliner <markdoliner@pidgin.im>
parents: 10272
diff changeset
486 * include connections that are in the process of connecting.
5563
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
487 *
18190
bcf28ef7e8ff Re-fix the DBus list handling code by killing const GList* / const GSList*
Richard Laager <rlaager@pidgin.im>
parents: 18122
diff changeset
488 * @constreturn A list of all active connections.
5563
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
489 */
18122
9bf9970c1b6a disapproval of revision '2d8ea56b90971e7851442d96b7d74ecb4f052126'
Richard Laager <rlaager@pidgin.im>
parents: 18121
diff changeset
490 GList *purple_connections_get_all(void);
5563
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
491
5564
1779a1bfbdb8 [gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents: 5563
diff changeset
492 /**
1779a1bfbdb8 [gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents: 5563
diff changeset
493 * Returns a list of all connections in the process of connecting.
1779a1bfbdb8 [gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents: 5563
diff changeset
494 *
18190
bcf28ef7e8ff Re-fix the DBus list handling code by killing const GList* / const GSList*
Richard Laager <rlaager@pidgin.im>
parents: 18122
diff changeset
495 * @constreturn A list of connecting connections.
5564
1779a1bfbdb8 [gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents: 5563
diff changeset
496 */
18122
9bf9970c1b6a disapproval of revision '2d8ea56b90971e7851442d96b7d74ecb4f052126'
Richard Laager <rlaager@pidgin.im>
parents: 18121
diff changeset
497 GList *purple_connections_get_connecting(void);
5564
1779a1bfbdb8 [gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents: 5563
diff changeset
498
9221
cae2261ba6f2 [gaim-migrate @ 10017]
Ambrose Li <ambrose.li@gmail.com>
parents: 9041
diff changeset
499 /**
cae2261ba6f2 [gaim-migrate @ 10017]
Ambrose Li <ambrose.li@gmail.com>
parents: 9041
diff changeset
500 * Checks if gc is still a valid pointer to a gc.
cae2261ba6f2 [gaim-migrate @ 10017]
Ambrose Li <ambrose.li@gmail.com>
parents: 9041
diff changeset
501 *
cae2261ba6f2 [gaim-migrate @ 10017]
Ambrose Li <ambrose.li@gmail.com>
parents: 9041
diff changeset
502 * @return @c TRUE if gc is valid.
cae2261ba6f2 [gaim-migrate @ 10017]
Ambrose Li <ambrose.li@gmail.com>
parents: 9041
diff changeset
503 */
14183
bdde840e984c [gaim-migrate @ 16755]
Mark Doliner <markdoliner@pidgin.im>
parents: 14030
diff changeset
504 /*
bdde840e984c [gaim-migrate @ 16755]
Mark Doliner <markdoliner@pidgin.im>
parents: 14030
diff changeset
505 * TODO: Eventually this bad boy will be removed, because it is
bdde840e984c [gaim-migrate @ 16755]
Mark Doliner <markdoliner@pidgin.im>
parents: 14030
diff changeset
506 * a gross fix for a crashy problem.
bdde840e984c [gaim-migrate @ 16755]
Mark Doliner <markdoliner@pidgin.im>
parents: 14030
diff changeset
507 */
18122
9bf9970c1b6a disapproval of revision '2d8ea56b90971e7851442d96b7d74ecb4f052126'
Richard Laager <rlaager@pidgin.im>
parents: 18121
diff changeset
508 #define PURPLE_CONNECTION_IS_VALID(gc) (g_list_find(purple_connections_get_all(), (gc)) != NULL)
9221
cae2261ba6f2 [gaim-migrate @ 10017]
Ambrose Li <ambrose.li@gmail.com>
parents: 9041
diff changeset
509
5944
f19df037ac58 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
510 /*@}*/
f19df037ac58 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
511
5563
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
512 /**************************************************************************/
7122
5f40c16a4ae4 [gaim-migrate @ 7689]
Christian Hammond <chipx86@chipx86.com>
parents: 7035
diff changeset
513 /** @name UI Registration Functions */
5563
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
514 /**************************************************************************/
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
515 /*@{*/
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
516
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
517 /**
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
518 * Sets the UI operations structure to be used for connections.
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
519 *
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
520 * @param ops The UI operations structure.
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
521 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
522 void purple_connections_set_ui_ops(PurpleConnectionUiOps *ops);
5563
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
523
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
524 /**
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
525 * Returns the UI operations structure used for connections.
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
526 *
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
527 * @return The UI operations structure in use.
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
528 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
529 PurpleConnectionUiOps *purple_connections_get_ui_ops(void);
5563
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
530
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
531 /*@}*/
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
532
6488
6a47a95e4dbb [gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents: 6485
diff changeset
533 /**************************************************************************/
6a47a95e4dbb [gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents: 6485
diff changeset
534 /** @name Connections Subsystem */
6a47a95e4dbb [gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents: 6485
diff changeset
535 /**************************************************************************/
6a47a95e4dbb [gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents: 6485
diff changeset
536 /*@{*/
6a47a95e4dbb [gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents: 6485
diff changeset
537
6a47a95e4dbb [gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents: 6485
diff changeset
538 /**
6a47a95e4dbb [gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents: 6485
diff changeset
539 * Initializes the connections subsystem.
6a47a95e4dbb [gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents: 6485
diff changeset
540 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
541 void purple_connections_init(void);
6488
6a47a95e4dbb [gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents: 6485
diff changeset
542
6a47a95e4dbb [gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents: 6485
diff changeset
543 /**
6a47a95e4dbb [gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents: 6485
diff changeset
544 * Uninitializes the connections subsystem.
6a47a95e4dbb [gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents: 6485
diff changeset
545 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
546 void purple_connections_uninit(void);
6488
6a47a95e4dbb [gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents: 6485
diff changeset
547
6a47a95e4dbb [gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents: 6485
diff changeset
548 /**
6a47a95e4dbb [gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents: 6485
diff changeset
549 * Returns the handle to the connections subsystem.
6a47a95e4dbb [gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents: 6485
diff changeset
550 *
6a47a95e4dbb [gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents: 6485
diff changeset
551 * @return The connections subsystem handle.
6a47a95e4dbb [gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents: 6485
diff changeset
552 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
553 void *purple_connections_get_handle(void);
6488
6a47a95e4dbb [gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents: 6485
diff changeset
554
6a47a95e4dbb [gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents: 6485
diff changeset
555 /*@}*/
6a47a95e4dbb [gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents: 6485
diff changeset
556
6a47a95e4dbb [gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents: 6485
diff changeset
557
5944
f19df037ac58 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
558 #ifdef __cplusplus
f19df037ac58 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
559 }
f19df037ac58 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
560 #endif
f19df037ac58 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
561
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
562 #endif /* _PURPLE_CONNECTION_H_ */

mercurial