Sat, 26 Mar 2005 23:25:18 +0000
[gaim-migrate @ 12342]
More big changes, yay.
I combined gaim_connection_new and gaim_connection_connect. Earlier
today I realized that it's dumb to have a GaimConnection that isn't
connected.
I'm about to combine gaim_connection_disconnect and
gaim_connection_destroy, as well.
I added a "password" field to GaimConnection.
It holds the password used to login a specific GaimConnection. Now,
when "remember password" is false, account->password is NEVER set.
When the user tries to sign on and Gaim prompts for the password,
it goes directly into the GaimConnection.
| 4359 | 1 | /** |
| 2 | * @file conversation.h Conversation API | |
|
5034
077678f7b048
[gaim-migrate @ 5377]
Christian Hammond <chipx86@chipx86.com>
parents:
4890
diff
changeset
|
3 | * @ingroup core |
| 4359 | 4 | * |
| 5 | * gaim | |
| 6 | * | |
| 8046 | 7 | * Gaim is the legal property of its developers, whose names are too numerous |
| 8 | * to list here. Please refer to the COPYRIGHT file distributed with this | |
| 9 | * source distribution. | |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
10 | * |
| 4359 | 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 | |
|
6488
6a47a95e4dbb
[gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents:
6485
diff
changeset
|
24 | * |
|
6605
665d3a8e885c
[gaim-migrate @ 7129]
Christian Hammond <chipx86@chipx86.com>
parents:
6585
diff
changeset
|
25 | * @see @ref conversation-signals |
| 4359 | 26 | */ |
|
4890
d87a9b5bbe57
[gaim-migrate @ 5220]
Christian Hammond <chipx86@chipx86.com>
parents:
4877
diff
changeset
|
27 | #ifndef _GAIM_CONVERSATION_H_ |
|
d87a9b5bbe57
[gaim-migrate @ 5220]
Christian Hammond <chipx86@chipx86.com>
parents:
4877
diff
changeset
|
28 | #define _GAIM_CONVERSATION_H_ |
| 4359 | 29 | |
| 30 | /**************************************************************************/ | |
| 31 | /** Data Structures */ | |
| 32 | /**************************************************************************/ | |
| 33 | ||
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
34 | typedef struct _GaimConvWindowUiOps GaimConvWindowUiOps; |
|
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
35 | typedef struct _GaimConvWindow GaimConvWindow; |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
36 | typedef struct _GaimConversationUiOps GaimConversationUiOps; |
|
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
37 | typedef struct _GaimConversation GaimConversation; |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
38 | typedef struct _GaimConvIm GaimConvIm; |
|
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
39 | typedef struct _GaimConvChat GaimConvChat; |
|
9554
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
40 | typedef struct _GaimConvChatBuddy GaimConvChatBuddy; |
| 4359 | 41 | |
| 42 | /** | |
| 43 | * A type of conversation. | |
| 44 | */ | |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
45 | typedef enum |
| 4359 | 46 | { |
| 47 | GAIM_CONV_UNKNOWN = 0, /**< Unknown conversation type. */ | |
| 48 | GAIM_CONV_IM, /**< Instant Message. */ | |
|
4378
3bef342997ef
[gaim-migrate @ 4644]
Christian Hammond <chipx86@chipx86.com>
parents:
4359
diff
changeset
|
49 | GAIM_CONV_CHAT, /**< Chat room. */ |
|
10246
aa5bff72f94c
[gaim-migrate @ 11386]
Mark Doliner <markdoliner@pidgin.im>
parents:
10008
diff
changeset
|
50 | GAIM_CONV_MISC, /**< A misc. conversation. */ |
|
aa5bff72f94c
[gaim-migrate @ 11386]
Mark Doliner <markdoliner@pidgin.im>
parents:
10008
diff
changeset
|
51 | GAIM_CONV_ANY /**< Any type of conversation. */ |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
52 | |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
53 | } GaimConversationType; |
| 4359 | 54 | |
| 55 | /** | |
| 56 | * Unseen text states. | |
| 57 | */ | |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
58 | typedef enum |
| 4359 | 59 | { |
| 60 | GAIM_UNSEEN_NONE = 0, /**< No unseen text in the conversation. */ | |
| 61 | GAIM_UNSEEN_TEXT, /**< Unseen text in the conversation. */ | |
|
6405
30166fa1b9a2
[gaim-migrate @ 6910]
Christian Hammond <chipx86@chipx86.com>
parents:
6311
diff
changeset
|
62 | GAIM_UNSEEN_NICK, /**< Unseen text and the nick was said. */ |
|
30166fa1b9a2
[gaim-migrate @ 6910]
Christian Hammond <chipx86@chipx86.com>
parents:
6311
diff
changeset
|
63 | GAIM_UNSEEN_EVENT /**< Unseen events in the conversation. */ |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
64 | |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
65 | } GaimUnseenState; |
| 4359 | 66 | |
| 67 | /** | |
| 68 | * Conversation update type. | |
| 69 | */ | |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
70 | typedef enum |
| 4359 | 71 | { |
| 72 | GAIM_CONV_UPDATE_ADD = 0, /**< The buddy associated with the conversation | |
| 8155 | 73 | was added. */ |
| 4359 | 74 | GAIM_CONV_UPDATE_REMOVE, /**< The buddy associated with the conversation |
| 8155 | 75 | was removed. */ |
| 4491 | 76 | GAIM_CONV_UPDATE_ACCOUNT, /**< The gaim_account was changed. */ |
| 4359 | 77 | GAIM_CONV_UPDATE_TYPING, /**< The typing state was updated. */ |
| 78 | GAIM_CONV_UPDATE_UNSEEN, /**< The unseen state was updated. */ | |
| 79 | GAIM_CONV_UPDATE_LOGGING, /**< Logging for this conversation was | |
| 8155 | 80 | enabled or disabled. */ |
| 4359 | 81 | GAIM_CONV_UPDATE_TOPIC, /**< The topic for a chat was updated. */ |
| 82 | /* | |
| 83 | * XXX These need to go when we implement a more generic core/UI event | |
| 84 | * system. | |
| 85 | */ | |
|
4378
3bef342997ef
[gaim-migrate @ 4644]
Christian Hammond <chipx86@chipx86.com>
parents:
4359
diff
changeset
|
86 | GAIM_CONV_ACCOUNT_ONLINE, /**< One of the user's accounts went online. */ |
|
3bef342997ef
[gaim-migrate @ 4644]
Christian Hammond <chipx86@chipx86.com>
parents:
4359
diff
changeset
|
87 | GAIM_CONV_ACCOUNT_OFFLINE, /**< One of the user's accounts went offline. */ |
|
6846
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
88 | GAIM_CONV_UPDATE_AWAY, /**< The other user went away. */ |
| 8155 | 89 | GAIM_CONV_UPDATE_ICON, /**< The other user's buddy icon changed. */ |
| 8256 | 90 | GAIM_CONV_UPDATE_TITLE, |
| 10665 | 91 | GAIM_CONV_UPDATE_CHATLEFT, |
| 92 | ||
| 93 | GAIM_CONV_UPDATE_FEATURES, /**< The features for a chat have changed */ | |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
94 | |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
95 | } GaimConvUpdateType; |
| 4359 | 96 | |
| 97 | /** | |
|
5872
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
98 | * The typing state of a user. |
|
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
99 | */ |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
100 | typedef enum |
|
5872
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
101 | { |
|
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
102 | GAIM_NOT_TYPING = 0, /**< Not typing. */ |
|
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
103 | GAIM_TYPING, /**< Currently typing. */ |
|
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
104 | GAIM_TYPED /**< Stopped typing momentarily. */ |
|
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
105 | |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
106 | } GaimTypingState; |
|
5872
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
107 | |
|
6621
2a18ef3e5224
[gaim-migrate @ 7145]
Robert McQueen <robot101@debian.org>
parents:
6605
diff
changeset
|
108 | /** |
|
2a18ef3e5224
[gaim-migrate @ 7145]
Robert McQueen <robot101@debian.org>
parents:
6605
diff
changeset
|
109 | * Flags applicable to a message. Most will have send, recv or system. |
|
2a18ef3e5224
[gaim-migrate @ 7145]
Robert McQueen <robot101@debian.org>
parents:
6605
diff
changeset
|
110 | */ |
|
2a18ef3e5224
[gaim-migrate @ 7145]
Robert McQueen <robot101@debian.org>
parents:
6605
diff
changeset
|
111 | typedef enum |
|
2a18ef3e5224
[gaim-migrate @ 7145]
Robert McQueen <robot101@debian.org>
parents:
6605
diff
changeset
|
112 | { |
|
6982
12f08de92674
[gaim-migrate @ 7538]
Mark Doliner <markdoliner@pidgin.im>
parents:
6846
diff
changeset
|
113 | GAIM_MESSAGE_SEND = 0x0001, /**< Outgoing message. */ |
|
12f08de92674
[gaim-migrate @ 7538]
Mark Doliner <markdoliner@pidgin.im>
parents:
6846
diff
changeset
|
114 | GAIM_MESSAGE_RECV = 0x0002, /**< Incoming message. */ |
|
12f08de92674
[gaim-migrate @ 7538]
Mark Doliner <markdoliner@pidgin.im>
parents:
6846
diff
changeset
|
115 | GAIM_MESSAGE_SYSTEM = 0x0004, /**< System message. */ |
|
12f08de92674
[gaim-migrate @ 7538]
Mark Doliner <markdoliner@pidgin.im>
parents:
6846
diff
changeset
|
116 | GAIM_MESSAGE_AUTO_RESP = 0x0008, /**< Auto response. */ |
|
12f08de92674
[gaim-migrate @ 7538]
Mark Doliner <markdoliner@pidgin.im>
parents:
6846
diff
changeset
|
117 | GAIM_MESSAGE_COLORIZE = 0x0010, /**< Colorize nicks. */ |
|
12f08de92674
[gaim-migrate @ 7538]
Mark Doliner <markdoliner@pidgin.im>
parents:
6846
diff
changeset
|
118 | GAIM_MESSAGE_NICK = 0x0020, /**< Contains your nick. */ |
|
12f08de92674
[gaim-migrate @ 7538]
Mark Doliner <markdoliner@pidgin.im>
parents:
6846
diff
changeset
|
119 | GAIM_MESSAGE_NO_LOG = 0x0040, /**< Do not log. */ |
|
12f08de92674
[gaim-migrate @ 7538]
Mark Doliner <markdoliner@pidgin.im>
parents:
6846
diff
changeset
|
120 | GAIM_MESSAGE_WHISPER = 0x0080, /**< Whispered message. */ |
|
9584
1a6198375303
[gaim-migrate @ 10427]
Nathan Fredrickson <nathan@silverorange.com>
parents:
9554
diff
changeset
|
121 | GAIM_MESSAGE_ERROR = 0x0200, /**< Error message. */ |
|
10346
9c65a007b4a5
[gaim-migrate @ 11560]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
10246
diff
changeset
|
122 | GAIM_MESSAGE_DELAYED = 0x0400, /**< Delayed message. */ |
|
9c65a007b4a5
[gaim-migrate @ 11560]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
10246
diff
changeset
|
123 | GAIM_MESSAGE_RAW = 0x0800 /**< "Raw" message - don't apply formatting */ |
|
10008
1de3454a0dca
[gaim-migrate @ 10925]
Mark Doliner <markdoliner@pidgin.im>
parents:
9939
diff
changeset
|
124 | |
|
6621
2a18ef3e5224
[gaim-migrate @ 7145]
Robert McQueen <robot101@debian.org>
parents:
6605
diff
changeset
|
125 | } GaimMessageFlags; |
|
2a18ef3e5224
[gaim-migrate @ 7145]
Robert McQueen <robot101@debian.org>
parents:
6605
diff
changeset
|
126 | |
|
9554
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
127 | /** |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
128 | * Flags applicable to users in Chats. |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
129 | */ |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
130 | typedef enum |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
131 | { |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
132 | GAIM_CBFLAGS_NONE = 0x0000, /**< No flags */ |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
133 | GAIM_CBFLAGS_VOICE = 0x0001, /**< Voiced user or "Participant" */ |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
134 | GAIM_CBFLAGS_HALFOP = 0x0002, /**< Half-op */ |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
135 | GAIM_CBFLAGS_OP = 0x0004, /**< Channel Op or Moderator */ |
| 10665 | 136 | GAIM_CBFLAGS_FOUNDER = 0x0008, /**< Channel Founder */ |
| 137 | GAIM_CBFLAGS_TYPING = 0x0010, /**< Currently typing */ | |
| 138 | ||
|
10008
1de3454a0dca
[gaim-migrate @ 10925]
Mark Doliner <markdoliner@pidgin.im>
parents:
9939
diff
changeset
|
139 | |
|
9554
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
140 | } GaimConvChatBuddyFlags; |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
141 | |
|
5872
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
142 | #include "account.h" |
|
9718
aeee69c6c784
[gaim-migrate @ 10579]
Mark Doliner <markdoliner@pidgin.im>
parents:
9627
diff
changeset
|
143 | #include "buddyicon.h" |
| 7431 | 144 | #include "log.h" |
|
5872
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
145 | #include "server.h" |
|
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
146 | |
|
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
147 | /** |
| 4359 | 148 | * Conversation window operations. |
| 149 | * | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
150 | * Any UI representing a window must assign a filled-out gaim_conv_window_ops |
|
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
151 | * structure to the GaimConvWindow. |
| 4359 | 152 | */ |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
153 | struct _GaimConvWindowUiOps |
| 4359 | 154 | { |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
155 | GaimConversationUiOps *(*get_conversation_ui_ops)(void); |
| 4359 | 156 | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
157 | void (*new_window)(GaimConvWindow *win); |
|
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
158 | void (*destroy_window)(GaimConvWindow *win); |
| 4359 | 159 | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
160 | void (*show)(GaimConvWindow *win); |
|
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
161 | void (*hide)(GaimConvWindow *win); |
|
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
162 | void (*raise)(GaimConvWindow *win); |
|
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
163 | void (*flash)(GaimConvWindow *win); |
| 4359 | 164 | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
165 | void (*switch_conversation)(GaimConvWindow *win, unsigned int index); |
|
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
166 | void (*add_conversation)(GaimConvWindow *win, GaimConversation *conv); |
|
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
167 | void (*remove_conversation)(GaimConvWindow *win, GaimConversation *conv); |
|
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
168 | void (*move_conversation)(GaimConvWindow *win, GaimConversation *conv, |
| 8155 | 169 | unsigned int newIndex); |
| 10665 | 170 | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
171 | int (*get_active_index)(const GaimConvWindow *win); |
|
9260
82d7b380220a
[gaim-migrate @ 10059]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9166
diff
changeset
|
172 | gboolean (*has_focus)(GaimConvWindow *win); |
| 4359 | 173 | }; |
| 174 | ||
| 175 | /** | |
| 176 | * Conversation operations and events. | |
| 177 | * | |
| 178 | * Any UI representing a conversation must assign a filled-out | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
179 | * GaimConversationUiOps structure to the GaimConversation. |
| 4359 | 180 | */ |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
181 | struct _GaimConversationUiOps |
| 4359 | 182 | { |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
183 | void (*destroy_conversation)(GaimConversation *conv); |
|
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
184 | void (*write_chat)(GaimConversation *conv, const char *who, |
| 8155 | 185 | const char *message, GaimMessageFlags flags, |
| 186 | time_t mtime); | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
187 | void (*write_im)(GaimConversation *conv, const char *who, |
| 8155 | 188 | const char *message, GaimMessageFlags flags, |
| 189 | time_t mtime); | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
190 | void (*write_conv)(GaimConversation *conv, const char *who, |
| 8155 | 191 | const char *message, GaimMessageFlags flags, |
| 192 | time_t mtime); | |
| 4359 | 193 | |
|
9846
61f7349c153a
[gaim-migrate @ 10724]
Nathan Fredrickson <nathan@silverorange.com>
parents:
9718
diff
changeset
|
194 | void (*chat_add_user)(GaimConversation *conv, const char *user, gboolean new_arrival); |
|
6407
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
195 | void (*chat_add_users)(GaimConversation *conv, GList *users); |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
196 | void (*chat_rename_user)(GaimConversation *conv, |
| 8155 | 197 | const char *old_name, const char *new_name); |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
198 | void (*chat_remove_user)(GaimConversation *conv, const char *user); |
|
6407
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
199 | void (*chat_remove_users)(GaimConversation *conv, GList *users); |
|
9554
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
200 | void (*chat_update_user)(GaimConversation *conv, const char *user); |
| 4359 | 201 | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
202 | void (*update_progress)(GaimConversation *conv, float percent); |
| 4359 | 203 | |
|
9260
82d7b380220a
[gaim-migrate @ 10059]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9166
diff
changeset
|
204 | gboolean (*has_focus)(GaimConversation *conv); |
|
82d7b380220a
[gaim-migrate @ 10059]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9166
diff
changeset
|
205 | |
| 10526 | 206 | /* Custom Smileys */ |
| 207 | gboolean (*custom_smiley_add)(GaimConversation *conv, const char *smile); | |
| 208 | void (*custom_smiley_write)(GaimConversation *conv, const char *smile, | |
| 209 | const char * data, gint64 size); | |
| 210 | void (*custom_smiley_close)(GaimConversation *conv, const char *smile); | |
| 211 | ||
| 212 | ||
| 213 | ||
| 4359 | 214 | /* Events */ |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
215 | void (*updated)(GaimConversation *conv, GaimConvUpdateType type); |
|
9260
82d7b380220a
[gaim-migrate @ 10059]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9166
diff
changeset
|
216 | |
| 4359 | 217 | }; |
| 218 | ||
| 219 | /** | |
| 220 | * A core representation of a graphical window containing one or more | |
| 221 | * conversations. | |
| 222 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
223 | struct _GaimConvWindow |
| 4359 | 224 | { |
|
4465
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
225 | GList *conversations; /**< The conversations in the window. */ |
|
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
226 | size_t conversation_count; /**< The number of conversations. */ |
| 4359 | 227 | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
228 | GaimConvWindowUiOps *ui_ops; /**< UI-specific window operations. */ |
|
4465
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
229 | void *ui_data; /**< UI-specific data. */ |
| 4359 | 230 | }; |
| 231 | ||
| 232 | /** | |
| 233 | * Data specific to Instant Messages. | |
| 234 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
235 | struct _GaimConvIm |
| 4359 | 236 | { |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
237 | GaimConversation *conv; /**< The parent conversation. */ |
| 4359 | 238 | |
|
5872
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
239 | GaimTypingState typing_state; /**< The current typing state. */ |
|
4465
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
240 | guint typing_timeout; /**< The typing timer handle. */ |
|
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
241 | time_t type_again; /**< The type again time. */ |
|
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
242 | guint type_again_timeout; /**< The type again timer handle. */ |
| 4359 | 243 | |
|
6846
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
244 | GaimBuddyIcon *icon; /**< The buddy icon. */ |
| 4359 | 245 | }; |
| 246 | ||
| 247 | /** | |
| 248 | * Data specific to Chats. | |
| 249 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
250 | struct _GaimConvChat |
| 4359 | 251 | { |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
252 | GaimConversation *conv; /**< The parent conversation. */ |
| 4359 | 253 | |
|
4465
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
254 | GList *in_room; /**< The users in the room. */ |
|
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
255 | GList *ignored; /**< Ignored users. */ |
|
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
256 | char *who; /**< The person who set the topic. */ |
|
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
257 | char *topic; /**< The topic. */ |
|
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
258 | int id; /**< The chat ID. */ |
| 8158 | 259 | char *nick; /**< Your nick in this chat. */ |
| 8256 | 260 | |
| 261 | gboolean left; /**< We left the chat and kept the window open */ | |
| 4359 | 262 | }; |
| 263 | ||
| 264 | /** | |
|
9554
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
265 | * Data for "Chat Buddies" |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
266 | */ |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
267 | struct _GaimConvChatBuddy |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
268 | { |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
269 | char *name; /**< The name */ |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
270 | GaimConvChatBuddyFlags flags; /**< Flags (ops, voice etc.) */ |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
271 | }; |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
272 | |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
273 | /** |
| 4359 | 274 | * A core representation of a conversation between two or more people. |
| 275 | * | |
| 276 | * The conversation can be an IM or a chat. Each conversation is kept | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
277 | * in a GaimConvWindow and has a UI representation. |
| 4359 | 278 | */ |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
279 | struct _GaimConversation |
| 4359 | 280 | { |
| 281 | GaimConversationType type; /**< The type of conversation. */ | |
| 282 | ||
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
283 | GaimAccount *account; /**< The user using this conversation. */ |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
284 | GaimConvWindow *window; /**< The parent window. */ |
| 4359 | 285 | |
| 286 | int conversation_pos; /**< The position in the window's list. */ | |
| 287 | ||
| 288 | char *name; /**< The name of the conversation. */ | |
| 289 | char *title; /**< The window title. */ | |
| 290 | ||
| 291 | gboolean logging; /**< The status of logging. */ | |
| 8158 | 292 | |
| 7431 | 293 | GaimLog *log; /**< This conversation's log */ |
| 8158 | 294 | |
| 4359 | 295 | GList *send_history; /**< The send history. */ |
| 296 | GString *history; /**< The conversation history. */ | |
| 297 | ||
| 298 | GaimUnseenState unseen; /**< The unseen tab state. */ | |
| 299 | ||
| 300 | union | |
| 301 | { | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
302 | GaimConvIm *im; /**< IM-specific data. */ |
|
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
303 | GaimConvChat *chat; /**< Chat-specific data. */ |
|
4378
3bef342997ef
[gaim-migrate @ 4644]
Christian Hammond <chipx86@chipx86.com>
parents:
4359
diff
changeset
|
304 | void *misc; /**< Misc. data. */ |
| 4359 | 305 | |
| 306 | } u; | |
|
4465
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
307 | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
308 | GaimConversationUiOps *ui_ops; /**< UI-specific operations. */ |
|
4465
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
309 | void *ui_data; /**< UI-specific data. */ |
|
4876
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
310 | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
311 | GHashTable *data; /**< Plugin-specific data. */ |
| 10665 | 312 | |
| 313 | GaimConnectionFlags features; /**< The supported features */ | |
| 314 | ||
| 4359 | 315 | }; |
| 316 | ||
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
317 | typedef void (*GaimConvPlacementFunc)(GaimConversation *); |
| 4359 | 318 | |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
319 | #ifdef __cplusplus |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
320 | extern "C" { |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
321 | #endif |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
322 | |
| 4359 | 323 | /**************************************************************************/ |
| 324 | /** @name Conversation Window API */ | |
| 325 | /**************************************************************************/ | |
| 326 | /*@{*/ | |
| 327 | ||
| 328 | /** | |
| 329 | * Creates a new conversation window. | |
| 330 | * | |
| 331 | * This window is added to the list of windows, but is not shown until | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
332 | * gaim_conv_window_show() is called. |
| 4359 | 333 | * |
| 334 | * @return The new conversation window. | |
| 335 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
336 | GaimConvWindow *gaim_conv_window_new(void); |
| 4359 | 337 | |
| 338 | /** | |
| 339 | * Destroys the specified conversation window and all conversations in it. | |
| 340 | * | |
| 341 | * @param win The window to destroy. | |
| 342 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
343 | void gaim_conv_window_destroy(GaimConvWindow *win); |
| 4359 | 344 | |
| 345 | /** | |
| 346 | * Shows the specified conversation window. | |
| 347 | * | |
| 348 | * @param win The window. | |
| 349 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
350 | void gaim_conv_window_show(GaimConvWindow *win); |
| 4359 | 351 | |
| 352 | /** | |
| 353 | * Hides the specified conversation window. | |
| 354 | * | |
| 355 | * @param win The window. | |
| 356 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
357 | void gaim_conv_window_hide(GaimConvWindow *win); |
| 4359 | 358 | |
| 359 | /** | |
| 360 | * Raises the specified conversation window. | |
| 361 | * | |
| 362 | * @param win The window. | |
| 363 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
364 | void gaim_conv_window_raise(GaimConvWindow *win); |
| 4359 | 365 | |
| 366 | /** | |
| 367 | * Causes the window to flash for IM notification, if the UI supports this. | |
|
6585
8fcd3639e544
[gaim-migrate @ 7107]
Christian Hammond <chipx86@chipx86.com>
parents:
6488
diff
changeset
|
368 | * |
| 4359 | 369 | * @param win The window. |
| 370 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
371 | void gaim_conv_window_flash(GaimConvWindow *win); |
| 4359 | 372 | |
| 373 | /** | |
| 374 | * Sets the specified window's UI window operations structure. | |
| 375 | * | |
| 376 | * @param win The window. | |
| 377 | * @param ops The UI window operations structure. | |
| 378 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
379 | void gaim_conv_window_set_ui_ops(GaimConvWindow *win, |
|
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
380 | GaimConvWindowUiOps *ops); |
| 4359 | 381 | |
| 382 | /** | |
| 383 | * Returns the specified window's UI window operations structure. | |
| 384 | * | |
| 385 | * @param win The window. | |
| 386 | * | |
| 387 | * @return The UI window operations structure. | |
| 388 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
389 | GaimConvWindowUiOps *gaim_conv_window_get_ui_ops(const GaimConvWindow *win); |
| 4359 | 390 | |
| 391 | /** | |
| 392 | * Adds a conversation to this window. | |
| 393 | * | |
| 394 | * If the conversation already has a parent window, this will do nothing. | |
| 395 | * | |
| 396 | * @param win The window. | |
| 397 | * @param conv The conversation. | |
| 398 | * | |
| 399 | * @return The new index of the conversation in the window. | |
| 400 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
401 | int gaim_conv_window_add_conversation(GaimConvWindow *win, |
|
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
402 | GaimConversation *conv); |
| 4359 | 403 | |
| 404 | /** | |
| 405 | * Removes the conversation at the specified index from the window. | |
| 406 | * | |
| 407 | * If there is no conversation at this index, this will do nothing. | |
| 408 | * | |
| 409 | * @param win The window. | |
| 410 | * @param index The index of the conversation. | |
| 411 | * | |
| 412 | * @return The conversation removed. | |
| 413 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
414 | GaimConversation *gaim_conv_window_remove_conversation(GaimConvWindow *win, |
|
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
415 | unsigned int index); |
| 4359 | 416 | |
| 417 | /** | |
| 418 | * Moves the conversation at the specified index in a window to a new index. | |
| 419 | * | |
| 420 | * @param win The window. | |
| 421 | * @param index The index of the conversation to move. | |
| 422 | * @param new_index The new index. | |
| 423 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
424 | void gaim_conv_window_move_conversation(GaimConvWindow *win, |
|
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
425 | unsigned int index, |
|
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
426 | unsigned int new_index); |
| 4359 | 427 | |
| 428 | /** | |
| 429 | * Returns the conversation in the window at the specified index. | |
| 430 | * | |
| 431 | * If the index is out of range, this returns @c NULL. | |
| 432 | * | |
| 433 | * @param win The window. | |
| 434 | * @param index The index containing a conversation. | |
| 435 | * | |
| 436 | * @return The conversation at the specified index. | |
| 437 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
438 | GaimConversation *gaim_conv_window_get_conversation_at( |
|
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
439 | const GaimConvWindow *win, unsigned int index); |
| 4359 | 440 | |
| 441 | /** | |
| 442 | * Returns the number of conversations in the window. | |
| 443 | * | |
| 444 | * @param win The window. | |
| 445 | * | |
| 446 | * @return The number of conversations. | |
| 447 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
448 | size_t gaim_conv_window_get_conversation_count(const GaimConvWindow *win); |
| 4359 | 449 | |
| 450 | /** | |
| 451 | * Switches the active conversation to the one at the specified index. | |
| 452 | * | |
| 453 | * If @a index is out of range, this does nothing. | |
| 454 | * | |
| 455 | * @param win The window. | |
| 456 | * @param index The new index. | |
| 457 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
458 | void gaim_conv_window_switch_conversation(GaimConvWindow *win, |
|
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
459 | unsigned int index); |
| 4359 | 460 | |
| 461 | /** | |
| 462 | * Returns the active conversation in the window. | |
| 463 | * | |
| 464 | * @param win The window. | |
| 465 | * | |
| 466 | * @return The active conversation. | |
| 467 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
468 | GaimConversation *gaim_conv_window_get_active_conversation( |
|
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
469 | const GaimConvWindow *win); |
| 4359 | 470 | |
| 471 | /** | |
|
9260
82d7b380220a
[gaim-migrate @ 10059]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9166
diff
changeset
|
472 | * Determines if a conversation window has focus |
|
82d7b380220a
[gaim-migrate @ 10059]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9166
diff
changeset
|
473 | * |
|
82d7b380220a
[gaim-migrate @ 10059]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9166
diff
changeset
|
474 | * @param win The window. |
|
82d7b380220a
[gaim-migrate @ 10059]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9166
diff
changeset
|
475 | * |
|
82d7b380220a
[gaim-migrate @ 10059]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9166
diff
changeset
|
476 | * @return @c TRUE if the conversation window has focus, @c FALSE if |
|
82d7b380220a
[gaim-migrate @ 10059]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9166
diff
changeset
|
477 | * it does not or the UI does not have a concept of window focus |
|
82d7b380220a
[gaim-migrate @ 10059]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9166
diff
changeset
|
478 | */ |
|
82d7b380220a
[gaim-migrate @ 10059]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9166
diff
changeset
|
479 | gboolean gaim_conv_window_has_focus(GaimConvWindow *win); |
|
82d7b380220a
[gaim-migrate @ 10059]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9166
diff
changeset
|
480 | |
|
82d7b380220a
[gaim-migrate @ 10059]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9166
diff
changeset
|
481 | /** |
| 4359 | 482 | * Returns the list of conversations in the specified window. |
| 483 | * | |
| 484 | * @param win The window. | |
| 485 | * | |
| 486 | * @return The list of conversations. | |
| 487 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
488 | GList *gaim_conv_window_get_conversations(const GaimConvWindow *win); |
| 4359 | 489 | |
| 490 | /** | |
| 491 | * Returns a list of all windows. | |
| 492 | * | |
| 493 | * @return A list of windows. | |
| 494 | */ | |
| 495 | GList *gaim_get_windows(void); | |
| 496 | ||
|
4469
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
497 | /** |
|
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
498 | * Returns the first window containing a conversation of the specified type. |
|
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
499 | * |
|
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
500 | * @param type The conversation type. |
|
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
501 | * |
|
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
502 | * @return The window if found, or @c NULL if not found. |
|
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
503 | */ |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
504 | GaimConvWindow *gaim_get_first_window_with_type(GaimConversationType type); |
|
4469
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
505 | /** |
|
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
506 | * Returns the last window containing a conversation of the specified type. |
|
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
507 | * |
|
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
508 | * @param type The conversation type. |
|
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
509 | * |
|
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
510 | * @return The window if found, or @c NULL if not found. |
|
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
511 | */ |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
512 | GaimConvWindow *gaim_get_last_window_with_type(GaimConversationType type); |
|
4469
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
513 | |
| 4359 | 514 | /*@}*/ |
| 515 | ||
| 516 | /**************************************************************************/ | |
| 517 | /** @name Conversation API */ | |
| 518 | /**************************************************************************/ | |
| 519 | /*@{*/ | |
| 520 | ||
| 521 | /** | |
| 522 | * Creates a new conversation of the specified type. | |
| 523 | * | |
|
6720
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6622
diff
changeset
|
524 | * @param type The type of conversation. |
|
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6622
diff
changeset
|
525 | * @param account The account opening the conversation window on the gaim |
|
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6622
diff
changeset
|
526 | * user's end. |
|
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6622
diff
changeset
|
527 | * @param name The name of the conversation. |
| 4359 | 528 | * |
| 529 | * @return The new conversation. | |
| 530 | */ | |
|
6585
8fcd3639e544
[gaim-migrate @ 7107]
Christian Hammond <chipx86@chipx86.com>
parents:
6488
diff
changeset
|
531 | GaimConversation *gaim_conversation_new(GaimConversationType type, |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
532 | GaimAccount *account, |
|
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
533 | const char *name); |
| 4359 | 534 | |
| 535 | /** | |
| 536 | * Destroys the specified conversation and removes it from the parent | |
| 537 | * window. | |
| 538 | * | |
| 539 | * If this conversation is the only one contained in the parent window, | |
| 540 | * that window is also destroyed. | |
| 541 | * | |
| 542 | * @param conv The conversation to destroy. | |
| 543 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
544 | void gaim_conversation_destroy(GaimConversation *conv); |
| 4359 | 545 | |
| 546 | /** | |
| 547 | * Returns the specified conversation's type. | |
| 548 | * | |
| 549 | * @param conv The conversation. | |
| 550 | * | |
| 551 | * @return The conversation's type. | |
| 552 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
553 | GaimConversationType gaim_conversation_get_type(const GaimConversation *conv); |
| 4359 | 554 | |
| 555 | /** | |
| 556 | * Sets the specified conversation's UI operations structure. | |
| 557 | * | |
| 558 | * @param conv The conversation. | |
| 559 | * @param ops The UI conversation operations structure. | |
| 560 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
561 | void gaim_conversation_set_ui_ops(GaimConversation *conv, |
|
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
562 | GaimConversationUiOps *ops); |
| 4359 | 563 | |
| 564 | /** | |
| 565 | * Returns the specified conversation's UI operations structure. | |
|
6585
8fcd3639e544
[gaim-migrate @ 7107]
Christian Hammond <chipx86@chipx86.com>
parents:
6488
diff
changeset
|
566 | * |
| 4359 | 567 | * @param conv The conversation. |
| 568 | * | |
| 569 | * @return The operations structure. | |
| 570 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
571 | GaimConversationUiOps *gaim_conversation_get_ui_ops( |
|
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
572 | const GaimConversation *conv); |
| 4359 | 573 | |
| 574 | /** | |
| 4491 | 575 | * Sets the specified conversation's gaim_account. |
| 4359 | 576 | * |
| 4491 | 577 | * This gaim_account represents the user using gaim, not the person the user |
| 4359 | 578 | * is having a conversation/chat/flame with. |
| 579 | * | |
| 580 | * @param conv The conversation. | |
| 4491 | 581 | * @param account The gaim_account. |
| 4359 | 582 | */ |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
583 | void gaim_conversation_set_account(GaimConversation *conv, |
|
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
584 | GaimAccount *account); |
| 4359 | 585 | |
| 586 | /** | |
| 4491 | 587 | * Returns the specified conversation's gaim_account. |
| 4359 | 588 | * |
| 4491 | 589 | * This gaim_account represents the user using gaim, not the person the user |
| 4359 | 590 | * is having a conversation/chat/flame with. |
| 591 | * | |
| 592 | * @param conv The conversation. | |
| 593 | * | |
| 4491 | 594 | * @return The conversation's gaim_account. |
| 4359 | 595 | */ |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
596 | GaimAccount *gaim_conversation_get_account(const GaimConversation *conv); |
| 4359 | 597 | |
| 598 | /** | |
| 599 | * Returns the specified conversation's gaim_connection. | |
| 600 | * | |
| 601 | * This is the same as gaim_conversation_get_user(conv)->gc. | |
| 602 | * | |
| 603 | * @param conv The conversation. | |
| 604 | * | |
| 605 | * @return The conversation's gaim_connection. | |
| 606 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
607 | GaimConnection *gaim_conversation_get_gc(const GaimConversation *conv); |
| 4359 | 608 | |
| 609 | /** | |
| 610 | * Sets the specified conversation's title. | |
| 611 | * | |
| 612 | * @param conv The conversation. | |
| 613 | * @param title The title. | |
| 614 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
615 | void gaim_conversation_set_title(GaimConversation *conv, const char *title); |
| 4359 | 616 | |
| 617 | /** | |
| 618 | * Returns the specified conversation's title. | |
| 619 | * | |
|
6720
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6622
diff
changeset
|
620 | * @param conv The conversation. |
| 4359 | 621 | * |
| 622 | * @return The title. | |
| 623 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
624 | const char *gaim_conversation_get_title(const GaimConversation *conv); |
| 4359 | 625 | |
| 626 | /** | |
| 627 | * Automatically sets the specified conversation's title. | |
| 628 | * | |
| 629 | * This function takes OPT_IM_ALIAS_TAB into account, as well as the | |
| 630 | * user's alias. | |
| 631 | * | |
| 632 | * @param conv The conversation. | |
| 633 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
634 | void gaim_conversation_autoset_title(GaimConversation *conv); |
| 4359 | 635 | |
| 636 | /** | |
| 637 | * Returns the specified conversation's index in the parent window. | |
| 638 | * | |
| 639 | * @param conv The conversation. | |
| 640 | * | |
| 641 | * @return The current index in the parent window. | |
| 642 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
643 | int gaim_conversation_get_index(const GaimConversation *conv); |
| 4359 | 644 | |
| 645 | /** | |
| 646 | * Sets the conversation's unseen state. | |
| 647 | * | |
| 648 | * @param conv The conversation. | |
| 649 | * @param state The new unseen state. | |
| 650 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
651 | void gaim_conversation_set_unseen(GaimConversation *conv, |
| 4359 | 652 | GaimUnseenState state); |
| 653 | ||
| 654 | /** | |
| 655 | * Returns the conversation's unseen state. | |
| 656 | * | |
| 657 | * @param conv The conversation. | |
| 658 | * | |
|
6720
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6622
diff
changeset
|
659 | * @return The conversation's unseen state. |
| 4359 | 660 | */ |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
661 | GaimUnseenState gaim_conversation_get_unseen(const GaimConversation *conv); |
| 4359 | 662 | |
| 663 | /** | |
|
7256
311c8febfc92
[gaim-migrate @ 7833]
Christian Hammond <chipx86@chipx86.com>
parents:
7122
diff
changeset
|
664 | * Sets the specified conversation's name. |
|
311c8febfc92
[gaim-migrate @ 7833]
Christian Hammond <chipx86@chipx86.com>
parents:
7122
diff
changeset
|
665 | * |
|
311c8febfc92
[gaim-migrate @ 7833]
Christian Hammond <chipx86@chipx86.com>
parents:
7122
diff
changeset
|
666 | * @param conv The conversation. |
|
311c8febfc92
[gaim-migrate @ 7833]
Christian Hammond <chipx86@chipx86.com>
parents:
7122
diff
changeset
|
667 | * @param name The conversation's name. |
|
311c8febfc92
[gaim-migrate @ 7833]
Christian Hammond <chipx86@chipx86.com>
parents:
7122
diff
changeset
|
668 | */ |
|
311c8febfc92
[gaim-migrate @ 7833]
Christian Hammond <chipx86@chipx86.com>
parents:
7122
diff
changeset
|
669 | void gaim_conversation_set_name(GaimConversation *conv, const char *name); |
|
311c8febfc92
[gaim-migrate @ 7833]
Christian Hammond <chipx86@chipx86.com>
parents:
7122
diff
changeset
|
670 | |
|
311c8febfc92
[gaim-migrate @ 7833]
Christian Hammond <chipx86@chipx86.com>
parents:
7122
diff
changeset
|
671 | /** |
| 4359 | 672 | * Returns the specified conversation's name. |
| 673 | * | |
| 674 | * @param conv The conversation. | |
| 675 | * | |
| 676 | * @return The conversation's name. | |
| 677 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
678 | const char *gaim_conversation_get_name(const GaimConversation *conv); |
| 4359 | 679 | |
| 680 | /** | |
| 681 | * Enables or disables logging for this conversation. | |
| 682 | * | |
|
6720
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6622
diff
changeset
|
683 | * @param conv The conversation. |
|
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6622
diff
changeset
|
684 | * @param log @c TRUE if logging should be enabled, or @c FALSE otherwise. |
| 4359 | 685 | */ |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
686 | void gaim_conversation_set_logging(GaimConversation *conv, gboolean log); |
| 4359 | 687 | |
| 688 | /** | |
| 689 | * Returns whether or not logging is enabled for this conversation. | |
| 690 | * | |
|
6720
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6622
diff
changeset
|
691 | * @param conv The conversation. |
|
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6622
diff
changeset
|
692 | * |
| 4359 | 693 | * @return @c TRUE if logging is enabled, or @c FALSE otherwise. |
| 694 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
695 | gboolean gaim_conversation_is_logging(const GaimConversation *conv); |
| 4359 | 696 | |
| 697 | /** | |
| 698 | * Returns the specified conversation's send history. | |
| 699 | * | |
| 700 | * @param conv The conversation. | |
| 701 | * | |
| 702 | * @return The conversation's send history. | |
| 703 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
704 | GList *gaim_conversation_get_send_history(const GaimConversation *conv); |
| 4359 | 705 | |
| 706 | /** | |
| 707 | * Sets the specified conversation's history. | |
| 708 | * | |
| 709 | * @param conv The conversation. | |
| 710 | * @param history The history. | |
| 711 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
712 | void gaim_conversation_set_history(GaimConversation *conv, GString *history); |
| 4359 | 713 | |
| 714 | /** | |
| 715 | * Returns the specified conversation's history. | |
| 716 | * | |
| 717 | * @param conv The conversation. | |
| 718 | * | |
| 719 | * @return The conversation's history. | |
| 720 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
721 | GString *gaim_conversation_get_history(const GaimConversation *conv); |
| 4359 | 722 | |
| 723 | /** | |
| 724 | * Returns the specified conversation's parent window. | |
| 725 | * | |
| 726 | * @param conv The conversation. | |
| 727 | * | |
| 728 | * @return The conversation's parent window. | |
| 729 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
730 | GaimConvWindow *gaim_conversation_get_window(const GaimConversation *conv); |
| 4359 | 731 | |
| 732 | /** | |
| 733 | * Returns the specified conversation's IM-specific data. | |
| 734 | * | |
| 735 | * If the conversation type is not GAIM_CONV_IM, this will return @c NULL. | |
| 736 | * | |
| 737 | * @param conv The conversation. | |
| 738 | * | |
| 739 | * @return The IM-specific data. | |
| 740 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
741 | GaimConvIm *gaim_conversation_get_im_data(const GaimConversation *conv); |
| 4359 | 742 | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
743 | #define GAIM_CONV_IM(c) (gaim_conversation_get_im_data(c)) |
| 4359 | 744 | |
| 745 | /** | |
| 746 | * Returns the specified conversation's chat-specific data. | |
| 747 | * | |
| 748 | * If the conversation type is not GAIM_CONV_CHAT, this will return @c NULL. | |
| 749 | * | |
| 750 | * @param conv The conversation. | |
| 751 | * | |
| 752 | * @return The chat-specific data. | |
| 753 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
754 | GaimConvChat *gaim_conversation_get_chat_data(const GaimConversation *conv); |
| 4359 | 755 | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
756 | #define GAIM_CONV_CHAT(c) (gaim_conversation_get_chat_data(c)) |
| 4359 | 757 | |
| 758 | /** | |
|
4877
7d1f4381fed0
[gaim-migrate @ 5207]
Christian Hammond <chipx86@chipx86.com>
parents:
4876
diff
changeset
|
759 | * Sets extra data for a conversation. |
|
6585
8fcd3639e544
[gaim-migrate @ 7107]
Christian Hammond <chipx86@chipx86.com>
parents:
6488
diff
changeset
|
760 | * |
|
4876
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
761 | * @param conv The conversation. |
|
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
762 | * @param key The unique key. |
|
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
763 | * @param data The data to assign. |
|
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
764 | */ |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
765 | void gaim_conversation_set_data(GaimConversation *conv, const char *key, |
|
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
766 | gpointer data); |
|
4876
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
767 | |
|
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
768 | /** |
|
4877
7d1f4381fed0
[gaim-migrate @ 5207]
Christian Hammond <chipx86@chipx86.com>
parents:
4876
diff
changeset
|
769 | * Returns extra data in a conversation. |
|
4876
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
770 | * |
|
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
771 | * @param conv The conversation. |
|
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
772 | * @param key The unqiue key. |
|
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
773 | * |
|
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
774 | * @return The data associated with the key. |
|
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
775 | */ |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
776 | gpointer gaim_conversation_get_data(GaimConversation *conv, const char *key); |
|
4876
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
777 | |
|
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
778 | /** |
| 4359 | 779 | * Returns a list of all conversations. |
| 780 | * | |
| 781 | * This list includes both IMs and chats. | |
| 782 | * | |
| 783 | * @return A GList of all conversations. | |
| 784 | */ | |
| 785 | GList *gaim_get_conversations(void); | |
| 786 | ||
| 787 | /** | |
| 788 | * Returns a list of all IMs. | |
| 789 | * | |
| 790 | * @return A GList of all IMs. | |
| 791 | */ | |
| 792 | GList *gaim_get_ims(void); | |
| 793 | ||
| 794 | /** | |
| 795 | * Returns a list of all chats. | |
| 796 | * | |
| 797 | * @return A GList of all chats. | |
| 798 | */ | |
| 799 | GList *gaim_get_chats(void); | |
| 800 | ||
| 801 | /** | |
|
10246
aa5bff72f94c
[gaim-migrate @ 11386]
Mark Doliner <markdoliner@pidgin.im>
parents:
10008
diff
changeset
|
802 | * Finds the conversation with the specified type and name. In most |
|
aa5bff72f94c
[gaim-migrate @ 11386]
Mark Doliner <markdoliner@pidgin.im>
parents:
10008
diff
changeset
|
803 | * cases you should use gaim_find_conversation_with_account() instead |
|
aa5bff72f94c
[gaim-migrate @ 11386]
Mark Doliner <markdoliner@pidgin.im>
parents:
10008
diff
changeset
|
804 | * of this. |
| 4359 | 805 | * |
|
10246
aa5bff72f94c
[gaim-migrate @ 11386]
Mark Doliner <markdoliner@pidgin.im>
parents:
10008
diff
changeset
|
806 | * @param type The type of the conversation. |
| 4359 | 807 | * @param name The name of the conversation. |
| 808 | * | |
| 809 | * @return The conversation if found, or @c NULL otherwise. | |
| 810 | */ | |
|
10246
aa5bff72f94c
[gaim-migrate @ 11386]
Mark Doliner <markdoliner@pidgin.im>
parents:
10008
diff
changeset
|
811 | GaimConversation *gaim_find_conversation(GaimConversationType type, |
|
aa5bff72f94c
[gaim-migrate @ 11386]
Mark Doliner <markdoliner@pidgin.im>
parents:
10008
diff
changeset
|
812 | const char *name); |
| 4359 | 813 | |
| 814 | /** | |
|
10246
aa5bff72f94c
[gaim-migrate @ 11386]
Mark Doliner <markdoliner@pidgin.im>
parents:
10008
diff
changeset
|
815 | * Finds a conversation with the specified type, name, and Gaim account. |
| 4359 | 816 | * |
|
10246
aa5bff72f94c
[gaim-migrate @ 11386]
Mark Doliner <markdoliner@pidgin.im>
parents:
10008
diff
changeset
|
817 | * @param type The type of the conversation. |
| 4359 | 818 | * @param name The name of the conversation. |
| 4491 | 819 | * @param account The gaim_account associated with the conversation. |
| 4359 | 820 | * |
| 821 | * @return The conversation if found, or @c NULL otherwise. | |
| 822 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
823 | GaimConversation *gaim_find_conversation_with_account( |
|
10246
aa5bff72f94c
[gaim-migrate @ 11386]
Mark Doliner <markdoliner@pidgin.im>
parents:
10008
diff
changeset
|
824 | GaimConversationType type, const char *name, |
|
aa5bff72f94c
[gaim-migrate @ 11386]
Mark Doliner <markdoliner@pidgin.im>
parents:
10008
diff
changeset
|
825 | const GaimAccount *account); |
| 4359 | 826 | |
| 827 | /** | |
| 828 | * Writes to a conversation window. | |
| 829 | * | |
| 830 | * This function should not be used to write IM or chat messages. Use | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
831 | * gaim_conv_im_write() and gaim_conv_chat_write() instead. Those functions will |
| 4359 | 832 | * most likely call this anyway, but they may do their own formatting, |
| 833 | * sound playback, etc. | |
| 834 | * | |
| 835 | * This can be used to write generic messages, such as "so and so closed | |
| 836 | * the conversation window." | |
| 837 | * | |
| 838 | * @param conv The conversation. | |
| 839 | * @param who The user who sent the message. | |
| 840 | * @param message The message. | |
|
6621
2a18ef3e5224
[gaim-migrate @ 7145]
Robert McQueen <robot101@debian.org>
parents:
6605
diff
changeset
|
841 | * @param flags The message flags. |
| 4359 | 842 | * @param mtime The time the message was sent. |
| 843 | * | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
844 | * @see gaim_conv_im_write() |
|
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
845 | * @see gaim_conv_chat_write() |
| 4359 | 846 | */ |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
847 | void gaim_conversation_write(GaimConversation *conv, const char *who, |
| 10665 | 848 | const char *message, GaimMessageFlags flags, |
| 849 | time_t mtime); | |
| 850 | ||
| 851 | ||
| 852 | /** | |
| 853 | Set the features as supported for the given conversation. | |
| 854 | @param conv The conversation | |
| 855 | @param features Bitset defining supported features | |
| 856 | */ | |
| 857 | void gaim_conversation_set_features(GaimConversation *conv, | |
| 858 | GaimConnectionFlags features); | |
| 859 | ||
| 860 | ||
| 861 | /** | |
| 862 | Get the features supported by the given conversation. | |
| 863 | @param conv The conversation | |
| 864 | */ | |
| 865 | GaimConnectionFlags gaim_conversation_get_features(GaimConversation *conv); | |
| 866 | ||
| 4359 | 867 | |
| 868 | /** | |
| 869 | * Updates the progress bar on a conversation window | |
| 870 | * (if one exists in the UI). | |
| 871 | * | |
| 872 | * This is used for loading images typically. | |
| 873 | * | |
| 874 | * @param conv The conversation. | |
| 875 | * @param percent The percentage. | |
| 876 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
877 | void gaim_conversation_update_progress(GaimConversation *conv, float percent); |
| 4359 | 878 | |
| 879 | /** | |
|
9260
82d7b380220a
[gaim-migrate @ 10059]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9166
diff
changeset
|
880 | * Determines if a conversation has focus |
|
82d7b380220a
[gaim-migrate @ 10059]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9166
diff
changeset
|
881 | * |
|
82d7b380220a
[gaim-migrate @ 10059]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9166
diff
changeset
|
882 | * @param conv The conversation. |
|
82d7b380220a
[gaim-migrate @ 10059]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9166
diff
changeset
|
883 | * |
|
82d7b380220a
[gaim-migrate @ 10059]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9166
diff
changeset
|
884 | * @return @c TRUE if the conversation has focus, @c FALSE if |
|
82d7b380220a
[gaim-migrate @ 10059]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9166
diff
changeset
|
885 | * it does not or the UI does not have a concept of conversation focus |
|
82d7b380220a
[gaim-migrate @ 10059]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9166
diff
changeset
|
886 | */ |
|
82d7b380220a
[gaim-migrate @ 10059]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9166
diff
changeset
|
887 | gboolean gaim_conversation_has_focus(GaimConversation *conv); |
|
82d7b380220a
[gaim-migrate @ 10059]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9166
diff
changeset
|
888 | |
|
82d7b380220a
[gaim-migrate @ 10059]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9166
diff
changeset
|
889 | /** |
| 4359 | 890 | * Updates the visual status and UI of a conversation. |
| 891 | * | |
| 892 | * @param conv The conversation. | |
| 893 | * @param type The update type. | |
| 894 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
895 | void gaim_conversation_update(GaimConversation *conv, GaimConvUpdateType type); |
| 4359 | 896 | |
| 897 | /** | |
| 898 | * Calls a function on each conversation. | |
| 899 | * | |
| 900 | * @param func The function. | |
| 901 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
902 | void gaim_conversation_foreach(void (*func)(GaimConversation *conv)); |
| 4359 | 903 | |
| 904 | /*@}*/ | |
| 905 | ||
| 906 | ||
| 907 | /**************************************************************************/ | |
| 908 | /** @name IM Conversation API */ | |
| 909 | /**************************************************************************/ | |
| 910 | /*@{*/ | |
| 911 | ||
| 912 | /** | |
| 913 | * Gets an IM's parent conversation. | |
| 914 | * | |
| 915 | * @param im The IM. | |
| 916 | * | |
| 917 | * @return The parent conversation. | |
| 918 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
919 | GaimConversation *gaim_conv_im_get_conversation(const GaimConvIm *im); |
| 4359 | 920 | |
| 921 | /** | |
|
6846
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
922 | * Sets the IM's buddy icon. |
|
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
923 | * |
|
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
924 | * This should only be called from within Gaim. You probably want to |
|
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
925 | * call gaim_buddy_icon_set_data(). |
|
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
926 | * |
|
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
927 | * @param im The IM. |
|
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
928 | * @param icon The buddy icon. |
|
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
929 | * |
|
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
930 | * @see gaim_buddy_icon_set_data() |
|
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
931 | */ |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
932 | void gaim_conv_im_set_icon(GaimConvIm *im, GaimBuddyIcon *icon); |
|
6846
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
933 | |
|
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
934 | /** |
|
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
935 | * Returns the IM's buddy icon. |
|
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
936 | * |
|
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
937 | * @param im The IM. |
|
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
938 | * |
|
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
939 | * @return The buddy icon. |
|
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
940 | */ |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
941 | GaimBuddyIcon *gaim_conv_im_get_icon(const GaimConvIm *im); |
|
6846
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
942 | |
|
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
943 | /** |
| 4359 | 944 | * Sets the IM's typing state. |
| 945 | * | |
| 946 | * @param im The IM. | |
| 947 | * @param state The typing state. | |
| 948 | */ | |
|
8288
457cf0339c09
[gaim-migrate @ 9012]
Christian Hammond <chipx86@chipx86.com>
parents:
8256
diff
changeset
|
949 | void gaim_conv_im_set_typing_state(GaimConvIm *im, GaimTypingState state); |
| 4359 | 950 | |
| 951 | /** | |
| 952 | * Returns the IM's typing state. | |
| 953 | * | |
| 954 | * @param im The IM. | |
| 955 | * | |
| 956 | * @return The IM's typing state. | |
| 957 | */ | |
|
8288
457cf0339c09
[gaim-migrate @ 9012]
Christian Hammond <chipx86@chipx86.com>
parents:
8256
diff
changeset
|
958 | GaimTypingState gaim_conv_im_get_typing_state(const GaimConvIm *im); |
| 4359 | 959 | |
| 960 | /** | |
| 961 | * Starts the IM's typing timeout. | |
| 962 | * | |
| 963 | * @param im The IM. | |
| 964 | * @param timeout The timeout. | |
| 965 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
966 | void gaim_conv_im_start_typing_timeout(GaimConvIm *im, int timeout); |
| 4359 | 967 | |
| 968 | /** | |
| 969 | * Stops the IM's typing timeout. | |
| 970 | * | |
| 971 | * @param im The IM. | |
| 972 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
973 | void gaim_conv_im_stop_typing_timeout(GaimConvIm *im); |
| 4359 | 974 | |
| 975 | /** | |
| 976 | * Returns the IM's typing timeout. | |
| 977 | * | |
| 978 | * @param im The IM. | |
| 979 | * | |
| 980 | * @return The timeout. | |
| 981 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
982 | guint gaim_conv_im_get_typing_timeout(const GaimConvIm *im); |
| 4359 | 983 | |
| 984 | /** | |
| 985 | * Sets the IM's time until it should send another typing notification. | |
| 986 | * | |
| 987 | * @param im The IM. | |
| 988 | * @param val The time. | |
| 989 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
990 | void gaim_conv_im_set_type_again(GaimConvIm *im, time_t val); |
| 4359 | 991 | |
| 992 | /** | |
| 993 | * Returns the IM's time until it should send another typing notification. | |
| 994 | * | |
| 995 | * @param im The IM. | |
| 996 | * | |
| 997 | * @return The time. | |
| 998 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
999 | time_t gaim_conv_im_get_type_again(const GaimConvIm *im); |
| 4359 | 1000 | |
| 1001 | /** | |
| 1002 | * Starts the IM's type again timeout. | |
| 1003 | * | |
| 1004 | * @param im The IM. | |
| 1005 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1006 | void gaim_conv_im_start_type_again_timeout(GaimConvIm *im); |
| 4359 | 1007 | |
| 1008 | /** | |
| 1009 | * Stops the IM's type again timeout. | |
| 1010 | * | |
| 1011 | * @param im The IM. | |
| 1012 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1013 | void gaim_conv_im_stop_type_again_timeout(GaimConvIm *im); |
| 4359 | 1014 | |
| 1015 | /** | |
| 1016 | * Returns the IM's type again timeout interval. | |
| 1017 | * | |
| 1018 | * @param im The IM. | |
| 1019 | * | |
| 1020 | * @return The type again timeout interval. | |
| 1021 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1022 | guint gaim_conv_im_get_type_again_timeout(const GaimConvIm *im); |
| 4359 | 1023 | |
| 1024 | /** | |
| 1025 | * Updates the visual typing notification for an IM conversation. | |
| 1026 | * | |
| 1027 | * @param im The IM. | |
| 1028 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1029 | void gaim_conv_im_update_typing(GaimConvIm *im); |
| 4359 | 1030 | |
| 1031 | /** | |
| 1032 | * Writes to an IM. | |
| 1033 | * | |
| 1034 | * @param im The IM. | |
| 1035 | * @param who The user who sent the message. | |
| 1036 | * @param message The message to write. | |
|
6621
2a18ef3e5224
[gaim-migrate @ 7145]
Robert McQueen <robot101@debian.org>
parents:
6605
diff
changeset
|
1037 | * @param flags The message flags. |
| 4359 | 1038 | * @param mtime The time the message was sent. |
| 1039 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1040 | void gaim_conv_im_write(GaimConvIm *im, const char *who, |
|
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1041 | const char *message, GaimMessageFlags flags, |
|
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1042 | time_t mtime); |
| 4359 | 1043 | |
| 1044 | /** | |
| 9627 | 1045 | * Presents an IM-error to the user |
| 1046 | * | |
| 1047 | * This is a helper function to find a conversation, write an error to it, and | |
| 1048 | * raise the window. If a conversation with this user doesn't already exist, | |
| 1049 | * the function will return FALSE and the calling function can attempt to present | |
| 1050 | * the error another way (gaim_notify_error, most likely) | |
| 1051 | * | |
| 1052 | * @param who The user this error is about | |
| 1053 | * @param account The account this error is on | |
| 1054 | * @param what The error | |
| 1055 | * @return TRUE if the error was presented, else FALSE | |
| 1056 | */ | |
| 1057 | gboolean gaim_conv_present_error(const char *who, GaimAccount *account, const char *what); | |
| 1058 | ||
| 1059 | /** | |
| 4359 | 1060 | * Sends a message to this IM conversation. |
| 1061 | * | |
| 1062 | * @param im The IM. | |
| 1063 | * @param message The message to send. | |
| 1064 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1065 | void gaim_conv_im_send(GaimConvIm *im, const char *message); |
| 4359 | 1066 | |
| 10526 | 1067 | /** |
| 10528 | 1068 | * Adds a smiley to the conversation's smiley tree. If this returns |
| 1069 | * @c TRUE you should call gaim_conv_custom_smiley_write() one or more | |
| 1070 | * times, and then gaim_conv_custom_smiley_close(). If this returns | |
| 1071 | * @c FALSE, either the conv or smile were invalid, or the icon was | |
| 1072 | * found in the cache. In either case, calling write or close would | |
| 1073 | * be an error. | |
| 10526 | 1074 | * |
| 1075 | * @param conv The conversation to associate the smiley with. | |
| 1076 | * @param smile The text associated with the smiley | |
| 1077 | * @param cksum_type The type of checksum. | |
| 1078 | * @param chksum The checksum, as a NUL terminated base64 string. | |
| 10528 | 1079 | * @return @c TRUE if an icon is expected, else FALSE. Note that |
| 10526 | 1080 | * it is an error to never call gaim_conv_custom_smiley_close if |
| 1081 | * this function returns @c TRUE, but an error to call it if | |
| 1082 | * @c FALSE is returned. | |
| 1083 | */ | |
| 1084 | ||
| 1085 | gboolean gaim_conv_custom_smiley_add(GaimConversation *conv, const char *smile, | |
| 1086 | const char *cksum_type, const char *chksum); | |
| 1087 | ||
| 1088 | ||
| 1089 | /** | |
| 1090 | * Updates the image associated with the current smiley. | |
| 1091 | * | |
| 1092 | * @param conv The conversation associated with the smiley. | |
| 1093 | * @param smile The text associated with the smiley. | |
| 1094 | * @param data The actual image data. | |
| 1095 | * @param size The length of the data. | |
| 1096 | */ | |
| 1097 | ||
| 1098 | void gaim_conv_custom_smiley_write(GaimConversation *conv, | |
| 1099 | const char *smile, const char * data, | |
| 1100 | gint64 size); | |
| 1101 | ||
| 1102 | /** | |
| 1103 | * Close the custom smiley, all data has been written with | |
| 1104 | * gaim_conv_custom_smiley_write, and it is no longer valid | |
| 1105 | * to call that function on that smiley. | |
| 1106 | * | |
| 1107 | * @param conv The gaim conversation associated with the smiley. | |
| 1108 | * @param smile The text associated with the smiley | |
| 1109 | */ | |
| 1110 | ||
| 1111 | void gaim_conv_custom_smiley_close(GaimConversation *conv, const char *smile); | |
| 1112 | ||
| 4359 | 1113 | /*@}*/ |
| 1114 | ||
| 1115 | ||
| 1116 | /**************************************************************************/ | |
| 1117 | /** @name Chat Conversation API */ | |
| 1118 | /**************************************************************************/ | |
| 1119 | /*@{*/ | |
| 1120 | ||
| 1121 | /** | |
| 1122 | * Gets a chat's parent conversation. | |
| 1123 | * | |
| 1124 | * @param chat The chat. | |
| 1125 | * | |
| 1126 | * @return The parent conversation. | |
| 1127 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1128 | GaimConversation *gaim_conv_chat_get_conversation(const GaimConvChat *chat); |
| 4359 | 1129 | |
| 1130 | /** | |
| 1131 | * Sets the list of users in the chat room. | |
| 1132 | * | |
|
6407
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1133 | * @note Calling this function will not update the display of the users. |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1134 | * Please use gaim_conv_chat_add_user(), gaim_conv_chat_add_users(), |
|
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1135 | * gaim_conv_chat_remove_user(), and gaim_conv_chat_remove_users() instead. |
|
6407
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1136 | * |
| 4359 | 1137 | * @param chat The chat. |
| 1138 | * @param users The list of users. | |
| 1139 | * | |
| 1140 | * @return The list passed. | |
| 1141 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1142 | GList *gaim_conv_chat_set_users(GaimConvChat *chat, GList *users); |
| 4359 | 1143 | |
| 1144 | /** | |
| 1145 | * Returns a list of users in the chat room. | |
| 1146 | * | |
| 1147 | * @param chat The chat. | |
| 1148 | * | |
| 1149 | * @return The list of users. | |
| 1150 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1151 | GList *gaim_conv_chat_get_users(const GaimConvChat *chat); |
| 4359 | 1152 | |
| 1153 | /** | |
| 1154 | * Ignores a user in a chat room. | |
| 1155 | * | |
| 1156 | * @param chat The chat. | |
| 1157 | * @param name The name of the user. | |
| 1158 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1159 | void gaim_conv_chat_ignore(GaimConvChat *chat, const char *name); |
| 4359 | 1160 | |
| 1161 | /** | |
| 1162 | * Unignores a user in a chat room. | |
| 1163 | * | |
| 1164 | * @param chat The chat. | |
| 1165 | * @param name The name of the user. | |
| 1166 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1167 | void gaim_conv_chat_unignore(GaimConvChat *chat, const char *name); |
| 4359 | 1168 | |
| 1169 | /** | |
| 1170 | * Sets the list of ignored users in the chat room. | |
| 1171 | * | |
| 1172 | * @param chat The chat. | |
| 1173 | * @param ignored The list of ignored users. | |
| 1174 | * | |
| 1175 | * @return The list passed. | |
| 1176 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1177 | GList *gaim_conv_chat_set_ignored(GaimConvChat *chat, GList *ignored); |
| 4359 | 1178 | |
| 1179 | /** | |
| 1180 | * Returns the list of ignored users in the chat room. | |
| 1181 | * | |
| 1182 | * @param chat The chat. | |
| 1183 | * | |
| 1184 | * @return The list of ignored users. | |
| 1185 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1186 | GList *gaim_conv_chat_get_ignored(const GaimConvChat *chat); |
| 4359 | 1187 | |
| 1188 | /** | |
| 1189 | * Returns the actual name of the specified ignored user, if it exists in | |
| 1190 | * the ignore list. | |
| 1191 | * | |
| 1192 | * If the user found contains a prefix, such as '+' or '\@', this is also | |
| 1193 | * returned. The username passed to the function does not have to have this | |
| 1194 | * formatting. | |
| 1195 | * | |
| 1196 | * @param chat The chat. | |
| 1197 | * @param user The user to check in the ignore list. | |
| 1198 | * | |
| 1199 | * @return The ignored user if found, complete with prefixes, or @c NULL | |
| 1200 | * if not found. | |
| 1201 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1202 | const char *gaim_conv_chat_get_ignored_user(const GaimConvChat *chat, |
|
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1203 | const char *user); |
| 4359 | 1204 | |
| 1205 | /** | |
| 1206 | * Returns @c TRUE if the specified user is ignored. | |
| 1207 | * | |
| 1208 | * @param chat The chat. | |
| 1209 | * @param user The user. | |
| 1210 | * | |
| 1211 | * @return @c TRUE if the user is in the ignore list; @c FALSE otherwise. | |
| 1212 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1213 | gboolean gaim_conv_chat_is_user_ignored(const GaimConvChat *chat, |
|
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1214 | const char *user); |
| 4359 | 1215 | |
| 1216 | /** | |
| 1217 | * Sets the chat room's topic. | |
| 1218 | * | |
| 1219 | * @param chat The chat. | |
| 1220 | * @param who The user that set the topic. | |
| 1221 | * @param topic The topic. | |
| 1222 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1223 | void gaim_conv_chat_set_topic(GaimConvChat *chat, const char *who, |
|
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1224 | const char *topic); |
| 4359 | 1225 | |
| 1226 | /** | |
| 1227 | * Returns the chat room's topic. | |
| 1228 | * | |
| 1229 | * @param chat The chat. | |
| 1230 | * | |
| 1231 | * @return The chat's topic. | |
| 1232 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1233 | const char *gaim_conv_chat_get_topic(const GaimConvChat *chat); |
| 4359 | 1234 | |
| 1235 | /** | |
| 1236 | * Sets the chat room's ID. | |
| 1237 | * | |
| 1238 | * @param chat The chat. | |
| 1239 | * @param id The ID. | |
| 1240 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1241 | void gaim_conv_chat_set_id(GaimConvChat *chat, int id); |
| 4359 | 1242 | |
| 1243 | /** | |
| 1244 | * Returns the chat room's ID. | |
| 1245 | * | |
| 1246 | * @param chat The chat. | |
| 1247 | * | |
| 1248 | * @return The ID. | |
| 1249 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1250 | int gaim_conv_chat_get_id(const GaimConvChat *chat); |
| 4359 | 1251 | |
| 1252 | /** | |
| 1253 | * Writes to a chat. | |
| 1254 | * | |
| 1255 | * @param chat The chat. | |
| 1256 | * @param who The user who sent the message. | |
| 1257 | * @param message The message to write. | |
|
6621
2a18ef3e5224
[gaim-migrate @ 7145]
Robert McQueen <robot101@debian.org>
parents:
6605
diff
changeset
|
1258 | * @param flags The flags. |
| 4359 | 1259 | * @param mtime The time the message was sent. |
| 1260 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1261 | void gaim_conv_chat_write(GaimConvChat *chat, const char *who, |
|
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1262 | const char *message, GaimMessageFlags flags, |
|
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1263 | time_t mtime); |
| 4359 | 1264 | |
| 1265 | /** | |
| 1266 | * Sends a message to this chat conversation. | |
| 1267 | * | |
| 1268 | * @param chat The chat. | |
| 1269 | * @param message The message to send. | |
| 1270 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1271 | void gaim_conv_chat_send(GaimConvChat *chat, const char *message); |
| 4359 | 1272 | |
| 1273 | /** | |
| 1274 | * Adds a user to a chat. | |
| 1275 | * | |
| 9939 | 1276 | * @param chat The chat. |
| 1277 | * @param user The user to add. | |
| 1278 | * @param extra_msg An extra message to display with the join message. | |
| 1279 | * @param flags The users flags | |
| 1280 | * @param new_arrival Decides whether or not to show a join notice. | |
| 4359 | 1281 | */ |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1282 | void gaim_conv_chat_add_user(GaimConvChat *chat, const char *user, |
|
9846
61f7349c153a
[gaim-migrate @ 10724]
Nathan Fredrickson <nathan@silverorange.com>
parents:
9718
diff
changeset
|
1283 | const char *extra_msg, GaimConvChatBuddyFlags flags, |
|
61f7349c153a
[gaim-migrate @ 10724]
Nathan Fredrickson <nathan@silverorange.com>
parents:
9718
diff
changeset
|
1284 | gboolean new_arrival); |
| 4359 | 1285 | |
| 1286 | /** | |
|
6407
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1287 | * Adds a list of users to a chat. |
|
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1288 | * |
|
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1289 | * The data is copied from @a users, so it is up to the developer to |
|
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1290 | * free this list after calling this function. |
|
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1291 | * |
|
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1292 | * @param chat The chat. |
|
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1293 | * @param users The list of users to add. |
|
9554
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1294 | * @param flags The list of flags for each user. |
|
6407
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1295 | */ |
|
9554
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1296 | void gaim_conv_chat_add_users(GaimConvChat *chat, GList *users, GList *flags); |
|
6407
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1297 | |
|
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1298 | /** |
| 4359 | 1299 | * Renames a user in a chat. |
| 1300 | * | |
| 1301 | * @param chat The chat. | |
| 1302 | * @param old_user The old username. | |
| 1303 | * @param new_user The new username. | |
| 1304 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1305 | void gaim_conv_chat_rename_user(GaimConvChat *chat, const char *old_user, |
|
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1306 | const char *new_user); |
| 4359 | 1307 | |
| 1308 | /** | |
| 1309 | * Removes a user from a chat, optionally with a reason. | |
| 1310 | * | |
|
6407
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1311 | * It is up to the developer to free this list after calling this function. |
|
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1312 | * |
| 4359 | 1313 | * @param chat The chat. |
| 1314 | * @param user The user that is being removed. | |
| 1315 | * @param reason The optional reason given for the removal. Can be @c NULL. | |
| 1316 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1317 | void gaim_conv_chat_remove_user(GaimConvChat *chat, const char *user, |
|
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1318 | const char *reason); |
| 4359 | 1319 | |
| 1320 | /** | |
|
6407
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1321 | * Removes a list of users from a chat, optionally with a single reason. |
|
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1322 | * |
|
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1323 | * @param chat The chat. |
|
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1324 | * @param users The users that are being removed. |
|
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1325 | * @param reason The optional reason given for the removal. Can be @c NULL. |
|
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1326 | */ |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1327 | void gaim_conv_chat_remove_users(GaimConvChat *chat, GList *users, |
|
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1328 | const char *reason); |
|
6407
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1329 | |
|
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1330 | /** |
|
9554
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1331 | * Finds a user in a chat |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1332 | * |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1333 | * @param chat The chat. |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1334 | * @param user The user to look for. |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1335 | * |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1336 | * @return TRUE if the user is in the chat, FALSE if not |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1337 | */ |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1338 | gboolean gaim_conv_chat_find_user(GaimConvChat *chat, const char *user); |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1339 | |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1340 | /** |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1341 | * Set a users flags in a chat |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1342 | * |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1343 | * @param chat The chat. |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1344 | * @param user The user to update. |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1345 | * @param flags The new flags. |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1346 | */ |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1347 | void gaim_conv_chat_user_set_flags(GaimConvChat *chat, const char *user, |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1348 | GaimConvChatBuddyFlags flags); |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1349 | |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1350 | /** |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1351 | * Get the flags for a user in a chat |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1352 | * |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1353 | * @param chat The chat. |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1354 | * @param user The user to find the flags for |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1355 | * |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1356 | * @return The flags for the user |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1357 | */ |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1358 | GaimConvChatBuddyFlags gaim_conv_chat_user_get_flags(GaimConvChat *chat, |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1359 | const char *user); |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1360 | |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1361 | /** |
|
6414
f78eb072fcc0
[gaim-migrate @ 6921]
Christian Hammond <chipx86@chipx86.com>
parents:
6407
diff
changeset
|
1362 | * Clears all users from a chat. |
|
f78eb072fcc0
[gaim-migrate @ 6921]
Christian Hammond <chipx86@chipx86.com>
parents:
6407
diff
changeset
|
1363 | * |
|
f78eb072fcc0
[gaim-migrate @ 6921]
Christian Hammond <chipx86@chipx86.com>
parents:
6407
diff
changeset
|
1364 | * @param chat The chat. |
|
f78eb072fcc0
[gaim-migrate @ 6921]
Christian Hammond <chipx86@chipx86.com>
parents:
6407
diff
changeset
|
1365 | */ |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1366 | void gaim_conv_chat_clear_users(GaimConvChat *chat); |
|
6414
f78eb072fcc0
[gaim-migrate @ 6921]
Christian Hammond <chipx86@chipx86.com>
parents:
6407
diff
changeset
|
1367 | |
|
f78eb072fcc0
[gaim-migrate @ 6921]
Christian Hammond <chipx86@chipx86.com>
parents:
6407
diff
changeset
|
1368 | /** |
| 8158 | 1369 | * Sets your nickname (used for hilighting) for a chat. |
| 1370 | * | |
| 1371 | * @param chat The chat. | |
| 1372 | * @param nick The nick. | |
| 1373 | */ | |
| 1374 | void gaim_conv_chat_set_nick(GaimConvChat *chat, const char *nick); | |
| 1375 | ||
| 1376 | /** | |
| 1377 | * Gets your nickname (used for hilighting) for a chat. | |
| 1378 | * | |
| 1379 | * @param chat The chat. | |
| 1380 | * @return The nick. | |
| 1381 | */ | |
| 1382 | const char *gaim_conv_chat_get_nick(GaimConvChat *chat); | |
| 1383 | ||
| 1384 | /** | |
| 4359 | 1385 | * Finds a chat with the specified chat ID. |
| 1386 | * | |
| 1387 | * @param gc The gaim_connection. | |
| 1388 | * @param id The chat ID. | |
| 1389 | * | |
| 1390 | * @return The chat conversation. | |
| 1391 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
1392 | GaimConversation *gaim_find_chat(const GaimConnection *gc, int id); |
| 4359 | 1393 | |
| 8256 | 1394 | /** |
| 1395 | * Lets the core know we left a chat, without destroying it. | |
| 1396 | * Called from serv_got_chat_left(). | |
| 1397 | * | |
| 1398 | * @param chat The chat. | |
| 1399 | */ | |
| 1400 | void gaim_conv_chat_left(GaimConvChat *chat); | |
| 1401 | ||
| 1402 | /** | |
| 1403 | * Returns true if we're no longer in this chat, | |
| 1404 | * and just left the window open. | |
| 1405 | * | |
| 1406 | * @param chat The chat. | |
| 1407 | * | |
| 1408 | * @return @c TRUE if we left the chat already, @c FALSE if | |
| 1409 | * we're still there. | |
| 1410 | */ | |
| 1411 | gboolean gaim_conv_chat_has_left(GaimConvChat *chat); | |
| 1412 | ||
|
9554
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1413 | /** |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1414 | * Creates a new chat buddy |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1415 | * |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1416 | * @param name The name. |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1417 | * @param flags The flags. |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1418 | * |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1419 | * @return The new chat buddy |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1420 | */ |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1421 | GaimConvChatBuddy *gaim_conv_chat_cb_new(const char *name, |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1422 | GaimConvChatBuddyFlags flags); |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1423 | |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1424 | /** |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1425 | * Find a chat buddy in a chat |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1426 | * |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1427 | * @param chat The chat. |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1428 | * @param name The name of the chat buddy to find. |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1429 | */ |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1430 | GaimConvChatBuddy *gaim_conv_chat_cb_find(GaimConvChat *chat, const char *name); |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1431 | |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1432 | /** |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1433 | * Get the name of a chat buddy |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1434 | * |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1435 | * @param cb The chat buddy. |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1436 | * |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1437 | * @return The name of the chat buddy. |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1438 | */ |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1439 | const char *gaim_conv_chat_cb_get_name(GaimConvChatBuddy *cb); |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1440 | |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1441 | /** |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1442 | * Destroys a chat buddy |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1443 | * |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1444 | * @param cb The chat buddy to destroy |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1445 | */ |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1446 | void gaim_conv_chat_cb_destroy(GaimConvChatBuddy *cb); |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1447 | |
| 4359 | 1448 | /*@}*/ |
| 1449 | ||
|
4469
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1450 | /**************************************************************************/ |
|
7122
5f40c16a4ae4
[gaim-migrate @ 7689]
Christian Hammond <chipx86@chipx86.com>
parents:
7118
diff
changeset
|
1451 | /** @name Conversation Placement API */ |
|
4469
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1452 | /**************************************************************************/ |
|
4481
1a02f276e41e
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1453 | /*@{*/ |
|
4469
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1454 | |
|
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1455 | /** |
| 5858 | 1456 | * Returns a GList containing the IDs and Names of the registered placement |
| 1457 | * functions. | |
| 1458 | * | |
| 1459 | * @return The list of IDs and names. | |
| 1460 | */ | |
| 1461 | GList *gaim_conv_placement_get_options(void); | |
| 1462 | ||
| 1463 | /** | |
|
4469
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1464 | * Adds a conversation placement function to the list of possible functions. |
|
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1465 | * |
|
6720
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6622
diff
changeset
|
1466 | * @param id The unique ID of the placement function. |
|
4469
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1467 | * @param name The name of the function. |
|
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1468 | * @param fnc A pointer to the function. |
|
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1469 | */ |
|
6311
1e253e4b423f
[gaim-migrate @ 6810]
Christian Hammond <chipx86@chipx86.com>
parents:
6063
diff
changeset
|
1470 | void gaim_conv_placement_add_fnc(const char *id, const char *name, |
|
1e253e4b423f
[gaim-migrate @ 6810]
Christian Hammond <chipx86@chipx86.com>
parents:
6063
diff
changeset
|
1471 | GaimConvPlacementFunc fnc); |
|
4469
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1472 | |
|
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1473 | /** |
|
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1474 | * Removes a conversation placement function from the list of possible |
|
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1475 | * functions. |
|
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1476 | * |
| 5858 | 1477 | * @param id The id of the function. |
|
4469
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1478 | */ |
| 5858 | 1479 | void gaim_conv_placement_remove_fnc(const char *id); |
|
4469
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1480 | |
|
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1481 | /** |
|
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1482 | * Returns the name of the conversation placement function at the |
| 5858 | 1483 | * specified id. |
|
4469
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1484 | * |
| 5858 | 1485 | * @param id The id. |
|
4469
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1486 | * |
| 5858 | 1487 | * @return The name of the function, or @c NULL if this id is invalid. |
|
4469
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1488 | */ |
| 5858 | 1489 | const char *gaim_conv_placement_get_name(const char *id); |
|
4469
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1490 | |
|
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1491 | /** |
|
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1492 | * Returns a pointer to the conversation placement function at the |
| 5858 | 1493 | * specified id. |
|
4469
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1494 | * |
| 5858 | 1495 | * @param id The id. |
|
4469
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1496 | * |
|
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1497 | * @return A pointer to the function. |
|
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1498 | */ |
| 5858 | 1499 | GaimConvPlacementFunc gaim_conv_placement_get_fnc(const char *id); |
|
4469
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1500 | |
|
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1501 | /** |
|
7561
fd6a81f1594e
[gaim-migrate @ 8175]
Christian Hammond <chipx86@chipx86.com>
parents:
7431
diff
changeset
|
1502 | * Sets the current conversation placement function. |
|
fd6a81f1594e
[gaim-migrate @ 8175]
Christian Hammond <chipx86@chipx86.com>
parents:
7431
diff
changeset
|
1503 | * |
|
fd6a81f1594e
[gaim-migrate @ 8175]
Christian Hammond <chipx86@chipx86.com>
parents:
7431
diff
changeset
|
1504 | * @param func The new conversation placement function. |
|
fd6a81f1594e
[gaim-migrate @ 8175]
Christian Hammond <chipx86@chipx86.com>
parents:
7431
diff
changeset
|
1505 | */ |
|
fd6a81f1594e
[gaim-migrate @ 8175]
Christian Hammond <chipx86@chipx86.com>
parents:
7431
diff
changeset
|
1506 | void gaim_conv_placement_set_current_func(GaimConvPlacementFunc func); |
|
fd6a81f1594e
[gaim-migrate @ 8175]
Christian Hammond <chipx86@chipx86.com>
parents:
7431
diff
changeset
|
1507 | |
|
fd6a81f1594e
[gaim-migrate @ 8175]
Christian Hammond <chipx86@chipx86.com>
parents:
7431
diff
changeset
|
1508 | /** |
|
fd6a81f1594e
[gaim-migrate @ 8175]
Christian Hammond <chipx86@chipx86.com>
parents:
7431
diff
changeset
|
1509 | * Returns the current conversation placement function. |
|
fd6a81f1594e
[gaim-migrate @ 8175]
Christian Hammond <chipx86@chipx86.com>
parents:
7431
diff
changeset
|
1510 | * |
|
fd6a81f1594e
[gaim-migrate @ 8175]
Christian Hammond <chipx86@chipx86.com>
parents:
7431
diff
changeset
|
1511 | * @return The current conversation placement function. |
|
fd6a81f1594e
[gaim-migrate @ 8175]
Christian Hammond <chipx86@chipx86.com>
parents:
7431
diff
changeset
|
1512 | */ |
|
fd6a81f1594e
[gaim-migrate @ 8175]
Christian Hammond <chipx86@chipx86.com>
parents:
7431
diff
changeset
|
1513 | GaimConvPlacementFunc gaim_conv_placement_get_current_func(void); |
|
fd6a81f1594e
[gaim-migrate @ 8175]
Christian Hammond <chipx86@chipx86.com>
parents:
7431
diff
changeset
|
1514 | |
|
fd6a81f1594e
[gaim-migrate @ 8175]
Christian Hammond <chipx86@chipx86.com>
parents:
7431
diff
changeset
|
1515 | /** |
| 5858 | 1516 | * Returns the id of the specified conversation placement function. |
|
4469
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1517 | * |
|
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1518 | * @param fnc A pointer to the registered function. |
|
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1519 | * |
| 5858 | 1520 | * @return The id of the conversation, or NULL if the function is not |
|
4469
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1521 | * registered. |
|
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1522 | */ |
| 5858 | 1523 | const char *gaim_conv_placement_get_fnc_id(GaimConvPlacementFunc fnc); |
|
4469
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1524 | |
|
4481
1a02f276e41e
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1525 | /*@}*/ |
|
1a02f276e41e
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1526 | |
|
1a02f276e41e
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1527 | /**************************************************************************/ |
|
1a02f276e41e
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1528 | /** @name UI Registration Functions */ |
|
1a02f276e41e
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1529 | /**************************************************************************/ |
|
1a02f276e41e
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1530 | /*@{*/ |
|
1a02f276e41e
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1531 | |
|
1a02f276e41e
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1532 | /** |
|
1a02f276e41e
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1533 | * Sets the UI operations structure to be used in all gaim conversation |
|
1a02f276e41e
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1534 | * windows. |
|
1a02f276e41e
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1535 | * |
|
5207
4d3a908867a2
[gaim-migrate @ 5575]
Christian Hammond <chipx86@chipx86.com>
parents:
5034
diff
changeset
|
1536 | * @param ops The UI operations structure. |
|
4481
1a02f276e41e
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1537 | */ |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1538 | void gaim_conversations_set_win_ui_ops(GaimConvWindowUiOps *ops); |
|
4481
1a02f276e41e
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1539 | |
|
1a02f276e41e
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1540 | /** |
|
1a02f276e41e
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1541 | * Returns the gaim window UI operations structure to be used in |
|
1a02f276e41e
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1542 | * new windows. |
|
1a02f276e41e
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1543 | * |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1544 | * @return A filled-out GaimConvWindowUiOps structure. |
|
4481
1a02f276e41e
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1545 | */ |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1546 | GaimConvWindowUiOps *gaim_conversations_get_win_ui_ops(void); |
|
4481
1a02f276e41e
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1547 | |
| 10665 | 1548 | |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1549 | /*@}*/ |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1550 | |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1551 | /**************************************************************************/ |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1552 | /** @name Conversations Subsystem */ |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1553 | /**************************************************************************/ |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1554 | /*@{*/ |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1555 | |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1556 | /** |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1557 | * Returns the conversation subsystem handle. |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1558 | * |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1559 | * @return The conversation subsystem handle. |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1560 | */ |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1561 | void *gaim_conversations_get_handle(void); |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1562 | |
|
5872
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
1563 | /** |
|
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
1564 | * Initializes the conversation subsystem. |
|
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
1565 | */ |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1566 | void gaim_conversations_init(void); |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1567 | |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1568 | /** |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1569 | * Uninitializes the conversation subsystem. |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1570 | */ |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1571 | void gaim_conversations_uninit(void); |
|
5872
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
1572 | |
|
4481
1a02f276e41e
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1573 | /*@}*/ |
|
1a02f276e41e
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1574 | |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
1575 | #ifdef __cplusplus |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
1576 | } |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
1577 | #endif |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
1578 | |
|
4890
d87a9b5bbe57
[gaim-migrate @ 5220]
Christian Hammond <chipx86@chipx86.com>
parents:
4877
diff
changeset
|
1579 | #endif /* _GAIM_CONVERSATION_H_ */ |