Mon, 18 Aug 2003 01:03:43 +0000
[gaim-migrate @ 6999]
Removed the old event system and replaced it with a much better signal
system. There will most likely be some bugs in this, but it seems to be
working for now. Plugins can now generate their own signals, and other
plugins can find those plugins and connect to them. This could give
plugins a form of IPC. It's also useful for other things. It's rather
flexible, except for the damn marshalling, but there's no way around that
that I or the glib people can see.
| 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 | * | |
| 7 | * Copyright (C) 2002-2003, Christian Hammond <chipx86@gnupdate.org> | |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
8 | * |
| 4359 | 9 | * This program is free software; you can redistribute it and/or modify |
| 10 | * it under the terms of the GNU General Public License as published by | |
| 11 | * the Free Software Foundation; either version 2 of the License, or | |
| 12 | * (at your option) any later version. | |
| 13 | * | |
| 14 | * This program is distributed in the hope that it will be useful, | |
| 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 17 | * GNU General Public License for more details. | |
| 18 | * | |
| 19 | * You should have received a copy of the GNU General Public License | |
| 20 | * along with this program; if not, write to the Free Software | |
| 21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
| 22 | */ | |
|
4890
d87a9b5bbe57
[gaim-migrate @ 5220]
Christian Hammond <chipx86@chipx86.com>
parents:
4877
diff
changeset
|
23 | #ifndef _GAIM_CONVERSATION_H_ |
|
d87a9b5bbe57
[gaim-migrate @ 5220]
Christian Hammond <chipx86@chipx86.com>
parents:
4877
diff
changeset
|
24 | #define _GAIM_CONVERSATION_H_ |
| 4359 | 25 | |
| 26 | /**************************************************************************/ | |
| 27 | /** Data Structures */ | |
| 28 | /**************************************************************************/ | |
| 29 | ||
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
30 | typedef struct _GaimWindowUiOps GaimWindowUiOps; |
|
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
31 | typedef struct _GaimWindow GaimWindow; |
|
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
32 | typedef struct _GaimConversationUiOps GaimConversationUiOps; |
|
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
33 | typedef struct _GaimConversation GaimConversation; |
|
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
34 | typedef struct _GaimIm GaimIm; |
|
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
35 | typedef struct _GaimChat GaimChat; |
| 4359 | 36 | |
| 37 | /** | |
| 38 | * A type of conversation. | |
| 39 | */ | |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
40 | typedef enum |
| 4359 | 41 | { |
| 42 | GAIM_CONV_UNKNOWN = 0, /**< Unknown conversation type. */ | |
| 43 | GAIM_CONV_IM, /**< Instant Message. */ | |
|
4378
3bef342997ef
[gaim-migrate @ 4644]
Christian Hammond <chipx86@chipx86.com>
parents:
4359
diff
changeset
|
44 | GAIM_CONV_CHAT, /**< Chat room. */ |
|
3bef342997ef
[gaim-migrate @ 4644]
Christian Hammond <chipx86@chipx86.com>
parents:
4359
diff
changeset
|
45 | GAIM_CONV_MISC /**< A misc. conversation. */ |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
46 | |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
47 | } GaimConversationType; |
| 4359 | 48 | |
| 49 | /** | |
| 50 | * Unseen text states. | |
| 51 | */ | |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
52 | typedef enum |
| 4359 | 53 | { |
| 54 | GAIM_UNSEEN_NONE = 0, /**< No unseen text in the conversation. */ | |
| 55 | GAIM_UNSEEN_TEXT, /**< Unseen text in the conversation. */ | |
|
6405
30166fa1b9a2
[gaim-migrate @ 6910]
Christian Hammond <chipx86@chipx86.com>
parents:
6311
diff
changeset
|
56 | GAIM_UNSEEN_NICK, /**< Unseen text and the nick was said. */ |
|
30166fa1b9a2
[gaim-migrate @ 6910]
Christian Hammond <chipx86@chipx86.com>
parents:
6311
diff
changeset
|
57 | GAIM_UNSEEN_EVENT /**< Unseen events in the conversation. */ |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
58 | |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
59 | } GaimUnseenState; |
| 4359 | 60 | |
| 61 | /** | |
| 62 | * Conversation update type. | |
| 63 | */ | |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
64 | typedef enum |
| 4359 | 65 | { |
| 66 | GAIM_CONV_UPDATE_ADD = 0, /**< The buddy associated with the conversation | |
| 67 | was added. */ | |
| 68 | GAIM_CONV_UPDATE_REMOVE, /**< The buddy associated with the conversation | |
| 69 | was removed. */ | |
| 4491 | 70 | GAIM_CONV_UPDATE_ACCOUNT, /**< The gaim_account was changed. */ |
| 4359 | 71 | GAIM_CONV_UPDATE_TYPING, /**< The typing state was updated. */ |
| 72 | GAIM_CONV_UPDATE_UNSEEN, /**< The unseen state was updated. */ | |
| 73 | GAIM_CONV_UPDATE_LOGGING, /**< Logging for this conversation was | |
| 74 | enabled or disabled. */ | |
| 75 | GAIM_CONV_UPDATE_TOPIC, /**< The topic for a chat was updated. */ | |
| 76 | ||
| 77 | /* | |
| 78 | * XXX These need to go when we implement a more generic core/UI event | |
| 79 | * system. | |
| 80 | */ | |
|
4378
3bef342997ef
[gaim-migrate @ 4644]
Christian Hammond <chipx86@chipx86.com>
parents:
4359
diff
changeset
|
81 | 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
|
82 | GAIM_CONV_ACCOUNT_OFFLINE, /**< One of the user's accounts went offline. */ |
|
3bef342997ef
[gaim-migrate @ 4644]
Christian Hammond <chipx86@chipx86.com>
parents:
4359
diff
changeset
|
83 | GAIM_CONV_UPDATE_AWAY /**< The other user went away. */ |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
84 | |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
85 | } GaimConvUpdateType; |
| 4359 | 86 | |
| 87 | /** | |
|
5872
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
88 | * The typing state of a user. |
|
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
89 | */ |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
90 | typedef enum |
|
5872
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
91 | { |
|
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
92 | GAIM_NOT_TYPING = 0, /**< Not typing. */ |
|
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
93 | GAIM_TYPING, /**< Currently typing. */ |
|
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
94 | GAIM_TYPED /**< Stopped typing momentarily. */ |
|
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
95 | |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
96 | } GaimTypingState; |
|
5872
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
97 | |
|
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
98 | #include "account.h" |
|
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
99 | #include "server.h" |
|
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
100 | |
|
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
101 | /** |
| 4359 | 102 | * Conversation window operations. |
| 103 | * | |
| 104 | * Any UI representing a window must assign a filled-out gaim_window_ops | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
105 | * structure to the GaimWindow. |
| 4359 | 106 | */ |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
107 | struct _GaimWindowUiOps |
| 4359 | 108 | { |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
109 | GaimConversationUiOps *(*get_conversation_ui_ops)(void); |
| 4359 | 110 | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
111 | void (*new_window)(GaimWindow *win); |
|
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
112 | void (*destroy_window)(GaimWindow *win); |
| 4359 | 113 | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
114 | void (*show)(GaimWindow *win); |
|
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
115 | void (*hide)(GaimWindow *win); |
|
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
116 | void (*raise)(GaimWindow *win); |
|
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
117 | void (*flash)(GaimWindow *win); |
| 4359 | 118 | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
119 | void (*switch_conversation)(GaimWindow *win, unsigned int index); |
|
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
120 | void (*add_conversation)(GaimWindow *win, GaimConversation *conv); |
|
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
121 | void (*remove_conversation)(GaimWindow *win, GaimConversation *conv); |
|
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
122 | void (*move_conversation)(GaimWindow *win, GaimConversation *conv, |
| 4359 | 123 | unsigned int newIndex); |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
124 | int (*get_active_index)(const GaimWindow *win); |
| 4359 | 125 | }; |
| 126 | ||
| 127 | /** | |
| 128 | * Conversation operations and events. | |
| 129 | * | |
| 130 | * Any UI representing a conversation must assign a filled-out | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
131 | * GaimConversationUiOps structure to the GaimConversation. |
| 4359 | 132 | */ |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
133 | struct _GaimConversationUiOps |
| 4359 | 134 | { |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
135 | void (*destroy_conversation)(GaimConversation *conv); |
|
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
136 | void (*write_chat)(GaimConversation *conv, const char *who, |
| 4359 | 137 | const char *message, int flags, time_t mtime); |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
138 | void (*write_im)(GaimConversation *conv, const char *who, |
| 4359 | 139 | const char *message, size_t len, int flags, time_t mtime); |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
140 | void (*write_conv)(GaimConversation *conv, const char *who, |
| 4359 | 141 | const char *message, size_t length, int flags, |
| 142 | time_t mtime); | |
| 143 | ||
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
144 | void (*chat_add_user)(GaimConversation *conv, const char *user); |
|
6407
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
145 | void (*chat_add_users)(GaimConversation *conv, GList *users); |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
146 | void (*chat_rename_user)(GaimConversation *conv, |
| 4359 | 147 | const char *old_name, const char *new_name); |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
148 | void (*chat_remove_user)(GaimConversation *conv, const char *user); |
|
6407
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
149 | void (*chat_remove_users)(GaimConversation *conv, GList *users); |
| 4359 | 150 | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
151 | void (*set_title)(GaimConversation *conv, const char *title); |
|
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
152 | void (*update_progress)(GaimConversation *conv, float percent); |
| 4359 | 153 | |
| 154 | /* Events */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
155 | void (*updated)(GaimConversation *conv, GaimConvUpdateType type); |
| 4359 | 156 | }; |
| 157 | ||
| 158 | /** | |
| 159 | * A core representation of a graphical window containing one or more | |
| 160 | * conversations. | |
| 161 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
162 | struct _GaimWindow |
| 4359 | 163 | { |
|
4465
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
164 | GList *conversations; /**< The conversations in the window. */ |
|
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
165 | size_t conversation_count; /**< The number of conversations. */ |
| 4359 | 166 | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
167 | GaimWindowUiOps *ui_ops; /**< UI-specific window operations. */ |
|
4465
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
168 | void *ui_data; /**< UI-specific data. */ |
| 4359 | 169 | }; |
| 170 | ||
| 171 | /** | |
| 172 | * Data specific to Instant Messages. | |
| 173 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
174 | struct _GaimIm |
| 4359 | 175 | { |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
176 | GaimConversation *conv; /**< The parent conversation. */ |
| 4359 | 177 | |
|
5872
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
178 | GaimTypingState typing_state; /**< The current typing state. */ |
|
4465
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
179 | guint typing_timeout; /**< The typing timer handle. */ |
|
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
180 | time_t type_again; /**< The type again time. */ |
|
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
181 | guint type_again_timeout; /**< The type again timer handle. */ |
| 4359 | 182 | |
|
4465
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
183 | GSList *images; /**< A list of images in the IM. */ |
| 4359 | 184 | }; |
| 185 | ||
| 186 | /** | |
| 187 | * Data specific to Chats. | |
| 188 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
189 | struct _GaimChat |
| 4359 | 190 | { |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
191 | GaimConversation *conv; /**< The parent conversation. */ |
| 4359 | 192 | |
|
4465
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
193 | GList *in_room; /**< The users in the room. */ |
|
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
194 | GList *ignored; /**< Ignored users. */ |
|
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
195 | char *who; /**< The person who set the topic. */ |
|
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
196 | char *topic; /**< The topic. */ |
|
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
197 | int id; /**< The chat ID. */ |
| 4359 | 198 | }; |
| 199 | ||
| 200 | /** | |
| 201 | * A core representation of a conversation between two or more people. | |
| 202 | * | |
| 203 | * The conversation can be an IM or a chat. Each conversation is kept | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
204 | * in a GaimWindow and has a UI representation. |
| 4359 | 205 | */ |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
206 | struct _GaimConversation |
| 4359 | 207 | { |
| 208 | GaimConversationType type; /**< The type of conversation. */ | |
| 209 | ||
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
210 | GaimAccount *account; /**< The user using this conversation. */ |
|
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
211 | GaimWindow *window; /**< The parent window. */ |
| 4359 | 212 | |
| 213 | int conversation_pos; /**< The position in the window's list. */ | |
| 214 | ||
| 215 | char *name; /**< The name of the conversation. */ | |
| 216 | char *title; /**< The window title. */ | |
| 217 | ||
| 218 | gboolean logging; /**< The status of logging. */ | |
| 219 | ||
| 220 | GList *send_history; /**< The send history. */ | |
| 221 | GString *history; /**< The conversation history. */ | |
| 222 | ||
| 223 | GaimUnseenState unseen; /**< The unseen tab state. */ | |
| 224 | ||
| 225 | union | |
| 226 | { | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
227 | GaimIm *im; /**< IM-specific data. */ |
|
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
228 | GaimChat *chat; /**< Chat-specific data. */ |
|
4378
3bef342997ef
[gaim-migrate @ 4644]
Christian Hammond <chipx86@chipx86.com>
parents:
4359
diff
changeset
|
229 | void *misc; /**< Misc. data. */ |
| 4359 | 230 | |
| 231 | } u; | |
|
4465
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
232 | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
233 | GaimConversationUiOps *ui_ops; /**< UI-specific operations. */ |
|
4465
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
234 | void *ui_data; /**< UI-specific data. */ |
|
4876
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
235 | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
236 | GHashTable *data; /**< Plugin-specific data. */ |
| 4359 | 237 | }; |
| 238 | ||
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
239 | typedef void (*GaimConvPlacementFunc)(GaimConversation *); |
| 4359 | 240 | |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
241 | #ifdef __cplusplus |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
242 | extern "C" { |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
243 | #endif |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
244 | |
| 4359 | 245 | /**************************************************************************/ |
| 246 | /** @name Conversation Window API */ | |
| 247 | /**************************************************************************/ | |
| 248 | /*@{*/ | |
| 249 | ||
| 250 | /** | |
| 251 | * Creates a new conversation window. | |
| 252 | * | |
| 253 | * This window is added to the list of windows, but is not shown until | |
| 254 | * gaim_window_show() is called. | |
| 255 | * | |
| 256 | * @return The new conversation window. | |
| 257 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
258 | GaimWindow *gaim_window_new(void); |
| 4359 | 259 | |
| 260 | /** | |
| 261 | * Destroys the specified conversation window and all conversations in it. | |
| 262 | * | |
| 263 | * @param win The window to destroy. | |
| 264 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
265 | void gaim_window_destroy(GaimWindow *win); |
| 4359 | 266 | |
| 267 | /** | |
| 268 | * Shows the specified conversation window. | |
| 269 | * | |
| 270 | * @param win The window. | |
| 271 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
272 | void gaim_window_show(GaimWindow *win); |
| 4359 | 273 | |
| 274 | /** | |
| 275 | * Hides the specified conversation window. | |
| 276 | * | |
| 277 | * @param win The window. | |
| 278 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
279 | void gaim_window_hide(GaimWindow *win); |
| 4359 | 280 | |
| 281 | /** | |
| 282 | * Raises the specified conversation window. | |
| 283 | * | |
| 284 | * @param win The window. | |
| 285 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
286 | void gaim_window_raise(GaimWindow *win); |
| 4359 | 287 | |
| 288 | /** | |
| 289 | * Causes the window to flash for IM notification, if the UI supports this. | |
| 290 | * | |
| 291 | * @param win The window. | |
| 292 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
293 | void gaim_window_flash(GaimWindow *win); |
| 4359 | 294 | |
| 295 | /** | |
| 296 | * Sets the specified window's UI window operations structure. | |
| 297 | * | |
| 298 | * @param win The window. | |
| 299 | * @param ops The UI window operations structure. | |
| 300 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
301 | void gaim_window_set_ui_ops(GaimWindow *win, GaimWindowUiOps *ops); |
| 4359 | 302 | |
| 303 | /** | |
| 304 | * Returns the specified window's UI window operations structure. | |
| 305 | * | |
| 306 | * @param win The window. | |
| 307 | * | |
| 308 | * @return The UI window operations structure. | |
| 309 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
310 | GaimWindowUiOps *gaim_window_get_ui_ops(const GaimWindow *win); |
| 4359 | 311 | |
| 312 | /** | |
| 313 | * Adds a conversation to this window. | |
| 314 | * | |
| 315 | * If the conversation already has a parent window, this will do nothing. | |
| 316 | * | |
| 317 | * @param win The window. | |
| 318 | * @param conv The conversation. | |
| 319 | * | |
| 320 | * @return The new index of the conversation in the window. | |
| 321 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
322 | int gaim_window_add_conversation(GaimWindow *win, GaimConversation *conv); |
| 4359 | 323 | |
| 324 | /** | |
| 325 | * Removes the conversation at the specified index from the window. | |
| 326 | * | |
| 327 | * If there is no conversation at this index, this will do nothing. | |
| 328 | * | |
| 329 | * @param win The window. | |
| 330 | * @param index The index of the conversation. | |
| 331 | * | |
| 332 | * @return The conversation removed. | |
| 333 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
334 | GaimConversation *gaim_window_remove_conversation(GaimWindow *win, |
|
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
335 | unsigned int index); |
| 4359 | 336 | |
| 337 | /** | |
| 338 | * Moves the conversation at the specified index in a window to a new index. | |
| 339 | * | |
| 340 | * @param win The window. | |
| 341 | * @param index The index of the conversation to move. | |
| 342 | * @param new_index The new index. | |
| 343 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
344 | void gaim_window_move_conversation(GaimWindow *win, unsigned int index, |
|
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
345 | unsigned int new_index); |
| 4359 | 346 | |
| 347 | /** | |
| 348 | * Returns the conversation in the window at the specified index. | |
| 349 | * | |
| 350 | * If the index is out of range, this returns @c NULL. | |
| 351 | * | |
| 352 | * @param win The window. | |
| 353 | * @param index The index containing a conversation. | |
| 354 | * | |
| 355 | * @return The conversation at the specified index. | |
| 356 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
357 | GaimConversation *gaim_window_get_conversation_at(const GaimWindow *win, |
|
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
358 | unsigned int index); |
| 4359 | 359 | |
| 360 | /** | |
| 361 | * Returns the number of conversations in the window. | |
| 362 | * | |
| 363 | * @param win The window. | |
| 364 | * | |
| 365 | * @return The number of conversations. | |
| 366 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
367 | size_t gaim_window_get_conversation_count(const GaimWindow *win); |
| 4359 | 368 | |
| 369 | /** | |
| 370 | * Switches the active conversation to the one at the specified index. | |
| 371 | * | |
| 372 | * If @a index is out of range, this does nothing. | |
| 373 | * | |
| 374 | * @param win The window. | |
| 375 | * @param index The new index. | |
| 376 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
377 | void gaim_window_switch_conversation(GaimWindow *win, unsigned int index); |
| 4359 | 378 | |
| 379 | /** | |
| 380 | * Returns the active conversation in the window. | |
| 381 | * | |
| 382 | * @param win The window. | |
| 383 | * | |
| 384 | * @return The active conversation. | |
| 385 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
386 | GaimConversation *gaim_window_get_active_conversation(const GaimWindow *win); |
| 4359 | 387 | |
| 388 | /** | |
| 389 | * Returns the list of conversations in the specified window. | |
| 390 | * | |
| 391 | * @param win The window. | |
| 392 | * | |
| 393 | * @return The list of conversations. | |
| 394 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
395 | GList *gaim_window_get_conversations(const GaimWindow *win); |
| 4359 | 396 | |
| 397 | /** | |
| 398 | * Returns a list of all windows. | |
| 399 | * | |
| 400 | * @return A list of windows. | |
| 401 | */ | |
| 402 | GList *gaim_get_windows(void); | |
| 403 | ||
|
4469
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
404 | /** |
|
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
405 | * Returns the first window containing a conversation of the specified type. |
|
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
406 | * |
|
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
407 | * @param type The conversation type. |
|
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
408 | * |
|
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
409 | * @return The window if found, or @c NULL if not found. |
|
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
410 | */ |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
411 | GaimWindow *gaim_get_first_window_with_type(GaimConversationType type); |
|
4469
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
412 | |
|
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
413 | /** |
|
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
414 | * Returns the last window containing a conversation of the specified type. |
|
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
415 | * |
|
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
416 | * @param type The conversation type. |
|
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
417 | * |
|
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
418 | * @return The window if found, or @c NULL if not found. |
|
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
419 | */ |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
420 | GaimWindow *gaim_get_last_window_with_type(GaimConversationType type); |
|
4469
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
421 | |
| 4359 | 422 | /*@}*/ |
| 423 | ||
| 424 | /**************************************************************************/ | |
| 425 | /** @name Conversation API */ | |
| 426 | /**************************************************************************/ | |
| 427 | /*@{*/ | |
| 428 | ||
| 429 | /** | |
| 430 | * Creates a new conversation of the specified type. | |
| 431 | * | |
| 432 | * @param type The type of conversation. | |
|
4476
bf88170ba269
[gaim-migrate @ 4751]
Christian Hammond <chipx86@chipx86.com>
parents:
4469
diff
changeset
|
433 | * @param user The account opening the conversation window on the gaim |
|
bf88170ba269
[gaim-migrate @ 4751]
Christian Hammond <chipx86@chipx86.com>
parents:
4469
diff
changeset
|
434 | * user's end. |
| 4359 | 435 | * @param name The name of the conversation. |
| 436 | * | |
| 437 | * @return The new conversation. | |
| 438 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
439 | GaimConversation *gaim_conversation_new(GaimConversationType type, |
|
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
440 | GaimAccount *account, |
|
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
441 | const char *name); |
| 4359 | 442 | |
| 443 | /** | |
| 444 | * Destroys the specified conversation and removes it from the parent | |
| 445 | * window. | |
| 446 | * | |
| 447 | * If this conversation is the only one contained in the parent window, | |
| 448 | * that window is also destroyed. | |
| 449 | * | |
| 450 | * @param conv The conversation to destroy. | |
| 451 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
452 | void gaim_conversation_destroy(GaimConversation *conv); |
| 4359 | 453 | |
| 454 | /** | |
| 455 | * Returns the specified conversation's type. | |
| 456 | * | |
| 457 | * @param conv The conversation. | |
| 458 | * | |
| 459 | * @return The conversation's type. | |
| 460 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
461 | GaimConversationType gaim_conversation_get_type(const GaimConversation *conv); |
| 4359 | 462 | |
| 463 | /** | |
| 464 | * Sets the specified conversation's UI operations structure. | |
| 465 | * | |
| 466 | * @param conv The conversation. | |
| 467 | * @param ops The UI conversation operations structure. | |
| 468 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
469 | void gaim_conversation_set_ui_ops(GaimConversation *conv, |
|
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
470 | GaimConversationUiOps *ops); |
| 4359 | 471 | |
| 472 | /** | |
| 473 | * Returns the specified conversation's UI operations structure. | |
| 474 | * | |
| 475 | * @param conv The conversation. | |
| 476 | * | |
| 477 | * @return The operations structure. | |
| 478 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
479 | GaimConversationUiOps *gaim_conversation_get_ui_ops( |
|
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
480 | const GaimConversation *conv); |
| 4359 | 481 | |
| 482 | /** | |
| 4491 | 483 | * Sets the specified conversation's gaim_account. |
| 4359 | 484 | * |
| 4491 | 485 | * This gaim_account represents the user using gaim, not the person the user |
| 4359 | 486 | * is having a conversation/chat/flame with. |
| 487 | * | |
| 488 | * @param conv The conversation. | |
| 4491 | 489 | * @param account The gaim_account. |
| 4359 | 490 | */ |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
491 | void gaim_conversation_set_account(GaimConversation *conv, |
|
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
492 | GaimAccount *account); |
| 4359 | 493 | |
| 494 | /** | |
| 4491 | 495 | * Returns the specified conversation's gaim_account. |
| 4359 | 496 | * |
| 4491 | 497 | * This gaim_account represents the user using gaim, not the person the user |
| 4359 | 498 | * is having a conversation/chat/flame with. |
| 499 | * | |
| 500 | * @param conv The conversation. | |
| 501 | * | |
| 4491 | 502 | * @return The conversation's gaim_account. |
| 4359 | 503 | */ |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
504 | GaimAccount *gaim_conversation_get_account(const GaimConversation *conv); |
| 4359 | 505 | |
| 506 | /** | |
| 507 | * Returns the specified conversation's gaim_connection. | |
| 508 | * | |
| 509 | * This is the same as gaim_conversation_get_user(conv)->gc. | |
| 510 | * | |
| 511 | * @param conv The conversation. | |
| 512 | * | |
| 513 | * @return The conversation's gaim_connection. | |
| 514 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
515 | GaimConnection *gaim_conversation_get_gc(const GaimConversation *conv); |
| 4359 | 516 | |
| 517 | /** | |
| 518 | * Sets the specified conversation's title. | |
| 519 | * | |
| 520 | * @param conv The conversation. | |
| 521 | * @param title The title. | |
| 522 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
523 | void gaim_conversation_set_title(GaimConversation *conv, const char *title); |
| 4359 | 524 | |
| 525 | /** | |
| 526 | * Returns the specified conversation's title. | |
| 527 | * | |
| 528 | * @param win The conversation. | |
| 529 | * | |
| 530 | * @return The title. | |
| 531 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
532 | const char *gaim_conversation_get_title(const GaimConversation *conv); |
| 4359 | 533 | |
| 534 | /** | |
| 535 | * Automatically sets the specified conversation's title. | |
| 536 | * | |
| 537 | * This function takes OPT_IM_ALIAS_TAB into account, as well as the | |
| 538 | * user's alias. | |
| 539 | * | |
| 540 | * @param conv The conversation. | |
| 541 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
542 | void gaim_conversation_autoset_title(GaimConversation *conv); |
| 4359 | 543 | |
| 544 | /** | |
| 545 | * Returns the specified conversation's index in the parent window. | |
| 546 | * | |
| 547 | * @param conv The conversation. | |
| 548 | * | |
| 549 | * @return The current index in the parent window. | |
| 550 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
551 | int gaim_conversation_get_index(const GaimConversation *conv); |
| 4359 | 552 | |
| 553 | /** | |
| 554 | * Sets the conversation's unseen state. | |
| 555 | * | |
| 556 | * @param conv The conversation. | |
| 557 | * @param state The new unseen state. | |
| 558 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
559 | void gaim_conversation_set_unseen(GaimConversation *conv, |
| 4359 | 560 | GaimUnseenState state); |
| 561 | ||
| 562 | /** | |
| 563 | * Returns the conversation's unseen state. | |
| 564 | * | |
| 565 | * @param conv The conversation. | |
| 566 | * | |
| 567 | * @param The conversation's unseen state. | |
| 568 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
569 | GaimUnseenState gaim_conversation_get_unseen(const GaimConversation *conv); |
| 4359 | 570 | |
| 571 | /** | |
| 572 | * Returns the specified conversation's name. | |
| 573 | * | |
| 574 | * @param conv The conversation. | |
| 575 | * | |
| 576 | * @return The conversation's name. | |
| 577 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
578 | const char *gaim_conversation_get_name(const GaimConversation *conv); |
| 4359 | 579 | |
| 580 | /** | |
| 581 | * Enables or disables logging for this conversation. | |
| 582 | * | |
| 583 | * @param log @c TRUE if logging should be enabled, or @c FALSE otherwise. | |
| 584 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
585 | void gaim_conversation_set_logging(GaimConversation *conv, gboolean log); |
| 4359 | 586 | |
| 587 | /** | |
| 588 | * Returns whether or not logging is enabled for this conversation. | |
| 589 | * | |
| 590 | * @return @c TRUE if logging is enabled, or @c FALSE otherwise. | |
| 591 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
592 | gboolean gaim_conversation_is_logging(const GaimConversation *conv); |
| 4359 | 593 | |
| 594 | /** | |
| 595 | * Returns the specified conversation's send history. | |
| 596 | * | |
| 597 | * @param conv The conversation. | |
| 598 | * | |
| 599 | * @return The conversation's send history. | |
| 600 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
601 | GList *gaim_conversation_get_send_history(const GaimConversation *conv); |
| 4359 | 602 | |
| 603 | /** | |
| 604 | * Sets the specified conversation's history. | |
| 605 | * | |
| 606 | * @param conv The conversation. | |
| 607 | * @param history The history. | |
| 608 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
609 | void gaim_conversation_set_history(GaimConversation *conv, GString *history); |
| 4359 | 610 | |
| 611 | /** | |
| 612 | * Returns the specified conversation's history. | |
| 613 | * | |
| 614 | * @param conv The conversation. | |
| 615 | * | |
| 616 | * @return The conversation's history. | |
| 617 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
618 | GString *gaim_conversation_get_history(const GaimConversation *conv); |
| 4359 | 619 | |
| 620 | /** | |
| 621 | * Returns the specified conversation's parent window. | |
| 622 | * | |
| 623 | * @param conv The conversation. | |
| 624 | * | |
| 625 | * @return The conversation's parent window. | |
| 626 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
627 | GaimWindow *gaim_conversation_get_window(const GaimConversation *conv); |
| 4359 | 628 | |
| 629 | /** | |
| 630 | * Returns the specified conversation's IM-specific data. | |
| 631 | * | |
| 632 | * If the conversation type is not GAIM_CONV_IM, this will return @c NULL. | |
| 633 | * | |
| 634 | * @param conv The conversation. | |
| 635 | * | |
| 636 | * @return The IM-specific data. | |
| 637 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
638 | GaimIm *gaim_conversation_get_im_data(const GaimConversation *conv); |
| 4359 | 639 | |
| 640 | #define GAIM_IM(c) (gaim_conversation_get_im_data(c)) | |
| 641 | ||
| 642 | /** | |
| 643 | * Returns the specified conversation's chat-specific data. | |
| 644 | * | |
| 645 | * If the conversation type is not GAIM_CONV_CHAT, this will return @c NULL. | |
| 646 | * | |
| 647 | * @param conv The conversation. | |
| 648 | * | |
| 649 | * @return The chat-specific data. | |
| 650 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
651 | GaimChat *gaim_conversation_get_chat_data(const GaimConversation *conv); |
| 4359 | 652 | |
| 653 | #define GAIM_CHAT(c) (gaim_conversation_get_chat_data(c)) | |
| 654 | ||
| 655 | /** | |
|
4877
7d1f4381fed0
[gaim-migrate @ 5207]
Christian Hammond <chipx86@chipx86.com>
parents:
4876
diff
changeset
|
656 | * Sets extra data for a conversation. |
|
4876
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
657 | * |
|
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
658 | * @param conv The conversation. |
|
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
659 | * @param key The unique key. |
|
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
660 | * @param data The data to assign. |
|
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
661 | */ |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
662 | void gaim_conversation_set_data(GaimConversation *conv, const char *key, |
|
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
663 | gpointer data); |
|
4876
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
664 | |
|
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
665 | /** |
|
4877
7d1f4381fed0
[gaim-migrate @ 5207]
Christian Hammond <chipx86@chipx86.com>
parents:
4876
diff
changeset
|
666 | * Returns extra data in a conversation. |
|
4876
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
667 | * |
|
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
668 | * @param conv The conversation. |
|
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
669 | * @param key The unqiue key. |
|
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
670 | * |
|
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
671 | * @return The data associated with the key. |
|
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
672 | */ |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
673 | gpointer gaim_conversation_get_data(GaimConversation *conv, const char *key); |
|
4876
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
674 | |
|
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
675 | /** |
| 4359 | 676 | * Returns a list of all conversations. |
| 677 | * | |
| 678 | * This list includes both IMs and chats. | |
| 679 | * | |
| 680 | * @return A GList of all conversations. | |
| 681 | */ | |
| 682 | GList *gaim_get_conversations(void); | |
| 683 | ||
| 684 | /** | |
| 685 | * Returns a list of all IMs. | |
| 686 | * | |
| 687 | * @return A GList of all IMs. | |
| 688 | */ | |
| 689 | GList *gaim_get_ims(void); | |
| 690 | ||
| 691 | /** | |
| 692 | * Returns a list of all chats. | |
| 693 | * | |
| 694 | * @return A GList of all chats. | |
| 695 | */ | |
| 696 | GList *gaim_get_chats(void); | |
| 697 | ||
| 698 | /** | |
| 699 | * Finds the conversation with the specified name. | |
| 700 | * | |
| 701 | * @param name The name of the conversation. | |
| 702 | * | |
| 703 | * @return The conversation if found, or @c NULL otherwise. | |
| 704 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
705 | GaimConversation *gaim_find_conversation(const char *name); |
| 4359 | 706 | |
| 707 | /** | |
| 708 | * Finds a conversation with the specified name and user. | |
| 709 | * | |
| 710 | * @param name The name of the conversation. | |
| 4491 | 711 | * @param account The gaim_account associated with the conversation. |
| 4359 | 712 | * |
| 713 | * @return The conversation if found, or @c NULL otherwise. | |
| 714 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
715 | GaimConversation *gaim_find_conversation_with_account( |
|
5563
d5a7852aa0cb
[gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
5207
diff
changeset
|
716 | const char *name, const GaimAccount *account); |
| 4359 | 717 | |
| 718 | /** | |
| 719 | * Writes to a conversation window. | |
| 720 | * | |
| 721 | * This function should not be used to write IM or chat messages. Use | |
| 722 | * gaim_im_write() and gaim_chat_write() instead. Those functions will | |
| 723 | * most likely call this anyway, but they may do their own formatting, | |
| 724 | * sound playback, etc. | |
| 725 | * | |
| 726 | * This can be used to write generic messages, such as "so and so closed | |
| 727 | * the conversation window." | |
| 728 | * | |
| 729 | * @param conv The conversation. | |
| 730 | * @param who The user who sent the message. | |
| 731 | * @param message The message. | |
| 732 | * @param length The length of the message. | |
| 733 | * @param flags The flags. | |
| 734 | * @param mtime The time the message was sent. | |
| 735 | * | |
| 736 | * @see gaim_im_write() | |
| 737 | * @see gaim_chat_write() | |
| 738 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
739 | void gaim_conversation_write(GaimConversation *conv, const char *who, |
| 4359 | 740 | const char *message, size_t length, int flags, |
| 741 | time_t mtime); | |
| 742 | ||
| 743 | /** | |
| 744 | * Updates the progress bar on a conversation window | |
| 745 | * (if one exists in the UI). | |
| 746 | * | |
| 747 | * This is used for loading images typically. | |
| 748 | * | |
| 749 | * @param conv The conversation. | |
| 750 | * @param percent The percentage. | |
| 751 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
752 | void gaim_conversation_update_progress(GaimConversation *conv, float percent); |
| 4359 | 753 | |
| 754 | /** | |
| 755 | * Updates the visual status and UI of a conversation. | |
| 756 | * | |
| 757 | * @param conv The conversation. | |
| 758 | * @param type The update type. | |
| 759 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
760 | void gaim_conversation_update(GaimConversation *conv, GaimConvUpdateType type); |
| 4359 | 761 | |
| 762 | /** | |
| 763 | * Calls a function on each conversation. | |
| 764 | * | |
| 765 | * @param func The function. | |
| 766 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
767 | void gaim_conversation_foreach(void (*func)(GaimConversation *conv)); |
| 4359 | 768 | |
| 769 | /*@}*/ | |
| 770 | ||
| 771 | ||
| 772 | /**************************************************************************/ | |
| 773 | /** @name IM Conversation API */ | |
| 774 | /**************************************************************************/ | |
| 775 | /*@{*/ | |
| 776 | ||
| 777 | /** | |
| 778 | * Gets an IM's parent conversation. | |
| 779 | * | |
| 780 | * @param im The IM. | |
| 781 | * | |
| 782 | * @return The parent conversation. | |
| 783 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
784 | GaimConversation *gaim_im_get_conversation(const GaimIm *im); |
| 4359 | 785 | |
| 786 | /** | |
| 787 | * Sets the IM's typing state. | |
| 788 | * | |
| 789 | * @param im The IM. | |
| 790 | * @param state The typing state. | |
| 791 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
792 | void gaim_im_set_typing_state(GaimIm *im, int state); |
| 4359 | 793 | |
| 794 | /** | |
| 795 | * Returns the IM's typing state. | |
| 796 | * | |
| 797 | * @param im The IM. | |
| 798 | * | |
| 799 | * @return The IM's typing state. | |
| 800 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
801 | int gaim_im_get_typing_state(const GaimIm *im); |
| 4359 | 802 | |
| 803 | /** | |
| 804 | * Starts the IM's typing timeout. | |
| 805 | * | |
| 806 | * @param im The IM. | |
| 807 | * @param timeout The timeout. | |
| 808 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
809 | void gaim_im_start_typing_timeout(GaimIm *im, int timeout); |
| 4359 | 810 | |
| 811 | /** | |
| 812 | * Stops the IM's typing timeout. | |
| 813 | * | |
| 814 | * @param im The IM. | |
| 815 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
816 | void gaim_im_stop_typing_timeout(GaimIm *im); |
| 4359 | 817 | |
| 818 | /** | |
| 819 | * Returns the IM's typing timeout. | |
| 820 | * | |
| 821 | * @param im The IM. | |
| 822 | * | |
| 823 | * @return The timeout. | |
| 824 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
825 | guint gaim_im_get_typing_timeout(const GaimIm *im); |
| 4359 | 826 | |
| 827 | /** | |
| 828 | * Sets the IM's time until it should send another typing notification. | |
| 829 | * | |
| 830 | * @param im The IM. | |
| 831 | * @param val The time. | |
| 832 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
833 | void gaim_im_set_type_again(GaimIm *im, time_t val); |
| 4359 | 834 | |
| 835 | /** | |
| 836 | * Returns the IM's time until it should send another typing notification. | |
| 837 | * | |
| 838 | * @param im The IM. | |
| 839 | * | |
| 840 | * @return The time. | |
| 841 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
842 | time_t gaim_im_get_type_again(const GaimIm *im); |
| 4359 | 843 | |
| 844 | /** | |
| 845 | * Starts the IM's type again timeout. | |
| 846 | * | |
| 847 | * @param im The IM. | |
| 848 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
849 | void gaim_im_start_type_again_timeout(GaimIm *im); |
| 4359 | 850 | |
| 851 | /** | |
| 852 | * Stops the IM's type again timeout. | |
| 853 | * | |
| 854 | * @param im The IM. | |
| 855 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
856 | void gaim_im_stop_type_again_timeout(GaimIm *im); |
| 4359 | 857 | |
| 858 | /** | |
| 859 | * Returns the IM's type again timeout interval. | |
| 860 | * | |
| 861 | * @param im The IM. | |
| 862 | * | |
| 863 | * @return The type again timeout interval. | |
| 864 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
865 | guint gaim_im_get_type_again_timeout(const GaimIm *im); |
| 4359 | 866 | |
| 867 | /** | |
| 868 | * Updates the visual typing notification for an IM conversation. | |
| 869 | * | |
| 870 | * @param im The IM. | |
| 871 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
872 | void gaim_im_update_typing(GaimIm *im); |
| 4359 | 873 | |
| 874 | /** | |
| 875 | * Writes to an IM. | |
| 876 | * | |
| 877 | * The @a len parameter is used for writing binary data, such as an | |
| 878 | * image. If @c message is text, specify -1 for @a len. | |
| 879 | * | |
| 880 | * @param im The IM. | |
| 881 | * @param who The user who sent the message. | |
| 882 | * @param message The message to write. | |
| 883 | * @param len The length of the message, or -1 to specify the length | |
| 884 | * of @a message. | |
| 885 | * @param flag The flags. | |
| 886 | * @param mtime The time the message was sent. | |
| 887 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
888 | void gaim_im_write(GaimIm *im, const char *who, |
| 4359 | 889 | const char *message, size_t len, int flag, time_t mtime); |
| 890 | ||
| 891 | /** | |
| 892 | * Sends a message to this IM conversation. | |
| 893 | * | |
| 894 | * @param im The IM. | |
| 895 | * @param message The message to send. | |
| 896 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
897 | void gaim_im_send(GaimIm *im, const char *message); |
| 4359 | 898 | |
| 899 | /*@}*/ | |
| 900 | ||
| 901 | ||
| 902 | /**************************************************************************/ | |
| 903 | /** @name Chat Conversation API */ | |
| 904 | /**************************************************************************/ | |
| 905 | /*@{*/ | |
| 906 | ||
| 907 | /** | |
| 908 | * Gets a chat's parent conversation. | |
| 909 | * | |
| 910 | * @param chat The chat. | |
| 911 | * | |
| 912 | * @return The parent conversation. | |
| 913 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
914 | GaimConversation *gaim_chat_get_conversation(const GaimChat *chat); |
| 4359 | 915 | |
| 916 | /** | |
| 917 | * Sets the list of users in the chat room. | |
| 918 | * | |
|
6407
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
919 | * @note Calling this function will not update the display of the users. |
|
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
920 | * Please use gaim_chat_add_user(), gaim_chat_add_users(), |
|
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
921 | * gaim_chat_remove_user(), and gaim_chat_remove_users() instead. |
|
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
922 | * |
| 4359 | 923 | * @param chat The chat. |
| 924 | * @param users The list of users. | |
| 925 | * | |
| 926 | * @return The list passed. | |
| 927 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
928 | GList *gaim_chat_set_users(GaimChat *chat, GList *users); |
| 4359 | 929 | |
| 930 | /** | |
| 931 | * Returns a list of users in the chat room. | |
| 932 | * | |
| 933 | * @param chat The chat. | |
| 934 | * | |
| 935 | * @return The list of users. | |
| 936 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
937 | GList *gaim_chat_get_users(const GaimChat *chat); |
| 4359 | 938 | |
| 939 | /** | |
| 940 | * Ignores a user in a chat room. | |
| 941 | * | |
| 942 | * @param chat The chat. | |
| 943 | * @param name The name of the user. | |
| 944 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
945 | void gaim_chat_ignore(GaimChat *chat, const char *name); |
| 4359 | 946 | |
| 947 | /** | |
| 948 | * Unignores a user in a chat room. | |
| 949 | * | |
| 950 | * @param chat The chat. | |
| 951 | * @param name The name of the user. | |
| 952 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
953 | void gaim_chat_unignore(GaimChat *chat, const char *name); |
| 4359 | 954 | |
| 955 | /** | |
| 956 | * Sets the list of ignored users in the chat room. | |
| 957 | * | |
| 958 | * @param chat The chat. | |
| 959 | * @param ignored The list of ignored users. | |
| 960 | * | |
| 961 | * @return The list passed. | |
| 962 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
963 | GList *gaim_chat_set_ignored(GaimChat *chat, GList *ignored); |
| 4359 | 964 | |
| 965 | /** | |
| 966 | * Returns the list of ignored users in the chat room. | |
| 967 | * | |
| 968 | * @param chat The chat. | |
| 969 | * | |
| 970 | * @return The list of ignored users. | |
| 971 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
972 | GList *gaim_chat_get_ignored(const GaimChat *chat); |
| 4359 | 973 | |
| 974 | /** | |
| 975 | * Returns the actual name of the specified ignored user, if it exists in | |
| 976 | * the ignore list. | |
| 977 | * | |
| 978 | * If the user found contains a prefix, such as '+' or '\@', this is also | |
| 979 | * returned. The username passed to the function does not have to have this | |
| 980 | * formatting. | |
| 981 | * | |
| 982 | * @param chat The chat. | |
| 983 | * @param user The user to check in the ignore list. | |
| 984 | * | |
| 985 | * @return The ignored user if found, complete with prefixes, or @c NULL | |
| 986 | * if not found. | |
| 987 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
988 | const char *gaim_chat_get_ignored_user(const GaimChat *chat, |
| 4359 | 989 | const char *user); |
| 990 | ||
| 991 | /** | |
| 992 | * Returns @c TRUE if the specified user is ignored. | |
| 993 | * | |
| 994 | * @param chat The chat. | |
| 995 | * @param user The user. | |
| 996 | * | |
| 997 | * @return @c TRUE if the user is in the ignore list; @c FALSE otherwise. | |
| 998 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
999 | gboolean gaim_chat_is_user_ignored(const GaimChat *chat, |
| 4359 | 1000 | const char *user); |
| 1001 | ||
| 1002 | /** | |
| 1003 | * Sets the chat room's topic. | |
| 1004 | * | |
| 1005 | * @param chat The chat. | |
| 1006 | * @param who The user that set the topic. | |
| 1007 | * @param topic The topic. | |
| 1008 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
1009 | void gaim_chat_set_topic(GaimChat *chat, const char *who, |
| 4359 | 1010 | const char *topic); |
| 1011 | ||
| 1012 | /** | |
| 1013 | * Returns the chat room's topic. | |
| 1014 | * | |
| 1015 | * @param chat The chat. | |
| 1016 | * | |
| 1017 | * @return The chat's topic. | |
| 1018 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
1019 | const char *gaim_chat_get_topic(const GaimChat *chat); |
| 4359 | 1020 | |
| 1021 | /** | |
| 1022 | * Sets the chat room's ID. | |
| 1023 | * | |
| 1024 | * @param chat The chat. | |
| 1025 | * @param id The ID. | |
| 1026 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
1027 | void gaim_chat_set_id(GaimChat *chat, int id); |
| 4359 | 1028 | |
| 1029 | /** | |
| 1030 | * Returns the chat room's ID. | |
| 1031 | * | |
| 1032 | * @param chat The chat. | |
| 1033 | * | |
| 1034 | * @return The ID. | |
| 1035 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
1036 | int gaim_chat_get_id(const GaimChat *chat); |
| 4359 | 1037 | |
| 1038 | /** | |
| 1039 | * Writes to a chat. | |
| 1040 | * | |
| 1041 | * @param chat The chat. | |
| 1042 | * @param who The user who sent the message. | |
| 1043 | * @param message The message to write. | |
| 1044 | * @param flag The flags. | |
| 1045 | * @param mtime The time the message was sent. | |
| 1046 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
1047 | void gaim_chat_write(GaimChat *chat, const char *who, |
| 4359 | 1048 | const char *message, int flag, time_t mtime); |
| 1049 | ||
| 1050 | /** | |
| 1051 | * Sends a message to this chat conversation. | |
| 1052 | * | |
| 1053 | * @param chat The chat. | |
| 1054 | * @param message The message to send. | |
| 1055 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
1056 | void gaim_chat_send(GaimChat *chat, const char *message); |
| 4359 | 1057 | |
| 1058 | /** | |
| 1059 | * Adds a user to a chat. | |
| 1060 | * | |
| 1061 | * @param chat The chat. | |
| 1062 | * @param user The user to add. | |
| 1063 | * @param extra_msg An extra message to display with the join message. | |
| 1064 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
1065 | void gaim_chat_add_user(GaimChat *chat, const char *user, |
| 4359 | 1066 | const char *extra_msg); |
| 1067 | ||
| 1068 | /** | |
|
6407
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1069 | * Adds a list of users to a chat. |
|
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1070 | * |
|
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1071 | * 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
|
1072 | * free this list after calling this function. |
|
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1073 | * |
|
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1074 | * @param chat The chat. |
|
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1075 | * @param users The list of users to add. |
|
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1076 | */ |
|
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1077 | void gaim_chat_add_users(GaimChat *chat, GList *users); |
|
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1078 | |
|
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1079 | /** |
| 4359 | 1080 | * Renames a user in a chat. |
| 1081 | * | |
| 1082 | * @param chat The chat. | |
| 1083 | * @param old_user The old username. | |
| 1084 | * @param new_user The new username. | |
| 1085 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
1086 | void gaim_chat_rename_user(GaimChat *chat, const char *old_user, |
| 4359 | 1087 | const char *new_user); |
| 1088 | ||
| 1089 | /** | |
| 1090 | * Removes a user from a chat, optionally with a reason. | |
| 1091 | * | |
|
6407
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1092 | * 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
|
1093 | * |
| 4359 | 1094 | * @param chat The chat. |
| 1095 | * @param user The user that is being removed. | |
| 1096 | * @param reason The optional reason given for the removal. Can be @c NULL. | |
| 1097 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
1098 | void gaim_chat_remove_user(GaimChat *chat, const char *user, |
| 4359 | 1099 | const char *reason); |
| 1100 | ||
| 1101 | /** | |
|
6407
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1102 | * 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
|
1103 | * |
|
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1104 | * @param chat The chat. |
|
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1105 | * @param users The users that are being removed. |
|
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1106 | * @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
|
1107 | */ |
|
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1108 | void gaim_chat_remove_users(GaimChat *chat, GList *users, const char *reason); |
|
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1109 | |
|
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1110 | /** |
|
6414
f78eb072fcc0
[gaim-migrate @ 6921]
Christian Hammond <chipx86@chipx86.com>
parents:
6407
diff
changeset
|
1111 | * Clears all users from a chat. |
|
f78eb072fcc0
[gaim-migrate @ 6921]
Christian Hammond <chipx86@chipx86.com>
parents:
6407
diff
changeset
|
1112 | * |
|
f78eb072fcc0
[gaim-migrate @ 6921]
Christian Hammond <chipx86@chipx86.com>
parents:
6407
diff
changeset
|
1113 | * @param chat The chat. |
|
f78eb072fcc0
[gaim-migrate @ 6921]
Christian Hammond <chipx86@chipx86.com>
parents:
6407
diff
changeset
|
1114 | */ |
|
f78eb072fcc0
[gaim-migrate @ 6921]
Christian Hammond <chipx86@chipx86.com>
parents:
6407
diff
changeset
|
1115 | void gaim_chat_clear_users(GaimChat *chat); |
|
f78eb072fcc0
[gaim-migrate @ 6921]
Christian Hammond <chipx86@chipx86.com>
parents:
6407
diff
changeset
|
1116 | |
|
f78eb072fcc0
[gaim-migrate @ 6921]
Christian Hammond <chipx86@chipx86.com>
parents:
6407
diff
changeset
|
1117 | /** |
| 4359 | 1118 | * Finds a chat with the specified chat ID. |
| 1119 | * | |
| 1120 | * @param gc The gaim_connection. | |
| 1121 | * @param id The chat ID. | |
| 1122 | * | |
| 1123 | * @return The chat conversation. | |
| 1124 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
1125 | GaimConversation *gaim_find_chat(const GaimConnection *gc, int id); |
| 4359 | 1126 | |
| 1127 | /*@}*/ | |
| 1128 | ||
|
4469
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1129 | /**************************************************************************/ |
|
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1130 | /** @name Conversation Placement Functions */ |
|
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1131 | /**************************************************************************/ |
|
4481
1a02f276e41e
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1132 | /*@{*/ |
|
4469
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1133 | |
|
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1134 | /** |
| 5858 | 1135 | * Returns a GList containing the IDs and Names of the registered placement |
| 1136 | * functions. | |
| 1137 | * | |
| 1138 | * @return The list of IDs and names. | |
| 1139 | */ | |
| 1140 | GList *gaim_conv_placement_get_options(void); | |
| 1141 | ||
| 1142 | /** | |
|
4469
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1143 | * Adds a conversation placement function to the list of possible functions. |
|
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1144 | * |
|
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1145 | * @param name The name of the function. |
|
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1146 | * @param fnc A pointer to the function. |
|
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1147 | */ |
|
6311
1e253e4b423f
[gaim-migrate @ 6810]
Christian Hammond <chipx86@chipx86.com>
parents:
6063
diff
changeset
|
1148 | 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
|
1149 | GaimConvPlacementFunc fnc); |
|
4469
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1150 | |
|
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1151 | /** |
|
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1152 | * Removes a conversation placement function from the list of possible |
|
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1153 | * functions. |
|
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1154 | * |
| 5858 | 1155 | * @param id The id of the function. |
|
4469
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1156 | */ |
| 5858 | 1157 | void gaim_conv_placement_remove_fnc(const char *id); |
|
4469
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1158 | |
|
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1159 | /** |
|
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1160 | * Returns the name of the conversation placement function at the |
| 5858 | 1161 | * specified id. |
|
4469
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1162 | * |
| 5858 | 1163 | * @param id The id. |
|
4469
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1164 | * |
| 5858 | 1165 | * @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
|
1166 | */ |
| 5858 | 1167 | const char *gaim_conv_placement_get_name(const char *id); |
|
4469
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1168 | |
|
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1169 | /** |
|
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1170 | * Returns a pointer to the conversation placement function at the |
| 5858 | 1171 | * specified id. |
|
4469
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1172 | * |
| 5858 | 1173 | * @param id The id. |
|
4469
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1174 | * |
|
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1175 | * @return A pointer to the function. |
|
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1176 | */ |
| 5858 | 1177 | GaimConvPlacementFunc gaim_conv_placement_get_fnc(const char *id); |
|
4469
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1178 | |
|
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1179 | /** |
| 5858 | 1180 | * Returns the id of the specified conversation placement function. |
|
4469
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1181 | * |
|
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1182 | * @param fnc A pointer to the registered function. |
|
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1183 | * |
| 5858 | 1184 | * @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
|
1185 | * registered. |
|
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1186 | */ |
| 5858 | 1187 | const char *gaim_conv_placement_get_fnc_id(GaimConvPlacementFunc fnc); |
|
4469
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1188 | |
|
4481
1a02f276e41e
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1189 | /*@}*/ |
|
1a02f276e41e
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1190 | |
|
1a02f276e41e
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1191 | /**************************************************************************/ |
|
1a02f276e41e
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1192 | /** @name UI Registration Functions */ |
|
1a02f276e41e
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1193 | /**************************************************************************/ |
|
1a02f276e41e
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1194 | /*@{*/ |
|
1a02f276e41e
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1195 | |
|
1a02f276e41e
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1196 | /** |
|
1a02f276e41e
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1197 | * 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
|
1198 | * windows. |
|
1a02f276e41e
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1199 | * |
|
5207
4d3a908867a2
[gaim-migrate @ 5575]
Christian Hammond <chipx86@chipx86.com>
parents:
5034
diff
changeset
|
1200 | * @param ops The UI operations structure. |
|
4481
1a02f276e41e
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1201 | */ |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
1202 | void gaim_set_win_ui_ops(GaimWindowUiOps *ops); |
|
4481
1a02f276e41e
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1203 | |
|
1a02f276e41e
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1204 | /** |
|
1a02f276e41e
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1205 | * Returns the gaim window UI operations structure to be used in |
|
1a02f276e41e
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1206 | * new windows. |
|
1a02f276e41e
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1207 | * |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
1208 | * @return A filled-out GaimWindowUiOps structure. |
|
4481
1a02f276e41e
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1209 | */ |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
1210 | GaimWindowUiOps *gaim_get_win_ui_ops(void); |
|
4481
1a02f276e41e
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1211 | |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1212 | /*@}*/ |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1213 | |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1214 | /**************************************************************************/ |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1215 | /** @name Conversations Subsystem */ |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1216 | /**************************************************************************/ |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1217 | /*@{*/ |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1218 | |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1219 | /** |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1220 | * Returns the conversation subsystem handle. |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1221 | * |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1222 | * @return The conversation subsystem handle. |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1223 | */ |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1224 | void *gaim_conversations_get_handle(void); |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1225 | |
|
5872
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
1226 | /** |
|
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
1227 | * Initializes the conversation subsystem. |
|
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
1228 | */ |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1229 | void gaim_conversations_init(void); |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1230 | |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1231 | /** |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1232 | * Uninitializes the conversation subsystem. |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1233 | */ |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1234 | void gaim_conversations_uninit(void); |
|
5872
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
1235 | |
|
4481
1a02f276e41e
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1236 | /*@}*/ |
|
1a02f276e41e
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1237 | |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
1238 | #ifdef __cplusplus |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
1239 | } |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
1240 | #endif |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
1241 | |
|
4890
d87a9b5bbe57
[gaim-migrate @ 5220]
Christian Hammond <chipx86@chipx86.com>
parents:
4877
diff
changeset
|
1242 | #endif /* _GAIM_CONVERSATION_H_ */ |