Tue, 02 Oct 2007 17:16:16 +0000
Rename PURPLE_REASON_INVALID_USERNAME to PURPLE_REASON_INVALID_SETTINGS, so it
can be used when a server parameter is required but not supplied (for example).
| 5563 | 1 | /** |
| 2 | * @file connection.h Connection API | |
| 3 | * @ingroup core | |
|
20330
650a7af9c238
remove gpl boilerplate from doxygen docs
Sean Egan <seanegan@pidgin.im>
parents:
19897
diff
changeset
|
4 | */ |
|
650a7af9c238
remove gpl boilerplate from doxygen docs
Sean Egan <seanegan@pidgin.im>
parents:
19897
diff
changeset
|
5 | |
|
650a7af9c238
remove gpl boilerplate from doxygen docs
Sean Egan <seanegan@pidgin.im>
parents:
19897
diff
changeset
|
6 | /* purple |
| 5563 | 7 | * |
| 15884 | 8 | * Purple is the legal property of its developers, whose names are too numerous |
| 8046 | 9 | * to list here. Please refer to the COPYRIGHT file distributed with this |
| 10 | * source distribution. | |
|
6460
fc288e7221ca
[gaim-migrate @ 6969]
Christian Hammond <chipx86@chipx86.com>
parents:
6393
diff
changeset
|
11 | * |
| 5563 | 12 | * This program is free software; you can redistribute it and/or modify |
| 13 | * it under the terms of the GNU General Public License as published by | |
| 14 | * the Free Software Foundation; either version 2 of the License, or | |
| 15 | * (at your option) any later version. | |
| 16 | * | |
| 17 | * This program is distributed in the hope that it will be useful, | |
| 18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 20 | * GNU General Public License for more details. | |
| 21 | * | |
| 22 | * You should have received a copy of the GNU General Public License | |
| 23 | * along with this program; if not, write to the Free Software | |
|
19859
71d37b57eff2
The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
19128
diff
changeset
|
24 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
|
6724
e1d416a4a4bc
[gaim-migrate @ 7251]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
25 | * |
|
e1d416a4a4bc
[gaim-migrate @ 7251]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
26 | * @see @ref connection-signals |
| 5563 | 27 | */ |
| 15884 | 28 | #ifndef _PURPLE_CONNECTION_H_ |
| 29 | #define _PURPLE_CONNECTION_H_ | |
| 5563 | 30 | |
| 15884 | 31 | typedef struct _PurpleConnection PurpleConnection; |
| 5563 | 32 | |
|
6622
277eb0b14653
[gaim-migrate @ 7146]
Robert McQueen <robot101@debian.org>
parents:
6605
diff
changeset
|
33 | /** |
|
277eb0b14653
[gaim-migrate @ 7146]
Robert McQueen <robot101@debian.org>
parents:
6605
diff
changeset
|
34 | * Flags to change behavior of the client for a given connection. |
|
277eb0b14653
[gaim-migrate @ 7146]
Robert McQueen <robot101@debian.org>
parents:
6605
diff
changeset
|
35 | */ |
|
277eb0b14653
[gaim-migrate @ 7146]
Robert McQueen <robot101@debian.org>
parents:
6605
diff
changeset
|
36 | typedef enum |
|
277eb0b14653
[gaim-migrate @ 7146]
Robert McQueen <robot101@debian.org>
parents:
6605
diff
changeset
|
37 | { |
| 15884 | 38 | PURPLE_CONNECTION_HTML = 0x0001, /**< Connection sends/receives in 'HTML'. */ |
| 39 | PURPLE_CONNECTION_NO_BGCOLOR = 0x0002, /**< Connection does not send/receive | |
|
6982
12f08de92674
[gaim-migrate @ 7538]
Mark Doliner <markdoliner@pidgin.im>
parents:
6724
diff
changeset
|
40 | background colors. */ |
| 15884 | 41 | PURPLE_CONNECTION_AUTO_RESP = 0x0004, /**< Send auto responses when away. */ |
| 42 | PURPLE_CONNECTION_FORMATTING_WBFO = 0x0008, /**< The text buffer must be formatted as a whole */ | |
| 43 | PURPLE_CONNECTION_NO_NEWLINES = 0x0010, /**< No new lines are allowed in outgoing messages */ | |
| 44 | PURPLE_CONNECTION_NO_FONTSIZE = 0x0020, /**< Connection does not send/receive font sizes */ | |
| 45 | PURPLE_CONNECTION_NO_URLDESC = 0x0040, /**< Connection does not support descriptions with links */ | |
| 46 | 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
|
47 | |
| 15884 | 48 | } PurpleConnectionFlags; |
|
5872
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5733
diff
changeset
|
49 | |
| 5563 | 50 | typedef enum |
| 51 | { | |
| 15884 | 52 | PURPLE_DISCONNECTED = 0, /**< Disconnected. */ |
| 53 | PURPLE_CONNECTED, /**< Connected. */ | |
| 54 | PURPLE_CONNECTING /**< Connecting. */ | |
| 5563 | 55 | |
| 15884 | 56 | } PurpleConnectionState; |
| 5563 | 57 | |
|
20429
0e840b026c82
Remove non-error PurpleDisconnectReasons, and add PURPLE_REASON_OTHER_ERROR
Will Thompson <resiak@pidgin.im>
parents:
20428
diff
changeset
|
58 | /** Possible errors that can cause a connection to be closed. */ |
|
20428
5526fe433c91
Create a PurpleDisconnectReason enum (which happens to be identical to
Will Thompson <resiak@pidgin.im>
parents:
19897
diff
changeset
|
59 | typedef enum |
|
5526fe433c91
Create a PurpleDisconnectReason enum (which happens to be identical to
Will Thompson <resiak@pidgin.im>
parents:
19897
diff
changeset
|
60 | { |
|
20442
97e2d532c2ac
Clarified the meaning of PURPLE_REASON_NETWORK_ERROR and
Will Thompson <resiak@pidgin.im>
parents:
20438
diff
changeset
|
61 | /** 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
|
62 | * 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
|
63 | * data). |
|
97e2d532c2ac
Clarified the meaning of PURPLE_REASON_NETWORK_ERROR and
Will Thompson <resiak@pidgin.im>
parents:
20438
diff
changeset
|
64 | */ |
|
20429
0e840b026c82
Remove non-error PurpleDisconnectReasons, and add PURPLE_REASON_OTHER_ERROR
Will Thompson <resiak@pidgin.im>
parents:
20428
diff
changeset
|
65 | PURPLE_REASON_NETWORK_ERROR = 0, |
|
20442
97e2d532c2ac
Clarified the meaning of PURPLE_REASON_NETWORK_ERROR and
Will Thompson <resiak@pidgin.im>
parents:
20438
diff
changeset
|
66 | /** 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
|
67 | */ |
|
20429
0e840b026c82
Remove non-error PurpleDisconnectReasons, and add PURPLE_REASON_OTHER_ERROR
Will Thompson <resiak@pidgin.im>
parents:
20428
diff
changeset
|
68 | PURPLE_REASON_AUTHENTICATION_FAILED, |
|
20442
97e2d532c2ac
Clarified the meaning of PURPLE_REASON_NETWORK_ERROR and
Will Thompson <resiak@pidgin.im>
parents:
20438
diff
changeset
|
69 | /** 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
|
70 | * server offered. |
|
97e2d532c2ac
Clarified the meaning of PURPLE_REASON_NETWORK_ERROR and
Will Thompson <resiak@pidgin.im>
parents:
20438
diff
changeset
|
71 | */ |
|
97e2d532c2ac
Clarified the meaning of PURPLE_REASON_NETWORK_ERROR and
Will Thompson <resiak@pidgin.im>
parents:
20438
diff
changeset
|
72 | PURPLE_REASON_AUTHENTICATION_IMPOSSIBLE, |
|
20428
5526fe433c91
Create a PurpleDisconnectReason enum (which happens to be identical to
Will Thompson <resiak@pidgin.im>
parents:
19897
diff
changeset
|
73 | /** There was an error negotiating SSL on this connection, or encryption |
|
5526fe433c91
Create a PurpleDisconnectReason enum (which happens to be identical to
Will Thompson <resiak@pidgin.im>
parents:
19897
diff
changeset
|
74 | * was unavailable and an account option was set to require it. |
|
5526fe433c91
Create a PurpleDisconnectReason enum (which happens to be identical to
Will Thompson <resiak@pidgin.im>
parents:
19897
diff
changeset
|
75 | */ |
|
20429
0e840b026c82
Remove non-error PurpleDisconnectReasons, and add PURPLE_REASON_OTHER_ERROR
Will Thompson <resiak@pidgin.im>
parents:
20428
diff
changeset
|
76 | PURPLE_REASON_ENCRYPTION_ERROR, |
|
20428
5526fe433c91
Create a PurpleDisconnectReason enum (which happens to be identical to
Will Thompson <resiak@pidgin.im>
parents:
19897
diff
changeset
|
77 | /** 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
|
78 | * trying to connect with. |
|
5526fe433c91
Create a PurpleDisconnectReason enum (which happens to be identical to
Will Thompson <resiak@pidgin.im>
parents:
19897
diff
changeset
|
79 | */ |
|
20429
0e840b026c82
Remove non-error PurpleDisconnectReasons, and add PURPLE_REASON_OTHER_ERROR
Will Thompson <resiak@pidgin.im>
parents:
20428
diff
changeset
|
80 | PURPLE_REASON_NAME_IN_USE, |
|
20428
5526fe433c91
Create a PurpleDisconnectReason enum (which happens to be identical to
Will Thompson <resiak@pidgin.im>
parents:
19897
diff
changeset
|
81 | |
|
20456
77550b97ebf2
Rename PURPLE_REASON_INVALID_USERNAME to PURPLE_REASON_INVALID_SETTINGS, so it
Will Thompson <resiak@pidgin.im>
parents:
20443
diff
changeset
|
82 | /** 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
|
83 | * 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
|
84 | * This reason should not be used for incorrect passwords etc: use |
|
77550b97ebf2
Rename PURPLE_REASON_INVALID_USERNAME to PURPLE_REASON_INVALID_SETTINGS, so it
Will Thompson <resiak@pidgin.im>
parents:
20443
diff
changeset
|
85 | * #PURPLE_REASON_AUTHENTICATION_FAILED for that. |
|
77550b97ebf2
Rename PURPLE_REASON_INVALID_USERNAME to PURPLE_REASON_INVALID_SETTINGS, so it
Will Thompson <resiak@pidgin.im>
parents:
20443
diff
changeset
|
86 | * |
|
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
|
87 | * @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
|
88 | * 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
|
89 | * 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
|
90 | */ |
|
20456
77550b97ebf2
Rename PURPLE_REASON_INVALID_USERNAME to PURPLE_REASON_INVALID_SETTINGS, so it
Will Thompson <resiak@pidgin.im>
parents:
20443
diff
changeset
|
91 | PURPLE_REASON_INVALID_SETTINGS, |
|
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
|
92 | |
|
20428
5526fe433c91
Create a PurpleDisconnectReason enum (which happens to be identical to
Will Thompson <resiak@pidgin.im>
parents:
19897
diff
changeset
|
93 | /** The server did not provide a SSL certificate. */ |
|
20429
0e840b026c82
Remove non-error PurpleDisconnectReasons, and add PURPLE_REASON_OTHER_ERROR
Will Thompson <resiak@pidgin.im>
parents:
20428
diff
changeset
|
94 | PURPLE_REASON_CERT_NOT_PROVIDED, |
|
20428
5526fe433c91
Create a PurpleDisconnectReason enum (which happens to be identical to
Will Thompson <resiak@pidgin.im>
parents:
19897
diff
changeset
|
95 | /** The server's SSL certificate could not be trusted. */ |
|
20429
0e840b026c82
Remove non-error PurpleDisconnectReasons, and add PURPLE_REASON_OTHER_ERROR
Will Thompson <resiak@pidgin.im>
parents:
20428
diff
changeset
|
96 | PURPLE_REASON_CERT_UNTRUSTED, |
|
20428
5526fe433c91
Create a PurpleDisconnectReason enum (which happens to be identical to
Will Thompson <resiak@pidgin.im>
parents:
19897
diff
changeset
|
97 | /** The server's SSL certificate has expired. */ |
|
20429
0e840b026c82
Remove non-error PurpleDisconnectReasons, and add PURPLE_REASON_OTHER_ERROR
Will Thompson <resiak@pidgin.im>
parents:
20428
diff
changeset
|
98 | PURPLE_REASON_CERT_EXPIRED, |
|
20428
5526fe433c91
Create a PurpleDisconnectReason enum (which happens to be identical to
Will Thompson <resiak@pidgin.im>
parents:
19897
diff
changeset
|
99 | /** The server's SSL certificate is not yet valid. */ |
|
20429
0e840b026c82
Remove non-error PurpleDisconnectReasons, and add PURPLE_REASON_OTHER_ERROR
Will Thompson <resiak@pidgin.im>
parents:
20428
diff
changeset
|
100 | PURPLE_REASON_CERT_NOT_ACTIVATED, |
|
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 did not match its hostname. */ |
|
20429
0e840b026c82
Remove non-error PurpleDisconnectReasons, and add PURPLE_REASON_OTHER_ERROR
Will Thompson <resiak@pidgin.im>
parents:
20428
diff
changeset
|
102 | PURPLE_REASON_CERT_HOSTNAME_MISMATCH, |
|
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 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
|
104 | * fingerprint. |
|
5526fe433c91
Create a PurpleDisconnectReason enum (which happens to be identical to
Will Thompson <resiak@pidgin.im>
parents:
19897
diff
changeset
|
105 | */ |
|
20429
0e840b026c82
Remove non-error PurpleDisconnectReasons, and add PURPLE_REASON_OTHER_ERROR
Will Thompson <resiak@pidgin.im>
parents:
20428
diff
changeset
|
106 | PURPLE_REASON_CERT_FINGERPRINT_MISMATCH, |
|
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 is self-signed. */ |
|
20429
0e840b026c82
Remove non-error PurpleDisconnectReasons, and add PURPLE_REASON_OTHER_ERROR
Will Thompson <resiak@pidgin.im>
parents:
20428
diff
changeset
|
108 | PURPLE_REASON_CERT_SELF_SIGNED, |
|
20428
5526fe433c91
Create a PurpleDisconnectReason enum (which happens to be identical to
Will Thompson <resiak@pidgin.im>
parents:
19897
diff
changeset
|
109 | /** 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
|
110 | */ |
|
20429
0e840b026c82
Remove non-error PurpleDisconnectReasons, and add PURPLE_REASON_OTHER_ERROR
Will Thompson <resiak@pidgin.im>
parents:
20428
diff
changeset
|
111 | PURPLE_REASON_CERT_OTHER_ERROR, |
|
0e840b026c82
Remove non-error PurpleDisconnectReasons, and add PURPLE_REASON_OTHER_ERROR
Will Thompson <resiak@pidgin.im>
parents:
20428
diff
changeset
|
112 | |
|
0e840b026c82
Remove non-error PurpleDisconnectReasons, and add PURPLE_REASON_OTHER_ERROR
Will Thompson <resiak@pidgin.im>
parents:
20428
diff
changeset
|
113 | /** 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
|
114 | * categories. |
|
0e840b026c82
Remove non-error PurpleDisconnectReasons, and add PURPLE_REASON_OTHER_ERROR
Will Thompson <resiak@pidgin.im>
parents:
20428
diff
changeset
|
115 | */ |
|
0e840b026c82
Remove non-error PurpleDisconnectReasons, and add PURPLE_REASON_OTHER_ERROR
Will Thompson <resiak@pidgin.im>
parents:
20428
diff
changeset
|
116 | PURPLE_REASON_OTHER_ERROR, |
|
20428
5526fe433c91
Create a PurpleDisconnectReason enum (which happens to be identical to
Will Thompson <resiak@pidgin.im>
parents:
19897
diff
changeset
|
117 | |
|
5526fe433c91
Create a PurpleDisconnectReason enum (which happens to be identical to
Will Thompson <resiak@pidgin.im>
parents:
19897
diff
changeset
|
118 | /** The number of PurpleDisconnectReason elements; not a valid reason. |
|
5526fe433c91
Create a PurpleDisconnectReason enum (which happens to be identical to
Will Thompson <resiak@pidgin.im>
parents:
19897
diff
changeset
|
119 | */ |
|
5526fe433c91
Create a PurpleDisconnectReason enum (which happens to be identical to
Will Thompson <resiak@pidgin.im>
parents:
19897
diff
changeset
|
120 | PURPLE_NUM_REASONS |
|
5526fe433c91
Create a PurpleDisconnectReason enum (which happens to be identical to
Will Thompson <resiak@pidgin.im>
parents:
19897
diff
changeset
|
121 | } PurpleDisconnectReason; |
|
5526fe433c91
Create a PurpleDisconnectReason enum (which happens to be identical to
Will Thompson <resiak@pidgin.im>
parents:
19897
diff
changeset
|
122 | |
|
10021
5aa380278a15
[gaim-migrate @ 10946]
Mark Doliner <markdoliner@pidgin.im>
parents:
10008
diff
changeset
|
123 | #include <time.h> |
|
5aa380278a15
[gaim-migrate @ 10946]
Mark Doliner <markdoliner@pidgin.im>
parents:
10008
diff
changeset
|
124 | |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
125 | #include "account.h" |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
126 | #include "plugin.h" |
| 10400 | 127 | #include "status.h" |
|
20443
7487bb69ae76
Create purple_connection_ssl_error(), which converts a PurpleSslErrorType
Will Thompson <resiak@pidgin.im>
parents:
20442
diff
changeset
|
128 | #include "sslconn.h" |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
129 | |
|
19128
871e26c75048
Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
130 | /** 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
|
131 | * 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
|
132 | * 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
|
133 | * 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
|
134 | * |
|
871e26c75048
Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
135 | * @see @ref ui-ops |
|
871e26c75048
Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
136 | */ |
| 5563 | 137 | typedef struct |
| 138 | { | |
|
19128
871e26c75048
Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
139 | /** 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
|
140 | * 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
|
141 | * 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
|
142 | * bar). |
|
20430
bb30dff3da21
Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <resiak@pidgin.im>
parents:
20429
diff
changeset
|
143 | * @see #purple_connection_update_progress |
|
19128
871e26c75048
Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
144 | */ |
|
871e26c75048
Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
145 | void (*connect_progress)(PurpleConnection *gc, |
|
871e26c75048
Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
146 | const char *text, |
|
871e26c75048
Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
147 | size_t step, |
|
871e26c75048
Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
148 | size_t step_count); |
|
20430
bb30dff3da21
Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <resiak@pidgin.im>
parents:
20429
diff
changeset
|
149 | |
|
19128
871e26c75048
Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
150 | /** 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
|
151 | * @ref signed-on signal). |
|
871e26c75048
Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
152 | */ |
| 15884 | 153 | void (*connected)(PurpleConnection *gc); |
|
19128
871e26c75048
Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
154 | /** 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
|
155 | * and @ref signed-off signals). |
|
871e26c75048
Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
156 | */ |
| 15884 | 157 | void (*disconnected)(PurpleConnection *gc); |
|
20430
bb30dff3da21
Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <resiak@pidgin.im>
parents:
20429
diff
changeset
|
158 | |
|
19128
871e26c75048
Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
159 | /** 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
|
160 | * 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
|
161 | * 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
|
162 | * shipped with libpurple.) |
|
871e26c75048
Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
163 | */ |
| 15884 | 164 | void (*notice)(PurpleConnection *gc, const char *text); |
|
20430
bb30dff3da21
Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <resiak@pidgin.im>
parents:
20429
diff
changeset
|
165 | |
|
19128
871e26c75048
Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
166 | /** 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
|
167 | * Called before #disconnected. |
|
871e26c75048
Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
168 | * @param text a localized error message. |
|
20430
bb30dff3da21
Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <resiak@pidgin.im>
parents:
20429
diff
changeset
|
169 | * @see #purple_connection_error |
|
bb30dff3da21
Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <resiak@pidgin.im>
parents:
20429
diff
changeset
|
170 | * @deprecated in favour of |
|
bb30dff3da21
Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <resiak@pidgin.im>
parents:
20429
diff
changeset
|
171 | * #PurpleConnectionUiOps.report_disconnect_reason. |
|
19128
871e26c75048
Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
172 | */ |
| 15884 | 173 | 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
|
174 | |
|
19128
871e26c75048
Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
175 | /** 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
|
176 | * 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
|
177 | * 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
|
178 | * infrastructure. |
|
871e26c75048
Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
179 | */ |
| 14758 | 180 | void (*network_connected)(); |
|
19128
871e26c75048
Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
181 | /** 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
|
182 | * connection has gone away. |
|
871e26c75048
Document PurpleConnectionUiOps. (Does purple_connection_notice predate the
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
183 | */ |
| 14758 | 184 | void (*network_disconnected)(); |
| 5563 | 185 | |
|
20430
bb30dff3da21
Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <resiak@pidgin.im>
parents:
20429
diff
changeset
|
186 | /** Called when a connection is disconnected, whether due to an |
|
bb30dff3da21
Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <resiak@pidgin.im>
parents:
20429
diff
changeset
|
187 | * error or to user request. Called before #disconnected. |
|
bb30dff3da21
Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <resiak@pidgin.im>
parents:
20429
diff
changeset
|
188 | * @param reason why the connection ended, if known, or |
|
bb30dff3da21
Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <resiak@pidgin.im>
parents:
20429
diff
changeset
|
189 | * PURPLE_REASON_OTHER_ERROR, if not. |
|
bb30dff3da21
Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <resiak@pidgin.im>
parents:
20429
diff
changeset
|
190 | * @param text a localized message describing the disconnection |
|
bb30dff3da21
Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <resiak@pidgin.im>
parents:
20429
diff
changeset
|
191 | * in more detail to the user. |
|
bb30dff3da21
Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <resiak@pidgin.im>
parents:
20429
diff
changeset
|
192 | * @see #purple_connection_error_reason |
|
bb30dff3da21
Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <resiak@pidgin.im>
parents:
20429
diff
changeset
|
193 | */ |
|
bb30dff3da21
Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <resiak@pidgin.im>
parents:
20429
diff
changeset
|
194 | void (*report_disconnect_reason)(PurpleConnection *gc, |
|
bb30dff3da21
Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <resiak@pidgin.im>
parents:
20429
diff
changeset
|
195 | PurpleDisconnectReason reason, |
|
bb30dff3da21
Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <resiak@pidgin.im>
parents:
20429
diff
changeset
|
196 | const char *text); |
|
bb30dff3da21
Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <resiak@pidgin.im>
parents:
20429
diff
changeset
|
197 | |
|
16743
1ce5ffe12e2a
Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents:
15884
diff
changeset
|
198 | 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
|
199 | 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
|
200 | void (*_purple_reserved3)(void); |
| 15884 | 201 | } PurpleConnectionUiOps; |
| 5563 | 202 | |
| 15884 | 203 | struct _PurpleConnection |
| 5563 | 204 | { |
| 15884 | 205 | PurplePlugin *prpl; /**< The protocol plugin. */ |
| 206 | PurpleConnectionFlags flags; /**< Connection flags. */ | |
| 5563 | 207 | |
| 15884 | 208 | PurpleConnectionState state; /**< The connection state. */ |
| 5563 | 209 | |
| 15884 | 210 | PurpleAccount *account; /**< The account being connected to. */ |
|
10740
a1cb6b819a21
[gaim-migrate @ 12342]
Mark Doliner <markdoliner@pidgin.im>
parents:
10738
diff
changeset
|
211 | char *password; /**< The password used. */ |
| 5563 | 212 | int inpa; /**< The input watcher. */ |
| 213 | ||
| 214 | GSList *buddy_chats; /**< A list of active chats. */ | |
| 215 | void *proto_data; /**< Protocol-specific data. */ | |
| 216 | ||
|
14341
e67646af66ab
[gaim-migrate @ 16964]
Mark Doliner <markdoliner@pidgin.im>
parents:
14254
diff
changeset
|
217 | char *display_name; /**< How you appear to other people. */ |
|
10745
04039e970a30
[gaim-migrate @ 12347]
Mark Doliner <markdoliner@pidgin.im>
parents:
10742
diff
changeset
|
218 | guint keepalive; /**< Keep-alive. */ |
| 5563 | 219 | |
| 220 | ||
|
8430
13694e7d1aaa
[gaim-migrate @ 9160]
Mark Doliner <markdoliner@pidgin.im>
parents:
8046
diff
changeset
|
221 | gboolean wants_to_die; /**< Wants to Die state. This is set |
|
10272
29aff2eb9290
[gaim-migrate @ 11421]
Mark Doliner <markdoliner@pidgin.im>
parents:
10021
diff
changeset
|
222 | when the user chooses to log out, |
|
8430
13694e7d1aaa
[gaim-migrate @ 9160]
Mark Doliner <markdoliner@pidgin.im>
parents:
8046
diff
changeset
|
223 | or when the protocol is |
|
13694e7d1aaa
[gaim-migrate @ 9160]
Mark Doliner <markdoliner@pidgin.im>
parents:
8046
diff
changeset
|
224 | disconnected and should not be |
|
13694e7d1aaa
[gaim-migrate @ 9160]
Mark Doliner <markdoliner@pidgin.im>
parents:
8046
diff
changeset
|
225 | automatically reconnected |
|
13694e7d1aaa
[gaim-migrate @ 9160]
Mark Doliner <markdoliner@pidgin.im>
parents:
8046
diff
changeset
|
226 | (incorrect password, etc.) */ |
| 6393 | 227 | guint disconnect_timeout; /**< Timer used for nasty stack tricks */ |
| 5563 | 228 | }; |
| 229 | ||
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
230 | #ifdef __cplusplus |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
231 | extern "C" { |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
232 | #endif |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
233 | |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
234 | /**************************************************************************/ |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
235 | /** @name Connection API */ |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
236 | /**************************************************************************/ |
|
6488
6a47a95e4dbb
[gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents:
6485
diff
changeset
|
237 | /*@{*/ |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
238 | |
| 5563 | 239 | /** |
| 15884 | 240 | * This function should only be called by purple_account_connect() |
|
10740
a1cb6b819a21
[gaim-migrate @ 12342]
Mark Doliner <markdoliner@pidgin.im>
parents:
10738
diff
changeset
|
241 | * 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
|
242 | * function instead. |
|
a1cb6b819a21
[gaim-migrate @ 12342]
Mark Doliner <markdoliner@pidgin.im>
parents:
10738
diff
changeset
|
243 | * |
|
a1cb6b819a21
[gaim-migrate @ 12342]
Mark Doliner <markdoliner@pidgin.im>
parents:
10738
diff
changeset
|
244 | * Creates a connection to the specified account and either connects |
|
a1cb6b819a21
[gaim-migrate @ 12342]
Mark Doliner <markdoliner@pidgin.im>
parents:
10738
diff
changeset
|
245 | * 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
|
246 | * the connection uses the current active status for this account. |
|
a1cb6b819a21
[gaim-migrate @ 12342]
Mark Doliner <markdoliner@pidgin.im>
parents:
10738
diff
changeset
|
247 | * So if you want to sign on as "away," for example, you need to |
| 15884 | 248 | * have called purple_account_set_status(account, "away"). |
| 249 | * (And this will call purple_account_connect() automatically). | |
| 5563 | 250 | * |
|
10758
b4554ec8d126
[gaim-migrate @ 12361]
Mark Doliner <markdoliner@pidgin.im>
parents:
10745
diff
changeset
|
251 | * @param account The account the connection should be connecting to. |
|
b4554ec8d126
[gaim-migrate @ 12361]
Mark Doliner <markdoliner@pidgin.im>
parents:
10745
diff
changeset
|
252 | * @param regist Whether we are registering a new account or just |
|
b4554ec8d126
[gaim-migrate @ 12361]
Mark Doliner <markdoliner@pidgin.im>
parents:
10745
diff
changeset
|
253 | * trying to do a normal signon. |
|
10740
a1cb6b819a21
[gaim-migrate @ 12342]
Mark Doliner <markdoliner@pidgin.im>
parents:
10738
diff
changeset
|
254 | * @param password The password to use. |
| 5563 | 255 | */ |
| 15884 | 256 | void purple_connection_new(PurpleAccount *account, gboolean regist, |
|
10740
a1cb6b819a21
[gaim-migrate @ 12342]
Mark Doliner <markdoliner@pidgin.im>
parents:
10738
diff
changeset
|
257 | const char *password); |
| 5563 | 258 | |
| 259 | /** | |
|
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
|
260 | * 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
|
261 | * 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
|
262 | * |
|
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
|
263 | * 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
|
264 | * 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
|
265 | * |
|
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
|
266 | * @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
|
267 | * @param password The password to use. |
|
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
|
268 | */ |
|
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
|
269 | void purple_connection_new_unregister(PurpleAccount *account, const char *password, PurpleAccountUnregistrationCb cb, void *user_data); |
|
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
|
270 | |
|
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
|
271 | /** |
| 15884 | 272 | * Disconnects and destroys a PurpleConnection. |
|
13976
2543396bd00e
[gaim-migrate @ 16414]
Mark Doliner <markdoliner@pidgin.im>
parents:
12272
diff
changeset
|
273 | * |
| 15884 | 274 | * This function should only be called by purple_account_disconnect() |
|
13976
2543396bd00e
[gaim-migrate @ 16414]
Mark Doliner <markdoliner@pidgin.im>
parents:
12272
diff
changeset
|
275 | * 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
|
276 | * function instead. |
|
63ca8277c234
[gaim-migrate @ 12340]
Mark Doliner <markdoliner@pidgin.im>
parents:
10665
diff
changeset
|
277 | * |
| 15884 | 278 | * @param gc The purple connection to destroy. |
| 5563 | 279 | */ |
| 15884 | 280 | void purple_connection_destroy(PurpleConnection *gc); |
| 6581 | 281 | |
| 282 | /** | |
|
11718
90804d019837
[gaim-migrate @ 14009]
Mark Doliner <markdoliner@pidgin.im>
parents:
10758
diff
changeset
|
283 | * Sets the connection state. PRPLs should call this and pass in |
| 15884 | 284 | * the state "PURPLE_CONNECTED" when the account is completely |
|
11718
90804d019837
[gaim-migrate @ 14009]
Mark Doliner <markdoliner@pidgin.im>
parents:
10758
diff
changeset
|
285 | * 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
|
286 | * the core can call prpl->set_status, and it successfully changes |
|
90804d019837
[gaim-migrate @ 14009]
Mark Doliner <markdoliner@pidgin.im>
parents:
10758
diff
changeset
|
287 | * your status, then the account is online. |
| 5563 | 288 | * |
| 289 | * @param gc The connection. | |
| 290 | * @param state The connection state. | |
| 291 | */ | |
| 15884 | 292 | void purple_connection_set_state(PurpleConnection *gc, PurpleConnectionState state); |
| 5563 | 293 | |
| 294 | /** | |
| 295 | * Sets the connection's account. | |
| 296 | * | |
| 297 | * @param gc The connection. | |
| 298 | * @param account The account. | |
| 299 | */ | |
| 15884 | 300 | void purple_connection_set_account(PurpleConnection *gc, PurpleAccount *account); |
| 5563 | 301 | |
| 302 | /** | |
| 303 | * Sets the connection's displayed name. | |
| 304 | * | |
| 305 | * @param gc The connection. | |
| 306 | * @param name The displayed name. | |
| 307 | */ | |
| 15884 | 308 | void purple_connection_set_display_name(PurpleConnection *gc, const char *name); |
| 5563 | 309 | |
| 310 | /** | |
| 311 | * Returns the connection state. | |
| 312 | * | |
| 313 | * @param gc The connection. | |
| 314 | * | |
| 315 | * @return The connection state. | |
| 316 | */ | |
| 15884 | 317 | PurpleConnectionState purple_connection_get_state(const PurpleConnection *gc); |
| 5563 | 318 | |
| 319 | /** | |
|
9019
b9a333b36763
[gaim-migrate @ 9795]
Mark Doliner <markdoliner@pidgin.im>
parents:
8735
diff
changeset
|
320 | * Returns TRUE if the account is connected, otherwise returns FALSE. |
|
b9a333b36763
[gaim-migrate @ 9795]
Mark Doliner <markdoliner@pidgin.im>
parents:
8735
diff
changeset
|
321 | * |
|
b9a333b36763
[gaim-migrate @ 9795]
Mark Doliner <markdoliner@pidgin.im>
parents:
8735
diff
changeset
|
322 | * @return TRUE if the account is connected, otherwise returns FALSE. |
|
b9a333b36763
[gaim-migrate @ 9795]
Mark Doliner <markdoliner@pidgin.im>
parents:
8735
diff
changeset
|
323 | */ |
| 15884 | 324 | #define PURPLE_CONNECTION_IS_CONNECTED(gc) \ |
| 325 | (gc->state == PURPLE_CONNECTED) | |
|
9019
b9a333b36763
[gaim-migrate @ 9795]
Mark Doliner <markdoliner@pidgin.im>
parents:
8735
diff
changeset
|
326 | |
|
b9a333b36763
[gaim-migrate @ 9795]
Mark Doliner <markdoliner@pidgin.im>
parents:
8735
diff
changeset
|
327 | /** |
| 5563 | 328 | * Returns the connection's account. |
| 329 | * | |
| 330 | * @param gc The connection. | |
| 331 | * | |
| 332 | * @return The connection's account. | |
| 333 | */ | |
| 15884 | 334 | PurpleAccount *purple_connection_get_account(const PurpleConnection *gc); |
| 5563 | 335 | |
| 336 | /** | |
|
10740
a1cb6b819a21
[gaim-migrate @ 12342]
Mark Doliner <markdoliner@pidgin.im>
parents:
10738
diff
changeset
|
337 | * Returns the connection's password. |
|
a1cb6b819a21
[gaim-migrate @ 12342]
Mark Doliner <markdoliner@pidgin.im>
parents:
10738
diff
changeset
|
338 | * |
|
a1cb6b819a21
[gaim-migrate @ 12342]
Mark Doliner <markdoliner@pidgin.im>
parents:
10738
diff
changeset
|
339 | * @param gc The connection. |
|
a1cb6b819a21
[gaim-migrate @ 12342]
Mark Doliner <markdoliner@pidgin.im>
parents:
10738
diff
changeset
|
340 | * |
|
a1cb6b819a21
[gaim-migrate @ 12342]
Mark Doliner <markdoliner@pidgin.im>
parents:
10738
diff
changeset
|
341 | * @return The connection's password. |
|
a1cb6b819a21
[gaim-migrate @ 12342]
Mark Doliner <markdoliner@pidgin.im>
parents:
10738
diff
changeset
|
342 | */ |
| 15884 | 343 | const char *purple_connection_get_password(const PurpleConnection *gc); |
|
10740
a1cb6b819a21
[gaim-migrate @ 12342]
Mark Doliner <markdoliner@pidgin.im>
parents:
10738
diff
changeset
|
344 | |
|
a1cb6b819a21
[gaim-migrate @ 12342]
Mark Doliner <markdoliner@pidgin.im>
parents:
10738
diff
changeset
|
345 | /** |
| 5563 | 346 | * Returns the connection's displayed name. |
| 347 | * | |
| 348 | * @param gc The connection. | |
| 349 | * | |
| 350 | * @return The connection's displayed name. | |
| 351 | */ | |
| 15884 | 352 | const char *purple_connection_get_display_name(const PurpleConnection *gc); |
| 5563 | 353 | |
| 354 | /** | |
| 355 | * Updates the connection progress. | |
| 356 | * | |
| 357 | * @param gc The connection. | |
| 358 | * @param text Information on the current step. | |
| 359 | * @param step The current step. | |
| 360 | * @param count The total number of steps. | |
| 361 | */ | |
| 15884 | 362 | void purple_connection_update_progress(PurpleConnection *gc, const char *text, |
| 5563 | 363 | size_t step, size_t count); |
| 364 | ||
| 365 | /** | |
|
5571
b709464f507e
[gaim-migrate @ 5973]
Christian Hammond <chipx86@chipx86.com>
parents:
5564
diff
changeset
|
366 | * Displays a connection-specific notice. |
|
b709464f507e
[gaim-migrate @ 5973]
Christian Hammond <chipx86@chipx86.com>
parents:
5564
diff
changeset
|
367 | * |
|
b709464f507e
[gaim-migrate @ 5973]
Christian Hammond <chipx86@chipx86.com>
parents:
5564
diff
changeset
|
368 | * @param gc The connection. |
|
b709464f507e
[gaim-migrate @ 5973]
Christian Hammond <chipx86@chipx86.com>
parents:
5564
diff
changeset
|
369 | * @param text The notice text. |
|
b709464f507e
[gaim-migrate @ 5973]
Christian Hammond <chipx86@chipx86.com>
parents:
5564
diff
changeset
|
370 | */ |
| 15884 | 371 | void purple_connection_notice(PurpleConnection *gc, const char *text); |
|
5571
b709464f507e
[gaim-migrate @ 5973]
Christian Hammond <chipx86@chipx86.com>
parents:
5564
diff
changeset
|
372 | |
|
b709464f507e
[gaim-migrate @ 5973]
Christian Hammond <chipx86@chipx86.com>
parents:
5564
diff
changeset
|
373 | /** |
|
5564
1779a1bfbdb8
[gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
374 | * Closes a connection with an error. |
|
1779a1bfbdb8
[gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
375 | * |
|
1779a1bfbdb8
[gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
376 | * @param gc The connection. |
|
1779a1bfbdb8
[gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
377 | * @param reason The error text. |
|
20430
bb30dff3da21
Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <resiak@pidgin.im>
parents:
20429
diff
changeset
|
378 | * @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
|
379 | * @c purple_connection_error(gc, text) is equivalent to calling |
|
bb30dff3da21
Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <resiak@pidgin.im>
parents:
20429
diff
changeset
|
380 | * @c purple_connection_error_reason(gc, PURPLE_REASON_OTHER_ERROR, text). |
|
5564
1779a1bfbdb8
[gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
381 | */ |
| 15884 | 382 | void purple_connection_error(PurpleConnection *gc, const char *reason); |
|
5564
1779a1bfbdb8
[gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
383 | |
|
20430
bb30dff3da21
Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <resiak@pidgin.im>
parents:
20429
diff
changeset
|
384 | /** |
|
bb30dff3da21
Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <resiak@pidgin.im>
parents:
20429
diff
changeset
|
385 | * Closes a connection with an error and an optional description of the |
|
bb30dff3da21
Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <resiak@pidgin.im>
parents:
20429
diff
changeset
|
386 | * error. |
|
bb30dff3da21
Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <resiak@pidgin.im>
parents:
20429
diff
changeset
|
387 | * |
|
bb30dff3da21
Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <resiak@pidgin.im>
parents:
20429
diff
changeset
|
388 | * @param reason why the connection is closing. |
|
bb30dff3da21
Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <resiak@pidgin.im>
parents:
20429
diff
changeset
|
389 | * @param description a localized description of the error. |
|
bb30dff3da21
Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <resiak@pidgin.im>
parents:
20429
diff
changeset
|
390 | */ |
|
bb30dff3da21
Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <resiak@pidgin.im>
parents:
20429
diff
changeset
|
391 | void |
|
bb30dff3da21
Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <resiak@pidgin.im>
parents:
20429
diff
changeset
|
392 | purple_connection_error_reason (PurpleConnection *gc, |
|
bb30dff3da21
Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <resiak@pidgin.im>
parents:
20429
diff
changeset
|
393 | PurpleDisconnectReason reason, |
|
bb30dff3da21
Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <resiak@pidgin.im>
parents:
20429
diff
changeset
|
394 | const char *description); |
|
bb30dff3da21
Create PurpleConnectionUiOps.report_disconnect_reason and
Will Thompson <resiak@pidgin.im>
parents:
20429
diff
changeset
|
395 | |
|
20431
49979e453876
Create purple_connection_reason_is_fatal, which is basically a replacement for
Will Thompson <resiak@pidgin.im>
parents:
20430
diff
changeset
|
396 | /** |
|
20443
7487bb69ae76
Create purple_connection_ssl_error(), which converts a PurpleSslErrorType
Will Thompson <resiak@pidgin.im>
parents:
20442
diff
changeset
|
397 | * Closes a connection due to an SSL error; this is basically a shortcut to |
|
7487bb69ae76
Create purple_connection_ssl_error(), which converts a PurpleSslErrorType
Will Thompson <resiak@pidgin.im>
parents:
20442
diff
changeset
|
398 | * turning the #PurpleSslErrorType into a #PurpleDisconnectReason and a |
|
7487bb69ae76
Create purple_connection_ssl_error(), which converts a PurpleSslErrorType
Will Thompson <resiak@pidgin.im>
parents:
20442
diff
changeset
|
399 | * human-readable string and then calling purple_connection_error_reason(). |
|
7487bb69ae76
Create purple_connection_ssl_error(), which converts a PurpleSslErrorType
Will Thompson <resiak@pidgin.im>
parents:
20442
diff
changeset
|
400 | */ |
|
7487bb69ae76
Create purple_connection_ssl_error(), which converts a PurpleSslErrorType
Will Thompson <resiak@pidgin.im>
parents:
20442
diff
changeset
|
401 | void |
|
7487bb69ae76
Create purple_connection_ssl_error(), which converts a PurpleSslErrorType
Will Thompson <resiak@pidgin.im>
parents:
20442
diff
changeset
|
402 | 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
|
403 | PurpleSslErrorType ssl_error); |
|
7487bb69ae76
Create purple_connection_ssl_error(), which converts a PurpleSslErrorType
Will Thompson <resiak@pidgin.im>
parents:
20442
diff
changeset
|
404 | |
|
7487bb69ae76
Create purple_connection_ssl_error(), which converts a PurpleSslErrorType
Will Thompson <resiak@pidgin.im>
parents:
20442
diff
changeset
|
405 | /** |
|
20431
49979e453876
Create purple_connection_reason_is_fatal, which is basically a replacement for
Will Thompson <resiak@pidgin.im>
parents:
20430
diff
changeset
|
406 | * 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
|
407 | * should probably not be automatically reconnected) or transient (so |
|
49979e453876
Create purple_connection_reason_is_fatal, which is basically a replacement for
Will Thompson <resiak@pidgin.im>
parents:
20430
diff
changeset
|
408 | * auto-reconnection is a good idea. |
|
49979e453876
Create purple_connection_reason_is_fatal, which is basically a replacement for
Will Thompson <resiak@pidgin.im>
parents:
20430
diff
changeset
|
409 | * For instance, #PURPLE_REASON_NETWORK_ERROR is a temporary |
|
49979e453876
Create purple_connection_reason_is_fatal, which is basically a replacement for
Will Thompson <resiak@pidgin.im>
parents:
20430
diff
changeset
|
410 | * error, which might be caused by losing the network connection, so |
|
49979e453876
Create purple_connection_reason_is_fatal, which is basically a replacement for
Will Thompson <resiak@pidgin.im>
parents:
20430
diff
changeset
|
411 | * @a purple_connection_reason_is_fatal(PURPLE_REASON_NETWORK_ERROR) is |
|
49979e453876
Create purple_connection_reason_is_fatal, which is basically a replacement for
Will Thompson <resiak@pidgin.im>
parents:
20430
diff
changeset
|
412 | * @a FALSE. On the other hand, #PURPLE_REASON_AUTHENTICATION_FAILED probably |
|
49979e453876
Create purple_connection_reason_is_fatal, which is basically a replacement for
Will Thompson <resiak@pidgin.im>
parents:
20430
diff
changeset
|
413 | * indicates a misconfiguration of the account which needs the user to go fix |
|
49979e453876
Create purple_connection_reason_is_fatal, which is basically a replacement for
Will Thompson <resiak@pidgin.im>
parents:
20430
diff
changeset
|
414 | * it up, so @a |
|
49979e453876
Create purple_connection_reason_is_fatal, which is basically a replacement for
Will Thompson <resiak@pidgin.im>
parents:
20430
diff
changeset
|
415 | * purple_connection_reason_is_fatal(PURPLE_REASON_AUTHENTICATION_FAILED) |
|
49979e453876
Create purple_connection_reason_is_fatal, which is basically a replacement for
Will Thompson <resiak@pidgin.im>
parents:
20430
diff
changeset
|
416 | * is @a TRUE. |
|
49979e453876
Create purple_connection_reason_is_fatal, which is basically a replacement for
Will Thompson <resiak@pidgin.im>
parents:
20430
diff
changeset
|
417 | * |
|
49979e453876
Create purple_connection_reason_is_fatal, which is basically a replacement for
Will Thompson <resiak@pidgin.im>
parents:
20430
diff
changeset
|
418 | * (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
|
419 | * |
|
49979e453876
Create purple_connection_reason_is_fatal, which is basically a replacement for
Will Thompson <resiak@pidgin.im>
parents:
20430
diff
changeset
|
420 | * @return @a TRUE iff automatic reconnection is a bad idea. |
|
49979e453876
Create purple_connection_reason_is_fatal, which is basically a replacement for
Will Thompson <resiak@pidgin.im>
parents:
20430
diff
changeset
|
421 | */ |
|
49979e453876
Create purple_connection_reason_is_fatal, which is basically a replacement for
Will Thompson <resiak@pidgin.im>
parents:
20430
diff
changeset
|
422 | gboolean |
|
49979e453876
Create purple_connection_reason_is_fatal, which is basically a replacement for
Will Thompson <resiak@pidgin.im>
parents:
20430
diff
changeset
|
423 | purple_connection_reason_is_fatal (PurpleDisconnectReason reason); |
|
49979e453876
Create purple_connection_reason_is_fatal, which is basically a replacement for
Will Thompson <resiak@pidgin.im>
parents:
20430
diff
changeset
|
424 | |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
425 | /*@}*/ |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
426 | |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
427 | /**************************************************************************/ |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
428 | /** @name Connections API */ |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
429 | /**************************************************************************/ |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
430 | /*@{*/ |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
431 | |
|
5564
1779a1bfbdb8
[gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
432 | /** |
| 5563 | 433 | * Disconnects from all connections. |
| 434 | */ | |
| 15884 | 435 | void purple_connections_disconnect_all(void); |
| 5563 | 436 | |
| 437 | /** | |
|
10352
802e7ab5b838
[gaim-migrate @ 11569]
Mark Doliner <markdoliner@pidgin.im>
parents:
10272
diff
changeset
|
438 | * Returns a list of all active connections. This does not |
|
802e7ab5b838
[gaim-migrate @ 11569]
Mark Doliner <markdoliner@pidgin.im>
parents:
10272
diff
changeset
|
439 | * include connections that are in the process of connecting. |
| 5563 | 440 | * |
|
18190
bcf28ef7e8ff
Re-fix the DBus list handling code by killing const GList* / const GSList*
Richard Laager <rlaager@pidgin.im>
parents:
18122
diff
changeset
|
441 | * @constreturn A list of all active connections. |
| 5563 | 442 | */ |
|
18122
9bf9970c1b6a
disapproval of revision '2d8ea56b90971e7851442d96b7d74ecb4f052126'
Richard Laager <rlaager@pidgin.im>
parents:
18121
diff
changeset
|
443 | GList *purple_connections_get_all(void); |
| 5563 | 444 | |
|
5564
1779a1bfbdb8
[gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
445 | /** |
|
1779a1bfbdb8
[gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
446 | * Returns a list of all connections in the process of connecting. |
|
1779a1bfbdb8
[gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
447 | * |
|
18190
bcf28ef7e8ff
Re-fix the DBus list handling code by killing const GList* / const GSList*
Richard Laager <rlaager@pidgin.im>
parents:
18122
diff
changeset
|
448 | * @constreturn A list of connecting connections. |
|
5564
1779a1bfbdb8
[gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
449 | */ |
|
18122
9bf9970c1b6a
disapproval of revision '2d8ea56b90971e7851442d96b7d74ecb4f052126'
Richard Laager <rlaager@pidgin.im>
parents:
18121
diff
changeset
|
450 | GList *purple_connections_get_connecting(void); |
|
5564
1779a1bfbdb8
[gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
451 | |
| 9221 | 452 | /** |
| 453 | * Checks if gc is still a valid pointer to a gc. | |
| 454 | * | |
| 455 | * @return @c TRUE if gc is valid. | |
| 456 | */ | |
|
14183
bdde840e984c
[gaim-migrate @ 16755]
Mark Doliner <markdoliner@pidgin.im>
parents:
14030
diff
changeset
|
457 | /* |
|
bdde840e984c
[gaim-migrate @ 16755]
Mark Doliner <markdoliner@pidgin.im>
parents:
14030
diff
changeset
|
458 | * TODO: Eventually this bad boy will be removed, because it is |
|
bdde840e984c
[gaim-migrate @ 16755]
Mark Doliner <markdoliner@pidgin.im>
parents:
14030
diff
changeset
|
459 | * a gross fix for a crashy problem. |
|
bdde840e984c
[gaim-migrate @ 16755]
Mark Doliner <markdoliner@pidgin.im>
parents:
14030
diff
changeset
|
460 | */ |
|
18122
9bf9970c1b6a
disapproval of revision '2d8ea56b90971e7851442d96b7d74ecb4f052126'
Richard Laager <rlaager@pidgin.im>
parents:
18121
diff
changeset
|
461 | #define PURPLE_CONNECTION_IS_VALID(gc) (g_list_find(purple_connections_get_all(), (gc)) != NULL) |
| 9221 | 462 | |
|
5944
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 | |
| 5563 | 465 | /**************************************************************************/ |
|
7122
5f40c16a4ae4
[gaim-migrate @ 7689]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
466 | /** @name UI Registration Functions */ |
| 5563 | 467 | /**************************************************************************/ |
| 468 | /*@{*/ | |
| 469 | ||
| 470 | /** | |
| 471 | * Sets the UI operations structure to be used for connections. | |
| 472 | * | |
| 473 | * @param ops The UI operations structure. | |
| 474 | */ | |
| 15884 | 475 | void purple_connections_set_ui_ops(PurpleConnectionUiOps *ops); |
| 5563 | 476 | |
| 477 | /** | |
| 478 | * Returns the UI operations structure used for connections. | |
| 479 | * | |
| 480 | * @return The UI operations structure in use. | |
| 481 | */ | |
| 15884 | 482 | PurpleConnectionUiOps *purple_connections_get_ui_ops(void); |
| 5563 | 483 | |
| 484 | /*@}*/ | |
| 485 | ||
|
6488
6a47a95e4dbb
[gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents:
6485
diff
changeset
|
486 | /**************************************************************************/ |
|
6a47a95e4dbb
[gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents:
6485
diff
changeset
|
487 | /** @name Connections Subsystem */ |
|
6a47a95e4dbb
[gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents:
6485
diff
changeset
|
488 | /**************************************************************************/ |
|
6a47a95e4dbb
[gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents:
6485
diff
changeset
|
489 | /*@{*/ |
|
6a47a95e4dbb
[gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents:
6485
diff
changeset
|
490 | |
|
6a47a95e4dbb
[gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents:
6485
diff
changeset
|
491 | /** |
|
6a47a95e4dbb
[gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents:
6485
diff
changeset
|
492 | * Initializes the connections subsystem. |
|
6a47a95e4dbb
[gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents:
6485
diff
changeset
|
493 | */ |
| 15884 | 494 | void purple_connections_init(void); |
|
6488
6a47a95e4dbb
[gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents:
6485
diff
changeset
|
495 | |
|
6a47a95e4dbb
[gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents:
6485
diff
changeset
|
496 | /** |
|
6a47a95e4dbb
[gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents:
6485
diff
changeset
|
497 | * Uninitializes the connections subsystem. |
|
6a47a95e4dbb
[gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents:
6485
diff
changeset
|
498 | */ |
| 15884 | 499 | void purple_connections_uninit(void); |
|
6488
6a47a95e4dbb
[gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents:
6485
diff
changeset
|
500 | |
|
6a47a95e4dbb
[gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents:
6485
diff
changeset
|
501 | /** |
|
6a47a95e4dbb
[gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents:
6485
diff
changeset
|
502 | * Returns the handle to the connections subsystem. |
|
6a47a95e4dbb
[gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents:
6485
diff
changeset
|
503 | * |
|
6a47a95e4dbb
[gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents:
6485
diff
changeset
|
504 | * @return The connections subsystem handle. |
|
6a47a95e4dbb
[gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents:
6485
diff
changeset
|
505 | */ |
| 15884 | 506 | void *purple_connections_get_handle(void); |
|
6488
6a47a95e4dbb
[gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents:
6485
diff
changeset
|
507 | |
|
6a47a95e4dbb
[gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents:
6485
diff
changeset
|
508 | /*@}*/ |
|
6a47a95e4dbb
[gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents:
6485
diff
changeset
|
509 | |
|
6a47a95e4dbb
[gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents:
6485
diff
changeset
|
510 | |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
511 | #ifdef __cplusplus |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
512 | } |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
513 | #endif |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
514 | |
| 15884 | 515 | #endif /* _PURPLE_CONNECTION_H_ */ |