annotate src/connection.h @ 9932:3fa121db91d0

[gaim-migrate @ 10824] A patch from Dave West. This prints happygood messages to conversation windows when doing file transfer stuff. Nicely done. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Thu, 02 Sep 2004 02:49:00 +0000
parents 8054855f2bb9
children e4a27c9aec4c
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 #include <stdlib.h>
5733
4350b62bac45 [gaim-migrate @ 6157]
Christian Hammond <chipx86@chipx86.com>
parents: 5717
diff changeset
31 #include <time.h>
5563
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
32
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
33 typedef struct _GaimConnection GaimConnection;
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
34
6622
a4622f1fb5a1 [gaim-migrate @ 7146]
Luke Schierer <lschiere@pidgin.im>
parents: 6605
diff changeset
35 /**
a4622f1fb5a1 [gaim-migrate @ 7146]
Luke Schierer <lschiere@pidgin.im>
parents: 6605
diff changeset
36 * Flags to change behavior of the client for a given connection.
a4622f1fb5a1 [gaim-migrate @ 7146]
Luke Schierer <lschiere@pidgin.im>
parents: 6605
diff changeset
37 */
a4622f1fb5a1 [gaim-migrate @ 7146]
Luke Schierer <lschiere@pidgin.im>
parents: 6605
diff changeset
38 typedef enum
a4622f1fb5a1 [gaim-migrate @ 7146]
Luke Schierer <lschiere@pidgin.im>
parents: 6605
diff changeset
39 {
6982
083d1e4a9c78 [gaim-migrate @ 7538]
Mark Doliner <mark@kingant.net>
parents: 6724
diff changeset
40 GAIM_CONNECTION_HTML = 0x0001, /**< Connection sends/receives in 'HTML'. */
8735
92cbf9713795 [gaim-migrate @ 9490]
Christian Hammond <chipx86@chipx86.com>
parents: 8691
diff changeset
41 GAIM_CONNECTION_NO_BGCOLOR = 0x0002, /**< Connection does not send/receive
6982
083d1e4a9c78 [gaim-migrate @ 7538]
Mark Doliner <mark@kingant.net>
parents: 6724
diff changeset
42 background colors. */
8677
cc2ce209cc46 [gaim-migrate @ 9430]
Sean Egan <seanegan@gmail.com>
parents: 8430
diff changeset
43 GAIM_CONNECTION_AUTO_RESP = 0x0004, /**< Send auto responses when away. */
cc2ce209cc46 [gaim-migrate @ 9430]
Sean Egan <seanegan@gmail.com>
parents: 8430
diff changeset
44 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
45 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
46 GAIM_CONNECTION_NO_FONTSIZE = 0x0020, /**< Connection does not send/receive font sizes */
812e7aa7eafa [gaim-migrate @ 9817]
Tim Ringenbach <marv@pidgin.im>
parents: 9019
diff changeset
47 GAIM_CONNECTION_NO_URLDESC = 0x0040 /**< Connection does not support descriptions with links */
6622
a4622f1fb5a1 [gaim-migrate @ 7146]
Luke Schierer <lschiere@pidgin.im>
parents: 6605
diff changeset
48 } GaimConnectionFlags;
5872
059d95c67cda [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5733
diff changeset
49
5563
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
50 typedef enum
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
51 {
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
52 GAIM_DISCONNECTED = 0, /**< Disconnected. */
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
53 GAIM_CONNECTED, /**< Connected. */
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
54 GAIM_CONNECTING /**< Connecting. */
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
55
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
56 } GaimConnectionState;
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
57
5944
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
58 #include "account.h"
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
59 #include "plugin.h"
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
60
5563
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
61 typedef struct
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
62 {
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
63 void (*connect_progress)(GaimConnection *gc, const char *text,
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
64 size_t step, size_t step_count);
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
65 void (*connected)(GaimConnection *gc);
6460
ff4551719cc7 [gaim-migrate @ 6969]
Christian Hammond <chipx86@chipx86.com>
parents: 6393
diff changeset
66 void (*disconnected)(GaimConnection *gc);
5571
113090160626 [gaim-migrate @ 5973]
Christian Hammond <chipx86@chipx86.com>
parents: 5564
diff changeset
67 void (*notice)(GaimConnection *gc, const char *text);
6460
ff4551719cc7 [gaim-migrate @ 6969]
Christian Hammond <chipx86@chipx86.com>
parents: 6393
diff changeset
68 void (*report_disconnect)(GaimConnection *gc, const char *text);
5563
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
69
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
70 } GaimConnectionUiOps;
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 struct _GaimConnection
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 GaimPlugin *prpl; /**< The protocol plugin. */
6622
a4622f1fb5a1 [gaim-migrate @ 7146]
Luke Schierer <lschiere@pidgin.im>
parents: 6605
diff changeset
75 GaimConnectionFlags flags; /**< Connection flags. */
5563
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
76
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
77 GaimConnectionState state; /**< The connection state. */
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 GaimAccount *account; /**< The account being connected to. */
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
80 int inpa; /**< The input watcher. */
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
81
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
82 GSList *buddy_chats; /**< A list of active chats. */
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
83 void *proto_data; /**< Protocol-specific data. */
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 char *display_name; /**< The name displayed. */
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
86 guint keep_alive; /**< Keep-alive. */
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 guint idle_timer; /**< The idle timer. */
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
89 time_t login_time; /**< Time of login. */
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
90 time_t login_time_official; /**< Official time of login. */
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
91 time_t last_sent_time; /**< The time something was last sent. */
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
92 int is_idle; /**< Idle state of the connection. */
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 char *away; /**< The current away message, or NULL */
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
95 char *away_state; /**< The last away type. */
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
96 gboolean is_auto_away; /**< Whether or not it's auto-away. */
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
97
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
98 int evil; /**< Warning level for AIM (why is
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
99 this here?) */
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
100
8430
87bd4d4ff499 [gaim-migrate @ 9160]
Mark Doliner <mark@kingant.net>
parents: 8046
diff changeset
101 gboolean wants_to_die; /**< Wants to Die state. This is set
87bd4d4ff499 [gaim-migrate @ 9160]
Mark Doliner <mark@kingant.net>
parents: 8046
diff changeset
102 when the user chooses to sign off,
87bd4d4ff499 [gaim-migrate @ 9160]
Mark Doliner <mark@kingant.net>
parents: 8046
diff changeset
103 or when the protocol is
87bd4d4ff499 [gaim-migrate @ 9160]
Mark Doliner <mark@kingant.net>
parents: 8046
diff changeset
104 disconnected and should not be
87bd4d4ff499 [gaim-migrate @ 9160]
Mark Doliner <mark@kingant.net>
parents: 8046
diff changeset
105 automatically reconnected
87bd4d4ff499 [gaim-migrate @ 9160]
Mark Doliner <mark@kingant.net>
parents: 8046
diff changeset
106 (incorrect password, etc.) */
6393
74ca311ceb2a [gaim-migrate @ 6898]
Nathan Walp <nwalp@pidgin.im>
parents: 6109
diff changeset
107 guint disconnect_timeout; /**< Timer used for nasty stack tricks */
5563
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
108 };
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
109
5944
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
110 #ifdef __cplusplus
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
111 extern "C" {
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
112 #endif
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
113
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
114 /**************************************************************************/
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
115 /** @name Connection API */
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
116 /**************************************************************************/
6488
e5e8d21bd4d8 [gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents: 6485
diff changeset
117 /*@{*/
5944
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
118
5563
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
119 /**
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
120 * Creates a connection to the specified account.
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
121 *
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
122 * @param account The account the connection should be connecting to.
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
123 *
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
124 * @return The gaim connection.
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
125 */
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
126 GaimConnection *gaim_connection_new(GaimAccount *account);
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
127
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
128 /**
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
129 * Destroys and closes a gaim connection.
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
130 *
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
131 * @param gc The gaim connection to destroy.
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
132 */
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
133 void gaim_connection_destroy(GaimConnection *gc);
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
134
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
135 /**
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
136 * Signs a connection on.
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
137 *
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
138 * @param gc The connection to sign on.
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
139 *
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
140 * @see gaim_connection_disconnect()
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
141 */
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
142 void gaim_connection_connect(GaimConnection *gc);
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
143
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
144 /**
6581
0473a28ce807 [gaim-migrate @ 7103]
Nathan Walp <nwalp@pidgin.im>
parents: 6488
diff changeset
145 * Registers a connection.
0473a28ce807 [gaim-migrate @ 7103]
Nathan Walp <nwalp@pidgin.im>
parents: 6488
diff changeset
146 *
0473a28ce807 [gaim-migrate @ 7103]
Nathan Walp <nwalp@pidgin.im>
parents: 6488
diff changeset
147 * @param gc The connection to register.
0473a28ce807 [gaim-migrate @ 7103]
Nathan Walp <nwalp@pidgin.im>
parents: 6488
diff changeset
148 */
0473a28ce807 [gaim-migrate @ 7103]
Nathan Walp <nwalp@pidgin.im>
parents: 6488
diff changeset
149 void gaim_connection_register(GaimConnection *gc);
0473a28ce807 [gaim-migrate @ 7103]
Nathan Walp <nwalp@pidgin.im>
parents: 6488
diff changeset
150
0473a28ce807 [gaim-migrate @ 7103]
Nathan Walp <nwalp@pidgin.im>
parents: 6488
diff changeset
151 /**
5563
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
152 * Signs a connection off.
6583
e07c66073b6d [gaim-migrate @ 7105]
Christian Hammond <chipx86@chipx86.com>
parents: 6581
diff changeset
153 *
5563
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
154 * @param gc The connection to sign off.
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
155 *
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
156 * @see gaim_connection_connect()
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 void gaim_connection_disconnect(GaimConnection *gc);
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 /**
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
161 * Sets the connection state.
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 * @param gc The connection.
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
164 * @param state The connection state.
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 void gaim_connection_set_state(GaimConnection *gc, GaimConnectionState state);
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 /**
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
169 * Sets the connection's account.
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 * @param gc The connection.
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
172 * @param account The account.
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 void gaim_connection_set_account(GaimConnection *gc, GaimAccount *account);
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 /**
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
177 * Sets the connection's displayed name.
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
178 *
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
179 * @param gc The connection.
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
180 * @param name The displayed name.
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 void gaim_connection_set_display_name(GaimConnection *gc, const char *name);
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
183
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
184 /**
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
185 * Returns the connection state.
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
186 *
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
187 * @param gc The connection.
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
188 *
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
189 * @return The connection state.
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
190 */
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
191 GaimConnectionState gaim_connection_get_state(const GaimConnection *gc);
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 /**
9019
db1dc2d02020 [gaim-migrate @ 9795]
Mark Doliner <mark@kingant.net>
parents: 8735
diff changeset
194 * Returns TRUE if the account is connected, otherwise returns FALSE.
db1dc2d02020 [gaim-migrate @ 9795]
Mark Doliner <mark@kingant.net>
parents: 8735
diff changeset
195 *
db1dc2d02020 [gaim-migrate @ 9795]
Mark Doliner <mark@kingant.net>
parents: 8735
diff changeset
196 * @return TRUE if the account is connected, otherwise returns FALSE.
db1dc2d02020 [gaim-migrate @ 9795]
Mark Doliner <mark@kingant.net>
parents: 8735
diff changeset
197 */
db1dc2d02020 [gaim-migrate @ 9795]
Mark Doliner <mark@kingant.net>
parents: 8735
diff changeset
198 #define GAIM_CONNECTION_IS_CONNECTED(gc) \
db1dc2d02020 [gaim-migrate @ 9795]
Mark Doliner <mark@kingant.net>
parents: 8735
diff changeset
199 (gc->state == GAIM_CONNECTED)
db1dc2d02020 [gaim-migrate @ 9795]
Mark Doliner <mark@kingant.net>
parents: 8735
diff changeset
200
db1dc2d02020 [gaim-migrate @ 9795]
Mark Doliner <mark@kingant.net>
parents: 8735
diff changeset
201 /**
5563
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
202 * Returns the connection's account.
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
203 *
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
204 * @param gc The connection.
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
205 *
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
206 * @return The connection's account.
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
207 */
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
208 GaimAccount *gaim_connection_get_account(const GaimConnection *gc);
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
209
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 * Returns the connection's displayed name.
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 * @param gc The connection.
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 * @return The connection's displayed name.
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 const char *gaim_connection_get_display_name(const GaimConnection *gc);
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
218
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 * Updates the connection progress.
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
221 *
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
222 * @param gc The connection.
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
223 * @param text Information on the current step.
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
224 * @param step The current step.
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
225 * @param count The total number of steps.
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
226 */
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
227 void gaim_connection_update_progress(GaimConnection *gc, const char *text,
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
228 size_t step, size_t count);
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
229
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
230 /**
5571
113090160626 [gaim-migrate @ 5973]
Christian Hammond <chipx86@chipx86.com>
parents: 5564
diff changeset
231 * Displays a connection-specific notice.
113090160626 [gaim-migrate @ 5973]
Christian Hammond <chipx86@chipx86.com>
parents: 5564
diff changeset
232 *
113090160626 [gaim-migrate @ 5973]
Christian Hammond <chipx86@chipx86.com>
parents: 5564
diff changeset
233 * @param gc The connection.
113090160626 [gaim-migrate @ 5973]
Christian Hammond <chipx86@chipx86.com>
parents: 5564
diff changeset
234 * @param text The notice 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 void gaim_connection_notice(GaimConnection *gc, const char *text);
113090160626 [gaim-migrate @ 5973]
Christian Hammond <chipx86@chipx86.com>
parents: 5564
diff changeset
237
113090160626 [gaim-migrate @ 5973]
Christian Hammond <chipx86@chipx86.com>
parents: 5564
diff changeset
238 /**
5564
187c740f2a4e [gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents: 5563
diff changeset
239 * Closes a connection with an error.
187c740f2a4e [gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents: 5563
diff changeset
240 *
187c740f2a4e [gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents: 5563
diff changeset
241 * @param gc The connection.
187c740f2a4e [gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents: 5563
diff changeset
242 * @param reason The error text.
187c740f2a4e [gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents: 5563
diff changeset
243 */
187c740f2a4e [gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents: 5563
diff changeset
244 void gaim_connection_error(GaimConnection *gc, const char *reason);
187c740f2a4e [gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents: 5563
diff changeset
245
5944
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
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 /** @name Connections API */
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
250 /**************************************************************************/
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
251 /*@{*/
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
252
5564
187c740f2a4e [gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents: 5563
diff changeset
253 /**
5563
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
254 * Disconnects from all connections.
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 void gaim_connections_disconnect_all(void);
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
257
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
258 /**
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
259 * Returns a list of all active connections.
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
260 *
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
261 * @return A list of all active connections.
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
262 */
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
263 GList *gaim_connections_get_all(void);
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
264
5564
187c740f2a4e [gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents: 5563
diff changeset
265 /**
187c740f2a4e [gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents: 5563
diff changeset
266 * Returns a list of all connections in the process of connecting.
187c740f2a4e [gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents: 5563
diff changeset
267 *
187c740f2a4e [gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents: 5563
diff changeset
268 * @return A list of connecting connections.
187c740f2a4e [gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents: 5563
diff changeset
269 */
187c740f2a4e [gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents: 5563
diff changeset
270 GList *gaim_connections_get_connecting(void);
187c740f2a4e [gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents: 5563
diff changeset
271
9221
8054855f2bb9 [gaim-migrate @ 10017]
Tim Ringenbach <marv@pidgin.im>
parents: 9041
diff changeset
272 /**
8054855f2bb9 [gaim-migrate @ 10017]
Tim Ringenbach <marv@pidgin.im>
parents: 9041
diff changeset
273 * Checks if gc is still a valid pointer to a gc.
8054855f2bb9 [gaim-migrate @ 10017]
Tim Ringenbach <marv@pidgin.im>
parents: 9041
diff changeset
274 *
8054855f2bb9 [gaim-migrate @ 10017]
Tim Ringenbach <marv@pidgin.im>
parents: 9041
diff changeset
275 * @return @c TRUE if gc is valid.
8054855f2bb9 [gaim-migrate @ 10017]
Tim Ringenbach <marv@pidgin.im>
parents: 9041
diff changeset
276 */
8054855f2bb9 [gaim-migrate @ 10017]
Tim Ringenbach <marv@pidgin.im>
parents: 9041
diff changeset
277 #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
278
5944
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
279 /*@}*/
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
280
5563
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
281 /**************************************************************************/
7122
b90c94620d1c [gaim-migrate @ 7689]
Christian Hammond <chipx86@chipx86.com>
parents: 7035
diff changeset
282 /** @name UI Registration Functions */
5563
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 /**
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
287 * Sets the UI operations structure to be used for connections.
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
288 *
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
289 * @param ops The UI operations structure.
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
290 */
7035
feb3d21a7794 [gaim-migrate @ 7598]
Christian Hammond <chipx86@chipx86.com>
parents: 6982
diff changeset
291 void gaim_connections_set_ui_ops(GaimConnectionUiOps *ops);
5563
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 /**
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
294 * Returns the UI operations structure used for connections.
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
295 *
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
296 * @return The UI operations structure in use.
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
297 */
7035
feb3d21a7794 [gaim-migrate @ 7598]
Christian Hammond <chipx86@chipx86.com>
parents: 6982
diff changeset
298 GaimConnectionUiOps *gaim_connections_get_ui_ops(void);
5563
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 /*@}*/
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
301
6488
e5e8d21bd4d8 [gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents: 6485
diff changeset
302 /**************************************************************************/
e5e8d21bd4d8 [gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents: 6485
diff changeset
303 /** @name Connections Subsystem */
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 /**
e5e8d21bd4d8 [gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents: 6485
diff changeset
308 * Initializes the connections subsystem.
e5e8d21bd4d8 [gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents: 6485
diff changeset
309 */
e5e8d21bd4d8 [gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents: 6485
diff changeset
310 void gaim_connections_init(void);
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 /**
e5e8d21bd4d8 [gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents: 6485
diff changeset
313 * Uninitializes the connections subsystem.
e5e8d21bd4d8 [gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents: 6485
diff changeset
314 */
e5e8d21bd4d8 [gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents: 6485
diff changeset
315 void gaim_connections_uninit(void);
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 /**
e5e8d21bd4d8 [gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents: 6485
diff changeset
318 * Returns the handle to the connections subsystem.
e5e8d21bd4d8 [gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents: 6485
diff changeset
319 *
e5e8d21bd4d8 [gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents: 6485
diff changeset
320 * @return The connections subsystem handle.
e5e8d21bd4d8 [gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents: 6485
diff changeset
321 */
e5e8d21bd4d8 [gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents: 6485
diff changeset
322 void *gaim_connections_get_handle(void);
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
e5e8d21bd4d8 [gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents: 6485
diff changeset
326
5944
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
327 #ifdef __cplusplus
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
328 }
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
329 #endif
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
330
5563
9eb5b13fd412 [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
331 #endif /* _GAIM_CONNECTION_H_ */