libpurple/connection.h

Fri, 12 Jul 2013 01:32:00 +0530

author
Ankit Vani <a@nevitus.org>
date
Fri, 12 Jul 2013 01:32:00 +0530
branch
soc.2013.gobjectification
changeset 34751
374a9500c430
parent 34750
826c1611ef90
child 34753
b2c73469c1be
permissions
-rw-r--r--

Added _purple_connection_wants_to_die() to internal.h to be used by account.c. Removed _purple_connection_destroy().

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
34748
02efb47ea4f4 Added GObject boilerplate code for PurpleConnection
Ankit Vani <a@nevitus.org>
parents: 34746
diff changeset
30 #define PURPLE_TYPE_CONNECTION (purple_connection_get_type())
02efb47ea4f4 Added GObject boilerplate code for PurpleConnection
Ankit Vani <a@nevitus.org>
parents: 34746
diff changeset
31 #define PURPLE_CONNECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), PURPLE_TYPE_CONNECTION, PurpleConnection))
02efb47ea4f4 Added GObject boilerplate code for PurpleConnection
Ankit Vani <a@nevitus.org>
parents: 34746
diff changeset
32 #define PURPLE_CONNECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), PURPLE_TYPE_CONNECTION, PurpleConnectionClass))
02efb47ea4f4 Added GObject boilerplate code for PurpleConnection
Ankit Vani <a@nevitus.org>
parents: 34746
diff changeset
33 #define PURPLE_IS_CONNECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), PURPLE_TYPE_CONNECTION))
02efb47ea4f4 Added GObject boilerplate code for PurpleConnection
Ankit Vani <a@nevitus.org>
parents: 34746
diff changeset
34 #define PURPLE_IS_CONNECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), PURPLE_TYPE_CONNECTION))
02efb47ea4f4 Added GObject boilerplate code for PurpleConnection
Ankit Vani <a@nevitus.org>
parents: 34746
diff changeset
35 #define PURPLE_CONNECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), PURPLE_TYPE_CONNECTION, PurpleConnectionClass))
02efb47ea4f4 Added GObject boilerplate code for PurpleConnection
Ankit Vani <a@nevitus.org>
parents: 34746
diff changeset
36
23514
f5c4c1cb7b6f Sprinkle @copydoc around to squash "ref could not be resolved" Doxygen warnings,
Will Thompson <resiak@pidgin.im>
parents: 23010
diff changeset
37 /** @copydoc _PurpleConnection */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
38 typedef struct _PurpleConnection PurpleConnection;
34748
02efb47ea4f4 Added GObject boilerplate code for PurpleConnection
Ankit Vani <a@nevitus.org>
parents: 34746
diff changeset
39 /** @copydoc _PurpleConnection */
02efb47ea4f4 Added GObject boilerplate code for PurpleConnection
Ankit Vani <a@nevitus.org>
parents: 34746
diff changeset
40 typedef struct _PurpleConnectionClass PurpleConnectionClass;
5563
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
41
6622
277eb0b14653 [gaim-migrate @ 7146]
Robert McQueen <robot101@debian.org>
parents: 6605
diff changeset
42 /**
277eb0b14653 [gaim-migrate @ 7146]
Robert McQueen <robot101@debian.org>
parents: 6605
diff changeset
43 * Flags to change behavior of the client for a given connection.
277eb0b14653 [gaim-migrate @ 7146]
Robert McQueen <robot101@debian.org>
parents: 6605
diff changeset
44 */
34646
e7f4631e93f7 Begun adding GObject code to conversation sources
Ankit Vani <a@nevitus.org>
parents: 34645
diff changeset
45 typedef enum /*< flags >*/
6622
277eb0b14653 [gaim-migrate @ 7146]
Robert McQueen <robot101@debian.org>
parents: 6605
diff changeset
46 {
34748
02efb47ea4f4 Added GObject boilerplate code for PurpleConnection
Ankit Vani <a@nevitus.org>
parents: 34746
diff changeset
47 PURPLE_CONNECTION_FLAG_HTML = 0x0001, /**< Connection sends/receives in 'HTML' */
02efb47ea4f4 Added GObject boilerplate code for PurpleConnection
Ankit Vani <a@nevitus.org>
parents: 34746
diff changeset
48 PURPLE_CONNECTION_FLAG_NO_BGCOLOR = 0x0002, /**< Connection does not send/receive background colors */
02efb47ea4f4 Added GObject boilerplate code for PurpleConnection
Ankit Vani <a@nevitus.org>
parents: 34746
diff changeset
49 PURPLE_CONNECTION_FLAG_AUTO_RESP = 0x0004, /**< Send auto responses when away */
34746
dc9c911dbd35 Started GObjectification of PurpleConnection.
Ankit Vani <a@nevitus.org>
parents: 34646
diff changeset
50 PURPLE_CONNECTION_FLAG_FORMATTING_WBFO = 0x0008, /**< The text buffer must be formatted as a whole */
dc9c911dbd35 Started GObjectification of PurpleConnection.
Ankit Vani <a@nevitus.org>
parents: 34646
diff changeset
51 PURPLE_CONNECTION_FLAG_NO_NEWLINES = 0x0010, /**< No new lines are allowed in outgoing messages */
dc9c911dbd35 Started GObjectification of PurpleConnection.
Ankit Vani <a@nevitus.org>
parents: 34646
diff changeset
52 PURPLE_CONNECTION_FLAG_NO_FONTSIZE = 0x0020, /**< Connection does not send/receive font sizes */
34748
02efb47ea4f4 Added GObject boilerplate code for PurpleConnection
Ankit Vani <a@nevitus.org>
parents: 34746
diff changeset
53 PURPLE_CONNECTION_FLAG_NO_URLDESC = 0x0040, /**< Connection does not support descriptions with links */
02efb47ea4f4 Added GObject boilerplate code for PurpleConnection
Ankit Vani <a@nevitus.org>
parents: 34746
diff changeset
54 PURPLE_CONNECTION_FLAG_NO_IMAGES = 0x0080, /**< Connection does not support sending of images */
34746
dc9c911dbd35 Started GObjectification of PurpleConnection.
Ankit Vani <a@nevitus.org>
parents: 34646
diff changeset
55 PURPLE_CONNECTION_FLAG_ALLOW_CUSTOM_SMILEY = 0x0100, /**< Connection supports sending and receiving custom smileys */
dc9c911dbd35 Started GObjectification of PurpleConnection.
Ankit Vani <a@nevitus.org>
parents: 34646
diff changeset
56 PURPLE_CONNECTION_FLAG_SUPPORT_MOODS = 0x0200, /**< Connection supports setting moods */
dc9c911dbd35 Started GObjectification of PurpleConnection.
Ankit Vani <a@nevitus.org>
parents: 34646
diff changeset
57 PURPLE_CONNECTION_FLAG_SUPPORT_MOOD_MESSAGES = 0x0400 /**< Connection supports setting a message on moods */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
58 } PurpleConnectionFlags;
5872
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5733
diff changeset
59
5563
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
60 typedef enum
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
61 {
34746
dc9c911dbd35 Started GObjectification of PurpleConnection.
Ankit Vani <a@nevitus.org>
parents: 34646
diff changeset
62 PURPLE_CONNECTION_DISCONNECTED = 0, /**< Disconnected. */
dc9c911dbd35 Started GObjectification of PurpleConnection.
Ankit Vani <a@nevitus.org>
parents: 34646
diff changeset
63 PURPLE_CONNECTION_CONNECTED, /**< Connected. */
dc9c911dbd35 Started GObjectification of PurpleConnection.
Ankit Vani <a@nevitus.org>
parents: 34646
diff changeset
64 PURPLE_CONNECTION_CONNECTING /**< Connecting. */
5563
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
65
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
66 } PurpleConnectionState;
5563
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
67
25885
5b5e2ca316b2 Add @since 2.6.0 doxygen comments to some of our new functions, and
Mark Doliner <markdoliner@pidgin.im>
parents: 25119
diff changeset
68 /**
5b5e2ca316b2 Add @since 2.6.0 doxygen comments to some of our new functions, and
Mark Doliner <markdoliner@pidgin.im>
parents: 25119
diff changeset
69 * Possible errors that can cause a connection to be closed.
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
70 */
20428
5526fe433c91 Create a PurpleDisconnectReason enum (which happens to be identical to
Will Thompson <resiak@pidgin.im>
parents: 19897
diff changeset
71 typedef enum
5526fe433c91 Create a PurpleDisconnectReason enum (which happens to be identical to
Will Thompson <resiak@pidgin.im>
parents: 19897
diff changeset
72 {
20442
97e2d532c2ac Clarified the meaning of PURPLE_REASON_NETWORK_ERROR and
Will Thompson <resiak@pidgin.im>
parents: 20438
diff changeset
73 /** 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
74 * 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
75 * data).
97e2d532c2ac Clarified the meaning of PURPLE_REASON_NETWORK_ERROR and
Will Thompson <resiak@pidgin.im>
parents: 20438
diff changeset
76 */
21279
40685e1f50ca Rename:
Will Thompson <resiak@pidgin.im>
parents: 21278
diff changeset
77 PURPLE_CONNECTION_ERROR_NETWORK_ERROR = 0,
21507
ef776d77f325 Add PURPLE_CONNECTION_ERROR_{INVALID_USERNAME,INCORRECT_PASSWORD}, to be used
Will Thompson <resiak@pidgin.im>
parents: 21313
diff changeset
78 /** The username supplied was not valid. */
ef776d77f325 Add PURPLE_CONNECTION_ERROR_{INVALID_USERNAME,INCORRECT_PASSWORD}, to be used
Will Thompson <resiak@pidgin.im>
parents: 21313
diff changeset
79 PURPLE_CONNECTION_ERROR_INVALID_USERNAME = 1,
ef776d77f325 Add PURPLE_CONNECTION_ERROR_{INVALID_USERNAME,INCORRECT_PASSWORD}, to be used
Will Thompson <resiak@pidgin.im>
parents: 21313
diff changeset
80 /** The username, password or some other credential was incorrect. Use
21511
e4dcf9f1261b Clarify PURPLE_CONNECTION_ERROR_INVALID_USERNAME slightly.
Will Thompson <resiak@pidgin.im>
parents: 21509
diff changeset
81 * #PURPLE_CONNECTION_ERROR_INVALID_USERNAME instead if the username
26054
0e13866834dc Fix a minor whitespace inconsistency.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 25889
diff changeset
82 * is known to be invalid.
20442
97e2d532c2ac Clarified the meaning of PURPLE_REASON_NETWORK_ERROR and
Will Thompson <resiak@pidgin.im>
parents: 20438
diff changeset
83 */
21509
e167cb01e146 I don't think that incorrect passwords can be helpfully distinguished from
Will Thompson <resiak@pidgin.im>
parents: 21507
diff changeset
84 PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED = 2,
20442
97e2d532c2ac Clarified the meaning of PURPLE_REASON_NETWORK_ERROR and
Will Thompson <resiak@pidgin.im>
parents: 20438
diff changeset
85 /** 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
86 * server offered.
97e2d532c2ac Clarified the meaning of PURPLE_REASON_NETWORK_ERROR and
Will Thompson <resiak@pidgin.im>
parents: 20438
diff changeset
87 */
21509
e167cb01e146 I don't think that incorrect passwords can be helpfully distinguished from
Will Thompson <resiak@pidgin.im>
parents: 21507
diff changeset
88 PURPLE_CONNECTION_ERROR_AUTHENTICATION_IMPOSSIBLE = 3,
20882
04bbf1786e15 Split the "you don't have SSL support" meaning of
Will Thompson <resiak@pidgin.im>
parents: 20456
diff changeset
89 /** 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
90 * SSL.
04bbf1786e15 Split the "you don't have SSL support" meaning of
Will Thompson <resiak@pidgin.im>
parents: 20456
diff changeset
91 */
21509
e167cb01e146 I don't think that incorrect passwords can be helpfully distinguished from
Will Thompson <resiak@pidgin.im>
parents: 21507
diff changeset
92 PURPLE_CONNECTION_ERROR_NO_SSL_SUPPORT = 4,
20882
04bbf1786e15 Split the "you don't have SSL support" meaning of
Will Thompson <resiak@pidgin.im>
parents: 20456
diff changeset
93 /** 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
94 * 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
95 * require it.
20428
5526fe433c91 Create a PurpleDisconnectReason enum (which happens to be identical to
Will Thompson <resiak@pidgin.im>
parents: 19897
diff changeset
96 */
21509
e167cb01e146 I don't think that incorrect passwords can be helpfully distinguished from
Will Thompson <resiak@pidgin.im>
parents: 21507
diff changeset
97 PURPLE_CONNECTION_ERROR_ENCRYPTION_ERROR = 5,
20428
5526fe433c91 Create a PurpleDisconnectReason enum (which happens to be identical to
Will Thompson <resiak@pidgin.im>
parents: 19897
diff changeset
98 /** 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
99 * trying to connect with.
5526fe433c91 Create a PurpleDisconnectReason enum (which happens to be identical to
Will Thompson <resiak@pidgin.im>
parents: 19897
diff changeset
100 */
21509
e167cb01e146 I don't think that incorrect passwords can be helpfully distinguished from
Will Thompson <resiak@pidgin.im>
parents: 21507
diff changeset
101 PURPLE_CONNECTION_ERROR_NAME_IN_USE = 6,
20428
5526fe433c91 Create a PurpleDisconnectReason enum (which happens to be identical to
Will Thompson <resiak@pidgin.im>
parents: 19897
diff changeset
102
20456
77550b97ebf2 Rename PURPLE_REASON_INVALID_USERNAME to PURPLE_REASON_INVALID_SETTINGS, so it
Will Thompson <resiak@pidgin.im>
parents: 20443
diff changeset
103 /** The username/server/other preference for the account isn't valid.
25889
26d9ca30335c Change "screen name" to "username" or "buddy name" in a whole bunch of
Mark Doliner <markdoliner@pidgin.im>
parents: 25885
diff changeset
104 * For instance, on IRC the username cannot contain white space.
20456
77550b97ebf2 Rename PURPLE_REASON_INVALID_USERNAME to PURPLE_REASON_INVALID_SETTINGS, so it
Will Thompson <resiak@pidgin.im>
parents: 20443
diff changeset
105 * This reason should not be used for incorrect passwords etc: use
21279
40685e1f50ca Rename:
Will Thompson <resiak@pidgin.im>
parents: 21278
diff changeset
106 * #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
107 *
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
108 * @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
109 * 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
110 * 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
111 */
21509
e167cb01e146 I don't think that incorrect passwords can be helpfully distinguished from
Will Thompson <resiak@pidgin.im>
parents: 21507
diff changeset
112 PURPLE_CONNECTION_ERROR_INVALID_SETTINGS = 7,
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
113
20428
5526fe433c91 Create a PurpleDisconnectReason enum (which happens to be identical to
Will Thompson <resiak@pidgin.im>
parents: 19897
diff changeset
114 /** The server did not provide a SSL certificate. */
21509
e167cb01e146 I don't think that incorrect passwords can be helpfully distinguished from
Will Thompson <resiak@pidgin.im>
parents: 21507
diff changeset
115 PURPLE_CONNECTION_ERROR_CERT_NOT_PROVIDED = 8,
20428
5526fe433c91 Create a PurpleDisconnectReason enum (which happens to be identical to
Will Thompson <resiak@pidgin.im>
parents: 19897
diff changeset
116 /** The server's SSL certificate could not be trusted. */
21509
e167cb01e146 I don't think that incorrect passwords can be helpfully distinguished from
Will Thompson <resiak@pidgin.im>
parents: 21507
diff changeset
117 PURPLE_CONNECTION_ERROR_CERT_UNTRUSTED = 9,
20428
5526fe433c91 Create a PurpleDisconnectReason enum (which happens to be identical to
Will Thompson <resiak@pidgin.im>
parents: 19897
diff changeset
118 /** The server's SSL certificate has expired. */
21509
e167cb01e146 I don't think that incorrect passwords can be helpfully distinguished from
Will Thompson <resiak@pidgin.im>
parents: 21507
diff changeset
119 PURPLE_CONNECTION_ERROR_CERT_EXPIRED = 10,
20428
5526fe433c91 Create a PurpleDisconnectReason enum (which happens to be identical to
Will Thompson <resiak@pidgin.im>
parents: 19897
diff changeset
120 /** The server's SSL certificate is not yet valid. */
21509
e167cb01e146 I don't think that incorrect passwords can be helpfully distinguished from
Will Thompson <resiak@pidgin.im>
parents: 21507
diff changeset
121 PURPLE_CONNECTION_ERROR_CERT_NOT_ACTIVATED = 11,
20428
5526fe433c91 Create a PurpleDisconnectReason enum (which happens to be identical to
Will Thompson <resiak@pidgin.im>
parents: 19897
diff changeset
122 /** The server's SSL certificate did not match its hostname. */
21509
e167cb01e146 I don't think that incorrect passwords can be helpfully distinguished from
Will Thompson <resiak@pidgin.im>
parents: 21507
diff changeset
123 PURPLE_CONNECTION_ERROR_CERT_HOSTNAME_MISMATCH = 12,
20428
5526fe433c91 Create a PurpleDisconnectReason enum (which happens to be identical to
Will Thompson <resiak@pidgin.im>
parents: 19897
diff changeset
124 /** 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
125 * fingerprint.
5526fe433c91 Create a PurpleDisconnectReason enum (which happens to be identical to
Will Thompson <resiak@pidgin.im>
parents: 19897
diff changeset
126 */
21509
e167cb01e146 I don't think that incorrect passwords can be helpfully distinguished from
Will Thompson <resiak@pidgin.im>
parents: 21507
diff changeset
127 PURPLE_CONNECTION_ERROR_CERT_FINGERPRINT_MISMATCH = 13,
20428
5526fe433c91 Create a PurpleDisconnectReason enum (which happens to be identical to
Will Thompson <resiak@pidgin.im>
parents: 19897
diff changeset
128 /** The server's SSL certificate is self-signed. */
21509
e167cb01e146 I don't think that incorrect passwords can be helpfully distinguished from
Will Thompson <resiak@pidgin.im>
parents: 21507
diff changeset
129 PURPLE_CONNECTION_ERROR_CERT_SELF_SIGNED = 14,
20428
5526fe433c91 Create a PurpleDisconnectReason enum (which happens to be identical to
Will Thompson <resiak@pidgin.im>
parents: 19897
diff changeset
130 /** 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
131 */
21509
e167cb01e146 I don't think that incorrect passwords can be helpfully distinguished from
Will Thompson <resiak@pidgin.im>
parents: 21507
diff changeset
132 PURPLE_CONNECTION_ERROR_CERT_OTHER_ERROR = 15,
20429
0e840b026c82 Remove non-error PurpleDisconnectReasons, and add PURPLE_REASON_OTHER_ERROR
Will Thompson <resiak@pidgin.im>
parents: 20428
diff changeset
133
23517
db3d6a500678 Fix occurred to be spelled correctly. Thanks to bruce89 for noticing. Fixes #6096.
Daniel Atallah <datallah@pidgin.im>
parents: 23514
diff changeset
134 /** Some other error occurred which fits into none of the other
20429
0e840b026c82 Remove non-error PurpleDisconnectReasons, and add PURPLE_REASON_OTHER_ERROR
Will Thompson <resiak@pidgin.im>
parents: 20428
diff changeset
135 * categories.
0e840b026c82 Remove non-error PurpleDisconnectReasons, and add PURPLE_REASON_OTHER_ERROR
Will Thompson <resiak@pidgin.im>
parents: 20428
diff changeset
136 */
32157
39ba2e2492ee Rename purple_connection_error_reason to purple_connection_error
Mark Doliner <markdoliner@pidgin.im>
parents: 32156
diff changeset
137 /* purple_connection_error() in connection.c uses the fact that
21278
19f6ce8ee4ad rlaager suggested using the last element of the PurpleDisconnectReason enum
Will Thompson <resiak@pidgin.im>
parents: 21161
diff changeset
138 * 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
139 * 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
140 */
21509
e167cb01e146 I don't think that incorrect passwords can be helpfully distinguished from
Will Thompson <resiak@pidgin.im>
parents: 21507
diff changeset
141 PURPLE_CONNECTION_ERROR_OTHER_ERROR = 16
21279
40685e1f50ca Rename:
Will Thompson <resiak@pidgin.im>
parents: 21278
diff changeset
142 } PurpleConnectionError;
20428
5526fe433c91 Create a PurpleDisconnectReason enum (which happens to be identical to
Will Thompson <resiak@pidgin.im>
parents: 19897
diff changeset
143
34746
dc9c911dbd35 Started GObjectification of PurpleConnection.
Ankit Vani <a@nevitus.org>
parents: 34646
diff changeset
144 /** Holds the type of an error along with its description. TODO GBoxed */
21295
46659b1bf31f PurpleConnectionErrorPair is a better name for struct { PurpleConnectionError;
Will Thompson <resiak@pidgin.im>
parents: 21281
diff changeset
145 typedef struct
46659b1bf31f PurpleConnectionErrorPair is a better name for struct { PurpleConnectionError;
Will Thompson <resiak@pidgin.im>
parents: 21281
diff changeset
146 {
46659b1bf31f PurpleConnectionErrorPair is a better name for struct { PurpleConnectionError;
Will Thompson <resiak@pidgin.im>
parents: 21281
diff changeset
147 /** The type of error. */
46659b1bf31f PurpleConnectionErrorPair is a better name for struct { PurpleConnectionError;
Will Thompson <resiak@pidgin.im>
parents: 21281
diff changeset
148 PurpleConnectionError type;
46659b1bf31f PurpleConnectionErrorPair is a better name for struct { PurpleConnectionError;
Will Thompson <resiak@pidgin.im>
parents: 21281
diff changeset
149 /** A localised, human-readable description of the error. */
21313
151d5a5258a8 PurpleConnectionErrorInfo.description should not be const.
Will Thompson <resiak@pidgin.im>
parents: 21298
diff changeset
150 char *description;
21298
d0d9cfaf3fe7 Mark pointed out that PurpleConnectionErrorPair is not a very good name for the
Will Thompson <resiak@pidgin.im>
parents: 21297
diff changeset
151 } PurpleConnectionErrorInfo;
21295
46659b1bf31f PurpleConnectionErrorPair is a better name for struct { PurpleConnectionError;
Will Thompson <resiak@pidgin.im>
parents: 21281
diff changeset
152
10021
5aa380278a15 [gaim-migrate @ 10946]
Mark Doliner <markdoliner@pidgin.im>
parents: 10008
diff changeset
153 #include <time.h>
5aa380278a15 [gaim-migrate @ 10946]
Mark Doliner <markdoliner@pidgin.im>
parents: 10008
diff changeset
154
5944
f19df037ac58 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
155 #include "account.h"
f19df037ac58 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
156 #include "plugin.h"
10400
5f11925078e5 [gaim-migrate @ 11631]
Sean Egan <seanegan@pidgin.im>
parents: 10352
diff changeset
157 #include "status.h"
20443
7487bb69ae76 Create purple_connection_ssl_error(), which converts a PurpleSslErrorType
Will Thompson <resiak@pidgin.im>
parents: 20442
diff changeset
158 #include "sslconn.h"
5944
f19df037ac58 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
159
25885
5b5e2ca316b2 Add @since 2.6.0 doxygen comments to some of our new functions, and
Mark Doliner <markdoliner@pidgin.im>
parents: 25119
diff changeset
160 /**
5b5e2ca316b2 Add @since 2.6.0 doxygen comments to some of our new functions, and
Mark Doliner <markdoliner@pidgin.im>
parents: 25119
diff changeset
161 * Connection UI operations. Used to notify the user of changes to
5b5e2ca316b2 Add @since 2.6.0 doxygen comments to some of our new functions, and
Mark Doliner <markdoliner@pidgin.im>
parents: 25119
diff changeset
162 * connections, such as being disconnected, and to respond to the
5b5e2ca316b2 Add @since 2.6.0 doxygen comments to some of our new functions, and
Mark Doliner <markdoliner@pidgin.im>
parents: 25119
diff changeset
163 * underlying network connection appearing and disappearing. UIs should
5b5e2ca316b2 Add @since 2.6.0 doxygen comments to some of our new functions, and
Mark Doliner <markdoliner@pidgin.im>
parents: 25119
diff changeset
164 * call #purple_connections_set_ui_ops() with an instance of this struct.
19128
871e26c75048 Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <resiak@pidgin.im>
parents: 18190
diff changeset
165 *
25885
5b5e2ca316b2 Add @since 2.6.0 doxygen comments to some of our new functions, and
Mark Doliner <markdoliner@pidgin.im>
parents: 25119
diff changeset
166 * @see @ref ui-ops
19128
871e26c75048 Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <resiak@pidgin.im>
parents: 18190
diff changeset
167 */
5563
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
168 typedef struct
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
169 {
25885
5b5e2ca316b2 Add @since 2.6.0 doxygen comments to some of our new functions, and
Mark Doliner <markdoliner@pidgin.im>
parents: 25119
diff changeset
170 /**
5b5e2ca316b2 Add @since 2.6.0 doxygen comments to some of our new functions, and
Mark Doliner <markdoliner@pidgin.im>
parents: 25119
diff changeset
171 * When an account is connecting, this operation is called to notify
5b5e2ca316b2 Add @since 2.6.0 doxygen comments to some of our new functions, and
Mark Doliner <markdoliner@pidgin.im>
parents: 25119
diff changeset
172 * the UI of what is happening, as well as which @a step out of @a
5b5e2ca316b2 Add @since 2.6.0 doxygen comments to some of our new functions, and
Mark Doliner <markdoliner@pidgin.im>
parents: 25119
diff changeset
173 * step_count has been reached (which might be displayed as a progress
5b5e2ca316b2 Add @since 2.6.0 doxygen comments to some of our new functions, and
Mark Doliner <markdoliner@pidgin.im>
parents: 25119
diff changeset
174 * bar).
5b5e2ca316b2 Add @since 2.6.0 doxygen comments to some of our new functions, and
Mark Doliner <markdoliner@pidgin.im>
parents: 25119
diff changeset
175 * @see #purple_connection_update_progress
19128
871e26c75048 Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <resiak@pidgin.im>
parents: 18190
diff changeset
176 */
871e26c75048 Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <resiak@pidgin.im>
parents: 18190
diff changeset
177 void (*connect_progress)(PurpleConnection *gc,
871e26c75048 Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <resiak@pidgin.im>
parents: 18190
diff changeset
178 const char *text,
871e26c75048 Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <resiak@pidgin.im>
parents: 18190
diff changeset
179 size_t step,
871e26c75048 Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <resiak@pidgin.im>
parents: 18190
diff changeset
180 size_t step_count);
20430
bb30dff3da21 Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <resiak@pidgin.im>
parents: 20429
diff changeset
181
25885
5b5e2ca316b2 Add @since 2.6.0 doxygen comments to some of our new functions, and
Mark Doliner <markdoliner@pidgin.im>
parents: 25119
diff changeset
182 /**
5b5e2ca316b2 Add @since 2.6.0 doxygen comments to some of our new functions, and
Mark Doliner <markdoliner@pidgin.im>
parents: 25119
diff changeset
183 * Called when a connection is established (just before the
5b5e2ca316b2 Add @since 2.6.0 doxygen comments to some of our new functions, and
Mark Doliner <markdoliner@pidgin.im>
parents: 25119
diff changeset
184 * @ref signed-on signal).
19128
871e26c75048 Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <resiak@pidgin.im>
parents: 18190
diff changeset
185 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
186 void (*connected)(PurpleConnection *gc);
25885
5b5e2ca316b2 Add @since 2.6.0 doxygen comments to some of our new functions, and
Mark Doliner <markdoliner@pidgin.im>
parents: 25119
diff changeset
187
5b5e2ca316b2 Add @since 2.6.0 doxygen comments to some of our new functions, and
Mark Doliner <markdoliner@pidgin.im>
parents: 25119
diff changeset
188 /**
5b5e2ca316b2 Add @since 2.6.0 doxygen comments to some of our new functions, and
Mark Doliner <markdoliner@pidgin.im>
parents: 25119
diff changeset
189 * Called when a connection is ended (between the @ref signing-off
5b5e2ca316b2 Add @since 2.6.0 doxygen comments to some of our new functions, and
Mark Doliner <markdoliner@pidgin.im>
parents: 25119
diff changeset
190 * and @ref signed-off signals).
19128
871e26c75048 Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <resiak@pidgin.im>
parents: 18190
diff changeset
191 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
192 void (*disconnected)(PurpleConnection *gc);
20430
bb30dff3da21 Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <resiak@pidgin.im>
parents: 20429
diff changeset
193
25885
5b5e2ca316b2 Add @since 2.6.0 doxygen comments to some of our new functions, and
Mark Doliner <markdoliner@pidgin.im>
parents: 25119
diff changeset
194 /**
5b5e2ca316b2 Add @since 2.6.0 doxygen comments to some of our new functions, and
Mark Doliner <markdoliner@pidgin.im>
parents: 25119
diff changeset
195 * Used to display connection-specific notices. (Pidgin's Gtk user
5b5e2ca316b2 Add @since 2.6.0 doxygen comments to some of our new functions, and
Mark Doliner <markdoliner@pidgin.im>
parents: 25119
diff changeset
196 * interface implements this as a no-op; #purple_connection_notice(),
5b5e2ca316b2 Add @since 2.6.0 doxygen comments to some of our new functions, and
Mark Doliner <markdoliner@pidgin.im>
parents: 25119
diff changeset
197 * which uses this operation, is not used by any of the protocols
5b5e2ca316b2 Add @since 2.6.0 doxygen comments to some of our new functions, and
Mark Doliner <markdoliner@pidgin.im>
parents: 25119
diff changeset
198 * shipped with libpurple.)
19128
871e26c75048 Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <resiak@pidgin.im>
parents: 18190
diff changeset
199 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
200 void (*notice)(PurpleConnection *gc, const char *text);
20430
bb30dff3da21 Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <resiak@pidgin.im>
parents: 20429
diff changeset
201
25885
5b5e2ca316b2 Add @since 2.6.0 doxygen comments to some of our new functions, and
Mark Doliner <markdoliner@pidgin.im>
parents: 25119
diff changeset
202 /**
5b5e2ca316b2 Add @since 2.6.0 doxygen comments to some of our new functions, and
Mark Doliner <markdoliner@pidgin.im>
parents: 25119
diff changeset
203 * Called when libpurple discovers that the computer's network
5b5e2ca316b2 Add @since 2.6.0 doxygen comments to some of our new functions, and
Mark Doliner <markdoliner@pidgin.im>
parents: 25119
diff changeset
204 * connection is active. On Linux, this uses Network Manager if
5b5e2ca316b2 Add @since 2.6.0 doxygen comments to some of our new functions, and
Mark Doliner <markdoliner@pidgin.im>
parents: 25119
diff changeset
205 * available; on Windows, it uses Win32's network change notification
5b5e2ca316b2 Add @since 2.6.0 doxygen comments to some of our new functions, and
Mark Doliner <markdoliner@pidgin.im>
parents: 25119
diff changeset
206 * infrastructure.
19128
871e26c75048 Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <resiak@pidgin.im>
parents: 18190
diff changeset
207 */
22093
a5e784e3b6a7 Felipe Contreras, one of our older Crazy Pacth Writers, noticed that these
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 21511
diff changeset
208 void (*network_connected)(void);
25885
5b5e2ca316b2 Add @since 2.6.0 doxygen comments to some of our new functions, and
Mark Doliner <markdoliner@pidgin.im>
parents: 25119
diff changeset
209
5b5e2ca316b2 Add @since 2.6.0 doxygen comments to some of our new functions, and
Mark Doliner <markdoliner@pidgin.im>
parents: 25119
diff changeset
210 /**
5b5e2ca316b2 Add @since 2.6.0 doxygen comments to some of our new functions, and
Mark Doliner <markdoliner@pidgin.im>
parents: 25119
diff changeset
211 * Called when libpurple discovers that the computer's network
5b5e2ca316b2 Add @since 2.6.0 doxygen comments to some of our new functions, and
Mark Doliner <markdoliner@pidgin.im>
parents: 25119
diff changeset
212 * connection has gone away.
19128
871e26c75048 Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <resiak@pidgin.im>
parents: 18190
diff changeset
213 */
22093
a5e784e3b6a7 Felipe Contreras, one of our older Crazy Pacth Writers, noticed that these
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 21511
diff changeset
214 void (*network_disconnected)(void);
5563
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
215
25885
5b5e2ca316b2 Add @since 2.6.0 doxygen comments to some of our new functions, and
Mark Doliner <markdoliner@pidgin.im>
parents: 25119
diff changeset
216 /**
5b5e2ca316b2 Add @since 2.6.0 doxygen comments to some of our new functions, and
Mark Doliner <markdoliner@pidgin.im>
parents: 25119
diff changeset
217 * Called when an error causes a connection to be disconnected.
32152
94075390338a Remove PurpleConnectionUiOps.report_disconnect
Mark Doliner <markdoliner@pidgin.im>
parents: 29814
diff changeset
218 * Called before #disconnected.
25885
5b5e2ca316b2 Add @since 2.6.0 doxygen comments to some of our new functions, and
Mark Doliner <markdoliner@pidgin.im>
parents: 25119
diff changeset
219 *
32152
94075390338a Remove PurpleConnectionUiOps.report_disconnect
Mark Doliner <markdoliner@pidgin.im>
parents: 29814
diff changeset
220 * @param reason why the connection ended, if known, or
94075390338a Remove PurpleConnectionUiOps.report_disconnect
Mark Doliner <markdoliner@pidgin.im>
parents: 29814
diff changeset
221 * #PURPLE_CONNECTION_ERROR_OTHER_ERROR, if not.
94075390338a Remove PurpleConnectionUiOps.report_disconnect
Mark Doliner <markdoliner@pidgin.im>
parents: 29814
diff changeset
222 * @param text a localized message describing the disconnection
94075390338a Remove PurpleConnectionUiOps.report_disconnect
Mark Doliner <markdoliner@pidgin.im>
parents: 29814
diff changeset
223 * in more detail to the user.
32157
39ba2e2492ee Rename purple_connection_error_reason to purple_connection_error
Mark Doliner <markdoliner@pidgin.im>
parents: 32156
diff changeset
224 * @see #purple_connection_error
20430
bb30dff3da21 Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <resiak@pidgin.im>
parents: 20429
diff changeset
225 */
32153
121f15699f88 Rename the report_disconnect_reason cb function to report_disconnect
Mark Doliner <markdoliner@pidgin.im>
parents: 32152
diff changeset
226 void (*report_disconnect)(PurpleConnection *gc,
121f15699f88 Rename the report_disconnect_reason cb function to report_disconnect
Mark Doliner <markdoliner@pidgin.im>
parents: 32152
diff changeset
227 PurpleConnectionError reason,
121f15699f88 Rename the report_disconnect_reason cb function to report_disconnect
Mark Doliner <markdoliner@pidgin.im>
parents: 32152
diff changeset
228 const char *text);
20430
bb30dff3da21 Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <resiak@pidgin.im>
parents: 20429
diff changeset
229
16743
1ce5ffe12e2a Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents: 15884
diff changeset
230 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
231 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
232 void (*_purple_reserved3)(void);
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
233 } PurpleConnectionUiOps;
5563
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
234
34748
02efb47ea4f4 Added GObject boilerplate code for PurpleConnection
Ankit Vani <a@nevitus.org>
parents: 34746
diff changeset
235 /**
02efb47ea4f4 Added GObject boilerplate code for PurpleConnection
Ankit Vani <a@nevitus.org>
parents: 34746
diff changeset
236 * Represents an active connection on an account.
02efb47ea4f4 Added GObject boilerplate code for PurpleConnection
Ankit Vani <a@nevitus.org>
parents: 34746
diff changeset
237 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
238 struct _PurpleConnection
5563
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
239 {
34748
02efb47ea4f4 Added GObject boilerplate code for PurpleConnection
Ankit Vani <a@nevitus.org>
parents: 34746
diff changeset
240 /*< private >*/
02efb47ea4f4 Added GObject boilerplate code for PurpleConnection
Ankit Vani <a@nevitus.org>
parents: 34746
diff changeset
241 GObject gparent;
02efb47ea4f4 Added GObject boilerplate code for PurpleConnection
Ankit Vani <a@nevitus.org>
parents: 34746
diff changeset
242 };
5563
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
243
34748
02efb47ea4f4 Added GObject boilerplate code for PurpleConnection
Ankit Vani <a@nevitus.org>
parents: 34746
diff changeset
244 /** Base class for all #PurpleConnection's */
02efb47ea4f4 Added GObject boilerplate code for PurpleConnection
Ankit Vani <a@nevitus.org>
parents: 34746
diff changeset
245 struct _PurpleConnectionClass {
02efb47ea4f4 Added GObject boilerplate code for PurpleConnection
Ankit Vani <a@nevitus.org>
parents: 34746
diff changeset
246 /*< private >*/
02efb47ea4f4 Added GObject boilerplate code for PurpleConnection
Ankit Vani <a@nevitus.org>
parents: 34746
diff changeset
247 GObjectClass parent_class;
5563
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
248
34748
02efb47ea4f4 Added GObject boilerplate code for PurpleConnection
Ankit Vani <a@nevitus.org>
parents: 34746
diff changeset
249 void (*_purple_reserved1)(void);
02efb47ea4f4 Added GObject boilerplate code for PurpleConnection
Ankit Vani <a@nevitus.org>
parents: 34746
diff changeset
250 void (*_purple_reserved2)(void);
02efb47ea4f4 Added GObject boilerplate code for PurpleConnection
Ankit Vani <a@nevitus.org>
parents: 34746
diff changeset
251 void (*_purple_reserved3)(void);
02efb47ea4f4 Added GObject boilerplate code for PurpleConnection
Ankit Vani <a@nevitus.org>
parents: 34746
diff changeset
252 void (*_purple_reserved4)(void);
5563
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
253 };
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
254
32787
7072f190d6ad Use G_BEGIN/END_DECLS in public libpurple files. This was
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32687
diff changeset
255 G_BEGIN_DECLS
5944
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 /**************************************************************************/
f19df037ac58 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
258 /** @name Connection API */
f19df037ac58 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
259 /**************************************************************************/
6488
6a47a95e4dbb [gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents: 6485
diff changeset
260 /*@{*/
5944
f19df037ac58 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
261
6581
dd89eb44f0ee [gaim-migrate @ 7103]
Nathan Walp <nwalp@pidgin.im>
parents: 6488
diff changeset
262 /**
34748
02efb47ea4f4 Added GObject boilerplate code for PurpleConnection
Ankit Vani <a@nevitus.org>
parents: 34746
diff changeset
263 * Returns the GType for the Connection object.
02efb47ea4f4 Added GObject boilerplate code for PurpleConnection
Ankit Vani <a@nevitus.org>
parents: 34746
diff changeset
264 */
02efb47ea4f4 Added GObject boilerplate code for PurpleConnection
Ankit Vani <a@nevitus.org>
parents: 34746
diff changeset
265 GType purple_connection_get_type(void);
02efb47ea4f4 Added GObject boilerplate code for PurpleConnection
Ankit Vani <a@nevitus.org>
parents: 34746
diff changeset
266
02efb47ea4f4 Added GObject boilerplate code for PurpleConnection
Ankit Vani <a@nevitus.org>
parents: 34746
diff changeset
267 /**
11718
90804d019837 [gaim-migrate @ 14009]
Mark Doliner <markdoliner@pidgin.im>
parents: 10758
diff changeset
268 * Sets the connection state. PRPLs should call this and pass in
34746
dc9c911dbd35 Started GObjectification of PurpleConnection.
Ankit Vani <a@nevitus.org>
parents: 34646
diff changeset
269 * the state #PURPLE_CONNECTION_CONNECTED when the account is completely
11718
90804d019837 [gaim-migrate @ 14009]
Mark Doliner <markdoliner@pidgin.im>
parents: 10758
diff changeset
270 * 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
271 * the core can call prpl->set_status, and it successfully changes
90804d019837 [gaim-migrate @ 14009]
Mark Doliner <markdoliner@pidgin.im>
parents: 10758
diff changeset
272 * your status, then the account is online.
5563
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
273 *
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
274 * @param gc The connection.
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
275 * @param state The connection state.
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
276 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
277 void purple_connection_set_state(PurpleConnection *gc, PurpleConnectionState state);
5563
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
278
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
279 /**
32678
01f6312a4a7b On the way to hiding the PurpleConnection struct.
Andrew Victor <andrew.victor@mxit.com>
parents: 32604
diff changeset
280 * Sets the connection flags.
01f6312a4a7b On the way to hiding the PurpleConnection struct.
Andrew Victor <andrew.victor@mxit.com>
parents: 32604
diff changeset
281 *
01f6312a4a7b On the way to hiding the PurpleConnection struct.
Andrew Victor <andrew.victor@mxit.com>
parents: 32604
diff changeset
282 * @param gc The connection.
01f6312a4a7b On the way to hiding the PurpleConnection struct.
Andrew Victor <andrew.victor@mxit.com>
parents: 32604
diff changeset
283 * @param flags The flags.
01f6312a4a7b On the way to hiding the PurpleConnection struct.
Andrew Victor <andrew.victor@mxit.com>
parents: 32604
diff changeset
284 */
01f6312a4a7b On the way to hiding the PurpleConnection struct.
Andrew Victor <andrew.victor@mxit.com>
parents: 32604
diff changeset
285 void purple_connection_set_flags(PurpleConnection *gc, PurpleConnectionFlags flags);
01f6312a4a7b On the way to hiding the PurpleConnection struct.
Andrew Victor <andrew.victor@mxit.com>
parents: 32604
diff changeset
286
01f6312a4a7b On the way to hiding the PurpleConnection struct.
Andrew Victor <andrew.victor@mxit.com>
parents: 32604
diff changeset
287 /**
5563
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
288 * Sets the connection's account.
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
289 *
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
290 * @param gc The connection.
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
291 * @param account The account.
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
292 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
293 void purple_connection_set_account(PurpleConnection *gc, PurpleAccount *account);
5563
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
294
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
295 /**
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
296 * Sets the connection's displayed name.
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
297 *
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
298 * @param gc The connection.
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
299 * @param name The displayed name.
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
300 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
301 void purple_connection_set_display_name(PurpleConnection *gc, const char *name);
5563
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
302
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
303 /**
24937
3664132c36c8 Added purple_connection_set_protocol_data and purple_connection_get_protocol_data
Gary Kramlich <grim@reaperworld.com>
parents: 23517
diff changeset
304 * Sets the protocol data for a connection.
3664132c36c8 Added purple_connection_set_protocol_data and purple_connection_get_protocol_data
Gary Kramlich <grim@reaperworld.com>
parents: 23517
diff changeset
305 *
3664132c36c8 Added purple_connection_set_protocol_data and purple_connection_get_protocol_data
Gary Kramlich <grim@reaperworld.com>
parents: 23517
diff changeset
306 * @param connection The PurpleConnection.
3664132c36c8 Added purple_connection_set_protocol_data and purple_connection_get_protocol_data
Gary Kramlich <grim@reaperworld.com>
parents: 23517
diff changeset
307 * @param proto_data The protocol data to set for the connection.
3664132c36c8 Added purple_connection_set_protocol_data and purple_connection_get_protocol_data
Gary Kramlich <grim@reaperworld.com>
parents: 23517
diff changeset
308 */
3664132c36c8 Added purple_connection_set_protocol_data and purple_connection_get_protocol_data
Gary Kramlich <grim@reaperworld.com>
parents: 23517
diff changeset
309 void purple_connection_set_protocol_data(PurpleConnection *connection, void *proto_data);
3664132c36c8 Added purple_connection_set_protocol_data and purple_connection_get_protocol_data
Gary Kramlich <grim@reaperworld.com>
parents: 23517
diff changeset
310
3664132c36c8 Added purple_connection_set_protocol_data and purple_connection_get_protocol_data
Gary Kramlich <grim@reaperworld.com>
parents: 23517
diff changeset
311 /**
5563
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
312 * Returns the connection state.
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
313 *
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
314 * @param gc The connection.
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
315 *
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
316 * @return The connection state.
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
317 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
318 PurpleConnectionState purple_connection_get_state(const PurpleConnection *gc);
5563
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
319
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
320 /**
32678
01f6312a4a7b On the way to hiding the PurpleConnection struct.
Andrew Victor <andrew.victor@mxit.com>
parents: 32604
diff changeset
321 * Returns the connection flags.
01f6312a4a7b On the way to hiding the PurpleConnection struct.
Andrew Victor <andrew.victor@mxit.com>
parents: 32604
diff changeset
322 *
01f6312a4a7b On the way to hiding the PurpleConnection struct.
Andrew Victor <andrew.victor@mxit.com>
parents: 32604
diff changeset
323 * @param gc The connection.
01f6312a4a7b On the way to hiding the PurpleConnection struct.
Andrew Victor <andrew.victor@mxit.com>
parents: 32604
diff changeset
324 *
01f6312a4a7b On the way to hiding the PurpleConnection struct.
Andrew Victor <andrew.victor@mxit.com>
parents: 32604
diff changeset
325 * @return The connection flags.
01f6312a4a7b On the way to hiding the PurpleConnection struct.
Andrew Victor <andrew.victor@mxit.com>
parents: 32604
diff changeset
326 */
01f6312a4a7b On the way to hiding the PurpleConnection struct.
Andrew Victor <andrew.victor@mxit.com>
parents: 32604
diff changeset
327 PurpleConnectionFlags purple_connection_get_flags(const PurpleConnection *gc);
01f6312a4a7b On the way to hiding the PurpleConnection struct.
Andrew Victor <andrew.victor@mxit.com>
parents: 32604
diff changeset
328
01f6312a4a7b On the way to hiding the PurpleConnection struct.
Andrew Victor <andrew.victor@mxit.com>
parents: 32604
diff changeset
329 /**
9019
b9a333b36763 [gaim-migrate @ 9795]
Mark Doliner <markdoliner@pidgin.im>
parents: 8735
diff changeset
330 * Returns TRUE if the account is connected, otherwise returns FALSE.
b9a333b36763 [gaim-migrate @ 9795]
Mark Doliner <markdoliner@pidgin.im>
parents: 8735
diff changeset
331 *
b9a333b36763 [gaim-migrate @ 9795]
Mark Doliner <markdoliner@pidgin.im>
parents: 8735
diff changeset
332 * @return TRUE if the account is connected, otherwise returns FALSE.
b9a333b36763 [gaim-migrate @ 9795]
Mark Doliner <markdoliner@pidgin.im>
parents: 8735
diff changeset
333 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
334 #define PURPLE_CONNECTION_IS_CONNECTED(gc) \
34746
dc9c911dbd35 Started GObjectification of PurpleConnection.
Ankit Vani <a@nevitus.org>
parents: 34646
diff changeset
335 (purple_connection_get_state(gc) == PURPLE_CONNECTION_CONNECTED)
9019
b9a333b36763 [gaim-migrate @ 9795]
Mark Doliner <markdoliner@pidgin.im>
parents: 8735
diff changeset
336
b9a333b36763 [gaim-migrate @ 9795]
Mark Doliner <markdoliner@pidgin.im>
parents: 8735
diff changeset
337 /**
5563
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
338 * Returns the connection's account.
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
339 *
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
340 * @param gc The connection.
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
341 *
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
342 * @return The connection's account.
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 PurpleAccount *purple_connection_get_account(const PurpleConnection *gc);
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 /**
22336
ac905bb0a8ec Add accessor and update finch to not touch the internals of PurpleConnection.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 22277
diff changeset
347 * Returns the protocol plugin managing a connection.
ac905bb0a8ec Add accessor and update finch to not touch the internals of PurpleConnection.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 22277
diff changeset
348 *
ac905bb0a8ec Add accessor and update finch to not touch the internals of PurpleConnection.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 22277
diff changeset
349 * @param gc The connection.
ac905bb0a8ec Add accessor and update finch to not touch the internals of PurpleConnection.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 22277
diff changeset
350 *
ac905bb0a8ec Add accessor and update finch to not touch the internals of PurpleConnection.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 22277
diff changeset
351 * @return The protocol plugin.
ac905bb0a8ec Add accessor and update finch to not touch the internals of PurpleConnection.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 22277
diff changeset
352 */
ac905bb0a8ec Add accessor and update finch to not touch the internals of PurpleConnection.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 22277
diff changeset
353 PurplePlugin * purple_connection_get_prpl(const PurpleConnection *gc);
ac905bb0a8ec Add accessor and update finch to not touch the internals of PurpleConnection.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 22277
diff changeset
354
ac905bb0a8ec Add accessor and update finch to not touch the internals of PurpleConnection.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 22277
diff changeset
355 /**
34044
0a176fe8b867 Clean up comments.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 34023
diff changeset
356 * Returns the connection's password.
10740
a1cb6b819a21 [gaim-migrate @ 12342]
Mark Doliner <markdoliner@pidgin.im>
parents: 10738
diff changeset
357 *
a1cb6b819a21 [gaim-migrate @ 12342]
Mark Doliner <markdoliner@pidgin.im>
parents: 10738
diff changeset
358 * @param gc The connection.
a1cb6b819a21 [gaim-migrate @ 12342]
Mark Doliner <markdoliner@pidgin.im>
parents: 10738
diff changeset
359 *
a1cb6b819a21 [gaim-migrate @ 12342]
Mark Doliner <markdoliner@pidgin.im>
parents: 10738
diff changeset
360 * @return The connection's password.
a1cb6b819a21 [gaim-migrate @ 12342]
Mark Doliner <markdoliner@pidgin.im>
parents: 10738
diff changeset
361 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
362 const char *purple_connection_get_password(const PurpleConnection *gc);
10740
a1cb6b819a21 [gaim-migrate @ 12342]
Mark Doliner <markdoliner@pidgin.im>
parents: 10738
diff changeset
363
a1cb6b819a21 [gaim-migrate @ 12342]
Mark Doliner <markdoliner@pidgin.im>
parents: 10738
diff changeset
364 /**
34750
826c1611ef90 Refactored protocols to use the initial GObject connection API.
Ankit Vani <a@nevitus.org>
parents: 34748
diff changeset
365 * Returns a list of active chat conversations on a connection.
826c1611ef90 Refactored protocols to use the initial GObject connection API.
Ankit Vani <a@nevitus.org>
parents: 34748
diff changeset
366 *
826c1611ef90 Refactored protocols to use the initial GObject connection API.
Ankit Vani <a@nevitus.org>
parents: 34748
diff changeset
367 * @param gc The connection.
826c1611ef90 Refactored protocols to use the initial GObject connection API.
Ankit Vani <a@nevitus.org>
parents: 34748
diff changeset
368 *
826c1611ef90 Refactored protocols to use the initial GObject connection API.
Ankit Vani <a@nevitus.org>
parents: 34748
diff changeset
369 * @return The active chats on the connection.
826c1611ef90 Refactored protocols to use the initial GObject connection API.
Ankit Vani <a@nevitus.org>
parents: 34748
diff changeset
370 */
826c1611ef90 Refactored protocols to use the initial GObject connection API.
Ankit Vani <a@nevitus.org>
parents: 34748
diff changeset
371 GSList *purple_connection_get_active_chats(const PurpleConnection *gc);
826c1611ef90 Refactored protocols to use the initial GObject connection API.
Ankit Vani <a@nevitus.org>
parents: 34748
diff changeset
372
826c1611ef90 Refactored protocols to use the initial GObject connection API.
Ankit Vani <a@nevitus.org>
parents: 34748
diff changeset
373 /**
5563
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
374 * Returns the connection's displayed name.
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
375 *
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
376 * @param gc The connection.
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
377 *
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
378 * @return The connection's displayed name.
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
379 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
380 const char *purple_connection_get_display_name(const PurpleConnection *gc);
5563
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
381
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
382 /**
24937
3664132c36c8 Added purple_connection_set_protocol_data and purple_connection_get_protocol_data
Gary Kramlich <grim@reaperworld.com>
parents: 23517
diff changeset
383 * Gets the protocol data from a connection.
3664132c36c8 Added purple_connection_set_protocol_data and purple_connection_get_protocol_data
Gary Kramlich <grim@reaperworld.com>
parents: 23517
diff changeset
384 *
3664132c36c8 Added purple_connection_set_protocol_data and purple_connection_get_protocol_data
Gary Kramlich <grim@reaperworld.com>
parents: 23517
diff changeset
385 * @param connection The PurpleConnection.
3664132c36c8 Added purple_connection_set_protocol_data and purple_connection_get_protocol_data
Gary Kramlich <grim@reaperworld.com>
parents: 23517
diff changeset
386 *
3664132c36c8 Added purple_connection_set_protocol_data and purple_connection_get_protocol_data
Gary Kramlich <grim@reaperworld.com>
parents: 23517
diff changeset
387 * @return The protocol data for the connection.
3664132c36c8 Added purple_connection_set_protocol_data and purple_connection_get_protocol_data
Gary Kramlich <grim@reaperworld.com>
parents: 23517
diff changeset
388 */
3664132c36c8 Added purple_connection_set_protocol_data and purple_connection_get_protocol_data
Gary Kramlich <grim@reaperworld.com>
parents: 23517
diff changeset
389 void *purple_connection_get_protocol_data(const PurpleConnection *connection);
3664132c36c8 Added purple_connection_set_protocol_data and purple_connection_get_protocol_data
Gary Kramlich <grim@reaperworld.com>
parents: 23517
diff changeset
390
3664132c36c8 Added purple_connection_set_protocol_data and purple_connection_get_protocol_data
Gary Kramlich <grim@reaperworld.com>
parents: 23517
diff changeset
391 /**
5563
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
392 * Updates the connection progress.
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
393 *
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
394 * @param gc The connection.
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
395 * @param text Information on the current step.
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
396 * @param step The current step.
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
397 * @param count The total number of steps.
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
398 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
399 void purple_connection_update_progress(PurpleConnection *gc, const char *text,
5563
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
400 size_t step, size_t count);
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
401
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
402 /**
5571
b709464f507e [gaim-migrate @ 5973]
Christian Hammond <chipx86@chipx86.com>
parents: 5564
diff changeset
403 * Displays a connection-specific notice.
b709464f507e [gaim-migrate @ 5973]
Christian Hammond <chipx86@chipx86.com>
parents: 5564
diff changeset
404 *
b709464f507e [gaim-migrate @ 5973]
Christian Hammond <chipx86@chipx86.com>
parents: 5564
diff changeset
405 * @param gc The connection.
b709464f507e [gaim-migrate @ 5973]
Christian Hammond <chipx86@chipx86.com>
parents: 5564
diff changeset
406 * @param text The notice text.
b709464f507e [gaim-migrate @ 5973]
Christian Hammond <chipx86@chipx86.com>
parents: 5564
diff changeset
407 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
408 void purple_connection_notice(PurpleConnection *gc, const char *text);
5571
b709464f507e [gaim-migrate @ 5973]
Christian Hammond <chipx86@chipx86.com>
parents: 5564
diff changeset
409
b709464f507e [gaim-migrate @ 5973]
Christian Hammond <chipx86@chipx86.com>
parents: 5564
diff changeset
410 /**
21280
2db787ddddf8 Document that the char * parameter of purple_connection_error{,_reason} may
Will Thompson <resiak@pidgin.im>
parents: 21279
diff changeset
411 * Closes a connection with an error and a human-readable description of the
34751
374a9500c430 Added _purple_connection_wants_to_die() to internal.h to be used by account.c. Removed _purple_connection_destroy().
Ankit Vani <a@nevitus.org>
parents: 34750
diff changeset
412 * error.
20430
bb30dff3da21 Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <resiak@pidgin.im>
parents: 20429
diff changeset
413 *
21297
9c34edc92ad2 Document the gc parameter of purple_connection_error_reason to shut doxygen up.
Will Thompson <resiak@pidgin.im>
parents: 21295
diff changeset
414 * @param gc the connection which is closing.
20430
bb30dff3da21 Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <resiak@pidgin.im>
parents: 20429
diff changeset
415 * @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
416 * @param description a non-@c NULL localized description of the error.
20430
bb30dff3da21 Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <resiak@pidgin.im>
parents: 20429
diff changeset
417 */
bb30dff3da21 Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <resiak@pidgin.im>
parents: 20429
diff changeset
418 void
32157
39ba2e2492ee Rename purple_connection_error_reason to purple_connection_error
Mark Doliner <markdoliner@pidgin.im>
parents: 32156
diff changeset
419 purple_connection_error(PurpleConnection *gc,
39ba2e2492ee Rename purple_connection_error_reason to purple_connection_error
Mark Doliner <markdoliner@pidgin.im>
parents: 32156
diff changeset
420 PurpleConnectionError reason,
39ba2e2492ee Rename purple_connection_error_reason to purple_connection_error
Mark Doliner <markdoliner@pidgin.im>
parents: 32156
diff changeset
421 const char *description);
20430
bb30dff3da21 Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <resiak@pidgin.im>
parents: 20429
diff changeset
422
20431
49979e453876 Create purple_connection_reason_is_fatal, which is basically a replacement for
Will Thompson <resiak@pidgin.im>
parents: 20430
diff changeset
423 /**
20443
7487bb69ae76 Create purple_connection_ssl_error(), which converts a PurpleSslErrorType
Will Thompson <resiak@pidgin.im>
parents: 20442
diff changeset
424 * 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
425 * turning the #PurpleSslErrorType into a #PurpleConnectionError and a
32157
39ba2e2492ee Rename purple_connection_error_reason to purple_connection_error
Mark Doliner <markdoliner@pidgin.im>
parents: 32156
diff changeset
426 * human-readable string and then calling purple_connection_error().
20443
7487bb69ae76 Create purple_connection_ssl_error(), which converts a PurpleSslErrorType
Will Thompson <resiak@pidgin.im>
parents: 20442
diff changeset
427 */
7487bb69ae76 Create purple_connection_ssl_error(), which converts a PurpleSslErrorType
Will Thompson <resiak@pidgin.im>
parents: 20442
diff changeset
428 void
7487bb69ae76 Create purple_connection_ssl_error(), which converts a PurpleSslErrorType
Will Thompson <resiak@pidgin.im>
parents: 20442
diff changeset
429 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
430 PurpleSslErrorType ssl_error);
7487bb69ae76 Create purple_connection_ssl_error(), which converts a PurpleSslErrorType
Will Thompson <resiak@pidgin.im>
parents: 20442
diff changeset
431
7487bb69ae76 Create purple_connection_ssl_error(), which converts a PurpleSslErrorType
Will Thompson <resiak@pidgin.im>
parents: 20442
diff changeset
432 /**
20431
49979e453876 Create purple_connection_reason_is_fatal, which is basically a replacement for
Will Thompson <resiak@pidgin.im>
parents: 20430
diff changeset
433 * 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
434 * 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
435 * 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
436 * 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
437 * 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
438 * 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
439 * is @c FALSE. On the other hand,
21279
40685e1f50ca Rename:
Will Thompson <resiak@pidgin.im>
parents: 21278
diff changeset
440 * #PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED probably indicates a
40685e1f50ca Rename:
Will Thompson <resiak@pidgin.im>
parents: 21278
diff changeset
441 * 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
442 * <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
443 * (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
444 *
21154
be1799decdb7 Clarify the documentation of the return value of
Will Thompson <resiak@pidgin.im>
parents: 21149
diff changeset
445 * @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
446 * @c FALSE otherwise.
20431
49979e453876 Create purple_connection_reason_is_fatal, which is basically a replacement for
Will Thompson <resiak@pidgin.im>
parents: 20430
diff changeset
447 */
49979e453876 Create purple_connection_reason_is_fatal, which is basically a replacement for
Will Thompson <resiak@pidgin.im>
parents: 20430
diff changeset
448 gboolean
21279
40685e1f50ca Rename:
Will Thompson <resiak@pidgin.im>
parents: 21278
diff changeset
449 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
450
32679
fd936a0b84f7 Add a purple_connection_update_last_received() function to update the
Andrew Victor <andrew.victor@mxit.com>
parents: 32678
diff changeset
451 /**
fd936a0b84f7 Add a purple_connection_update_last_received() function to update the
Andrew Victor <andrew.victor@mxit.com>
parents: 32678
diff changeset
452 * Indicate that a packet was received on the connection.
fd936a0b84f7 Add a purple_connection_update_last_received() function to update the
Andrew Victor <andrew.victor@mxit.com>
parents: 32678
diff changeset
453 * Set by the prpl to avoid sending unneeded keepalives.
fd936a0b84f7 Add a purple_connection_update_last_received() function to update the
Andrew Victor <andrew.victor@mxit.com>
parents: 32678
diff changeset
454 *
fd936a0b84f7 Add a purple_connection_update_last_received() function to update the
Andrew Victor <andrew.victor@mxit.com>
parents: 32678
diff changeset
455 * @param gc The connection.
fd936a0b84f7 Add a purple_connection_update_last_received() function to update the
Andrew Victor <andrew.victor@mxit.com>
parents: 32678
diff changeset
456 */
fd936a0b84f7 Add a purple_connection_update_last_received() function to update the
Andrew Victor <andrew.victor@mxit.com>
parents: 32678
diff changeset
457 void purple_connection_update_last_received(PurpleConnection *gc);
fd936a0b84f7 Add a purple_connection_update_last_received() function to update the
Andrew Victor <andrew.victor@mxit.com>
parents: 32678
diff changeset
458
5944
f19df037ac58 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
459 /*@}*/
f19df037ac58 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
460
f19df037ac58 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
461 /**************************************************************************/
f19df037ac58 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
462 /** @name Connections API */
f19df037ac58 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
463 /**************************************************************************/
f19df037ac58 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
464 /*@{*/
f19df037ac58 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
465
5564
1779a1bfbdb8 [gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents: 5563
diff changeset
466 /**
5563
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
467 * Disconnects from all connections.
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
468 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
469 void purple_connections_disconnect_all(void);
5563
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
470
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
471 /**
10352
802e7ab5b838 [gaim-migrate @ 11569]
Mark Doliner <markdoliner@pidgin.im>
parents: 10272
diff changeset
472 * Returns a list of all active connections. This does not
802e7ab5b838 [gaim-migrate @ 11569]
Mark Doliner <markdoliner@pidgin.im>
parents: 10272
diff changeset
473 * include connections that are in the process of connecting.
5563
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
474 *
18190
bcf28ef7e8ff Re-fix the DBus list handling code by killing const GList* / const GSList*
Richard Laager <rlaager@pidgin.im>
parents: 18122
diff changeset
475 * @constreturn A list of all active connections.
5563
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
476 */
18122
9bf9970c1b6a disapproval of revision '2d8ea56b90971e7851442d96b7d74ecb4f052126'
Richard Laager <rlaager@pidgin.im>
parents: 18121
diff changeset
477 GList *purple_connections_get_all(void);
5563
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
478
5564
1779a1bfbdb8 [gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents: 5563
diff changeset
479 /**
1779a1bfbdb8 [gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents: 5563
diff changeset
480 * Returns a list of all connections in the process of connecting.
1779a1bfbdb8 [gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents: 5563
diff changeset
481 *
18190
bcf28ef7e8ff Re-fix the DBus list handling code by killing const GList* / const GSList*
Richard Laager <rlaager@pidgin.im>
parents: 18122
diff changeset
482 * @constreturn A list of connecting connections.
5564
1779a1bfbdb8 [gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents: 5563
diff changeset
483 */
18122
9bf9970c1b6a disapproval of revision '2d8ea56b90971e7851442d96b7d74ecb4f052126'
Richard Laager <rlaager@pidgin.im>
parents: 18121
diff changeset
484 GList *purple_connections_get_connecting(void);
5564
1779a1bfbdb8 [gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents: 5563
diff changeset
485
9221
cae2261ba6f2 [gaim-migrate @ 10017]
Ambrose Li <ambrose.li@gmail.com>
parents: 9041
diff changeset
486 /**
cae2261ba6f2 [gaim-migrate @ 10017]
Ambrose Li <ambrose.li@gmail.com>
parents: 9041
diff changeset
487 * 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
488 *
cae2261ba6f2 [gaim-migrate @ 10017]
Ambrose Li <ambrose.li@gmail.com>
parents: 9041
diff changeset
489 * @return @c TRUE if gc is valid.
27349
52870be72b22 Clarify that PURPLE_CONNECTION_IS_VALID is deprecated, in case it wasn't
Mark Doliner <markdoliner@pidgin.im>
parents: 26054
diff changeset
490 *
52870be72b22 Clarify that PURPLE_CONNECTION_IS_VALID is deprecated, in case it wasn't
Mark Doliner <markdoliner@pidgin.im>
parents: 26054
diff changeset
491 * @deprecated Do not use this. Instead, cancel your asynchronous request
52870be72b22 Clarify that PURPLE_CONNECTION_IS_VALID is deprecated, in case it wasn't
Mark Doliner <markdoliner@pidgin.im>
parents: 26054
diff changeset
492 * when the PurpleConnection is destroyed.
9221
cae2261ba6f2 [gaim-migrate @ 10017]
Ambrose Li <ambrose.li@gmail.com>
parents: 9041
diff changeset
493 */
14183
bdde840e984c [gaim-migrate @ 16755]
Mark Doliner <markdoliner@pidgin.im>
parents: 14030
diff changeset
494 /*
bdde840e984c [gaim-migrate @ 16755]
Mark Doliner <markdoliner@pidgin.im>
parents: 14030
diff changeset
495 * TODO: Eventually this bad boy will be removed, because it is
bdde840e984c [gaim-migrate @ 16755]
Mark Doliner <markdoliner@pidgin.im>
parents: 14030
diff changeset
496 * a gross fix for a crashy problem.
bdde840e984c [gaim-migrate @ 16755]
Mark Doliner <markdoliner@pidgin.im>
parents: 14030
diff changeset
497 */
18122
9bf9970c1b6a disapproval of revision '2d8ea56b90971e7851442d96b7d74ecb4f052126'
Richard Laager <rlaager@pidgin.im>
parents: 18121
diff changeset
498 #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
499
5944
f19df037ac58 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
500 /*@}*/
f19df037ac58 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
501
5563
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
502 /**************************************************************************/
7122
5f40c16a4ae4 [gaim-migrate @ 7689]
Christian Hammond <chipx86@chipx86.com>
parents: 7035
diff changeset
503 /** @name UI Registration Functions */
5563
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
504 /**************************************************************************/
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
505 /*@{*/
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
506
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
507 /**
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
508 * Sets the UI operations structure to be used for connections.
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
509 *
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
510 * @param ops The UI operations structure.
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
511 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
512 void purple_connections_set_ui_ops(PurpleConnectionUiOps *ops);
5563
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
513
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 * Returns the UI operations structure used for connections.
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 * @return The UI operations structure in use.
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
518 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
519 PurpleConnectionUiOps *purple_connections_get_ui_ops(void);
5563
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
520
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
521 /*@}*/
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
522
6488
6a47a95e4dbb [gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents: 6485
diff changeset
523 /**************************************************************************/
6a47a95e4dbb [gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents: 6485
diff changeset
524 /** @name Connections Subsystem */
6a47a95e4dbb [gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents: 6485
diff changeset
525 /**************************************************************************/
6a47a95e4dbb [gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents: 6485
diff changeset
526 /*@{*/
6a47a95e4dbb [gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents: 6485
diff changeset
527
6a47a95e4dbb [gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents: 6485
diff changeset
528 /**
6a47a95e4dbb [gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents: 6485
diff changeset
529 * Initializes the connections subsystem.
6a47a95e4dbb [gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents: 6485
diff changeset
530 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
531 void purple_connections_init(void);
6488
6a47a95e4dbb [gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents: 6485
diff changeset
532
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 * Uninitializes the connections subsystem.
6a47a95e4dbb [gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents: 6485
diff changeset
535 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
536 void purple_connections_uninit(void);
6488
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 * Returns the handle to the connections subsystem.
6a47a95e4dbb [gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents: 6485
diff changeset
540 *
6a47a95e4dbb [gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents: 6485
diff changeset
541 * @return The connections subsystem handle.
6a47a95e4dbb [gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents: 6485
diff changeset
542 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
543 void *purple_connections_get_handle(void);
6488
6a47a95e4dbb [gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents: 6485
diff changeset
544
6a47a95e4dbb [gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents: 6485
diff changeset
545 /*@}*/
6a47a95e4dbb [gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents: 6485
diff changeset
546
6a47a95e4dbb [gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents: 6485
diff changeset
547
32787
7072f190d6ad Use G_BEGIN/END_DECLS in public libpurple files. This was
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32687
diff changeset
548 G_END_DECLS
5944
f19df037ac58 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
549
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
550 #endif /* _PURPLE_CONNECTION_H_ */

mercurial