Thu, 07 Jun 2007 04:22:42 +0000
Mark the return type const for the following functions. I noticed this
while fixing some DBus stuff which I'll commit shortly.
* purple_accounts_get_all
* purple_connections_get_all
* purple_connections_get_connecting
* purple_conv_chat_get_ignored
* purple_conv_chat_get_users
* purple_get_chats
* purple_get_conversations
* purple_get_ims
* purple_notify_user_info_get_entries
References #1344
| 5563 | 1 | /** |
| 2 | * @file connection.h Connection API | |
| 3 | * @ingroup core | |
| 4 | * | |
| 15884 | 5 | * purple |
| 5563 | 6 | * |
| 15884 | 7 | * Purple is the legal property of its developers, whose names are too numerous |
| 8046 | 8 | * to list here. Please refer to the COPYRIGHT file distributed with this |
| 9 | * source distribution. | |
|
6460
fc288e7221ca
[gaim-migrate @ 6969]
Christian Hammond <chipx86@chipx86.com>
parents:
6393
diff
changeset
|
10 | * |
| 5563 | 11 | * This program is free software; you can redistribute it and/or modify |
| 12 | * it under the terms of the GNU General Public License as published by | |
| 13 | * the Free Software Foundation; either version 2 of the License, or | |
| 14 | * (at your option) any later version. | |
| 15 | * | |
| 16 | * This program is distributed in the hope that it will be useful, | |
| 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 19 | * GNU General Public License for more details. | |
| 20 | * | |
| 21 | * You should have received a copy of the GNU General Public License | |
| 22 | * along with this program; if not, write to the Free Software | |
| 23 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
|
6724
e1d416a4a4bc
[gaim-migrate @ 7251]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
24 | * |
|
e1d416a4a4bc
[gaim-migrate @ 7251]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
25 | * @see @ref connection-signals |
| 5563 | 26 | */ |
| 15884 | 27 | #ifndef _PURPLE_CONNECTION_H_ |
| 28 | #define _PURPLE_CONNECTION_H_ | |
| 5563 | 29 | |
| 15884 | 30 | typedef struct _PurpleConnection PurpleConnection; |
| 5563 | 31 | |
|
6622
277eb0b14653
[gaim-migrate @ 7146]
Robert McQueen <robot101@debian.org>
parents:
6605
diff
changeset
|
32 | /** |
|
277eb0b14653
[gaim-migrate @ 7146]
Robert McQueen <robot101@debian.org>
parents:
6605
diff
changeset
|
33 | * Flags to change behavior of the client for a given connection. |
|
277eb0b14653
[gaim-migrate @ 7146]
Robert McQueen <robot101@debian.org>
parents:
6605
diff
changeset
|
34 | */ |
|
277eb0b14653
[gaim-migrate @ 7146]
Robert McQueen <robot101@debian.org>
parents:
6605
diff
changeset
|
35 | typedef enum |
|
277eb0b14653
[gaim-migrate @ 7146]
Robert McQueen <robot101@debian.org>
parents:
6605
diff
changeset
|
36 | { |
| 15884 | 37 | PURPLE_CONNECTION_HTML = 0x0001, /**< Connection sends/receives in 'HTML'. */ |
| 38 | PURPLE_CONNECTION_NO_BGCOLOR = 0x0002, /**< Connection does not send/receive | |
|
6982
12f08de92674
[gaim-migrate @ 7538]
Mark Doliner <markdoliner@pidgin.im>
parents:
6724
diff
changeset
|
39 | background colors. */ |
| 15884 | 40 | PURPLE_CONNECTION_AUTO_RESP = 0x0004, /**< Send auto responses when away. */ |
| 41 | PURPLE_CONNECTION_FORMATTING_WBFO = 0x0008, /**< The text buffer must be formatted as a whole */ | |
| 42 | PURPLE_CONNECTION_NO_NEWLINES = 0x0010, /**< No new lines are allowed in outgoing messages */ | |
| 43 | PURPLE_CONNECTION_NO_FONTSIZE = 0x0020, /**< Connection does not send/receive font sizes */ | |
| 44 | PURPLE_CONNECTION_NO_URLDESC = 0x0040, /**< Connection does not support descriptions with links */ | |
| 45 | PURPLE_CONNECTION_NO_IMAGES = 0x0080, /**< Connection does not support sending of images */ | |
|
10008
1de3454a0dca
[gaim-migrate @ 10925]
Mark Doliner <markdoliner@pidgin.im>
parents:
9981
diff
changeset
|
46 | |
| 15884 | 47 | } PurpleConnectionFlags; |
|
5872
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5733
diff
changeset
|
48 | |
| 5563 | 49 | typedef enum |
| 50 | { | |
| 15884 | 51 | PURPLE_DISCONNECTED = 0, /**< Disconnected. */ |
| 52 | PURPLE_CONNECTED, /**< Connected. */ | |
| 53 | PURPLE_CONNECTING /**< Connecting. */ | |
| 5563 | 54 | |
| 15884 | 55 | } PurpleConnectionState; |
| 5563 | 56 | |
|
10021
5aa380278a15
[gaim-migrate @ 10946]
Mark Doliner <markdoliner@pidgin.im>
parents:
10008
diff
changeset
|
57 | #include <time.h> |
|
5aa380278a15
[gaim-migrate @ 10946]
Mark Doliner <markdoliner@pidgin.im>
parents:
10008
diff
changeset
|
58 | |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
59 | #include "account.h" |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
60 | #include "plugin.h" |
| 10400 | 61 | #include "status.h" |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
62 | |
| 5563 | 63 | typedef struct |
| 64 | { | |
| 15884 | 65 | void (*connect_progress)(PurpleConnection *gc, const char *text, |
| 5563 | 66 | size_t step, size_t step_count); |
| 15884 | 67 | void (*connected)(PurpleConnection *gc); |
| 68 | void (*disconnected)(PurpleConnection *gc); | |
| 69 | void (*notice)(PurpleConnection *gc, const char *text); | |
| 70 | void (*report_disconnect)(PurpleConnection *gc, const char *text); | |
| 14758 | 71 | void (*network_connected)(); |
| 72 | void (*network_disconnected)(); | |
| 5563 | 73 | |
|
16743
1ce5ffe12e2a
Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents:
15884
diff
changeset
|
74 | 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
|
75 | 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
|
76 | void (*_purple_reserved3)(void); |
|
1ce5ffe12e2a
Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents:
15884
diff
changeset
|
77 | void (*_purple_reserved4)(void); |
| 15884 | 78 | } PurpleConnectionUiOps; |
| 5563 | 79 | |
| 15884 | 80 | struct _PurpleConnection |
| 5563 | 81 | { |
| 15884 | 82 | PurplePlugin *prpl; /**< The protocol plugin. */ |
| 83 | PurpleConnectionFlags flags; /**< Connection flags. */ | |
| 5563 | 84 | |
| 15884 | 85 | PurpleConnectionState state; /**< The connection state. */ |
| 5563 | 86 | |
| 15884 | 87 | PurpleAccount *account; /**< The account being connected to. */ |
|
10740
a1cb6b819a21
[gaim-migrate @ 12342]
Mark Doliner <markdoliner@pidgin.im>
parents:
10738
diff
changeset
|
88 | char *password; /**< The password used. */ |
| 5563 | 89 | int inpa; /**< The input watcher. */ |
| 90 | ||
| 91 | GSList *buddy_chats; /**< A list of active chats. */ | |
| 92 | void *proto_data; /**< Protocol-specific data. */ | |
| 93 | ||
|
14341
e67646af66ab
[gaim-migrate @ 16964]
Mark Doliner <markdoliner@pidgin.im>
parents:
14254
diff
changeset
|
94 | char *display_name; /**< How you appear to other people. */ |
|
10745
04039e970a30
[gaim-migrate @ 12347]
Mark Doliner <markdoliner@pidgin.im>
parents:
10742
diff
changeset
|
95 | guint keepalive; /**< Keep-alive. */ |
| 5563 | 96 | |
| 97 | ||
|
8430
13694e7d1aaa
[gaim-migrate @ 9160]
Mark Doliner <markdoliner@pidgin.im>
parents:
8046
diff
changeset
|
98 | 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
|
99 | when the user chooses to log out, |
|
8430
13694e7d1aaa
[gaim-migrate @ 9160]
Mark Doliner <markdoliner@pidgin.im>
parents:
8046
diff
changeset
|
100 | or when the protocol is |
|
13694e7d1aaa
[gaim-migrate @ 9160]
Mark Doliner <markdoliner@pidgin.im>
parents:
8046
diff
changeset
|
101 | disconnected and should not be |
|
13694e7d1aaa
[gaim-migrate @ 9160]
Mark Doliner <markdoliner@pidgin.im>
parents:
8046
diff
changeset
|
102 | automatically reconnected |
|
13694e7d1aaa
[gaim-migrate @ 9160]
Mark Doliner <markdoliner@pidgin.im>
parents:
8046
diff
changeset
|
103 | (incorrect password, etc.) */ |
| 6393 | 104 | guint disconnect_timeout; /**< Timer used for nasty stack tricks */ |
| 5563 | 105 | }; |
| 106 | ||
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
107 | #ifdef __cplusplus |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
108 | extern "C" { |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
109 | #endif |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
110 | |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
111 | /**************************************************************************/ |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
112 | /** @name Connection API */ |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
113 | /**************************************************************************/ |
|
6488
6a47a95e4dbb
[gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents:
6485
diff
changeset
|
114 | /*@{*/ |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
115 | |
| 5563 | 116 | /** |
| 15884 | 117 | * This function should only be called by purple_account_connect() |
|
10740
a1cb6b819a21
[gaim-migrate @ 12342]
Mark Doliner <markdoliner@pidgin.im>
parents:
10738
diff
changeset
|
118 | * 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
|
119 | * function instead. |
|
a1cb6b819a21
[gaim-migrate @ 12342]
Mark Doliner <markdoliner@pidgin.im>
parents:
10738
diff
changeset
|
120 | * |
|
a1cb6b819a21
[gaim-migrate @ 12342]
Mark Doliner <markdoliner@pidgin.im>
parents:
10738
diff
changeset
|
121 | * Creates a connection to the specified account and either connects |
|
a1cb6b819a21
[gaim-migrate @ 12342]
Mark Doliner <markdoliner@pidgin.im>
parents:
10738
diff
changeset
|
122 | * 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
|
123 | * the connection uses the current active status for this account. |
|
a1cb6b819a21
[gaim-migrate @ 12342]
Mark Doliner <markdoliner@pidgin.im>
parents:
10738
diff
changeset
|
124 | * So if you want to sign on as "away," for example, you need to |
| 15884 | 125 | * have called purple_account_set_status(account, "away"). |
| 126 | * (And this will call purple_account_connect() automatically). | |
| 5563 | 127 | * |
|
10758
b4554ec8d126
[gaim-migrate @ 12361]
Mark Doliner <markdoliner@pidgin.im>
parents:
10745
diff
changeset
|
128 | * @param account The account the connection should be connecting to. |
|
b4554ec8d126
[gaim-migrate @ 12361]
Mark Doliner <markdoliner@pidgin.im>
parents:
10745
diff
changeset
|
129 | * @param regist Whether we are registering a new account or just |
|
b4554ec8d126
[gaim-migrate @ 12361]
Mark Doliner <markdoliner@pidgin.im>
parents:
10745
diff
changeset
|
130 | * trying to do a normal signon. |
|
10740
a1cb6b819a21
[gaim-migrate @ 12342]
Mark Doliner <markdoliner@pidgin.im>
parents:
10738
diff
changeset
|
131 | * @param password The password to use. |
| 5563 | 132 | */ |
| 15884 | 133 | void purple_connection_new(PurpleAccount *account, gboolean regist, |
|
10740
a1cb6b819a21
[gaim-migrate @ 12342]
Mark Doliner <markdoliner@pidgin.im>
parents:
10738
diff
changeset
|
134 | const char *password); |
| 5563 | 135 | |
| 136 | /** | |
| 15884 | 137 | * Disconnects and destroys a PurpleConnection. |
|
13976
2543396bd00e
[gaim-migrate @ 16414]
Mark Doliner <markdoliner@pidgin.im>
parents:
12272
diff
changeset
|
138 | * |
| 15884 | 139 | * This function should only be called by purple_account_disconnect() |
|
13976
2543396bd00e
[gaim-migrate @ 16414]
Mark Doliner <markdoliner@pidgin.im>
parents:
12272
diff
changeset
|
140 | * 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
|
141 | * function instead. |
|
63ca8277c234
[gaim-migrate @ 12340]
Mark Doliner <markdoliner@pidgin.im>
parents:
10665
diff
changeset
|
142 | * |
| 15884 | 143 | * @param gc The purple connection to destroy. |
| 5563 | 144 | */ |
| 15884 | 145 | void purple_connection_destroy(PurpleConnection *gc); |
| 6581 | 146 | |
| 147 | /** | |
|
11718
90804d019837
[gaim-migrate @ 14009]
Mark Doliner <markdoliner@pidgin.im>
parents:
10758
diff
changeset
|
148 | * Sets the connection state. PRPLs should call this and pass in |
| 15884 | 149 | * the state "PURPLE_CONNECTED" when the account is completely |
|
11718
90804d019837
[gaim-migrate @ 14009]
Mark Doliner <markdoliner@pidgin.im>
parents:
10758
diff
changeset
|
150 | * 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
|
151 | * the core can call prpl->set_status, and it successfully changes |
|
90804d019837
[gaim-migrate @ 14009]
Mark Doliner <markdoliner@pidgin.im>
parents:
10758
diff
changeset
|
152 | * your status, then the account is online. |
| 5563 | 153 | * |
| 154 | * @param gc The connection. | |
| 155 | * @param state The connection state. | |
| 156 | */ | |
| 15884 | 157 | void purple_connection_set_state(PurpleConnection *gc, PurpleConnectionState state); |
| 5563 | 158 | |
| 159 | /** | |
| 160 | * Sets the connection's account. | |
| 161 | * | |
| 162 | * @param gc The connection. | |
| 163 | * @param account The account. | |
| 164 | */ | |
| 15884 | 165 | void purple_connection_set_account(PurpleConnection *gc, PurpleAccount *account); |
| 5563 | 166 | |
| 167 | /** | |
| 168 | * Sets the connection's displayed name. | |
| 169 | * | |
| 170 | * @param gc The connection. | |
| 171 | * @param name The displayed name. | |
| 172 | */ | |
| 15884 | 173 | void purple_connection_set_display_name(PurpleConnection *gc, const char *name); |
| 5563 | 174 | |
| 175 | /** | |
| 176 | * Returns the connection state. | |
| 177 | * | |
| 178 | * @param gc The connection. | |
| 179 | * | |
| 180 | * @return The connection state. | |
| 181 | */ | |
| 15884 | 182 | PurpleConnectionState purple_connection_get_state(const PurpleConnection *gc); |
| 5563 | 183 | |
| 184 | /** | |
|
9019
b9a333b36763
[gaim-migrate @ 9795]
Mark Doliner <markdoliner@pidgin.im>
parents:
8735
diff
changeset
|
185 | * Returns TRUE if the account is connected, otherwise returns FALSE. |
|
b9a333b36763
[gaim-migrate @ 9795]
Mark Doliner <markdoliner@pidgin.im>
parents:
8735
diff
changeset
|
186 | * |
|
b9a333b36763
[gaim-migrate @ 9795]
Mark Doliner <markdoliner@pidgin.im>
parents:
8735
diff
changeset
|
187 | * @return TRUE if the account is connected, otherwise returns FALSE. |
|
b9a333b36763
[gaim-migrate @ 9795]
Mark Doliner <markdoliner@pidgin.im>
parents:
8735
diff
changeset
|
188 | */ |
| 15884 | 189 | #define PURPLE_CONNECTION_IS_CONNECTED(gc) \ |
| 190 | (gc->state == PURPLE_CONNECTED) | |
|
9019
b9a333b36763
[gaim-migrate @ 9795]
Mark Doliner <markdoliner@pidgin.im>
parents:
8735
diff
changeset
|
191 | |
|
b9a333b36763
[gaim-migrate @ 9795]
Mark Doliner <markdoliner@pidgin.im>
parents:
8735
diff
changeset
|
192 | /** |
| 5563 | 193 | * Returns the connection's account. |
| 194 | * | |
| 195 | * @param gc The connection. | |
| 196 | * | |
| 197 | * @return The connection's account. | |
| 198 | */ | |
| 15884 | 199 | PurpleAccount *purple_connection_get_account(const PurpleConnection *gc); |
| 5563 | 200 | |
| 201 | /** | |
|
10740
a1cb6b819a21
[gaim-migrate @ 12342]
Mark Doliner <markdoliner@pidgin.im>
parents:
10738
diff
changeset
|
202 | * Returns the connection's password. |
|
a1cb6b819a21
[gaim-migrate @ 12342]
Mark Doliner <markdoliner@pidgin.im>
parents:
10738
diff
changeset
|
203 | * |
|
a1cb6b819a21
[gaim-migrate @ 12342]
Mark Doliner <markdoliner@pidgin.im>
parents:
10738
diff
changeset
|
204 | * @param gc The connection. |
|
a1cb6b819a21
[gaim-migrate @ 12342]
Mark Doliner <markdoliner@pidgin.im>
parents:
10738
diff
changeset
|
205 | * |
|
a1cb6b819a21
[gaim-migrate @ 12342]
Mark Doliner <markdoliner@pidgin.im>
parents:
10738
diff
changeset
|
206 | * @return The connection's password. |
|
a1cb6b819a21
[gaim-migrate @ 12342]
Mark Doliner <markdoliner@pidgin.im>
parents:
10738
diff
changeset
|
207 | */ |
| 15884 | 208 | const char *purple_connection_get_password(const PurpleConnection *gc); |
|
10740
a1cb6b819a21
[gaim-migrate @ 12342]
Mark Doliner <markdoliner@pidgin.im>
parents:
10738
diff
changeset
|
209 | |
|
a1cb6b819a21
[gaim-migrate @ 12342]
Mark Doliner <markdoliner@pidgin.im>
parents:
10738
diff
changeset
|
210 | /** |
| 5563 | 211 | * Returns the connection's displayed name. |
| 212 | * | |
| 213 | * @param gc The connection. | |
| 214 | * | |
| 215 | * @return The connection's displayed name. | |
| 216 | */ | |
| 15884 | 217 | const char *purple_connection_get_display_name(const PurpleConnection *gc); |
| 5563 | 218 | |
| 219 | /** | |
| 220 | * Updates the connection progress. | |
| 221 | * | |
| 222 | * @param gc The connection. | |
| 223 | * @param text Information on the current step. | |
| 224 | * @param step The current step. | |
| 225 | * @param count The total number of steps. | |
| 226 | */ | |
| 15884 | 227 | void purple_connection_update_progress(PurpleConnection *gc, const char *text, |
| 5563 | 228 | size_t step, size_t count); |
| 229 | ||
| 230 | /** | |
|
5571
b709464f507e
[gaim-migrate @ 5973]
Christian Hammond <chipx86@chipx86.com>
parents:
5564
diff
changeset
|
231 | * Displays a connection-specific notice. |
|
b709464f507e
[gaim-migrate @ 5973]
Christian Hammond <chipx86@chipx86.com>
parents:
5564
diff
changeset
|
232 | * |
|
b709464f507e
[gaim-migrate @ 5973]
Christian Hammond <chipx86@chipx86.com>
parents:
5564
diff
changeset
|
233 | * @param gc The connection. |
|
b709464f507e
[gaim-migrate @ 5973]
Christian Hammond <chipx86@chipx86.com>
parents:
5564
diff
changeset
|
234 | * @param text The notice text. |
|
b709464f507e
[gaim-migrate @ 5973]
Christian Hammond <chipx86@chipx86.com>
parents:
5564
diff
changeset
|
235 | */ |
| 15884 | 236 | void purple_connection_notice(PurpleConnection *gc, const char *text); |
|
5571
b709464f507e
[gaim-migrate @ 5973]
Christian Hammond <chipx86@chipx86.com>
parents:
5564
diff
changeset
|
237 | |
|
b709464f507e
[gaim-migrate @ 5973]
Christian Hammond <chipx86@chipx86.com>
parents:
5564
diff
changeset
|
238 | /** |
|
5564
1779a1bfbdb8
[gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
239 | * Closes a connection with an error. |
|
1779a1bfbdb8
[gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
240 | * |
|
1779a1bfbdb8
[gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
241 | * @param gc The connection. |
|
1779a1bfbdb8
[gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
242 | * @param reason The error text. |
|
1779a1bfbdb8
[gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
243 | */ |
| 15884 | 244 | void purple_connection_error(PurpleConnection *gc, const char *reason); |
|
5564
1779a1bfbdb8
[gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
245 | |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
246 | /*@}*/ |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
247 | |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
248 | /**************************************************************************/ |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
249 | /** @name Connections API */ |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
250 | /**************************************************************************/ |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
251 | /*@{*/ |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
252 | |
|
5564
1779a1bfbdb8
[gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
253 | /** |
| 5563 | 254 | * Disconnects from all connections. |
| 255 | */ | |
| 15884 | 256 | void purple_connections_disconnect_all(void); |
| 5563 | 257 | |
| 258 | /** | |
|
10352
802e7ab5b838
[gaim-migrate @ 11569]
Mark Doliner <markdoliner@pidgin.im>
parents:
10272
diff
changeset
|
259 | * Returns a list of all active connections. This does not |
|
802e7ab5b838
[gaim-migrate @ 11569]
Mark Doliner <markdoliner@pidgin.im>
parents:
10272
diff
changeset
|
260 | * include connections that are in the process of connecting. |
| 5563 | 261 | * |
| 262 | * @return A list of all active connections. | |
| 263 | */ | |
|
18121
2d8ea56b9097
Mark the return type const for the following functions. I noticed this
Richard Laager <rlaager@pidgin.im>
parents:
17458
diff
changeset
|
264 | const GList *purple_connections_get_all(void); |
| 5563 | 265 | |
|
5564
1779a1bfbdb8
[gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
266 | /** |
|
1779a1bfbdb8
[gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
267 | * Returns a list of all connections in the process of connecting. |
|
1779a1bfbdb8
[gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
268 | * |
|
1779a1bfbdb8
[gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
269 | * @return A list of connecting connections. |
|
1779a1bfbdb8
[gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
270 | */ |
|
18121
2d8ea56b9097
Mark the return type const for the following functions. I noticed this
Richard Laager <rlaager@pidgin.im>
parents:
17458
diff
changeset
|
271 | const GList *purple_connections_get_connecting(void); |
|
5564
1779a1bfbdb8
[gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
272 | |
| 9221 | 273 | /** |
| 274 | * Checks if gc is still a valid pointer to a gc. | |
| 275 | * | |
| 276 | * @return @c TRUE if gc is valid. | |
| 277 | */ | |
|
14183
bdde840e984c
[gaim-migrate @ 16755]
Mark Doliner <markdoliner@pidgin.im>
parents:
14030
diff
changeset
|
278 | /* |
|
bdde840e984c
[gaim-migrate @ 16755]
Mark Doliner <markdoliner@pidgin.im>
parents:
14030
diff
changeset
|
279 | * TODO: Eventually this bad boy will be removed, because it is |
|
bdde840e984c
[gaim-migrate @ 16755]
Mark Doliner <markdoliner@pidgin.im>
parents:
14030
diff
changeset
|
280 | * a gross fix for a crashy problem. |
|
bdde840e984c
[gaim-migrate @ 16755]
Mark Doliner <markdoliner@pidgin.im>
parents:
14030
diff
changeset
|
281 | */ |
|
18121
2d8ea56b9097
Mark the return type const for the following functions. I noticed this
Richard Laager <rlaager@pidgin.im>
parents:
17458
diff
changeset
|
282 | #define PURPLE_CONNECTION_IS_VALID(gc) (g_list_find((GList *)purple_connections_get_all(), (gc)) != NULL) |
| 9221 | 283 | |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
284 | /*@}*/ |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
285 | |
| 5563 | 286 | /**************************************************************************/ |
|
7122
5f40c16a4ae4
[gaim-migrate @ 7689]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
287 | /** @name UI Registration Functions */ |
| 5563 | 288 | /**************************************************************************/ |
| 289 | /*@{*/ | |
| 290 | ||
| 291 | /** | |
| 292 | * Sets the UI operations structure to be used for connections. | |
| 293 | * | |
| 294 | * @param ops The UI operations structure. | |
| 295 | */ | |
| 15884 | 296 | void purple_connections_set_ui_ops(PurpleConnectionUiOps *ops); |
| 5563 | 297 | |
| 298 | /** | |
| 299 | * Returns the UI operations structure used for connections. | |
| 300 | * | |
| 301 | * @return The UI operations structure in use. | |
| 302 | */ | |
| 15884 | 303 | PurpleConnectionUiOps *purple_connections_get_ui_ops(void); |
| 5563 | 304 | |
| 305 | /*@}*/ | |
| 306 | ||
|
6488
6a47a95e4dbb
[gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents:
6485
diff
changeset
|
307 | /**************************************************************************/ |
|
6a47a95e4dbb
[gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents:
6485
diff
changeset
|
308 | /** @name Connections Subsystem */ |
|
6a47a95e4dbb
[gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents:
6485
diff
changeset
|
309 | /**************************************************************************/ |
|
6a47a95e4dbb
[gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents:
6485
diff
changeset
|
310 | /*@{*/ |
|
6a47a95e4dbb
[gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents:
6485
diff
changeset
|
311 | |
|
6a47a95e4dbb
[gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents:
6485
diff
changeset
|
312 | /** |
|
6a47a95e4dbb
[gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents:
6485
diff
changeset
|
313 | * Initializes the connections subsystem. |
|
6a47a95e4dbb
[gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents:
6485
diff
changeset
|
314 | */ |
| 15884 | 315 | void purple_connections_init(void); |
|
6488
6a47a95e4dbb
[gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents:
6485
diff
changeset
|
316 | |
|
6a47a95e4dbb
[gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents:
6485
diff
changeset
|
317 | /** |
|
6a47a95e4dbb
[gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents:
6485
diff
changeset
|
318 | * Uninitializes the connections subsystem. |
|
6a47a95e4dbb
[gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents:
6485
diff
changeset
|
319 | */ |
| 15884 | 320 | void purple_connections_uninit(void); |
|
6488
6a47a95e4dbb
[gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents:
6485
diff
changeset
|
321 | |
|
6a47a95e4dbb
[gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents:
6485
diff
changeset
|
322 | /** |
|
6a47a95e4dbb
[gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents:
6485
diff
changeset
|
323 | * Returns the handle to the connections subsystem. |
|
6a47a95e4dbb
[gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents:
6485
diff
changeset
|
324 | * |
|
6a47a95e4dbb
[gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents:
6485
diff
changeset
|
325 | * @return The connections subsystem handle. |
|
6a47a95e4dbb
[gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents:
6485
diff
changeset
|
326 | */ |
| 15884 | 327 | void *purple_connections_get_handle(void); |
|
6488
6a47a95e4dbb
[gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents:
6485
diff
changeset
|
328 | |
|
6a47a95e4dbb
[gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents:
6485
diff
changeset
|
329 | /*@}*/ |
|
6a47a95e4dbb
[gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents:
6485
diff
changeset
|
330 | |
|
6a47a95e4dbb
[gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents:
6485
diff
changeset
|
331 | |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
332 | #ifdef __cplusplus |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
333 | } |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
334 | #endif |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
335 | |
| 15884 | 336 | #endif /* _PURPLE_CONNECTION_H_ */ |