Sun, 29 Apr 2007 01:08:11 +0000
Fix a bug with the bugfix for empty icons. The logic was backwards here.
This caused all buddy icons to be lost on migration and as an added bonus,
it failed to solve the empty icon NULL extension bug!
| 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 | * |
| 15884 | 5 | * purple |
| 4359 | 6 | * |
| 15884 | 7 | * Purple is the legal property of its developers, whose names are too numerous |
| 8046 | 8 | * to list here. Please refer to the COPYRIGHT file distributed with this |
| 9 | * source distribution. | |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
10 | * |
| 4359 | 11 | * This program is free software; you can redistribute it and/or modify |
| 12 | * it under the terms of the GNU General Public License as published by | |
| 13 | * the Free Software Foundation; either version 2 of the License, or | |
| 14 | * (at your option) any later version. | |
| 15 | * | |
| 16 | * This program is distributed in the hope that it will be useful, | |
| 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 19 | * GNU General Public License for more details. | |
| 20 | * | |
| 21 | * You should have received a copy of the GNU General Public License | |
| 22 | * along with this program; if not, write to the Free Software | |
| 23 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
|
6488
6a47a95e4dbb
[gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents:
6485
diff
changeset
|
24 | * |
|
6605
665d3a8e885c
[gaim-migrate @ 7129]
Christian Hammond <chipx86@chipx86.com>
parents:
6585
diff
changeset
|
25 | * @see @ref conversation-signals |
| 4359 | 26 | */ |
| 15884 | 27 | #ifndef _PURPLE_CONVERSATION_H_ |
| 28 | #define _PURPLE_CONVERSATION_H_ | |
| 4359 | 29 | |
| 30 | /**************************************************************************/ | |
| 31 | /** Data Structures */ | |
| 32 | /**************************************************************************/ | |
| 33 | ||
| 11581 | 34 | |
| 15884 | 35 | typedef struct _PurpleConversationUiOps PurpleConversationUiOps; |
| 36 | typedef struct _PurpleConversation PurpleConversation; | |
| 37 | typedef struct _PurpleConvIm PurpleConvIm; | |
| 38 | typedef struct _PurpleConvChat PurpleConvChat; | |
| 39 | typedef struct _PurpleConvChatBuddy PurpleConvChatBuddy; | |
| 4359 | 40 | |
| 41 | /** | |
| 42 | * A type of conversation. | |
| 43 | */ | |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
44 | typedef enum |
| 4359 | 45 | { |
| 15884 | 46 | PURPLE_CONV_TYPE_UNKNOWN = 0, /**< Unknown conversation type. */ |
| 47 | PURPLE_CONV_TYPE_IM, /**< Instant Message. */ | |
| 48 | PURPLE_CONV_TYPE_CHAT, /**< Chat room. */ | |
| 49 | PURPLE_CONV_TYPE_MISC, /**< A misc. conversation. */ | |
| 50 | PURPLE_CONV_TYPE_ANY /**< Any type of conversation. */ | |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
51 | |
| 15884 | 52 | } PurpleConversationType; |
| 4359 | 53 | |
| 54 | /** | |
| 55 | * Conversation update type. | |
| 56 | */ | |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
57 | typedef enum |
| 4359 | 58 | { |
| 15884 | 59 | PURPLE_CONV_UPDATE_ADD = 0, /**< The buddy associated with the conversation |
| 8155 | 60 | was added. */ |
| 15884 | 61 | PURPLE_CONV_UPDATE_REMOVE, /**< The buddy associated with the conversation |
| 8155 | 62 | was removed. */ |
| 15884 | 63 | PURPLE_CONV_UPDATE_ACCOUNT, /**< The purple_account was changed. */ |
| 64 | PURPLE_CONV_UPDATE_TYPING, /**< The typing state was updated. */ | |
| 65 | PURPLE_CONV_UPDATE_UNSEEN, /**< The unseen state was updated. */ | |
| 66 | PURPLE_CONV_UPDATE_LOGGING, /**< Logging for this conversation was | |
| 8155 | 67 | enabled or disabled. */ |
| 15884 | 68 | PURPLE_CONV_UPDATE_TOPIC, /**< The topic for a chat was updated. */ |
| 4359 | 69 | /* |
| 70 | * XXX These need to go when we implement a more generic core/UI event | |
| 71 | * system. | |
| 72 | */ | |
| 15884 | 73 | PURPLE_CONV_ACCOUNT_ONLINE, /**< One of the user's accounts went online. */ |
| 74 | PURPLE_CONV_ACCOUNT_OFFLINE, /**< One of the user's accounts went offline. */ | |
| 75 | PURPLE_CONV_UPDATE_AWAY, /**< The other user went away. */ | |
| 76 | PURPLE_CONV_UPDATE_ICON, /**< The other user's buddy icon changed. */ | |
| 77 | PURPLE_CONV_UPDATE_TITLE, | |
| 78 | PURPLE_CONV_UPDATE_CHATLEFT, | |
| 10665 | 79 | |
| 15884 | 80 | PURPLE_CONV_UPDATE_FEATURES, /**< The features for a chat have changed */ |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
81 | |
| 15884 | 82 | } PurpleConvUpdateType; |
| 4359 | 83 | |
| 84 | /** | |
|
5872
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
85 | * The typing state of a user. |
|
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
86 | */ |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
87 | typedef enum |
|
5872
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
88 | { |
| 15884 | 89 | PURPLE_NOT_TYPING = 0, /**< Not typing. */ |
| 90 | PURPLE_TYPING, /**< Currently typing. */ | |
| 91 | PURPLE_TYPED /**< Stopped typing momentarily. */ | |
|
5872
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
92 | |
| 15884 | 93 | } PurpleTypingState; |
|
5872
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
94 | |
|
6621
2a18ef3e5224
[gaim-migrate @ 7145]
Robert McQueen <robot101@debian.org>
parents:
6605
diff
changeset
|
95 | /** |
|
2a18ef3e5224
[gaim-migrate @ 7145]
Robert McQueen <robot101@debian.org>
parents:
6605
diff
changeset
|
96 | * Flags applicable to a message. Most will have send, recv or system. |
|
2a18ef3e5224
[gaim-migrate @ 7145]
Robert McQueen <robot101@debian.org>
parents:
6605
diff
changeset
|
97 | */ |
|
2a18ef3e5224
[gaim-migrate @ 7145]
Robert McQueen <robot101@debian.org>
parents:
6605
diff
changeset
|
98 | typedef enum |
|
2a18ef3e5224
[gaim-migrate @ 7145]
Robert McQueen <robot101@debian.org>
parents:
6605
diff
changeset
|
99 | { |
| 15884 | 100 | PURPLE_MESSAGE_SEND = 0x0001, /**< Outgoing message. */ |
| 101 | PURPLE_MESSAGE_RECV = 0x0002, /**< Incoming message. */ | |
| 102 | PURPLE_MESSAGE_SYSTEM = 0x0004, /**< System message. */ | |
| 103 | PURPLE_MESSAGE_AUTO_RESP = 0x0008, /**< Auto response. */ | |
| 104 | PURPLE_MESSAGE_ACTIVE_ONLY = 0x0010, /**< Hint to the UI that this | |
|
13477
aa1863ed7f63
[gaim-migrate @ 15852]
Richard Laager <rlaager@pidgin.im>
parents:
12867
diff
changeset
|
105 | message should not be |
|
aa1863ed7f63
[gaim-migrate @ 15852]
Richard Laager <rlaager@pidgin.im>
parents:
12867
diff
changeset
|
106 | shown in conversations |
|
aa1863ed7f63
[gaim-migrate @ 15852]
Richard Laager <rlaager@pidgin.im>
parents:
12867
diff
changeset
|
107 | which are only open for |
|
aa1863ed7f63
[gaim-migrate @ 15852]
Richard Laager <rlaager@pidgin.im>
parents:
12867
diff
changeset
|
108 | internal UI purposes |
|
aa1863ed7f63
[gaim-migrate @ 15852]
Richard Laager <rlaager@pidgin.im>
parents:
12867
diff
changeset
|
109 | (e.g. for contact-aware |
|
aa1863ed7f63
[gaim-migrate @ 15852]
Richard Laager <rlaager@pidgin.im>
parents:
12867
diff
changeset
|
110 | conversions). */ |
| 15884 | 111 | PURPLE_MESSAGE_NICK = 0x0020, /**< Contains your nick. */ |
| 112 | PURPLE_MESSAGE_NO_LOG = 0x0040, /**< Do not log. */ | |
| 113 | PURPLE_MESSAGE_WHISPER = 0x0080, /**< Whispered message. */ | |
| 114 | PURPLE_MESSAGE_ERROR = 0x0200, /**< Error message. */ | |
| 115 | PURPLE_MESSAGE_DELAYED = 0x0400, /**< Delayed message. */ | |
| 116 | PURPLE_MESSAGE_RAW = 0x0800, /**< "Raw" message - don't | |
|
13477
aa1863ed7f63
[gaim-migrate @ 15852]
Richard Laager <rlaager@pidgin.im>
parents:
12867
diff
changeset
|
117 | apply formatting */ |
|
16007
3d954c38cf0c
Patch from Zac West which (1) adds a message flag, PURPLE_MESSAGE_NOTIFY, used to indicate that a message is a protocol-level notification from a user ('buzz' in yahoo, 'nudge' in msn, for example) and (2) uses it along with improving the text displayed when sending/receiving buzzes and nudges. The addition of this flag means that a plugin could implement custom behavior, such as playing a sound or triggerring some other event, reliably and easily.
Evan Schoenberg <evands@pidgin.im>
parents:
15884
diff
changeset
|
118 | PURPLE_MESSAGE_IMAGES = 0x1000, /**< Message contains images */ |
|
3d954c38cf0c
Patch from Zac West which (1) adds a message flag, PURPLE_MESSAGE_NOTIFY, used to indicate that a message is a protocol-level notification from a user ('buzz' in yahoo, 'nudge' in msn, for example) and (2) uses it along with improving the text displayed when sending/receiving buzzes and nudges. The addition of this flag means that a plugin could implement custom behavior, such as playing a sound or triggerring some other event, reliably and easily.
Evan Schoenberg <evands@pidgin.im>
parents:
15884
diff
changeset
|
119 | PURPLE_MESSAGE_NOTIFY = 0x2000 /**< Message is a notification */ |
|
10008
1de3454a0dca
[gaim-migrate @ 10925]
Mark Doliner <markdoliner@pidgin.im>
parents:
9939
diff
changeset
|
120 | |
| 15884 | 121 | } PurpleMessageFlags; |
|
6621
2a18ef3e5224
[gaim-migrate @ 7145]
Robert McQueen <robot101@debian.org>
parents:
6605
diff
changeset
|
122 | |
|
9554
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
123 | /** |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
124 | * Flags applicable to users in Chats. |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
125 | */ |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
126 | typedef enum |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
127 | { |
| 15884 | 128 | PURPLE_CBFLAGS_NONE = 0x0000, /**< No flags */ |
| 129 | PURPLE_CBFLAGS_VOICE = 0x0001, /**< Voiced user or "Participant" */ | |
| 130 | PURPLE_CBFLAGS_HALFOP = 0x0002, /**< Half-op */ | |
| 131 | PURPLE_CBFLAGS_OP = 0x0004, /**< Channel Op or Moderator */ | |
| 132 | PURPLE_CBFLAGS_FOUNDER = 0x0008, /**< Channel Founder */ | |
| 133 | PURPLE_CBFLAGS_TYPING = 0x0010, /**< Currently typing */ | |
| 11581 | 134 | |
| 15884 | 135 | } PurpleConvChatBuddyFlags; |
|
9554
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
136 | |
|
5872
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
137 | #include "account.h" |
|
9718
aeee69c6c784
[gaim-migrate @ 10579]
Mark Doliner <markdoliner@pidgin.im>
parents:
9627
diff
changeset
|
138 | #include "buddyicon.h" |
| 7431 | 139 | #include "log.h" |
|
5872
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
140 | #include "server.h" |
|
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
141 | |
|
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
142 | /** |
| 4359 | 143 | * Conversation operations and events. |
| 144 | * | |
| 145 | * Any UI representing a conversation must assign a filled-out | |
| 15884 | 146 | * PurpleConversationUiOps structure to the PurpleConversation. |
| 4359 | 147 | */ |
| 15884 | 148 | struct _PurpleConversationUiOps |
| 4359 | 149 | { |
| 15884 | 150 | void (*create_conversation)(PurpleConversation *conv); |
| 151 | void (*destroy_conversation)(PurpleConversation *conv); | |
| 152 | void (*write_chat)(PurpleConversation *conv, const char *who, | |
| 153 | const char *message, PurpleMessageFlags flags, | |
| 8155 | 154 | time_t mtime); |
| 15884 | 155 | void (*write_im)(PurpleConversation *conv, const char *who, |
| 156 | const char *message, PurpleMessageFlags flags, | |
| 8155 | 157 | time_t mtime); |
| 15884 | 158 | void (*write_conv)(PurpleConversation *conv, const char *name, const char *alias, |
| 159 | const char *message, PurpleMessageFlags flags, | |
| 8155 | 160 | time_t mtime); |
| 4359 | 161 | |
| 15884 | 162 | void (*chat_add_users)(PurpleConversation *conv, GList *cbuddies, gboolean new_arrivals); |
|
14027
708c2047424f
[gaim-migrate @ 16521]
Aaron Sheldon <aaronsheldon@users.sourceforge.net>
parents:
13844
diff
changeset
|
163 | |
| 15884 | 164 | void (*chat_rename_user)(PurpleConversation *conv, const char *old_name, |
|
11485
fe334b13d1d0
[gaim-migrate @ 13727]
Peter Lawler <pidgin@bleeter.id.au>
parents:
11454
diff
changeset
|
165 | const char *new_name, const char *new_alias); |
| 15884 | 166 | void (*chat_remove_users)(PurpleConversation *conv, GList *users); |
| 167 | void (*chat_update_user)(PurpleConversation *conv, const char *user); | |
| 4359 | 168 | |
| 15884 | 169 | void (*present)(PurpleConversation *conv); |
| 4359 | 170 | |
| 15884 | 171 | gboolean (*has_focus)(PurpleConversation *conv); |
|
9260
82d7b380220a
[gaim-migrate @ 10059]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9166
diff
changeset
|
172 | |
| 10526 | 173 | /* Custom Smileys */ |
| 15884 | 174 | gboolean (*custom_smiley_add)(PurpleConversation *conv, const char *smile, gboolean remote); |
| 175 | void (*custom_smiley_write)(PurpleConversation *conv, const char *smile, | |
|
11137
cf40226ddff7
[gaim-migrate @ 13201]
Mark Doliner <markdoliner@pidgin.im>
parents:
11035
diff
changeset
|
176 | const guchar *data, gsize size); |
| 15884 | 177 | void (*custom_smiley_close)(PurpleConversation *conv, const char *smile); |
| 14582 | 178 | |
| 15884 | 179 | void (*send_confirm)(PurpleConversation *conv, const char *message); |
| 4359 | 180 | }; |
| 181 | ||
| 182 | /** | |
| 183 | * Data specific to Instant Messages. | |
| 184 | */ | |
| 15884 | 185 | struct _PurpleConvIm |
| 4359 | 186 | { |
| 15884 | 187 | PurpleConversation *conv; /**< The parent conversation. */ |
| 4359 | 188 | |
| 15884 | 189 | PurpleTypingState typing_state; /**< The current typing state. */ |
|
4465
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
190 | guint typing_timeout; /**< The typing timer handle. */ |
|
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
191 | time_t type_again; /**< The type again time. */ |
|
13844
835b8f7b3d1d
[gaim-migrate @ 16295]
Mark Doliner <markdoliner@pidgin.im>
parents:
13840
diff
changeset
|
192 | guint send_typed_timeout; /**< The type again timer handle. */ |
| 4359 | 193 | |
| 15884 | 194 | PurpleBuddyIcon *icon; /**< The buddy icon. */ |
| 4359 | 195 | }; |
| 196 | ||
| 197 | /** | |
| 198 | * Data specific to Chats. | |
| 199 | */ | |
| 15884 | 200 | struct _PurpleConvChat |
| 4359 | 201 | { |
| 15884 | 202 | PurpleConversation *conv; /**< The parent conversation. */ |
| 4359 | 203 | |
|
4465
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
204 | GList *in_room; /**< The users in the room. */ |
|
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
205 | GList *ignored; /**< Ignored users. */ |
|
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
206 | char *who; /**< The person who set the topic. */ |
|
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
207 | char *topic; /**< The topic. */ |
|
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
208 | int id; /**< The chat ID. */ |
| 8158 | 209 | char *nick; /**< Your nick in this chat. */ |
| 8256 | 210 | |
| 211 | gboolean left; /**< We left the chat and kept the window open */ | |
| 4359 | 212 | }; |
| 213 | ||
| 214 | /** | |
|
9554
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
215 | * Data for "Chat Buddies" |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
216 | */ |
| 15884 | 217 | struct _PurpleConvChatBuddy |
|
9554
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
218 | { |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
219 | char *name; /**< The name */ |
|
14027
708c2047424f
[gaim-migrate @ 16521]
Aaron Sheldon <aaronsheldon@users.sourceforge.net>
parents:
13844
diff
changeset
|
220 | char *alias; /**< The alias */ |
|
708c2047424f
[gaim-migrate @ 16521]
Aaron Sheldon <aaronsheldon@users.sourceforge.net>
parents:
13844
diff
changeset
|
221 | char *alias_key; /**< The alias key */ |
|
708c2047424f
[gaim-migrate @ 16521]
Aaron Sheldon <aaronsheldon@users.sourceforge.net>
parents:
13844
diff
changeset
|
222 | gboolean buddy; /**< ChatBuddy is on the blist */ |
| 15884 | 223 | PurpleConvChatBuddyFlags flags; /**< Flags (ops, voice etc.) */ |
|
9554
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
224 | }; |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
225 | |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
226 | /** |
| 4359 | 227 | * A core representation of a conversation between two or more people. |
| 228 | * | |
| 11581 | 229 | * The conversation can be an IM or a chat. |
| 4359 | 230 | */ |
| 15884 | 231 | struct _PurpleConversation |
| 4359 | 232 | { |
| 15884 | 233 | PurpleConversationType type; /**< The type of conversation. */ |
| 4359 | 234 | |
| 15884 | 235 | PurpleAccount *account; /**< The user using this conversation. */ |
| 4359 | 236 | |
| 237 | ||
| 238 | char *name; /**< The name of the conversation. */ | |
| 239 | char *title; /**< The window title. */ | |
| 240 | ||
| 241 | gboolean logging; /**< The status of logging. */ | |
| 8158 | 242 | |
|
11454
a604c2097a6e
[gaim-migrate @ 13693]
Richard Laager <rlaager@pidgin.im>
parents:
11338
diff
changeset
|
243 | GList *logs; /**< This conversation's logs */ |
| 8158 | 244 | |
| 4359 | 245 | union |
| 246 | { | |
| 15884 | 247 | PurpleConvIm *im; /**< IM-specific data. */ |
| 248 | PurpleConvChat *chat; /**< Chat-specific data. */ | |
|
4378
3bef342997ef
[gaim-migrate @ 4644]
Christian Hammond <chipx86@chipx86.com>
parents:
4359
diff
changeset
|
249 | void *misc; /**< Misc. data. */ |
| 4359 | 250 | |
| 251 | } u; | |
|
4465
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
252 | |
| 15884 | 253 | PurpleConversationUiOps *ui_ops; /**< UI-specific operations. */ |
|
4465
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
254 | void *ui_data; /**< UI-specific data. */ |
|
4876
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
255 | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
256 | GHashTable *data; /**< Plugin-specific data. */ |
|
10849
476d68d7a435
[gaim-migrate @ 12521]
Richard Laager <rlaager@pidgin.im>
parents:
10827
diff
changeset
|
257 | |
| 15884 | 258 | PurpleConnectionFlags features; /**< The supported features */ |
| 10665 | 259 | |
| 4359 | 260 | }; |
| 261 | ||
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
262 | #ifdef __cplusplus |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
263 | extern "C" { |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
264 | #endif |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
265 | |
| 4359 | 266 | /**************************************************************************/ |
| 267 | /** @name Conversation API */ | |
| 268 | /**************************************************************************/ | |
| 269 | /*@{*/ | |
| 270 | ||
| 271 | /** | |
| 272 | * Creates a new conversation of the specified type. | |
| 273 | * | |
|
6720
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6622
diff
changeset
|
274 | * @param type The type of conversation. |
| 15884 | 275 | * @param account The account opening the conversation window on the purple |
|
6720
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6622
diff
changeset
|
276 | * user's end. |
|
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6622
diff
changeset
|
277 | * @param name The name of the conversation. |
| 4359 | 278 | * |
| 279 | * @return The new conversation. | |
| 280 | */ | |
| 15884 | 281 | PurpleConversation *purple_conversation_new(PurpleConversationType type, |
| 282 | PurpleAccount *account, | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
283 | const char *name); |
| 4359 | 284 | |
| 285 | /** | |
| 286 | * Destroys the specified conversation and removes it from the parent | |
| 287 | * window. | |
| 288 | * | |
| 289 | * If this conversation is the only one contained in the parent window, | |
| 290 | * that window is also destroyed. | |
| 291 | * | |
| 292 | * @param conv The conversation to destroy. | |
| 293 | */ | |
| 15884 | 294 | void purple_conversation_destroy(PurpleConversation *conv); |
| 4359 | 295 | |
|
12624
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12618
diff
changeset
|
296 | |
|
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12618
diff
changeset
|
297 | /** |
|
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12618
diff
changeset
|
298 | * Present a conversation to the user. This allows core code to initiate a |
|
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12618
diff
changeset
|
299 | * conversation by displaying the IM dialog. |
|
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12618
diff
changeset
|
300 | * @param conv The conversation to present |
|
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12618
diff
changeset
|
301 | */ |
| 15884 | 302 | void purple_conversation_present(PurpleConversation *conv); |
|
12624
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12618
diff
changeset
|
303 | |
|
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12618
diff
changeset
|
304 | |
| 4359 | 305 | /** |
| 306 | * Returns the specified conversation's type. | |
| 307 | * | |
| 308 | * @param conv The conversation. | |
| 309 | * | |
| 310 | * @return The conversation's type. | |
| 311 | */ | |
| 15884 | 312 | PurpleConversationType purple_conversation_get_type(const PurpleConversation *conv); |
| 4359 | 313 | |
| 314 | /** | |
| 315 | * Sets the specified conversation's UI operations structure. | |
| 316 | * | |
| 317 | * @param conv The conversation. | |
| 318 | * @param ops The UI conversation operations structure. | |
| 319 | */ | |
| 15884 | 320 | void purple_conversation_set_ui_ops(PurpleConversation *conv, |
| 321 | PurpleConversationUiOps *ops); | |
| 4359 | 322 | |
| 323 | /** | |
| 11581 | 324 | * Sets the default conversation UI operations structure. |
| 325 | * | |
| 326 | * @param ops The UI conversation operations structure. | |
| 327 | */ | |
| 15884 | 328 | void purple_conversations_set_ui_ops(PurpleConversationUiOps *ops); |
| 11581 | 329 | |
| 330 | /** | |
| 4359 | 331 | * Returns the specified conversation's UI operations structure. |
|
6585
8fcd3639e544
[gaim-migrate @ 7107]
Christian Hammond <chipx86@chipx86.com>
parents:
6488
diff
changeset
|
332 | * |
| 4359 | 333 | * @param conv The conversation. |
| 334 | * | |
| 335 | * @return The operations structure. | |
| 336 | */ | |
| 15884 | 337 | PurpleConversationUiOps *purple_conversation_get_ui_ops( |
| 338 | const PurpleConversation *conv); | |
| 4359 | 339 | |
| 340 | /** | |
| 15884 | 341 | * Sets the specified conversation's purple_account. |
| 4359 | 342 | * |
| 15884 | 343 | * This purple_account represents the user using purple, not the person the user |
| 4359 | 344 | * is having a conversation/chat/flame with. |
| 345 | * | |
| 346 | * @param conv The conversation. | |
| 15884 | 347 | * @param account The purple_account. |
| 4359 | 348 | */ |
| 15884 | 349 | void purple_conversation_set_account(PurpleConversation *conv, |
| 350 | PurpleAccount *account); | |
| 4359 | 351 | |
| 352 | /** | |
| 15884 | 353 | * Returns the specified conversation's purple_account. |
| 4359 | 354 | * |
| 15884 | 355 | * This purple_account represents the user using purple, not the person the user |
| 4359 | 356 | * is having a conversation/chat/flame with. |
| 357 | * | |
| 358 | * @param conv The conversation. | |
| 359 | * | |
| 15884 | 360 | * @return The conversation's purple_account. |
| 4359 | 361 | */ |
| 15884 | 362 | PurpleAccount *purple_conversation_get_account(const PurpleConversation *conv); |
| 4359 | 363 | |
| 364 | /** | |
| 15884 | 365 | * Returns the specified conversation's purple_connection. |
| 4359 | 366 | * |
| 15884 | 367 | * This is the same as purple_conversation_get_user(conv)->gc. |
| 4359 | 368 | * |
| 369 | * @param conv The conversation. | |
| 370 | * | |
| 15884 | 371 | * @return The conversation's purple_connection. |
| 4359 | 372 | */ |
| 15884 | 373 | PurpleConnection *purple_conversation_get_gc(const PurpleConversation *conv); |
| 4359 | 374 | |
| 375 | /** | |
| 376 | * Sets the specified conversation's title. | |
| 377 | * | |
| 378 | * @param conv The conversation. | |
| 379 | * @param title The title. | |
| 380 | */ | |
| 15884 | 381 | void purple_conversation_set_title(PurpleConversation *conv, const char *title); |
| 4359 | 382 | |
| 383 | /** | |
| 384 | * Returns the specified conversation's title. | |
| 385 | * | |
|
6720
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6622
diff
changeset
|
386 | * @param conv The conversation. |
| 4359 | 387 | * |
| 388 | * @return The title. | |
| 389 | */ | |
| 15884 | 390 | const char *purple_conversation_get_title(const PurpleConversation *conv); |
| 4359 | 391 | |
| 392 | /** | |
| 393 | * Automatically sets the specified conversation's title. | |
| 394 | * | |
| 395 | * This function takes OPT_IM_ALIAS_TAB into account, as well as the | |
| 396 | * user's alias. | |
| 397 | * | |
| 398 | * @param conv The conversation. | |
| 399 | */ | |
| 15884 | 400 | void purple_conversation_autoset_title(PurpleConversation *conv); |
| 4359 | 401 | |
| 402 | /** | |
|
7256
311c8febfc92
[gaim-migrate @ 7833]
Christian Hammond <chipx86@chipx86.com>
parents:
7122
diff
changeset
|
403 | * Sets the specified conversation's name. |
|
311c8febfc92
[gaim-migrate @ 7833]
Christian Hammond <chipx86@chipx86.com>
parents:
7122
diff
changeset
|
404 | * |
|
311c8febfc92
[gaim-migrate @ 7833]
Christian Hammond <chipx86@chipx86.com>
parents:
7122
diff
changeset
|
405 | * @param conv The conversation. |
|
311c8febfc92
[gaim-migrate @ 7833]
Christian Hammond <chipx86@chipx86.com>
parents:
7122
diff
changeset
|
406 | * @param name The conversation's name. |
|
311c8febfc92
[gaim-migrate @ 7833]
Christian Hammond <chipx86@chipx86.com>
parents:
7122
diff
changeset
|
407 | */ |
| 15884 | 408 | void purple_conversation_set_name(PurpleConversation *conv, const char *name); |
|
7256
311c8febfc92
[gaim-migrate @ 7833]
Christian Hammond <chipx86@chipx86.com>
parents:
7122
diff
changeset
|
409 | |
|
311c8febfc92
[gaim-migrate @ 7833]
Christian Hammond <chipx86@chipx86.com>
parents:
7122
diff
changeset
|
410 | /** |
| 4359 | 411 | * Returns the specified conversation's name. |
| 412 | * | |
| 413 | * @param conv The conversation. | |
| 414 | * | |
| 415 | * @return The conversation's name. | |
| 416 | */ | |
| 15884 | 417 | const char *purple_conversation_get_name(const PurpleConversation *conv); |
| 4359 | 418 | |
| 419 | /** | |
| 420 | * Enables or disables logging for this conversation. | |
| 421 | * | |
|
6720
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6622
diff
changeset
|
422 | * @param conv The conversation. |
|
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6622
diff
changeset
|
423 | * @param log @c TRUE if logging should be enabled, or @c FALSE otherwise. |
| 4359 | 424 | */ |
| 15884 | 425 | void purple_conversation_set_logging(PurpleConversation *conv, gboolean log); |
| 4359 | 426 | |
| 427 | /** | |
| 428 | * Returns whether or not logging is enabled for this conversation. | |
| 429 | * | |
|
6720
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6622
diff
changeset
|
430 | * @param conv The conversation. |
|
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6622
diff
changeset
|
431 | * |
| 4359 | 432 | * @return @c TRUE if logging is enabled, or @c FALSE otherwise. |
| 433 | */ | |
| 15884 | 434 | gboolean purple_conversation_is_logging(const PurpleConversation *conv); |
| 4359 | 435 | |
| 436 | /** | |
|
11672
018c70c8134c
[gaim-migrate @ 13958]
Richard Laager <rlaager@pidgin.im>
parents:
11664
diff
changeset
|
437 | * Closes any open logs for this conversation. |
|
018c70c8134c
[gaim-migrate @ 13958]
Richard Laager <rlaager@pidgin.im>
parents:
11664
diff
changeset
|
438 | * |
|
018c70c8134c
[gaim-migrate @ 13958]
Richard Laager <rlaager@pidgin.im>
parents:
11664
diff
changeset
|
439 | * Note that new logs will be opened as necessary (e.g. upon receipt of a |
|
018c70c8134c
[gaim-migrate @ 13958]
Richard Laager <rlaager@pidgin.im>
parents:
11664
diff
changeset
|
440 | * message, if the conversation has logging enabled. To disable logging for |
| 15884 | 441 | * the remainder of the conversation, use purple_conversation_set_logging(). |
|
11672
018c70c8134c
[gaim-migrate @ 13958]
Richard Laager <rlaager@pidgin.im>
parents:
11664
diff
changeset
|
442 | * |
|
018c70c8134c
[gaim-migrate @ 13958]
Richard Laager <rlaager@pidgin.im>
parents:
11664
diff
changeset
|
443 | * @param conv The conversation. |
|
018c70c8134c
[gaim-migrate @ 13958]
Richard Laager <rlaager@pidgin.im>
parents:
11664
diff
changeset
|
444 | */ |
| 15884 | 445 | void purple_conversation_close_logs(PurpleConversation *conv); |
|
11672
018c70c8134c
[gaim-migrate @ 13958]
Richard Laager <rlaager@pidgin.im>
parents:
11664
diff
changeset
|
446 | |
|
018c70c8134c
[gaim-migrate @ 13958]
Richard Laager <rlaager@pidgin.im>
parents:
11664
diff
changeset
|
447 | /** |
| 4359 | 448 | * Returns the specified conversation's IM-specific data. |
| 449 | * | |
| 15884 | 450 | * If the conversation type is not PURPLE_CONV_TYPE_IM, this will return @c NULL. |
| 4359 | 451 | * |
| 452 | * @param conv The conversation. | |
| 453 | * | |
| 454 | * @return The IM-specific data. | |
| 455 | */ | |
| 15884 | 456 | PurpleConvIm *purple_conversation_get_im_data(const PurpleConversation *conv); |
| 4359 | 457 | |
| 15884 | 458 | #define PURPLE_CONV_IM(c) (purple_conversation_get_im_data(c)) |
| 4359 | 459 | |
| 460 | /** | |
| 461 | * Returns the specified conversation's chat-specific data. | |
| 462 | * | |
| 15884 | 463 | * If the conversation type is not PURPLE_CONV_TYPE_CHAT, this will return @c NULL. |
| 4359 | 464 | * |
| 465 | * @param conv The conversation. | |
| 466 | * | |
| 467 | * @return The chat-specific data. | |
| 468 | */ | |
| 15884 | 469 | PurpleConvChat *purple_conversation_get_chat_data(const PurpleConversation *conv); |
| 4359 | 470 | |
| 15884 | 471 | #define PURPLE_CONV_CHAT(c) (purple_conversation_get_chat_data(c)) |
| 4359 | 472 | |
| 473 | /** | |
|
4877
7d1f4381fed0
[gaim-migrate @ 5207]
Christian Hammond <chipx86@chipx86.com>
parents:
4876
diff
changeset
|
474 | * Sets extra data for a conversation. |
|
6585
8fcd3639e544
[gaim-migrate @ 7107]
Christian Hammond <chipx86@chipx86.com>
parents:
6488
diff
changeset
|
475 | * |
|
4876
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
476 | * @param conv The conversation. |
|
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
477 | * @param key The unique key. |
|
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
478 | * @param data The data to assign. |
|
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
479 | */ |
| 15884 | 480 | void purple_conversation_set_data(PurpleConversation *conv, const char *key, |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
481 | gpointer data); |
|
4876
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
482 | |
|
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
483 | /** |
|
4877
7d1f4381fed0
[gaim-migrate @ 5207]
Christian Hammond <chipx86@chipx86.com>
parents:
4876
diff
changeset
|
484 | * Returns extra data in a conversation. |
|
4876
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
485 | * |
|
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
486 | * @param conv The conversation. |
|
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
487 | * @param key The unqiue key. |
|
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
488 | * |
|
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
489 | * @return The data associated with the key. |
|
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
490 | */ |
| 15884 | 491 | gpointer purple_conversation_get_data(PurpleConversation *conv, const char *key); |
|
4876
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
492 | |
|
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
493 | /** |
| 4359 | 494 | * Returns a list of all conversations. |
| 495 | * | |
| 496 | * This list includes both IMs and chats. | |
| 497 | * | |
| 498 | * @return A GList of all conversations. | |
| 499 | */ | |
| 15884 | 500 | GList *purple_get_conversations(void); |
| 4359 | 501 | |
| 502 | /** | |
| 503 | * Returns a list of all IMs. | |
| 504 | * | |
| 505 | * @return A GList of all IMs. | |
| 506 | */ | |
| 15884 | 507 | GList *purple_get_ims(void); |
| 4359 | 508 | |
| 509 | /** | |
| 510 | * Returns a list of all chats. | |
| 511 | * | |
| 512 | * @return A GList of all chats. | |
| 513 | */ | |
| 15884 | 514 | GList *purple_get_chats(void); |
| 4359 | 515 | |
| 516 | /** | |
| 15884 | 517 | * Finds a conversation with the specified type, name, and Purple account. |
| 4359 | 518 | * |
|
10246
aa5bff72f94c
[gaim-migrate @ 11386]
Mark Doliner <markdoliner@pidgin.im>
parents:
10008
diff
changeset
|
519 | * @param type The type of the conversation. |
| 4359 | 520 | * @param name The name of the conversation. |
| 15884 | 521 | * @param account The purple_account associated with the conversation. |
| 4359 | 522 | * |
| 523 | * @return The conversation if found, or @c NULL otherwise. | |
| 524 | */ | |
| 15884 | 525 | PurpleConversation *purple_find_conversation_with_account( |
| 526 | PurpleConversationType type, const char *name, | |
| 527 | const PurpleAccount *account); | |
| 4359 | 528 | |
| 529 | /** | |
| 530 | * Writes to a conversation window. | |
| 531 | * | |
| 532 | * This function should not be used to write IM or chat messages. Use | |
| 15884 | 533 | * purple_conv_im_write() and purple_conv_chat_write() instead. Those functions will |
| 4359 | 534 | * most likely call this anyway, but they may do their own formatting, |
| 535 | * sound playback, etc. | |
| 536 | * | |
| 537 | * This can be used to write generic messages, such as "so and so closed | |
| 538 | * the conversation window." | |
| 539 | * | |
| 540 | * @param conv The conversation. | |
| 541 | * @param who The user who sent the message. | |
| 542 | * @param message The message. | |
|
6621
2a18ef3e5224
[gaim-migrate @ 7145]
Robert McQueen <robot101@debian.org>
parents:
6605
diff
changeset
|
543 | * @param flags The message flags. |
| 4359 | 544 | * @param mtime The time the message was sent. |
| 545 | * | |
| 15884 | 546 | * @see purple_conv_im_write() |
| 547 | * @see purple_conv_chat_write() | |
| 4359 | 548 | */ |
| 15884 | 549 | void purple_conversation_write(PurpleConversation *conv, const char *who, |
| 550 | const char *message, PurpleMessageFlags flags, | |
| 10665 | 551 | time_t mtime); |
| 552 | ||
| 553 | ||
| 554 | /** | |
| 555 | Set the features as supported for the given conversation. | |
| 556 | @param conv The conversation | |
| 557 | @param features Bitset defining supported features | |
| 558 | */ | |
| 15884 | 559 | void purple_conversation_set_features(PurpleConversation *conv, |
| 560 | PurpleConnectionFlags features); | |
| 10665 | 561 | |
| 562 | ||
| 563 | /** | |
| 564 | Get the features supported by the given conversation. | |
| 565 | @param conv The conversation | |
| 566 | */ | |
| 15884 | 567 | PurpleConnectionFlags purple_conversation_get_features(PurpleConversation *conv); |
| 4359 | 568 | |
| 569 | /** | |
|
9260
82d7b380220a
[gaim-migrate @ 10059]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9166
diff
changeset
|
570 | * Determines if a conversation has focus |
|
82d7b380220a
[gaim-migrate @ 10059]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9166
diff
changeset
|
571 | * |
|
82d7b380220a
[gaim-migrate @ 10059]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9166
diff
changeset
|
572 | * @param conv The conversation. |
|
82d7b380220a
[gaim-migrate @ 10059]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9166
diff
changeset
|
573 | * |
|
82d7b380220a
[gaim-migrate @ 10059]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9166
diff
changeset
|
574 | * @return @c TRUE if the conversation has focus, @c FALSE if |
|
82d7b380220a
[gaim-migrate @ 10059]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9166
diff
changeset
|
575 | * it does not or the UI does not have a concept of conversation focus |
|
82d7b380220a
[gaim-migrate @ 10059]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9166
diff
changeset
|
576 | */ |
| 15884 | 577 | gboolean purple_conversation_has_focus(PurpleConversation *conv); |
|
9260
82d7b380220a
[gaim-migrate @ 10059]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9166
diff
changeset
|
578 | |
|
82d7b380220a
[gaim-migrate @ 10059]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9166
diff
changeset
|
579 | /** |
| 4359 | 580 | * Updates the visual status and UI of a conversation. |
| 581 | * | |
| 582 | * @param conv The conversation. | |
| 583 | * @param type The update type. | |
| 584 | */ | |
| 15884 | 585 | void purple_conversation_update(PurpleConversation *conv, PurpleConvUpdateType type); |
| 4359 | 586 | |
| 587 | /** | |
| 588 | * Calls a function on each conversation. | |
| 589 | * | |
| 590 | * @param func The function. | |
| 591 | */ | |
| 15884 | 592 | void purple_conversation_foreach(void (*func)(PurpleConversation *conv)); |
| 4359 | 593 | |
| 594 | /*@}*/ | |
| 595 | ||
| 596 | ||
| 597 | /**************************************************************************/ | |
| 598 | /** @name IM Conversation API */ | |
| 599 | /**************************************************************************/ | |
| 600 | /*@{*/ | |
| 601 | ||
| 602 | /** | |
| 603 | * Gets an IM's parent conversation. | |
| 604 | * | |
| 605 | * @param im The IM. | |
| 606 | * | |
| 607 | * @return The parent conversation. | |
| 608 | */ | |
| 15884 | 609 | PurpleConversation *purple_conv_im_get_conversation(const PurpleConvIm *im); |
| 4359 | 610 | |
| 611 | /** | |
|
6846
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
612 | * Sets the IM's buddy icon. |
|
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
613 | * |
| 15884 | 614 | * This should only be called from within Purple. You probably want to |
| 615 | * call purple_buddy_icon_set_data(). | |
|
6846
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
616 | * |
|
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
617 | * @param im The IM. |
|
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
618 | * @param icon The buddy icon. |
|
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
619 | * |
| 15884 | 620 | * @see purple_buddy_icon_set_data() |
|
6846
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
621 | */ |
| 15884 | 622 | void purple_conv_im_set_icon(PurpleConvIm *im, PurpleBuddyIcon *icon); |
|
6846
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
623 | |
|
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
624 | /** |
|
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
625 | * Returns the IM's buddy icon. |
|
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
626 | * |
|
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
627 | * @param im The IM. |
|
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
628 | * |
|
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
629 | * @return The buddy icon. |
|
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
630 | */ |
| 15884 | 631 | PurpleBuddyIcon *purple_conv_im_get_icon(const PurpleConvIm *im); |
|
6846
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
632 | |
|
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
633 | /** |
| 4359 | 634 | * Sets the IM's typing state. |
| 635 | * | |
| 636 | * @param im The IM. | |
| 637 | * @param state The typing state. | |
| 638 | */ | |
| 15884 | 639 | void purple_conv_im_set_typing_state(PurpleConvIm *im, PurpleTypingState state); |
| 4359 | 640 | |
| 641 | /** | |
| 642 | * Returns the IM's typing state. | |
| 643 | * | |
| 644 | * @param im The IM. | |
| 645 | * | |
| 646 | * @return The IM's typing state. | |
| 647 | */ | |
| 15884 | 648 | PurpleTypingState purple_conv_im_get_typing_state(const PurpleConvIm *im); |
| 4359 | 649 | |
| 650 | /** | |
| 651 | * Starts the IM's typing timeout. | |
| 652 | * | |
| 653 | * @param im The IM. | |
| 654 | * @param timeout The timeout. | |
| 655 | */ | |
| 15884 | 656 | void purple_conv_im_start_typing_timeout(PurpleConvIm *im, int timeout); |
| 4359 | 657 | |
| 658 | /** | |
| 659 | * Stops the IM's typing timeout. | |
| 660 | * | |
| 661 | * @param im The IM. | |
| 662 | */ | |
| 15884 | 663 | void purple_conv_im_stop_typing_timeout(PurpleConvIm *im); |
| 4359 | 664 | |
| 665 | /** | |
| 666 | * Returns the IM's typing timeout. | |
| 667 | * | |
| 668 | * @param im The IM. | |
| 669 | * | |
| 670 | * @return The timeout. | |
| 671 | */ | |
| 15884 | 672 | guint purple_conv_im_get_typing_timeout(const PurpleConvIm *im); |
| 4359 | 673 | |
| 674 | /** | |
| 15884 | 675 | * Sets the quiet-time when no PURPLE_TYPING messages will be sent. |
|
13844
835b8f7b3d1d
[gaim-migrate @ 16295]
Mark Doliner <markdoliner@pidgin.im>
parents:
13840
diff
changeset
|
676 | * Few protocols need this (maybe only MSN). If the user is still |
| 15884 | 677 | * typing after this quiet-period, then another PURPLE_TYPING message |
|
13844
835b8f7b3d1d
[gaim-migrate @ 16295]
Mark Doliner <markdoliner@pidgin.im>
parents:
13840
diff
changeset
|
678 | * will be sent. |
| 4359 | 679 | * |
| 680 | * @param im The IM. | |
|
13844
835b8f7b3d1d
[gaim-migrate @ 16295]
Mark Doliner <markdoliner@pidgin.im>
parents:
13840
diff
changeset
|
681 | * @param val The number of seconds to wait before allowing another |
| 15884 | 682 | * PURPLE_TYPING message to be sent to the user. Or 0 to |
| 683 | * not send another PURPLE_TYPING message. | |
| 4359 | 684 | */ |
| 15884 | 685 | void purple_conv_im_set_type_again(PurpleConvIm *im, unsigned int val); |
| 4359 | 686 | |
| 687 | /** | |
| 15884 | 688 | * Returns the time after which another PURPLE_TYPING message should be sent. |
| 4359 | 689 | * |
| 690 | * @param im The IM. | |
| 691 | * | |
|
13844
835b8f7b3d1d
[gaim-migrate @ 16295]
Mark Doliner <markdoliner@pidgin.im>
parents:
13840
diff
changeset
|
692 | * @return The time in seconds since the epoch. Or 0 if no additional |
| 15884 | 693 | * PURPLE_TYPING message should be sent. |
| 4359 | 694 | */ |
| 15884 | 695 | time_t purple_conv_im_get_type_again(const PurpleConvIm *im); |
| 4359 | 696 | |
| 697 | /** | |
| 698 | * Starts the IM's type again timeout. | |
| 699 | * | |
| 700 | * @param im The IM. | |
| 701 | */ | |
| 15884 | 702 | void purple_conv_im_start_send_typed_timeout(PurpleConvIm *im); |
| 4359 | 703 | |
| 704 | /** | |
| 705 | * Stops the IM's type again timeout. | |
| 706 | * | |
| 707 | * @param im The IM. | |
| 708 | */ | |
| 15884 | 709 | void purple_conv_im_stop_send_typed_timeout(PurpleConvIm *im); |
| 4359 | 710 | |
| 711 | /** | |
| 712 | * Returns the IM's type again timeout interval. | |
| 713 | * | |
| 714 | * @param im The IM. | |
| 715 | * | |
| 716 | * @return The type again timeout interval. | |
| 717 | */ | |
| 15884 | 718 | guint purple_conv_im_get_send_typed_timeout(const PurpleConvIm *im); |
| 4359 | 719 | |
| 720 | /** | |
| 721 | * Updates the visual typing notification for an IM conversation. | |
| 722 | * | |
| 723 | * @param im The IM. | |
| 724 | */ | |
| 15884 | 725 | void purple_conv_im_update_typing(PurpleConvIm *im); |
| 4359 | 726 | |
| 727 | /** | |
| 728 | * Writes to an IM. | |
| 729 | * | |
| 730 | * @param im The IM. | |
| 731 | * @param who The user who sent the message. | |
| 732 | * @param message The message to write. | |
|
6621
2a18ef3e5224
[gaim-migrate @ 7145]
Robert McQueen <robot101@debian.org>
parents:
6605
diff
changeset
|
733 | * @param flags The message flags. |
| 4359 | 734 | * @param mtime The time the message was sent. |
| 735 | */ | |
| 15884 | 736 | void purple_conv_im_write(PurpleConvIm *im, const char *who, |
| 737 | const char *message, PurpleMessageFlags flags, | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
738 | time_t mtime); |
| 4359 | 739 | |
| 740 | /** | |
| 9627 | 741 | * Presents an IM-error to the user |
| 11581 | 742 | * |
| 9627 | 743 | * This is a helper function to find a conversation, write an error to it, and |
| 744 | * raise the window. If a conversation with this user doesn't already exist, | |
| 745 | * the function will return FALSE and the calling function can attempt to present | |
| 15884 | 746 | * the error another way (purple_notify_error, most likely) |
| 9627 | 747 | * |
| 748 | * @param who The user this error is about | |
| 749 | * @param account The account this error is on | |
| 750 | * @param what The error | |
| 751 | * @return TRUE if the error was presented, else FALSE | |
| 752 | */ | |
| 15884 | 753 | gboolean purple_conv_present_error(const char *who, PurpleAccount *account, const char *what); |
| 9627 | 754 | |
| 755 | /** | |
| 4359 | 756 | * Sends a message to this IM conversation. |
| 757 | * | |
| 758 | * @param im The IM. | |
| 759 | * @param message The message to send. | |
| 760 | */ | |
| 15884 | 761 | void purple_conv_im_send(PurpleConvIm *im, const char *message); |
| 4359 | 762 | |
| 10526 | 763 | /** |
| 14582 | 764 | * Sends a message to a conversation after confirming with |
| 765 | * the user. | |
| 766 | * | |
| 767 | * This function is intended for use in cases where the user | |
| 768 | * hasn't explicitly and knowingly caused a message to be sent. | |
| 769 | * The confirmation ensures that the user isn't sending a | |
| 770 | * message by mistake. | |
| 771 | * | |
| 772 | * @param conv The conversation. | |
| 773 | * @param message The message to send. | |
| 774 | */ | |
| 15884 | 775 | void purple_conv_send_confirm(PurpleConversation *conv, const char *message); |
| 14582 | 776 | |
| 777 | /** | |
|
11921
fe74264ce36c
[gaim-migrate @ 14212]
Evan Schoenberg <evands@pidgin.im>
parents:
11869
diff
changeset
|
778 | * Sends a message to this IM conversation with specified flags. |
|
fe74264ce36c
[gaim-migrate @ 14212]
Evan Schoenberg <evands@pidgin.im>
parents:
11869
diff
changeset
|
779 | * |
|
fe74264ce36c
[gaim-migrate @ 14212]
Evan Schoenberg <evands@pidgin.im>
parents:
11869
diff
changeset
|
780 | * @param im The IM. |
|
fe74264ce36c
[gaim-migrate @ 14212]
Evan Schoenberg <evands@pidgin.im>
parents:
11869
diff
changeset
|
781 | * @param message The message to send. |
| 15884 | 782 | * @param flags The PurpleMessageFlags flags to use in addition to PURPLE_MESSAGE_SEND. |
|
11921
fe74264ce36c
[gaim-migrate @ 14212]
Evan Schoenberg <evands@pidgin.im>
parents:
11869
diff
changeset
|
783 | */ |
| 15884 | 784 | void purple_conv_im_send_with_flags(PurpleConvIm *im, const char *message, PurpleMessageFlags flags); |
|
11921
fe74264ce36c
[gaim-migrate @ 14212]
Evan Schoenberg <evands@pidgin.im>
parents:
11869
diff
changeset
|
785 | |
|
fe74264ce36c
[gaim-migrate @ 14212]
Evan Schoenberg <evands@pidgin.im>
parents:
11869
diff
changeset
|
786 | /** |
| 10528 | 787 | * Adds a smiley to the conversation's smiley tree. If this returns |
| 15884 | 788 | * @c TRUE you should call purple_conv_custom_smiley_write() one or more |
| 789 | * times, and then purple_conv_custom_smiley_close(). If this returns | |
| 10528 | 790 | * @c FALSE, either the conv or smile were invalid, or the icon was |
| 791 | * found in the cache. In either case, calling write or close would | |
| 792 | * be an error. | |
| 10526 | 793 | * |
| 794 | * @param conv The conversation to associate the smiley with. | |
| 795 | * @param smile The text associated with the smiley | |
| 796 | * @param cksum_type The type of checksum. | |
| 797 | * @param chksum The checksum, as a NUL terminated base64 string. | |
|
12618
b83b6bab0703
[gaim-migrate @ 14954]
Richard Laager <rlaager@pidgin.im>
parents:
12463
diff
changeset
|
798 | * @param remote @c TRUE if the custom smiley is set by the remote user (buddy). |
| 10528 | 799 | * @return @c TRUE if an icon is expected, else FALSE. Note that |
| 15884 | 800 | * it is an error to never call purple_conv_custom_smiley_close if |
| 10526 | 801 | * this function returns @c TRUE, but an error to call it if |
| 802 | * @c FALSE is returned. | |
| 803 | */ | |
| 804 | ||
| 15884 | 805 | gboolean purple_conv_custom_smiley_add(PurpleConversation *conv, const char *smile, |
|
12618
b83b6bab0703
[gaim-migrate @ 14954]
Richard Laager <rlaager@pidgin.im>
parents:
12463
diff
changeset
|
806 | const char *cksum_type, const char *chksum, |
|
b83b6bab0703
[gaim-migrate @ 14954]
Richard Laager <rlaager@pidgin.im>
parents:
12463
diff
changeset
|
807 | gboolean remote); |
| 10526 | 808 | |
| 809 | ||
| 810 | /** | |
| 811 | * Updates the image associated with the current smiley. | |
| 812 | * | |
| 813 | * @param conv The conversation associated with the smiley. | |
| 814 | * @param smile The text associated with the smiley. | |
| 815 | * @param data The actual image data. | |
| 816 | * @param size The length of the data. | |
| 817 | */ | |
| 818 | ||
| 15884 | 819 | void purple_conv_custom_smiley_write(PurpleConversation *conv, |
|
11137
cf40226ddff7
[gaim-migrate @ 13201]
Mark Doliner <markdoliner@pidgin.im>
parents:
11035
diff
changeset
|
820 | const char *smile, |
|
cf40226ddff7
[gaim-migrate @ 13201]
Mark Doliner <markdoliner@pidgin.im>
parents:
11035
diff
changeset
|
821 | const guchar *data, |
|
cf40226ddff7
[gaim-migrate @ 13201]
Mark Doliner <markdoliner@pidgin.im>
parents:
11035
diff
changeset
|
822 | gsize size); |
| 10526 | 823 | |
| 824 | /** | |
| 825 | * Close the custom smiley, all data has been written with | |
| 15884 | 826 | * purple_conv_custom_smiley_write, and it is no longer valid |
| 10526 | 827 | * to call that function on that smiley. |
| 828 | * | |
| 15884 | 829 | * @param conv The purple conversation associated with the smiley. |
| 10526 | 830 | * @param smile The text associated with the smiley |
| 831 | */ | |
| 832 | ||
| 15884 | 833 | void purple_conv_custom_smiley_close(PurpleConversation *conv, const char *smile); |
| 10526 | 834 | |
| 4359 | 835 | /*@}*/ |
| 836 | ||
| 837 | ||
| 838 | /**************************************************************************/ | |
| 839 | /** @name Chat Conversation API */ | |
| 840 | /**************************************************************************/ | |
| 841 | /*@{*/ | |
| 842 | ||
| 843 | /** | |
| 844 | * Gets a chat's parent conversation. | |
| 845 | * | |
| 846 | * @param chat The chat. | |
| 847 | * | |
| 848 | * @return The parent conversation. | |
| 849 | */ | |
| 15884 | 850 | PurpleConversation *purple_conv_chat_get_conversation(const PurpleConvChat *chat); |
| 4359 | 851 | |
| 852 | /** | |
| 853 | * Sets the list of users in the chat room. | |
| 854 | * | |
|
6407
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
855 | * @note Calling this function will not update the display of the users. |
| 15884 | 856 | * Please use purple_conv_chat_add_user(), purple_conv_chat_add_users(), |
| 857 | * purple_conv_chat_remove_user(), and purple_conv_chat_remove_users() instead. | |
|
6407
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
858 | * |
| 4359 | 859 | * @param chat The chat. |
| 860 | * @param users The list of users. | |
| 861 | * | |
| 862 | * @return The list passed. | |
| 863 | */ | |
| 15884 | 864 | GList *purple_conv_chat_set_users(PurpleConvChat *chat, GList *users); |
| 4359 | 865 | |
| 866 | /** | |
| 867 | * Returns a list of users in the chat room. | |
| 868 | * | |
| 869 | * @param chat The chat. | |
| 870 | * | |
| 871 | * @return The list of users. | |
| 872 | */ | |
| 15884 | 873 | GList *purple_conv_chat_get_users(const PurpleConvChat *chat); |
| 4359 | 874 | |
| 875 | /** | |
| 876 | * Ignores a user in a chat room. | |
| 877 | * | |
| 878 | * @param chat The chat. | |
| 879 | * @param name The name of the user. | |
| 880 | */ | |
| 15884 | 881 | void purple_conv_chat_ignore(PurpleConvChat *chat, const char *name); |
| 4359 | 882 | |
| 883 | /** | |
| 884 | * Unignores a user in a chat room. | |
| 885 | * | |
| 886 | * @param chat The chat. | |
| 887 | * @param name The name of the user. | |
| 888 | */ | |
| 15884 | 889 | void purple_conv_chat_unignore(PurpleConvChat *chat, const char *name); |
| 4359 | 890 | |
| 891 | /** | |
| 892 | * Sets the list of ignored users in the chat room. | |
| 893 | * | |
| 894 | * @param chat The chat. | |
| 895 | * @param ignored The list of ignored users. | |
| 896 | * | |
| 897 | * @return The list passed. | |
| 898 | */ | |
| 15884 | 899 | GList *purple_conv_chat_set_ignored(PurpleConvChat *chat, GList *ignored); |
| 4359 | 900 | |
| 901 | /** | |
| 902 | * Returns the list of ignored users in the chat room. | |
| 903 | * | |
| 904 | * @param chat The chat. | |
| 905 | * | |
| 906 | * @return The list of ignored users. | |
| 907 | */ | |
| 15884 | 908 | GList *purple_conv_chat_get_ignored(const PurpleConvChat *chat); |
| 4359 | 909 | |
| 910 | /** | |
| 911 | * Returns the actual name of the specified ignored user, if it exists in | |
| 912 | * the ignore list. | |
| 913 | * | |
| 914 | * If the user found contains a prefix, such as '+' or '\@', this is also | |
| 915 | * returned. The username passed to the function does not have to have this | |
| 916 | * formatting. | |
| 917 | * | |
| 918 | * @param chat The chat. | |
| 919 | * @param user The user to check in the ignore list. | |
| 920 | * | |
| 921 | * @return The ignored user if found, complete with prefixes, or @c NULL | |
| 922 | * if not found. | |
| 923 | */ | |
| 15884 | 924 | const char *purple_conv_chat_get_ignored_user(const PurpleConvChat *chat, |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
925 | const char *user); |
| 4359 | 926 | |
| 927 | /** | |
| 928 | * Returns @c TRUE if the specified user is ignored. | |
| 929 | * | |
| 930 | * @param chat The chat. | |
| 931 | * @param user The user. | |
| 932 | * | |
| 933 | * @return @c TRUE if the user is in the ignore list; @c FALSE otherwise. | |
| 934 | */ | |
| 15884 | 935 | gboolean purple_conv_chat_is_user_ignored(const PurpleConvChat *chat, |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
936 | const char *user); |
| 4359 | 937 | |
| 938 | /** | |
| 939 | * Sets the chat room's topic. | |
| 940 | * | |
| 941 | * @param chat The chat. | |
| 942 | * @param who The user that set the topic. | |
| 943 | * @param topic The topic. | |
| 944 | */ | |
| 15884 | 945 | void purple_conv_chat_set_topic(PurpleConvChat *chat, const char *who, |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
946 | const char *topic); |
| 4359 | 947 | |
| 948 | /** | |
| 949 | * Returns the chat room's topic. | |
| 950 | * | |
| 951 | * @param chat The chat. | |
| 952 | * | |
| 953 | * @return The chat's topic. | |
| 954 | */ | |
| 15884 | 955 | const char *purple_conv_chat_get_topic(const PurpleConvChat *chat); |
| 4359 | 956 | |
| 957 | /** | |
| 958 | * Sets the chat room's ID. | |
| 959 | * | |
| 960 | * @param chat The chat. | |
| 961 | * @param id The ID. | |
| 962 | */ | |
| 15884 | 963 | void purple_conv_chat_set_id(PurpleConvChat *chat, int id); |
| 4359 | 964 | |
| 965 | /** | |
| 966 | * Returns the chat room's ID. | |
| 967 | * | |
| 968 | * @param chat The chat. | |
| 969 | * | |
| 970 | * @return The ID. | |
| 971 | */ | |
| 15884 | 972 | int purple_conv_chat_get_id(const PurpleConvChat *chat); |
| 4359 | 973 | |
| 974 | /** | |
| 975 | * Writes to a chat. | |
| 976 | * | |
| 977 | * @param chat The chat. | |
| 978 | * @param who The user who sent the message. | |
| 979 | * @param message The message to write. | |
|
6621
2a18ef3e5224
[gaim-migrate @ 7145]
Robert McQueen <robot101@debian.org>
parents:
6605
diff
changeset
|
980 | * @param flags The flags. |
| 4359 | 981 | * @param mtime The time the message was sent. |
| 982 | */ | |
| 15884 | 983 | void purple_conv_chat_write(PurpleConvChat *chat, const char *who, |
| 984 | const char *message, PurpleMessageFlags flags, | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
985 | time_t mtime); |
| 4359 | 986 | |
| 987 | /** | |
| 988 | * Sends a message to this chat conversation. | |
| 989 | * | |
| 990 | * @param chat The chat. | |
| 991 | * @param message The message to send. | |
| 992 | */ | |
| 15884 | 993 | void purple_conv_chat_send(PurpleConvChat *chat, const char *message); |
| 4359 | 994 | |
| 995 | /** | |
|
11921
fe74264ce36c
[gaim-migrate @ 14212]
Evan Schoenberg <evands@pidgin.im>
parents:
11869
diff
changeset
|
996 | * Sends a message to this chat conversation with specified flags. |
|
fe74264ce36c
[gaim-migrate @ 14212]
Evan Schoenberg <evands@pidgin.im>
parents:
11869
diff
changeset
|
997 | * |
|
fe74264ce36c
[gaim-migrate @ 14212]
Evan Schoenberg <evands@pidgin.im>
parents:
11869
diff
changeset
|
998 | * @param chat The chat. |
|
fe74264ce36c
[gaim-migrate @ 14212]
Evan Schoenberg <evands@pidgin.im>
parents:
11869
diff
changeset
|
999 | * @param message The message to send. |
| 15884 | 1000 | * @param flags The PurpleMessageFlags flags to use. |
|
11921
fe74264ce36c
[gaim-migrate @ 14212]
Evan Schoenberg <evands@pidgin.im>
parents:
11869
diff
changeset
|
1001 | */ |
| 15884 | 1002 | void purple_conv_chat_send_with_flags(PurpleConvChat *chat, const char *message, PurpleMessageFlags flags); |
|
11921
fe74264ce36c
[gaim-migrate @ 14212]
Evan Schoenberg <evands@pidgin.im>
parents:
11869
diff
changeset
|
1003 | |
|
fe74264ce36c
[gaim-migrate @ 14212]
Evan Schoenberg <evands@pidgin.im>
parents:
11869
diff
changeset
|
1004 | /** |
| 4359 | 1005 | * Adds a user to a chat. |
| 1006 | * | |
| 9939 | 1007 | * @param chat The chat. |
| 1008 | * @param user The user to add. | |
| 1009 | * @param extra_msg An extra message to display with the join message. | |
| 1010 | * @param flags The users flags | |
| 1011 | * @param new_arrival Decides whether or not to show a join notice. | |
| 4359 | 1012 | */ |
| 15884 | 1013 | void purple_conv_chat_add_user(PurpleConvChat *chat, const char *user, |
| 1014 | const char *extra_msg, PurpleConvChatBuddyFlags flags, | |
|
9846
61f7349c153a
[gaim-migrate @ 10724]
Nathan Fredrickson <nathan@silverorange.com>
parents:
9718
diff
changeset
|
1015 | gboolean new_arrival); |
| 4359 | 1016 | |
| 1017 | /** | |
|
6407
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1018 | * Adds a list of users to a chat. |
|
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1019 | * |
|
11454
a604c2097a6e
[gaim-migrate @ 13693]
Richard Laager <rlaager@pidgin.im>
parents:
11338
diff
changeset
|
1020 | * The data is copied from @a users, @a extra_msgs, and @a flags, so it is up to |
|
a604c2097a6e
[gaim-migrate @ 13693]
Richard Laager <rlaager@pidgin.im>
parents:
11338
diff
changeset
|
1021 | * the caller to free this list after calling this function. |
|
6407
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1022 | * |
|
11454
a604c2097a6e
[gaim-migrate @ 13693]
Richard Laager <rlaager@pidgin.im>
parents:
11338
diff
changeset
|
1023 | * @param chat The chat. |
|
a604c2097a6e
[gaim-migrate @ 13693]
Richard Laager <rlaager@pidgin.im>
parents:
11338
diff
changeset
|
1024 | * @param users The list of users to add. |
|
a604c2097a6e
[gaim-migrate @ 13693]
Richard Laager <rlaager@pidgin.im>
parents:
11338
diff
changeset
|
1025 | * @param extra_msgs An extra message to display with the join message for each |
|
a604c2097a6e
[gaim-migrate @ 13693]
Richard Laager <rlaager@pidgin.im>
parents:
11338
diff
changeset
|
1026 | * user. This list may be shorter than @a users, in which |
|
a604c2097a6e
[gaim-migrate @ 13693]
Richard Laager <rlaager@pidgin.im>
parents:
11338
diff
changeset
|
1027 | * case, the users after the end of extra_msgs will not have |
|
a604c2097a6e
[gaim-migrate @ 13693]
Richard Laager <rlaager@pidgin.im>
parents:
11338
diff
changeset
|
1028 | * an extra message. By extension, this means that extra_msgs |
|
a604c2097a6e
[gaim-migrate @ 13693]
Richard Laager <rlaager@pidgin.im>
parents:
11338
diff
changeset
|
1029 | * can simply be @c NULL and none of the users will have an |
|
a604c2097a6e
[gaim-migrate @ 13693]
Richard Laager <rlaager@pidgin.im>
parents:
11338
diff
changeset
|
1030 | * extra message. |
|
a604c2097a6e
[gaim-migrate @ 13693]
Richard Laager <rlaager@pidgin.im>
parents:
11338
diff
changeset
|
1031 | * @param flags The list of flags for each user. |
|
a604c2097a6e
[gaim-migrate @ 13693]
Richard Laager <rlaager@pidgin.im>
parents:
11338
diff
changeset
|
1032 | * @param new_arrivals Decides whether or not to show join notices. |
|
6407
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1033 | */ |
| 15884 | 1034 | void purple_conv_chat_add_users(PurpleConvChat *chat, GList *users, GList *extra_msgs, |
|
11454
a604c2097a6e
[gaim-migrate @ 13693]
Richard Laager <rlaager@pidgin.im>
parents:
11338
diff
changeset
|
1035 | GList *flags, gboolean new_arrivals); |
|
6407
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1036 | |
|
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1037 | /** |
| 4359 | 1038 | * Renames a user in a chat. |
| 1039 | * | |
| 1040 | * @param chat The chat. | |
| 1041 | * @param old_user The old username. | |
| 1042 | * @param new_user The new username. | |
| 1043 | */ | |
| 15884 | 1044 | void purple_conv_chat_rename_user(PurpleConvChat *chat, const char *old_user, |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1045 | const char *new_user); |
| 4359 | 1046 | |
| 1047 | /** | |
| 1048 | * Removes a user from a chat, optionally with a reason. | |
| 1049 | * | |
|
6407
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1050 | * 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
|
1051 | * |
| 4359 | 1052 | * @param chat The chat. |
| 1053 | * @param user The user that is being removed. | |
| 1054 | * @param reason The optional reason given for the removal. Can be @c NULL. | |
| 1055 | */ | |
| 15884 | 1056 | void purple_conv_chat_remove_user(PurpleConvChat *chat, const char *user, |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1057 | const char *reason); |
| 4359 | 1058 | |
| 1059 | /** | |
|
6407
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1060 | * 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
|
1061 | * |
|
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1062 | * @param chat The chat. |
|
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1063 | * @param users The users that are being removed. |
|
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1064 | * @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
|
1065 | */ |
| 15884 | 1066 | void purple_conv_chat_remove_users(PurpleConvChat *chat, GList *users, |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1067 | const char *reason); |
|
6407
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1068 | |
|
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1069 | /** |
|
9554
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1070 | * Finds a user in a chat |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1071 | * |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1072 | * @param chat The chat. |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1073 | * @param user The user to look for. |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1074 | * |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1075 | * @return TRUE if the user is in the chat, FALSE if not |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1076 | */ |
| 15884 | 1077 | gboolean purple_conv_chat_find_user(PurpleConvChat *chat, const char *user); |
|
9554
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1078 | |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1079 | /** |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1080 | * Set a users flags in a chat |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1081 | * |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1082 | * @param chat The chat. |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1083 | * @param user The user to update. |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1084 | * @param flags The new flags. |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1085 | */ |
| 15884 | 1086 | void purple_conv_chat_user_set_flags(PurpleConvChat *chat, const char *user, |
| 1087 | PurpleConvChatBuddyFlags flags); | |
|
9554
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1088 | |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1089 | /** |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1090 | * Get the flags for a user in a chat |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1091 | * |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1092 | * @param chat The chat. |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1093 | * @param user The user to find the flags for |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1094 | * |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1095 | * @return The flags for the user |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1096 | */ |
| 15884 | 1097 | PurpleConvChatBuddyFlags purple_conv_chat_user_get_flags(PurpleConvChat *chat, |
|
9554
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1098 | const char *user); |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1099 | |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1100 | /** |
|
6414
f78eb072fcc0
[gaim-migrate @ 6921]
Christian Hammond <chipx86@chipx86.com>
parents:
6407
diff
changeset
|
1101 | * Clears all users from a chat. |
|
f78eb072fcc0
[gaim-migrate @ 6921]
Christian Hammond <chipx86@chipx86.com>
parents:
6407
diff
changeset
|
1102 | * |
|
f78eb072fcc0
[gaim-migrate @ 6921]
Christian Hammond <chipx86@chipx86.com>
parents:
6407
diff
changeset
|
1103 | * @param chat The chat. |
|
f78eb072fcc0
[gaim-migrate @ 6921]
Christian Hammond <chipx86@chipx86.com>
parents:
6407
diff
changeset
|
1104 | */ |
| 15884 | 1105 | void purple_conv_chat_clear_users(PurpleConvChat *chat); |
|
6414
f78eb072fcc0
[gaim-migrate @ 6921]
Christian Hammond <chipx86@chipx86.com>
parents:
6407
diff
changeset
|
1106 | |
|
f78eb072fcc0
[gaim-migrate @ 6921]
Christian Hammond <chipx86@chipx86.com>
parents:
6407
diff
changeset
|
1107 | /** |
| 8158 | 1108 | * Sets your nickname (used for hilighting) for a chat. |
| 1109 | * | |
| 1110 | * @param chat The chat. | |
| 1111 | * @param nick The nick. | |
| 1112 | */ | |
| 15884 | 1113 | void purple_conv_chat_set_nick(PurpleConvChat *chat, const char *nick); |
| 8158 | 1114 | |
| 1115 | /** | |
| 1116 | * Gets your nickname (used for hilighting) for a chat. | |
| 1117 | * | |
| 1118 | * @param chat The chat. | |
| 1119 | * @return The nick. | |
| 1120 | */ | |
| 15884 | 1121 | const char *purple_conv_chat_get_nick(PurpleConvChat *chat); |
| 8158 | 1122 | |
| 1123 | /** | |
| 4359 | 1124 | * Finds a chat with the specified chat ID. |
| 1125 | * | |
| 15884 | 1126 | * @param gc The purple_connection. |
| 4359 | 1127 | * @param id The chat ID. |
| 1128 | * | |
| 1129 | * @return The chat conversation. | |
| 1130 | */ | |
| 15884 | 1131 | PurpleConversation *purple_find_chat(const PurpleConnection *gc, int id); |
| 4359 | 1132 | |
| 8256 | 1133 | /** |
| 1134 | * Lets the core know we left a chat, without destroying it. | |
| 1135 | * Called from serv_got_chat_left(). | |
| 1136 | * | |
| 1137 | * @param chat The chat. | |
| 1138 | */ | |
| 15884 | 1139 | void purple_conv_chat_left(PurpleConvChat *chat); |
| 8256 | 1140 | |
| 1141 | /** | |
| 1142 | * Returns true if we're no longer in this chat, | |
| 1143 | * and just left the window open. | |
| 1144 | * | |
| 1145 | * @param chat The chat. | |
| 1146 | * | |
| 1147 | * @return @c TRUE if we left the chat already, @c FALSE if | |
| 1148 | * we're still there. | |
| 1149 | */ | |
| 15884 | 1150 | gboolean purple_conv_chat_has_left(PurpleConvChat *chat); |
| 8256 | 1151 | |
|
9554
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1152 | /** |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1153 | * Creates a new chat buddy |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1154 | * |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1155 | * @param name The name. |
|
14027
708c2047424f
[gaim-migrate @ 16521]
Aaron Sheldon <aaronsheldon@users.sourceforge.net>
parents:
13844
diff
changeset
|
1156 | * @param alias The alias. |
|
9554
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1157 | * @param flags The flags. |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1158 | * |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1159 | * @return The new chat buddy |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1160 | */ |
| 15884 | 1161 | PurpleConvChatBuddy *purple_conv_chat_cb_new(const char *name, const char *alias, |
| 1162 | PurpleConvChatBuddyFlags flags); | |
|
9554
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1163 | |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1164 | /** |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1165 | * Find a chat buddy in a chat |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1166 | * |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1167 | * @param chat The chat. |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1168 | * @param name The name of the chat buddy to find. |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1169 | */ |
| 15884 | 1170 | PurpleConvChatBuddy *purple_conv_chat_cb_find(PurpleConvChat *chat, const char *name); |
|
9554
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1171 | |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1172 | /** |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1173 | * Get the name of a chat buddy |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1174 | * |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1175 | * @param cb The chat buddy. |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1176 | * |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1177 | * @return The name of the chat buddy. |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1178 | */ |
| 15884 | 1179 | const char *purple_conv_chat_cb_get_name(PurpleConvChatBuddy *cb); |
|
9554
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1180 | |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1181 | /** |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1182 | * Destroys a chat buddy |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1183 | * |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1184 | * @param cb The chat buddy to destroy |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1185 | */ |
| 15884 | 1186 | void purple_conv_chat_cb_destroy(PurpleConvChatBuddy *cb); |
|
9554
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1187 | |
| 4359 | 1188 | /*@}*/ |
| 1189 | ||
|
4469
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1190 | /**************************************************************************/ |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1191 | /** @name Conversations Subsystem */ |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1192 | /**************************************************************************/ |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1193 | /*@{*/ |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1194 | |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1195 | /** |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1196 | * Returns the conversation subsystem handle. |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1197 | * |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1198 | * @return The conversation subsystem handle. |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1199 | */ |
| 15884 | 1200 | void *purple_conversations_get_handle(void); |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1201 | |
|
5872
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
1202 | /** |
|
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
1203 | * Initializes the conversation subsystem. |
|
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
1204 | */ |
| 15884 | 1205 | void purple_conversations_init(void); |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1206 | |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1207 | /** |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1208 | * Uninitializes the conversation subsystem. |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1209 | */ |
| 15884 | 1210 | void purple_conversations_uninit(void); |
|
5872
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
1211 | |
|
4481
1a02f276e41e
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1212 | /*@}*/ |
|
1a02f276e41e
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1213 | |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
1214 | #ifdef __cplusplus |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
1215 | } |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
1216 | #endif |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
1217 | |
| 15884 | 1218 | #endif /* _PURPLE_CONVERSATION_H_ */ |