annotate src/connection.h @ 12086:08be85ee79c0

[gaim-migrate @ 14383] Fix compilation for older version of gtk committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Mon, 14 Nov 2005 14:28:46 +0000
parents 0fab529c01fc
children 3ef381cdc47e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5563
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1 /**
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
2 * @file connection.h Connection API
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
3 * @ingroup core
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
4 *
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
5 * gaim
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
6 *
8046
fa6395637e2c [gaim-migrate @ 8730]
Sean Egan <seanegan@gmail.com>
parents: 7122
diff changeset
7 * Gaim is the legal property of its developers, whose names are too numerous
fa6395637e2c [gaim-migrate @ 8730]
Sean Egan <seanegan@gmail.com>
parents: 7122
diff changeset
8 * to list here. Please refer to the COPYRIGHT file distributed with this
fa6395637e2c [gaim-migrate @ 8730]
Sean Egan <seanegan@gmail.com>
parents: 7122
diff changeset
9 * source distribution.
6460
ff4551719cc7 [gaim-migrate @ 6969]
Christian Hammond <chipx86@chipx86.com>
parents: 6393
diff changeset
10 *
5563
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
11 * This program is free software; you can redistribute it and/or modify
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
12 * it under the terms of the GNU General Public License as published by
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
13 * the Free Software Foundation; either version 2 of the License, or
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
14 * (at your option) any later version.
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
15 *
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
16 * This program is distributed in the hope that it will be useful,
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
19 * GNU General Public License for more details.
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
20 *
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
21 * You should have received a copy of the GNU General Public License
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
22 * along with this program; if not, write to the Free Software
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
6724
aca39e77db85 [gaim-migrate @ 7251]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
24 *
aca39e77db85 [gaim-migrate @ 7251]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
25 * @see @ref connection-signals
5563
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
26 */
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
27 #ifndef _GAIM_CONNECTION_H_
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
28 #define _GAIM_CONNECTION_H_
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
29
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
30 typedef struct _GaimConnection GaimConnection;
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
31
6622
a4622f1fb5a1 [gaim-migrate @ 7146]
Luke Schierer <lschiere@pidgin.im>
parents: 6605
diff changeset
32 /**
a4622f1fb5a1 [gaim-migrate @ 7146]
Luke Schierer <lschiere@pidgin.im>
parents: 6605
diff changeset
33 * Flags to change behavior of the client for a given connection.
a4622f1fb5a1 [gaim-migrate @ 7146]
Luke Schierer <lschiere@pidgin.im>
parents: 6605
diff changeset
34 */
a4622f1fb5a1 [gaim-migrate @ 7146]
Luke Schierer <lschiere@pidgin.im>
parents: 6605
diff changeset
35 typedef enum
a4622f1fb5a1 [gaim-migrate @ 7146]
Luke Schierer <lschiere@pidgin.im>
parents: 6605
diff changeset
36 {
6982
083d1e4a9c78 [gaim-migrate @ 7538]
Mark Doliner <mark@kingant.net>
parents: 6724
diff changeset
37 GAIM_CONNECTION_HTML = 0x0001, /**< Connection sends/receives in 'HTML'. */
8735
92cbf9713795 [gaim-migrate @ 9490]
Christian Hammond <chipx86@chipx86.com>
parents: 8691
diff changeset
38 GAIM_CONNECTION_NO_BGCOLOR = 0x0002, /**< Connection does not send/receive
6982
083d1e4a9c78 [gaim-migrate @ 7538]
Mark Doliner <mark@kingant.net>
parents: 6724
diff changeset
39 background colors. */
8677
cc2ce209cc46 [gaim-migrate @ 9430]
Sean Egan <seanegan@gmail.com>
parents: 8430
diff changeset
40 GAIM_CONNECTION_AUTO_RESP = 0x0004, /**< Send auto responses when away. */
cc2ce209cc46 [gaim-migrate @ 9430]
Sean Egan <seanegan@gmail.com>
parents: 8430
diff changeset
41 GAIM_CONNECTION_FORMATTING_WBFO = 0x0008, /**< The text buffer must be formatted as a whole */
8691
0eb5161ef333 [gaim-migrate @ 9444]
Christian Hammond <chipx86@chipx86.com>
parents: 8677
diff changeset
42 GAIM_CONNECTION_NO_NEWLINES = 0x0010, /**< No new lines are allowed in outgoing messages */
9041
812e7aa7eafa [gaim-migrate @ 9817]
Tim Ringenbach <marv@pidgin.im>
parents: 9019
diff changeset
43 GAIM_CONNECTION_NO_FONTSIZE = 0x0020, /**< Connection does not send/receive font sizes */
10665
4829abdc5c35 [gaim-migrate @ 12205]
Sean Egan <seanegan@gmail.com>
parents: 10400
diff changeset
44 GAIM_CONNECTION_NO_URLDESC = 0x0040, /**< Connection does not support descriptions with links */
4829abdc5c35 [gaim-migrate @ 12205]
Sean Egan <seanegan@gmail.com>
parents: 10400
diff changeset
45 GAIM_CONNECTION_NO_IMAGES = 0x0080, /**< Connection does not support sending of images */
10008
50c1724d5e59 [gaim-migrate @ 10925]
Mark Doliner <mark@kingant.net>
parents: 9981
diff changeset
46
6622
a4622f1fb5a1 [gaim-migrate @ 7146]
Luke Schierer <lschiere@pidgin.im>
parents: 6605
diff changeset
47 } GaimConnectionFlags;
5872
059d95c67cda [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5733
diff changeset
48
5563
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
49 typedef enum
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
50 {
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
51 GAIM_DISCONNECTED = 0, /**< Disconnected. */
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
52 GAIM_CONNECTED, /**< Connected. */
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
53 GAIM_CONNECTING /**< Connecting. */
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
54
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
55 } GaimConnectionState;
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
56
10021
2f41f462ab4e [gaim-migrate @ 10946]
Mark Doliner <mark@kingant.net>
parents: 10008
diff changeset
57 #include <time.h>
2f41f462ab4e [gaim-migrate @ 10946]
Mark Doliner <mark@kingant.net>
parents: 10008
diff changeset
58
5944
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
59 #include "account.h"
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
60 #include "plugin.h"
10400
6a043ae92db6 [gaim-migrate @ 11631]
Sean Egan <seanegan@gmail.com>
parents: 10352
diff changeset
61 #include "status.h"
5944
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
62
5563
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
63 typedef struct
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
64 {
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
65 void (*connect_progress)(GaimConnection *gc, const char *text,
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
66 size_t step, size_t step_count);
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
67 void (*connected)(GaimConnection *gc);
6460
ff4551719cc7 [gaim-migrate @ 6969]
Christian Hammond <chipx86@chipx86.com>
parents: 6393
diff changeset
68 void (*disconnected)(GaimConnection *gc);
5571
113090160626 [gaim-migrate @ 5973]
Christian Hammond <chipx86@chipx86.com>
parents: 5564
diff changeset
69 void (*notice)(GaimConnection *gc, const char *text);
6460
ff4551719cc7 [gaim-migrate @ 6969]
Christian Hammond <chipx86@chipx86.com>
parents: 6393
diff changeset
70 void (*report_disconnect)(GaimConnection *gc, const char *text);
5563
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
71
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
72 } GaimConnectionUiOps;
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
73
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
74 struct _GaimConnection
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
75 {
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
76 GaimPlugin *prpl; /**< The protocol plugin. */
6622
a4622f1fb5a1 [gaim-migrate @ 7146]
Luke Schierer <lschiere@pidgin.im>
parents: 6605
diff changeset
77 GaimConnectionFlags flags; /**< Connection flags. */
5563
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
78
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
79 GaimConnectionState state; /**< The connection state. */
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
80
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
81 GaimAccount *account; /**< The account being connected to. */
10740
94cc67130789 [gaim-migrate @ 12342]
Mark Doliner <mark@kingant.net>
parents: 10738
diff changeset
82 char *password; /**< The password used. */
5563
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
83 int inpa; /**< The input watcher. */
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
84
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
85 GSList *buddy_chats; /**< A list of active chats. */
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
86 void *proto_data; /**< Protocol-specific data. */
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
87
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
88 char *display_name; /**< The name displayed. */
10745
ca69d597a5e2 [gaim-migrate @ 12347]
Mark Doliner <mark@kingant.net>
parents: 10742
diff changeset
89 guint keepalive; /**< Keep-alive. */
5563
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
90
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
91 guint idle_timer; /**< The idle timer. */
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
92 time_t last_sent_time; /**< The time something was last sent. */
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
93
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
94 gboolean is_auto_away; /**< Whether or not it's auto-away. */
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
95
8430
87bd4d4ff499 [gaim-migrate @ 9160]
Mark Doliner <mark@kingant.net>
parents: 8046
diff changeset
96 gboolean wants_to_die; /**< Wants to Die state. This is set
10272
bf1ebc8f3bf3 [gaim-migrate @ 11421]
Mark Doliner <mark@kingant.net>
parents: 10021
diff changeset
97 when the user chooses to log out,
8430
87bd4d4ff499 [gaim-migrate @ 9160]
Mark Doliner <mark@kingant.net>
parents: 8046
diff changeset
98 or when the protocol is
87bd4d4ff499 [gaim-migrate @ 9160]
Mark Doliner <mark@kingant.net>
parents: 8046
diff changeset
99 disconnected and should not be
87bd4d4ff499 [gaim-migrate @ 9160]
Mark Doliner <mark@kingant.net>
parents: 8046
diff changeset
100 automatically reconnected
87bd4d4ff499 [gaim-migrate @ 9160]
Mark Doliner <mark@kingant.net>
parents: 8046
diff changeset
101 (incorrect password, etc.) */
6393
74ca311ceb2a [gaim-migrate @ 6898]
Nathan Walp <nwalp@pidgin.im>
parents: 6109
diff changeset
102 guint disconnect_timeout; /**< Timer used for nasty stack tricks */
5563
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
103 };
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
104
5944
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
105 #ifdef __cplusplus
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
106 extern "C" {
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
107 #endif
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
108
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
109 /**************************************************************************/
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
110 /** @name Connection API */
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
111 /**************************************************************************/
6488
e5e8d21bd4d8 [gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents: 6485
diff changeset
112 /*@{*/
5944
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
113
5563
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
114 /**
10742
4228b6d78506 [gaim-migrate @ 12344]
Mark Doliner <mark@kingant.net>
parents: 10740
diff changeset
115 * This function should only be called by gaim_account_connect()
10740
94cc67130789 [gaim-migrate @ 12342]
Mark Doliner <mark@kingant.net>
parents: 10738
diff changeset
116 * in account.c. If you're trying to sign on an account, use that
94cc67130789 [gaim-migrate @ 12342]
Mark Doliner <mark@kingant.net>
parents: 10738
diff changeset
117 * function instead.
94cc67130789 [gaim-migrate @ 12342]
Mark Doliner <mark@kingant.net>
parents: 10738
diff changeset
118 *
94cc67130789 [gaim-migrate @ 12342]
Mark Doliner <mark@kingant.net>
parents: 10738
diff changeset
119 * Creates a connection to the specified account and either connects
94cc67130789 [gaim-migrate @ 12342]
Mark Doliner <mark@kingant.net>
parents: 10738
diff changeset
120 * or attempts to register a new account. If you are logging in,
94cc67130789 [gaim-migrate @ 12342]
Mark Doliner <mark@kingant.net>
parents: 10738
diff changeset
121 * the connection uses the current active status for this account.
94cc67130789 [gaim-migrate @ 12342]
Mark Doliner <mark@kingant.net>
parents: 10738
diff changeset
122 * So if you want to sign on as "away," for example, you need to
94cc67130789 [gaim-migrate @ 12342]
Mark Doliner <mark@kingant.net>
parents: 10738
diff changeset
123 * have called gaim_account_set_status(account, "away").
94cc67130789 [gaim-migrate @ 12342]
Mark Doliner <mark@kingant.net>
parents: 10738
diff changeset
124 * (And this will call gaim_account_connect() automatically).
5563
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
125 *
10758
c80a609bd747 [gaim-migrate @ 12361]
Mark Doliner <mark@kingant.net>
parents: 10745
diff changeset
126 * @param account The account the connection should be connecting to.
c80a609bd747 [gaim-migrate @ 12361]
Mark Doliner <mark@kingant.net>
parents: 10745
diff changeset
127 * @param regist Whether we are registering a new account or just
c80a609bd747 [gaim-migrate @ 12361]
Mark Doliner <mark@kingant.net>
parents: 10745
diff changeset
128 * trying to do a normal signon.
10740
94cc67130789 [gaim-migrate @ 12342]
Mark Doliner <mark@kingant.net>
parents: 10738
diff changeset
129 * @param password The password to use.
5563
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
130 */
10740
94cc67130789 [gaim-migrate @ 12342]
Mark Doliner <mark@kingant.net>
parents: 10738
diff changeset
131 void gaim_connection_new(GaimAccount *account, gboolean regist,
94cc67130789 [gaim-migrate @ 12342]
Mark Doliner <mark@kingant.net>
parents: 10738
diff changeset
132 const char *password);
5563
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
133
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
134 /**
10742
4228b6d78506 [gaim-migrate @ 12344]
Mark Doliner <mark@kingant.net>
parents: 10740
diff changeset
135 * This function should only be called by gaim_account_disconnect()
10738
55af3fa46329 [gaim-migrate @ 12340]
Mark Doliner <mark@kingant.net>
parents: 10665
diff changeset
136 * in account.c. If you're trying to sign on an account, use that
55af3fa46329 [gaim-migrate @ 12340]
Mark Doliner <mark@kingant.net>
parents: 10665
diff changeset
137 * function instead.
55af3fa46329 [gaim-migrate @ 12340]
Mark Doliner <mark@kingant.net>
parents: 10665
diff changeset
138 *
10740
94cc67130789 [gaim-migrate @ 12342]
Mark Doliner <mark@kingant.net>
parents: 10738
diff changeset
139 * Disconnects and destroys a GaimConnection.
5563
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
140 *
10740
94cc67130789 [gaim-migrate @ 12342]
Mark Doliner <mark@kingant.net>
parents: 10738
diff changeset
141 * @param gc The gaim connection to destroy.
5563
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
142 */
10740
94cc67130789 [gaim-migrate @ 12342]
Mark Doliner <mark@kingant.net>
parents: 10738
diff changeset
143 void gaim_connection_destroy(GaimConnection *gc);
6581
0473a28ce807 [gaim-migrate @ 7103]
Nathan Walp <nwalp@pidgin.im>
parents: 6488
diff changeset
144
0473a28ce807 [gaim-migrate @ 7103]
Nathan Walp <nwalp@pidgin.im>
parents: 6488
diff changeset
145 /**
11718
11e95968c9ff [gaim-migrate @ 14009]
Mark Doliner <mark@kingant.net>
parents: 10758
diff changeset
146 * Sets the connection state. PRPLs should call this and pass in
11e95968c9ff [gaim-migrate @ 14009]
Mark Doliner <mark@kingant.net>
parents: 10758
diff changeset
147 * the state "GAIM_CONNECTED" when the account is completely
11e95968c9ff [gaim-migrate @ 14009]
Mark Doliner <mark@kingant.net>
parents: 10758
diff changeset
148 * signed on. What does it mean to be completely signed on? If
11e95968c9ff [gaim-migrate @ 14009]
Mark Doliner <mark@kingant.net>
parents: 10758
diff changeset
149 * the core can call prpl->set_status, and it successfully changes
11e95968c9ff [gaim-migrate @ 14009]
Mark Doliner <mark@kingant.net>
parents: 10758
diff changeset
150 * your status, then the account is online.
5563
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
151 *
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
152 * @param gc The connection.
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
153 * @param state The connection state.
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
154 */
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
155 void gaim_connection_set_state(GaimConnection *gc, GaimConnectionState state);
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
156
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
157 /**
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
158 * Sets the connection's account.
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
159 *
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
160 * @param gc The connection.
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
161 * @param account The account.
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
162 */
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
163 void gaim_connection_set_account(GaimConnection *gc, GaimAccount *account);
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
164
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
165 /**
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
166 * Sets the connection's displayed name.
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
167 *
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
168 * @param gc The connection.
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
169 * @param name The displayed name.
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
170 */
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
171 void gaim_connection_set_display_name(GaimConnection *gc, const char *name);
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
172
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
173 /**
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
174 * Returns the connection state.
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
175 *
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
176 * @param gc The connection.
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
177 *
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
178 * @return The connection state.
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
179 */
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
180 GaimConnectionState gaim_connection_get_state(const GaimConnection *gc);
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
181
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
182 /**
9019
db1dc2d02020 [gaim-migrate @ 9795]
Mark Doliner <mark@kingant.net>
parents: 8735
diff changeset
183 * Returns TRUE if the account is connected, otherwise returns FALSE.
db1dc2d02020 [gaim-migrate @ 9795]
Mark Doliner <mark@kingant.net>
parents: 8735
diff changeset
184 *
db1dc2d02020 [gaim-migrate @ 9795]
Mark Doliner <mark@kingant.net>
parents: 8735
diff changeset
185 * @return TRUE if the account is connected, otherwise returns FALSE.
db1dc2d02020 [gaim-migrate @ 9795]
Mark Doliner <mark@kingant.net>
parents: 8735
diff changeset
186 */
db1dc2d02020 [gaim-migrate @ 9795]
Mark Doliner <mark@kingant.net>
parents: 8735
diff changeset
187 #define GAIM_CONNECTION_IS_CONNECTED(gc) \
db1dc2d02020 [gaim-migrate @ 9795]
Mark Doliner <mark@kingant.net>
parents: 8735
diff changeset
188 (gc->state == GAIM_CONNECTED)
db1dc2d02020 [gaim-migrate @ 9795]
Mark Doliner <mark@kingant.net>
parents: 8735
diff changeset
189
db1dc2d02020 [gaim-migrate @ 9795]
Mark Doliner <mark@kingant.net>
parents: 8735
diff changeset
190 /**
5563
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
191 * Returns the connection's account.
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
192 *
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
193 * @param gc The connection.
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
194 *
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
195 * @return The connection's account.
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
196 */
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
197 GaimAccount *gaim_connection_get_account(const GaimConnection *gc);
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
198
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
199 /**
10740
94cc67130789 [gaim-migrate @ 12342]
Mark Doliner <mark@kingant.net>
parents: 10738
diff changeset
200 * Returns the connection's password.
94cc67130789 [gaim-migrate @ 12342]
Mark Doliner <mark@kingant.net>
parents: 10738
diff changeset
201 *
94cc67130789 [gaim-migrate @ 12342]
Mark Doliner <mark@kingant.net>
parents: 10738
diff changeset
202 * @param gc The connection.
94cc67130789 [gaim-migrate @ 12342]
Mark Doliner <mark@kingant.net>
parents: 10738
diff changeset
203 *
94cc67130789 [gaim-migrate @ 12342]
Mark Doliner <mark@kingant.net>
parents: 10738
diff changeset
204 * @return The connection's password.
94cc67130789 [gaim-migrate @ 12342]
Mark Doliner <mark@kingant.net>
parents: 10738
diff changeset
205 */
94cc67130789 [gaim-migrate @ 12342]
Mark Doliner <mark@kingant.net>
parents: 10738
diff changeset
206 const char *gaim_connection_get_password(const GaimConnection *gc);
94cc67130789 [gaim-migrate @ 12342]
Mark Doliner <mark@kingant.net>
parents: 10738
diff changeset
207
94cc67130789 [gaim-migrate @ 12342]
Mark Doliner <mark@kingant.net>
parents: 10738
diff changeset
208 /**
5563
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
209 * Returns the connection's displayed name.
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
210 *
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
211 * @param gc The connection.
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
212 *
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
213 * @return The connection's displayed name.
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
214 */
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
215 const char *gaim_connection_get_display_name(const GaimConnection *gc);
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
216
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
217 /**
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
218 * Updates the connection progress.
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
219 *
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
220 * @param gc The connection.
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
221 * @param text Information on the current step.
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
222 * @param step The current step.
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
223 * @param count The total number of steps.
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
224 */
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
225 void gaim_connection_update_progress(GaimConnection *gc, const char *text,
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
226 size_t step, size_t count);
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
227
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
228 /**
5571
113090160626 [gaim-migrate @ 5973]
Christian Hammond <chipx86@chipx86.com>
parents: 5564
diff changeset
229 * Displays a connection-specific notice.
113090160626 [gaim-migrate @ 5973]
Christian Hammond <chipx86@chipx86.com>
parents: 5564
diff changeset
230 *
113090160626 [gaim-migrate @ 5973]
Christian Hammond <chipx86@chipx86.com>
parents: 5564
diff changeset
231 * @param gc The connection.
113090160626 [gaim-migrate @ 5973]
Christian Hammond <chipx86@chipx86.com>
parents: 5564
diff changeset
232 * @param text The notice text.
113090160626 [gaim-migrate @ 5973]
Christian Hammond <chipx86@chipx86.com>
parents: 5564
diff changeset
233 */
113090160626 [gaim-migrate @ 5973]
Christian Hammond <chipx86@chipx86.com>
parents: 5564
diff changeset
234 void gaim_connection_notice(GaimConnection *gc, const char *text);
113090160626 [gaim-migrate @ 5973]
Christian Hammond <chipx86@chipx86.com>
parents: 5564
diff changeset
235
113090160626 [gaim-migrate @ 5973]
Christian Hammond <chipx86@chipx86.com>
parents: 5564
diff changeset
236 /**
5564
187c740f2a4e [gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents: 5563
diff changeset
237 * Closes a connection with an error.
187c740f2a4e [gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents: 5563
diff changeset
238 *
187c740f2a4e [gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents: 5563
diff changeset
239 * @param gc The connection.
187c740f2a4e [gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents: 5563
diff changeset
240 * @param reason The error text.
187c740f2a4e [gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents: 5563
diff changeset
241 */
187c740f2a4e [gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents: 5563
diff changeset
242 void gaim_connection_error(GaimConnection *gc, const char *reason);
187c740f2a4e [gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents: 5563
diff changeset
243
5944
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
244 /*@}*/
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
245
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
246 /**************************************************************************/
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
247 /** @name Connections API */
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
248 /**************************************************************************/
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
249 /*@{*/
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
250
5564
187c740f2a4e [gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents: 5563
diff changeset
251 /**
5563
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
252 * Disconnects from all connections.
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
253 */
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
254 void gaim_connections_disconnect_all(void);
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
255
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
256 /**
10352
5879593a6a10 [gaim-migrate @ 11569]
Mark Doliner <mark@kingant.net>
parents: 10272
diff changeset
257 * Returns a list of all active connections. This does not
5879593a6a10 [gaim-migrate @ 11569]
Mark Doliner <mark@kingant.net>
parents: 10272
diff changeset
258 * include connections that are in the process of connecting.
5563
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
259 *
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
260 * @return A list of all active connections.
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
261 */
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
262 GList *gaim_connections_get_all(void);
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
263
5564
187c740f2a4e [gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents: 5563
diff changeset
264 /**
187c740f2a4e [gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents: 5563
diff changeset
265 * Returns a list of all connections in the process of connecting.
187c740f2a4e [gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents: 5563
diff changeset
266 *
187c740f2a4e [gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents: 5563
diff changeset
267 * @return A list of connecting connections.
187c740f2a4e [gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents: 5563
diff changeset
268 */
187c740f2a4e [gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents: 5563
diff changeset
269 GList *gaim_connections_get_connecting(void);
187c740f2a4e [gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents: 5563
diff changeset
270
9221
8054855f2bb9 [gaim-migrate @ 10017]
Tim Ringenbach <marv@pidgin.im>
parents: 9041
diff changeset
271 /**
8054855f2bb9 [gaim-migrate @ 10017]
Tim Ringenbach <marv@pidgin.im>
parents: 9041
diff changeset
272 * Checks if gc is still a valid pointer to a gc.
8054855f2bb9 [gaim-migrate @ 10017]
Tim Ringenbach <marv@pidgin.im>
parents: 9041
diff changeset
273 *
8054855f2bb9 [gaim-migrate @ 10017]
Tim Ringenbach <marv@pidgin.im>
parents: 9041
diff changeset
274 * @return @c TRUE if gc is valid.
8054855f2bb9 [gaim-migrate @ 10017]
Tim Ringenbach <marv@pidgin.im>
parents: 9041
diff changeset
275 */
8054855f2bb9 [gaim-migrate @ 10017]
Tim Ringenbach <marv@pidgin.im>
parents: 9041
diff changeset
276 #define GAIM_CONNECTION_IS_VALID(gc) (g_list_find(gaim_connections_get_all(), (gc)) || g_list_find(gaim_connections_get_connecting(), (gc)))
8054855f2bb9 [gaim-migrate @ 10017]
Tim Ringenbach <marv@pidgin.im>
parents: 9041
diff changeset
277
5944
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
278 /*@}*/
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
279
5563
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
280 /**************************************************************************/
7122
b90c94620d1c [gaim-migrate @ 7689]
Christian Hammond <chipx86@chipx86.com>
parents: 7035
diff changeset
281 /** @name UI Registration Functions */
5563
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
282 /**************************************************************************/
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
283 /*@{*/
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
284
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
285 /**
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
286 * Sets the UI operations structure to be used for connections.
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
287 *
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
288 * @param ops The UI operations structure.
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
289 */
7035
feb3d21a7794 [gaim-migrate @ 7598]
Christian Hammond <chipx86@chipx86.com>
parents: 6982
diff changeset
290 void gaim_connections_set_ui_ops(GaimConnectionUiOps *ops);
5563
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
291
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
292 /**
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
293 * Returns the UI operations structure used for connections.
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
294 *
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
295 * @return The UI operations structure in use.
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
296 */
7035
feb3d21a7794 [gaim-migrate @ 7598]
Christian Hammond <chipx86@chipx86.com>
parents: 6982
diff changeset
297 GaimConnectionUiOps *gaim_connections_get_ui_ops(void);
5563
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
298
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
299 /*@}*/
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
300
6488
e5e8d21bd4d8 [gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents: 6485
diff changeset
301 /**************************************************************************/
e5e8d21bd4d8 [gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents: 6485
diff changeset
302 /** @name Connections Subsystem */
e5e8d21bd4d8 [gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents: 6485
diff changeset
303 /**************************************************************************/
e5e8d21bd4d8 [gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents: 6485
diff changeset
304 /*@{*/
e5e8d21bd4d8 [gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents: 6485
diff changeset
305
e5e8d21bd4d8 [gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents: 6485
diff changeset
306 /**
e5e8d21bd4d8 [gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents: 6485
diff changeset
307 * Initializes the connections subsystem.
e5e8d21bd4d8 [gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents: 6485
diff changeset
308 */
e5e8d21bd4d8 [gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents: 6485
diff changeset
309 void gaim_connections_init(void);
e5e8d21bd4d8 [gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents: 6485
diff changeset
310
e5e8d21bd4d8 [gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents: 6485
diff changeset
311 /**
e5e8d21bd4d8 [gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents: 6485
diff changeset
312 * Uninitializes the connections subsystem.
e5e8d21bd4d8 [gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents: 6485
diff changeset
313 */
e5e8d21bd4d8 [gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents: 6485
diff changeset
314 void gaim_connections_uninit(void);
e5e8d21bd4d8 [gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents: 6485
diff changeset
315
e5e8d21bd4d8 [gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents: 6485
diff changeset
316 /**
e5e8d21bd4d8 [gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents: 6485
diff changeset
317 * Returns the handle to the connections subsystem.
e5e8d21bd4d8 [gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents: 6485
diff changeset
318 *
e5e8d21bd4d8 [gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents: 6485
diff changeset
319 * @return The connections subsystem handle.
e5e8d21bd4d8 [gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents: 6485
diff changeset
320 */
e5e8d21bd4d8 [gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents: 6485
diff changeset
321 void *gaim_connections_get_handle(void);
e5e8d21bd4d8 [gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents: 6485
diff changeset
322
e5e8d21bd4d8 [gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents: 6485
diff changeset
323 /*@}*/
e5e8d21bd4d8 [gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents: 6485
diff changeset
324
e5e8d21bd4d8 [gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents: 6485
diff changeset
325
5944
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
326 #ifdef __cplusplus
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
327 }
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
328 #endif
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
329
5563
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
330 #endif /* _GAIM_CONNECTION_H_ */