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