Fri, 18 May 2007 22:04:01 +0000
Added to gtkutils.c:
GtkWidget *pidgin_create_window(const char *title, guint border_width, const char *role, gboolean resizable);
| 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); |
|
16743
1ce5ffe12e2a
Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents:
16007
diff
changeset
|
180 | |
|
1ce5ffe12e2a
Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents:
16007
diff
changeset
|
181 | void (*_purple_reserved1)(void); |
|
1ce5ffe12e2a
Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents:
16007
diff
changeset
|
182 | void (*_purple_reserved2)(void); |
|
1ce5ffe12e2a
Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents:
16007
diff
changeset
|
183 | void (*_purple_reserved3)(void); |
|
1ce5ffe12e2a
Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents:
16007
diff
changeset
|
184 | void (*_purple_reserved4)(void); |
| 4359 | 185 | }; |
| 186 | ||
| 187 | /** | |
| 188 | * Data specific to Instant Messages. | |
| 189 | */ | |
| 15884 | 190 | struct _PurpleConvIm |
| 4359 | 191 | { |
| 15884 | 192 | PurpleConversation *conv; /**< The parent conversation. */ |
| 4359 | 193 | |
| 15884 | 194 | PurpleTypingState typing_state; /**< The current typing state. */ |
|
4465
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
195 | guint typing_timeout; /**< The typing timer handle. */ |
|
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
196 | time_t type_again; /**< The type again time. */ |
|
13844
835b8f7b3d1d
[gaim-migrate @ 16295]
Mark Doliner <markdoliner@pidgin.im>
parents:
13840
diff
changeset
|
197 | guint send_typed_timeout; /**< The type again timer handle. */ |
| 4359 | 198 | |
| 15884 | 199 | PurpleBuddyIcon *icon; /**< The buddy icon. */ |
| 4359 | 200 | }; |
| 201 | ||
| 202 | /** | |
| 203 | * Data specific to Chats. | |
| 204 | */ | |
| 15884 | 205 | struct _PurpleConvChat |
| 4359 | 206 | { |
| 15884 | 207 | PurpleConversation *conv; /**< The parent conversation. */ |
| 4359 | 208 | |
|
4465
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
209 | GList *in_room; /**< The users in the room. */ |
|
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
210 | GList *ignored; /**< Ignored users. */ |
|
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
211 | char *who; /**< The person who set the topic. */ |
|
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
212 | char *topic; /**< The topic. */ |
|
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
213 | int id; /**< The chat ID. */ |
| 8158 | 214 | char *nick; /**< Your nick in this chat. */ |
| 8256 | 215 | |
| 216 | gboolean left; /**< We left the chat and kept the window open */ | |
| 4359 | 217 | }; |
| 218 | ||
| 219 | /** | |
|
9554
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
220 | * Data for "Chat Buddies" |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
221 | */ |
| 15884 | 222 | struct _PurpleConvChatBuddy |
|
9554
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
223 | { |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
224 | char *name; /**< The name */ |
|
14027
708c2047424f
[gaim-migrate @ 16521]
Aaron Sheldon <aaronsheldon@users.sourceforge.net>
parents:
13844
diff
changeset
|
225 | char *alias; /**< The alias */ |
|
708c2047424f
[gaim-migrate @ 16521]
Aaron Sheldon <aaronsheldon@users.sourceforge.net>
parents:
13844
diff
changeset
|
226 | char *alias_key; /**< The alias key */ |
|
708c2047424f
[gaim-migrate @ 16521]
Aaron Sheldon <aaronsheldon@users.sourceforge.net>
parents:
13844
diff
changeset
|
227 | gboolean buddy; /**< ChatBuddy is on the blist */ |
| 15884 | 228 | PurpleConvChatBuddyFlags flags; /**< Flags (ops, voice etc.) */ |
|
9554
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
229 | }; |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
230 | |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
231 | /** |
| 4359 | 232 | * A core representation of a conversation between two or more people. |
| 233 | * | |
| 11581 | 234 | * The conversation can be an IM or a chat. |
| 4359 | 235 | */ |
| 15884 | 236 | struct _PurpleConversation |
| 4359 | 237 | { |
| 15884 | 238 | PurpleConversationType type; /**< The type of conversation. */ |
| 4359 | 239 | |
| 15884 | 240 | PurpleAccount *account; /**< The user using this conversation. */ |
| 4359 | 241 | |
| 242 | ||
| 243 | char *name; /**< The name of the conversation. */ | |
| 244 | char *title; /**< The window title. */ | |
| 245 | ||
| 246 | gboolean logging; /**< The status of logging. */ | |
| 8158 | 247 | |
|
11454
a604c2097a6e
[gaim-migrate @ 13693]
Richard Laager <rlaager@pidgin.im>
parents:
11338
diff
changeset
|
248 | GList *logs; /**< This conversation's logs */ |
| 8158 | 249 | |
| 4359 | 250 | union |
| 251 | { | |
| 15884 | 252 | PurpleConvIm *im; /**< IM-specific data. */ |
| 253 | PurpleConvChat *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 | |
| 15884 | 258 | PurpleConversationUiOps *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. */ |
|
10849
476d68d7a435
[gaim-migrate @ 12521]
Richard Laager <rlaager@pidgin.im>
parents:
10827
diff
changeset
|
262 | |
| 15884 | 263 | PurpleConnectionFlags features; /**< The supported features */ |
| 10665 | 264 | |
| 4359 | 265 | }; |
| 266 | ||
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
267 | #ifdef __cplusplus |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
268 | extern "C" { |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
269 | #endif |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
270 | |
| 4359 | 271 | /**************************************************************************/ |
| 272 | /** @name Conversation API */ | |
| 273 | /**************************************************************************/ | |
| 274 | /*@{*/ | |
| 275 | ||
| 276 | /** | |
| 277 | * Creates a new conversation of the specified type. | |
| 278 | * | |
|
6720
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6622
diff
changeset
|
279 | * @param type The type of conversation. |
| 15884 | 280 | * @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
|
281 | * user's end. |
|
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6622
diff
changeset
|
282 | * @param name The name of the conversation. |
| 4359 | 283 | * |
| 284 | * @return The new conversation. | |
| 285 | */ | |
| 15884 | 286 | PurpleConversation *purple_conversation_new(PurpleConversationType type, |
| 287 | PurpleAccount *account, | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
288 | const char *name); |
| 4359 | 289 | |
| 290 | /** | |
| 291 | * Destroys the specified conversation and removes it from the parent | |
| 292 | * window. | |
| 293 | * | |
| 294 | * If this conversation is the only one contained in the parent window, | |
| 295 | * that window is also destroyed. | |
| 296 | * | |
| 297 | * @param conv The conversation to destroy. | |
| 298 | */ | |
| 15884 | 299 | void purple_conversation_destroy(PurpleConversation *conv); |
| 4359 | 300 | |
|
12624
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12618
diff
changeset
|
301 | |
|
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12618
diff
changeset
|
302 | /** |
|
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12618
diff
changeset
|
303 | * 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
|
304 | * conversation by displaying the IM dialog. |
|
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12618
diff
changeset
|
305 | * @param conv The conversation to present |
|
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12618
diff
changeset
|
306 | */ |
| 15884 | 307 | void purple_conversation_present(PurpleConversation *conv); |
|
12624
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12618
diff
changeset
|
308 | |
|
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12618
diff
changeset
|
309 | |
| 4359 | 310 | /** |
| 311 | * Returns the specified conversation's type. | |
| 312 | * | |
| 313 | * @param conv The conversation. | |
| 314 | * | |
| 315 | * @return The conversation's type. | |
| 316 | */ | |
| 15884 | 317 | PurpleConversationType purple_conversation_get_type(const PurpleConversation *conv); |
| 4359 | 318 | |
| 319 | /** | |
| 320 | * Sets the specified conversation's UI operations structure. | |
| 321 | * | |
| 322 | * @param conv The conversation. | |
| 323 | * @param ops The UI conversation operations structure. | |
| 324 | */ | |
| 15884 | 325 | void purple_conversation_set_ui_ops(PurpleConversation *conv, |
| 326 | PurpleConversationUiOps *ops); | |
| 4359 | 327 | |
| 328 | /** | |
| 11581 | 329 | * Sets the default conversation UI operations structure. |
| 330 | * | |
| 331 | * @param ops The UI conversation operations structure. | |
| 332 | */ | |
| 15884 | 333 | void purple_conversations_set_ui_ops(PurpleConversationUiOps *ops); |
| 11581 | 334 | |
| 335 | /** | |
| 4359 | 336 | * Returns the specified conversation's UI operations structure. |
|
6585
8fcd3639e544
[gaim-migrate @ 7107]
Christian Hammond <chipx86@chipx86.com>
parents:
6488
diff
changeset
|
337 | * |
| 4359 | 338 | * @param conv The conversation. |
| 339 | * | |
| 340 | * @return The operations structure. | |
| 341 | */ | |
| 15884 | 342 | PurpleConversationUiOps *purple_conversation_get_ui_ops( |
| 343 | const PurpleConversation *conv); | |
| 4359 | 344 | |
| 345 | /** | |
| 15884 | 346 | * Sets the specified conversation's purple_account. |
| 4359 | 347 | * |
| 15884 | 348 | * This purple_account represents the user using purple, not the person the user |
| 4359 | 349 | * is having a conversation/chat/flame with. |
| 350 | * | |
| 351 | * @param conv The conversation. | |
| 15884 | 352 | * @param account The purple_account. |
| 4359 | 353 | */ |
| 15884 | 354 | void purple_conversation_set_account(PurpleConversation *conv, |
| 355 | PurpleAccount *account); | |
| 4359 | 356 | |
| 357 | /** | |
| 15884 | 358 | * Returns the specified conversation's purple_account. |
| 4359 | 359 | * |
| 15884 | 360 | * This purple_account represents the user using purple, not the person the user |
| 4359 | 361 | * is having a conversation/chat/flame with. |
| 362 | * | |
| 363 | * @param conv The conversation. | |
| 364 | * | |
| 15884 | 365 | * @return The conversation's purple_account. |
| 4359 | 366 | */ |
| 15884 | 367 | PurpleAccount *purple_conversation_get_account(const PurpleConversation *conv); |
| 4359 | 368 | |
| 369 | /** | |
| 15884 | 370 | * Returns the specified conversation's purple_connection. |
| 4359 | 371 | * |
| 15884 | 372 | * This is the same as purple_conversation_get_user(conv)->gc. |
| 4359 | 373 | * |
| 374 | * @param conv The conversation. | |
| 375 | * | |
| 15884 | 376 | * @return The conversation's purple_connection. |
| 4359 | 377 | */ |
| 15884 | 378 | PurpleConnection *purple_conversation_get_gc(const PurpleConversation *conv); |
| 4359 | 379 | |
| 380 | /** | |
| 381 | * Sets the specified conversation's title. | |
| 382 | * | |
| 383 | * @param conv The conversation. | |
| 384 | * @param title The title. | |
| 385 | */ | |
| 15884 | 386 | void purple_conversation_set_title(PurpleConversation *conv, const char *title); |
| 4359 | 387 | |
| 388 | /** | |
| 389 | * Returns the specified conversation's title. | |
| 390 | * | |
|
6720
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6622
diff
changeset
|
391 | * @param conv The conversation. |
| 4359 | 392 | * |
| 393 | * @return The title. | |
| 394 | */ | |
| 15884 | 395 | const char *purple_conversation_get_title(const PurpleConversation *conv); |
| 4359 | 396 | |
| 397 | /** | |
| 398 | * Automatically sets the specified conversation's title. | |
| 399 | * | |
| 400 | * This function takes OPT_IM_ALIAS_TAB into account, as well as the | |
| 401 | * user's alias. | |
| 402 | * | |
| 403 | * @param conv The conversation. | |
| 404 | */ | |
| 15884 | 405 | void purple_conversation_autoset_title(PurpleConversation *conv); |
| 4359 | 406 | |
| 407 | /** | |
|
7256
311c8febfc92
[gaim-migrate @ 7833]
Christian Hammond <chipx86@chipx86.com>
parents:
7122
diff
changeset
|
408 | * Sets the specified conversation's name. |
|
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 | * @param conv The conversation. |
|
311c8febfc92
[gaim-migrate @ 7833]
Christian Hammond <chipx86@chipx86.com>
parents:
7122
diff
changeset
|
411 | * @param name The conversation's name. |
|
311c8febfc92
[gaim-migrate @ 7833]
Christian Hammond <chipx86@chipx86.com>
parents:
7122
diff
changeset
|
412 | */ |
| 15884 | 413 | void purple_conversation_set_name(PurpleConversation *conv, const char *name); |
|
7256
311c8febfc92
[gaim-migrate @ 7833]
Christian Hammond <chipx86@chipx86.com>
parents:
7122
diff
changeset
|
414 | |
|
311c8febfc92
[gaim-migrate @ 7833]
Christian Hammond <chipx86@chipx86.com>
parents:
7122
diff
changeset
|
415 | /** |
| 4359 | 416 | * Returns the specified conversation's name. |
| 417 | * | |
| 418 | * @param conv The conversation. | |
| 419 | * | |
| 420 | * @return The conversation's name. | |
| 421 | */ | |
| 15884 | 422 | const char *purple_conversation_get_name(const PurpleConversation *conv); |
| 4359 | 423 | |
| 424 | /** | |
| 425 | * Enables or disables logging for this conversation. | |
| 426 | * | |
|
6720
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6622
diff
changeset
|
427 | * @param conv The conversation. |
|
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6622
diff
changeset
|
428 | * @param log @c TRUE if logging should be enabled, or @c FALSE otherwise. |
| 4359 | 429 | */ |
| 15884 | 430 | void purple_conversation_set_logging(PurpleConversation *conv, gboolean log); |
| 4359 | 431 | |
| 432 | /** | |
| 433 | * Returns whether or not logging is enabled for this conversation. | |
| 434 | * | |
|
6720
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6622
diff
changeset
|
435 | * @param conv The conversation. |
|
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6622
diff
changeset
|
436 | * |
| 4359 | 437 | * @return @c TRUE if logging is enabled, or @c FALSE otherwise. |
| 438 | */ | |
| 15884 | 439 | gboolean purple_conversation_is_logging(const PurpleConversation *conv); |
| 4359 | 440 | |
| 441 | /** | |
|
11672
018c70c8134c
[gaim-migrate @ 13958]
Richard Laager <rlaager@pidgin.im>
parents:
11664
diff
changeset
|
442 | * Closes any open logs for this conversation. |
|
018c70c8134c
[gaim-migrate @ 13958]
Richard Laager <rlaager@pidgin.im>
parents:
11664
diff
changeset
|
443 | * |
|
018c70c8134c
[gaim-migrate @ 13958]
Richard Laager <rlaager@pidgin.im>
parents:
11664
diff
changeset
|
444 | * 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
|
445 | * message, if the conversation has logging enabled. To disable logging for |
| 15884 | 446 | * the remainder of the conversation, use purple_conversation_set_logging(). |
|
11672
018c70c8134c
[gaim-migrate @ 13958]
Richard Laager <rlaager@pidgin.im>
parents:
11664
diff
changeset
|
447 | * |
|
018c70c8134c
[gaim-migrate @ 13958]
Richard Laager <rlaager@pidgin.im>
parents:
11664
diff
changeset
|
448 | * @param conv The conversation. |
|
018c70c8134c
[gaim-migrate @ 13958]
Richard Laager <rlaager@pidgin.im>
parents:
11664
diff
changeset
|
449 | */ |
| 15884 | 450 | void purple_conversation_close_logs(PurpleConversation *conv); |
|
11672
018c70c8134c
[gaim-migrate @ 13958]
Richard Laager <rlaager@pidgin.im>
parents:
11664
diff
changeset
|
451 | |
|
018c70c8134c
[gaim-migrate @ 13958]
Richard Laager <rlaager@pidgin.im>
parents:
11664
diff
changeset
|
452 | /** |
| 4359 | 453 | * Returns the specified conversation's IM-specific data. |
| 454 | * | |
| 15884 | 455 | * If the conversation type is not PURPLE_CONV_TYPE_IM, this will return @c NULL. |
| 4359 | 456 | * |
| 457 | * @param conv The conversation. | |
| 458 | * | |
| 459 | * @return The IM-specific data. | |
| 460 | */ | |
| 15884 | 461 | PurpleConvIm *purple_conversation_get_im_data(const PurpleConversation *conv); |
| 4359 | 462 | |
| 15884 | 463 | #define PURPLE_CONV_IM(c) (purple_conversation_get_im_data(c)) |
| 4359 | 464 | |
| 465 | /** | |
| 466 | * Returns the specified conversation's chat-specific data. | |
| 467 | * | |
| 15884 | 468 | * If the conversation type is not PURPLE_CONV_TYPE_CHAT, this will return @c NULL. |
| 4359 | 469 | * |
| 470 | * @param conv The conversation. | |
| 471 | * | |
| 472 | * @return The chat-specific data. | |
| 473 | */ | |
| 15884 | 474 | PurpleConvChat *purple_conversation_get_chat_data(const PurpleConversation *conv); |
| 4359 | 475 | |
| 15884 | 476 | #define PURPLE_CONV_CHAT(c) (purple_conversation_get_chat_data(c)) |
| 4359 | 477 | |
| 478 | /** | |
|
4877
7d1f4381fed0
[gaim-migrate @ 5207]
Christian Hammond <chipx86@chipx86.com>
parents:
4876
diff
changeset
|
479 | * Sets extra data for a conversation. |
|
6585
8fcd3639e544
[gaim-migrate @ 7107]
Christian Hammond <chipx86@chipx86.com>
parents:
6488
diff
changeset
|
480 | * |
|
4876
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
481 | * @param conv The conversation. |
|
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
482 | * @param key The unique key. |
|
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
483 | * @param data The data to assign. |
|
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
484 | */ |
| 15884 | 485 | void purple_conversation_set_data(PurpleConversation *conv, const char *key, |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
486 | gpointer data); |
|
4876
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
487 | |
|
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
488 | /** |
|
4877
7d1f4381fed0
[gaim-migrate @ 5207]
Christian Hammond <chipx86@chipx86.com>
parents:
4876
diff
changeset
|
489 | * Returns extra data in a conversation. |
|
4876
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
490 | * |
|
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
491 | * @param conv The conversation. |
|
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
492 | * @param key The unqiue key. |
|
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
493 | * |
|
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
494 | * @return The data associated with the key. |
|
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
495 | */ |
| 15884 | 496 | gpointer purple_conversation_get_data(PurpleConversation *conv, const char *key); |
|
4876
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
497 | |
|
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
498 | /** |
| 4359 | 499 | * Returns a list of all conversations. |
| 500 | * | |
| 501 | * This list includes both IMs and chats. | |
| 502 | * | |
| 503 | * @return A GList of all conversations. | |
| 504 | */ | |
| 15884 | 505 | GList *purple_get_conversations(void); |
| 4359 | 506 | |
| 507 | /** | |
| 508 | * Returns a list of all IMs. | |
| 509 | * | |
| 510 | * @return A GList of all IMs. | |
| 511 | */ | |
| 15884 | 512 | GList *purple_get_ims(void); |
| 4359 | 513 | |
| 514 | /** | |
| 515 | * Returns a list of all chats. | |
| 516 | * | |
| 517 | * @return A GList of all chats. | |
| 518 | */ | |
| 15884 | 519 | GList *purple_get_chats(void); |
| 4359 | 520 | |
| 521 | /** | |
| 15884 | 522 | * Finds a conversation with the specified type, name, and Purple account. |
| 4359 | 523 | * |
|
10246
aa5bff72f94c
[gaim-migrate @ 11386]
Mark Doliner <markdoliner@pidgin.im>
parents:
10008
diff
changeset
|
524 | * @param type The type of the conversation. |
| 4359 | 525 | * @param name The name of the conversation. |
| 15884 | 526 | * @param account The purple_account associated with the conversation. |
| 4359 | 527 | * |
| 528 | * @return The conversation if found, or @c NULL otherwise. | |
| 529 | */ | |
| 15884 | 530 | PurpleConversation *purple_find_conversation_with_account( |
| 531 | PurpleConversationType type, const char *name, | |
| 532 | const PurpleAccount *account); | |
| 4359 | 533 | |
| 534 | /** | |
| 535 | * Writes to a conversation window. | |
| 536 | * | |
| 537 | * This function should not be used to write IM or chat messages. Use | |
| 15884 | 538 | * purple_conv_im_write() and purple_conv_chat_write() instead. Those functions will |
| 4359 | 539 | * most likely call this anyway, but they may do their own formatting, |
| 540 | * sound playback, etc. | |
| 541 | * | |
| 542 | * This can be used to write generic messages, such as "so and so closed | |
| 543 | * the conversation window." | |
| 544 | * | |
| 545 | * @param conv The conversation. | |
| 546 | * @param who The user who sent the message. | |
| 547 | * @param message The message. | |
|
6621
2a18ef3e5224
[gaim-migrate @ 7145]
Robert McQueen <robot101@debian.org>
parents:
6605
diff
changeset
|
548 | * @param flags The message flags. |
| 4359 | 549 | * @param mtime The time the message was sent. |
| 550 | * | |
| 15884 | 551 | * @see purple_conv_im_write() |
| 552 | * @see purple_conv_chat_write() | |
| 4359 | 553 | */ |
| 15884 | 554 | void purple_conversation_write(PurpleConversation *conv, const char *who, |
| 555 | const char *message, PurpleMessageFlags flags, | |
| 10665 | 556 | time_t mtime); |
| 557 | ||
| 558 | ||
| 559 | /** | |
| 560 | Set the features as supported for the given conversation. | |
| 561 | @param conv The conversation | |
| 562 | @param features Bitset defining supported features | |
| 563 | */ | |
| 15884 | 564 | void purple_conversation_set_features(PurpleConversation *conv, |
| 565 | PurpleConnectionFlags features); | |
| 10665 | 566 | |
| 567 | ||
| 568 | /** | |
| 569 | Get the features supported by the given conversation. | |
| 570 | @param conv The conversation | |
| 571 | */ | |
| 15884 | 572 | PurpleConnectionFlags purple_conversation_get_features(PurpleConversation *conv); |
| 4359 | 573 | |
| 574 | /** | |
|
9260
82d7b380220a
[gaim-migrate @ 10059]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9166
diff
changeset
|
575 | * Determines if a conversation has focus |
|
82d7b380220a
[gaim-migrate @ 10059]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9166
diff
changeset
|
576 | * |
|
82d7b380220a
[gaim-migrate @ 10059]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9166
diff
changeset
|
577 | * @param conv The conversation. |
|
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 | * @return @c TRUE if the conversation has focus, @c FALSE if |
|
82d7b380220a
[gaim-migrate @ 10059]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9166
diff
changeset
|
580 | * 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
|
581 | */ |
| 15884 | 582 | gboolean purple_conversation_has_focus(PurpleConversation *conv); |
|
9260
82d7b380220a
[gaim-migrate @ 10059]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9166
diff
changeset
|
583 | |
|
82d7b380220a
[gaim-migrate @ 10059]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9166
diff
changeset
|
584 | /** |
| 4359 | 585 | * Updates the visual status and UI of a conversation. |
| 586 | * | |
| 587 | * @param conv The conversation. | |
| 588 | * @param type The update type. | |
| 589 | */ | |
| 15884 | 590 | void purple_conversation_update(PurpleConversation *conv, PurpleConvUpdateType type); |
| 4359 | 591 | |
| 592 | /** | |
| 593 | * Calls a function on each conversation. | |
| 594 | * | |
| 595 | * @param func The function. | |
| 596 | */ | |
| 15884 | 597 | void purple_conversation_foreach(void (*func)(PurpleConversation *conv)); |
| 4359 | 598 | |
| 599 | /*@}*/ | |
| 600 | ||
| 601 | ||
| 602 | /**************************************************************************/ | |
| 603 | /** @name IM Conversation API */ | |
| 604 | /**************************************************************************/ | |
| 605 | /*@{*/ | |
| 606 | ||
| 607 | /** | |
| 608 | * Gets an IM's parent conversation. | |
| 609 | * | |
| 610 | * @param im The IM. | |
| 611 | * | |
| 612 | * @return The parent conversation. | |
| 613 | */ | |
| 15884 | 614 | PurpleConversation *purple_conv_im_get_conversation(const PurpleConvIm *im); |
| 4359 | 615 | |
| 616 | /** | |
|
6846
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
617 | * Sets the IM's buddy icon. |
|
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
618 | * |
| 15884 | 619 | * This should only be called from within Purple. You probably want to |
| 620 | * call purple_buddy_icon_set_data(). | |
|
6846
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
621 | * |
|
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
622 | * @param im The IM. |
|
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
623 | * @param icon The buddy icon. |
|
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
624 | * |
| 15884 | 625 | * @see purple_buddy_icon_set_data() |
|
6846
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
626 | */ |
| 15884 | 627 | void purple_conv_im_set_icon(PurpleConvIm *im, PurpleBuddyIcon *icon); |
|
6846
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 | /** |
|
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
630 | * Returns the IM's buddy icon. |
|
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
631 | * |
|
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
632 | * @param im The IM. |
|
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
633 | * |
|
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
634 | * @return The buddy icon. |
|
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
635 | */ |
| 15884 | 636 | PurpleBuddyIcon *purple_conv_im_get_icon(const PurpleConvIm *im); |
|
6846
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
637 | |
|
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
638 | /** |
| 4359 | 639 | * Sets the IM's typing state. |
| 640 | * | |
| 641 | * @param im The IM. | |
| 642 | * @param state The typing state. | |
| 643 | */ | |
| 15884 | 644 | void purple_conv_im_set_typing_state(PurpleConvIm *im, PurpleTypingState state); |
| 4359 | 645 | |
| 646 | /** | |
| 647 | * Returns the IM's typing state. | |
| 648 | * | |
| 649 | * @param im The IM. | |
| 650 | * | |
| 651 | * @return The IM's typing state. | |
| 652 | */ | |
| 15884 | 653 | PurpleTypingState purple_conv_im_get_typing_state(const PurpleConvIm *im); |
| 4359 | 654 | |
| 655 | /** | |
| 656 | * Starts the IM's typing timeout. | |
| 657 | * | |
| 658 | * @param im The IM. | |
| 659 | * @param timeout The timeout. | |
| 660 | */ | |
| 15884 | 661 | void purple_conv_im_start_typing_timeout(PurpleConvIm *im, int timeout); |
| 4359 | 662 | |
| 663 | /** | |
| 664 | * Stops the IM's typing timeout. | |
| 665 | * | |
| 666 | * @param im The IM. | |
| 667 | */ | |
| 15884 | 668 | void purple_conv_im_stop_typing_timeout(PurpleConvIm *im); |
| 4359 | 669 | |
| 670 | /** | |
| 671 | * Returns the IM's typing timeout. | |
| 672 | * | |
| 673 | * @param im The IM. | |
| 674 | * | |
| 675 | * @return The timeout. | |
| 676 | */ | |
| 15884 | 677 | guint purple_conv_im_get_typing_timeout(const PurpleConvIm *im); |
| 4359 | 678 | |
| 679 | /** | |
| 15884 | 680 | * 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
|
681 | * Few protocols need this (maybe only MSN). If the user is still |
| 15884 | 682 | * typing after this quiet-period, then another PURPLE_TYPING message |
|
13844
835b8f7b3d1d
[gaim-migrate @ 16295]
Mark Doliner <markdoliner@pidgin.im>
parents:
13840
diff
changeset
|
683 | * will be sent. |
| 4359 | 684 | * |
| 685 | * @param im The IM. | |
|
13844
835b8f7b3d1d
[gaim-migrate @ 16295]
Mark Doliner <markdoliner@pidgin.im>
parents:
13840
diff
changeset
|
686 | * @param val The number of seconds to wait before allowing another |
| 15884 | 687 | * PURPLE_TYPING message to be sent to the user. Or 0 to |
| 688 | * not send another PURPLE_TYPING message. | |
| 4359 | 689 | */ |
| 15884 | 690 | void purple_conv_im_set_type_again(PurpleConvIm *im, unsigned int val); |
| 4359 | 691 | |
| 692 | /** | |
| 15884 | 693 | * Returns the time after which another PURPLE_TYPING message should be sent. |
| 4359 | 694 | * |
| 695 | * @param im The IM. | |
| 696 | * | |
|
13844
835b8f7b3d1d
[gaim-migrate @ 16295]
Mark Doliner <markdoliner@pidgin.im>
parents:
13840
diff
changeset
|
697 | * @return The time in seconds since the epoch. Or 0 if no additional |
| 15884 | 698 | * PURPLE_TYPING message should be sent. |
| 4359 | 699 | */ |
| 15884 | 700 | time_t purple_conv_im_get_type_again(const PurpleConvIm *im); |
| 4359 | 701 | |
| 702 | /** | |
| 703 | * Starts the IM's type again timeout. | |
| 704 | * | |
| 705 | * @param im The IM. | |
| 706 | */ | |
| 15884 | 707 | void purple_conv_im_start_send_typed_timeout(PurpleConvIm *im); |
| 4359 | 708 | |
| 709 | /** | |
| 710 | * Stops the IM's type again timeout. | |
| 711 | * | |
| 712 | * @param im The IM. | |
| 713 | */ | |
| 15884 | 714 | void purple_conv_im_stop_send_typed_timeout(PurpleConvIm *im); |
| 4359 | 715 | |
| 716 | /** | |
| 717 | * Returns the IM's type again timeout interval. | |
| 718 | * | |
| 719 | * @param im The IM. | |
| 720 | * | |
| 721 | * @return The type again timeout interval. | |
| 722 | */ | |
| 15884 | 723 | guint purple_conv_im_get_send_typed_timeout(const PurpleConvIm *im); |
| 4359 | 724 | |
| 725 | /** | |
| 726 | * Updates the visual typing notification for an IM conversation. | |
| 727 | * | |
| 728 | * @param im The IM. | |
| 729 | */ | |
| 15884 | 730 | void purple_conv_im_update_typing(PurpleConvIm *im); |
| 4359 | 731 | |
| 732 | /** | |
| 733 | * Writes to an IM. | |
| 734 | * | |
| 735 | * @param im The IM. | |
| 736 | * @param who The user who sent the message. | |
| 737 | * @param message The message to write. | |
|
6621
2a18ef3e5224
[gaim-migrate @ 7145]
Robert McQueen <robot101@debian.org>
parents:
6605
diff
changeset
|
738 | * @param flags The message flags. |
| 4359 | 739 | * @param mtime The time the message was sent. |
| 740 | */ | |
| 15884 | 741 | void purple_conv_im_write(PurpleConvIm *im, const char *who, |
| 742 | const char *message, PurpleMessageFlags flags, | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
743 | time_t mtime); |
| 4359 | 744 | |
| 745 | /** | |
| 9627 | 746 | * Presents an IM-error to the user |
| 11581 | 747 | * |
| 9627 | 748 | * This is a helper function to find a conversation, write an error to it, and |
| 749 | * raise the window. If a conversation with this user doesn't already exist, | |
| 750 | * the function will return FALSE and the calling function can attempt to present | |
| 15884 | 751 | * the error another way (purple_notify_error, most likely) |
| 9627 | 752 | * |
| 753 | * @param who The user this error is about | |
| 754 | * @param account The account this error is on | |
| 755 | * @param what The error | |
| 756 | * @return TRUE if the error was presented, else FALSE | |
| 757 | */ | |
| 15884 | 758 | gboolean purple_conv_present_error(const char *who, PurpleAccount *account, const char *what); |
| 9627 | 759 | |
| 760 | /** | |
| 4359 | 761 | * Sends a message to this IM conversation. |
| 762 | * | |
| 763 | * @param im The IM. | |
| 764 | * @param message The message to send. | |
| 765 | */ | |
| 15884 | 766 | void purple_conv_im_send(PurpleConvIm *im, const char *message); |
| 4359 | 767 | |
| 10526 | 768 | /** |
| 14582 | 769 | * Sends a message to a conversation after confirming with |
| 770 | * the user. | |
| 771 | * | |
| 772 | * This function is intended for use in cases where the user | |
| 773 | * hasn't explicitly and knowingly caused a message to be sent. | |
| 774 | * The confirmation ensures that the user isn't sending a | |
| 775 | * message by mistake. | |
| 776 | * | |
| 777 | * @param conv The conversation. | |
| 778 | * @param message The message to send. | |
| 779 | */ | |
| 15884 | 780 | void purple_conv_send_confirm(PurpleConversation *conv, const char *message); |
| 14582 | 781 | |
| 782 | /** | |
|
11921
fe74264ce36c
[gaim-migrate @ 14212]
Evan Schoenberg <evands@pidgin.im>
parents:
11869
diff
changeset
|
783 | * Sends a message to this IM conversation with specified flags. |
|
fe74264ce36c
[gaim-migrate @ 14212]
Evan Schoenberg <evands@pidgin.im>
parents:
11869
diff
changeset
|
784 | * |
|
fe74264ce36c
[gaim-migrate @ 14212]
Evan Schoenberg <evands@pidgin.im>
parents:
11869
diff
changeset
|
785 | * @param im The IM. |
|
fe74264ce36c
[gaim-migrate @ 14212]
Evan Schoenberg <evands@pidgin.im>
parents:
11869
diff
changeset
|
786 | * @param message The message to send. |
| 15884 | 787 | * @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
|
788 | */ |
| 15884 | 789 | 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
|
790 | |
|
fe74264ce36c
[gaim-migrate @ 14212]
Evan Schoenberg <evands@pidgin.im>
parents:
11869
diff
changeset
|
791 | /** |
| 10528 | 792 | * Adds a smiley to the conversation's smiley tree. If this returns |
| 15884 | 793 | * @c TRUE you should call purple_conv_custom_smiley_write() one or more |
| 794 | * times, and then purple_conv_custom_smiley_close(). If this returns | |
| 10528 | 795 | * @c FALSE, either the conv or smile were invalid, or the icon was |
| 796 | * found in the cache. In either case, calling write or close would | |
| 797 | * be an error. | |
| 10526 | 798 | * |
| 799 | * @param conv The conversation to associate the smiley with. | |
| 800 | * @param smile The text associated with the smiley | |
| 801 | * @param cksum_type The type of checksum. | |
| 802 | * @param chksum The checksum, as a NUL terminated base64 string. | |
|
12618
b83b6bab0703
[gaim-migrate @ 14954]
Richard Laager <rlaager@pidgin.im>
parents:
12463
diff
changeset
|
803 | * @param remote @c TRUE if the custom smiley is set by the remote user (buddy). |
| 10528 | 804 | * @return @c TRUE if an icon is expected, else FALSE. Note that |
| 15884 | 805 | * it is an error to never call purple_conv_custom_smiley_close if |
| 10526 | 806 | * this function returns @c TRUE, but an error to call it if |
| 807 | * @c FALSE is returned. | |
| 808 | */ | |
| 809 | ||
| 15884 | 810 | 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
|
811 | const char *cksum_type, const char *chksum, |
|
b83b6bab0703
[gaim-migrate @ 14954]
Richard Laager <rlaager@pidgin.im>
parents:
12463
diff
changeset
|
812 | gboolean remote); |
| 10526 | 813 | |
| 814 | ||
| 815 | /** | |
| 816 | * Updates the image associated with the current smiley. | |
| 817 | * | |
| 818 | * @param conv The conversation associated with the smiley. | |
| 819 | * @param smile The text associated with the smiley. | |
| 820 | * @param data The actual image data. | |
| 821 | * @param size The length of the data. | |
| 822 | */ | |
| 823 | ||
| 15884 | 824 | void purple_conv_custom_smiley_write(PurpleConversation *conv, |
|
11137
cf40226ddff7
[gaim-migrate @ 13201]
Mark Doliner <markdoliner@pidgin.im>
parents:
11035
diff
changeset
|
825 | const char *smile, |
|
cf40226ddff7
[gaim-migrate @ 13201]
Mark Doliner <markdoliner@pidgin.im>
parents:
11035
diff
changeset
|
826 | const guchar *data, |
|
cf40226ddff7
[gaim-migrate @ 13201]
Mark Doliner <markdoliner@pidgin.im>
parents:
11035
diff
changeset
|
827 | gsize size); |
| 10526 | 828 | |
| 829 | /** | |
| 830 | * Close the custom smiley, all data has been written with | |
| 15884 | 831 | * purple_conv_custom_smiley_write, and it is no longer valid |
| 10526 | 832 | * to call that function on that smiley. |
| 833 | * | |
| 15884 | 834 | * @param conv The purple conversation associated with the smiley. |
| 10526 | 835 | * @param smile The text associated with the smiley |
| 836 | */ | |
| 837 | ||
| 15884 | 838 | void purple_conv_custom_smiley_close(PurpleConversation *conv, const char *smile); |
| 10526 | 839 | |
| 4359 | 840 | /*@}*/ |
| 841 | ||
| 842 | ||
| 843 | /**************************************************************************/ | |
| 844 | /** @name Chat Conversation API */ | |
| 845 | /**************************************************************************/ | |
| 846 | /*@{*/ | |
| 847 | ||
| 848 | /** | |
| 849 | * Gets a chat's parent conversation. | |
| 850 | * | |
| 851 | * @param chat The chat. | |
| 852 | * | |
| 853 | * @return The parent conversation. | |
| 854 | */ | |
| 15884 | 855 | PurpleConversation *purple_conv_chat_get_conversation(const PurpleConvChat *chat); |
| 4359 | 856 | |
| 857 | /** | |
| 858 | * Sets the list of users in the chat room. | |
| 859 | * | |
|
6407
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
860 | * @note Calling this function will not update the display of the users. |
| 15884 | 861 | * Please use purple_conv_chat_add_user(), purple_conv_chat_add_users(), |
| 862 | * 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
|
863 | * |
| 4359 | 864 | * @param chat The chat. |
| 865 | * @param users The list of users. | |
| 866 | * | |
| 867 | * @return The list passed. | |
| 868 | */ | |
| 15884 | 869 | GList *purple_conv_chat_set_users(PurpleConvChat *chat, GList *users); |
| 4359 | 870 | |
| 871 | /** | |
| 872 | * Returns a list of users in the chat room. | |
| 873 | * | |
| 874 | * @param chat The chat. | |
| 875 | * | |
| 876 | * @return The list of users. | |
| 877 | */ | |
| 15884 | 878 | GList *purple_conv_chat_get_users(const PurpleConvChat *chat); |
| 4359 | 879 | |
| 880 | /** | |
| 881 | * Ignores a user in a chat room. | |
| 882 | * | |
| 883 | * @param chat The chat. | |
| 884 | * @param name The name of the user. | |
| 885 | */ | |
| 15884 | 886 | void purple_conv_chat_ignore(PurpleConvChat *chat, const char *name); |
| 4359 | 887 | |
| 888 | /** | |
| 889 | * Unignores a user in a chat room. | |
| 890 | * | |
| 891 | * @param chat The chat. | |
| 892 | * @param name The name of the user. | |
| 893 | */ | |
| 15884 | 894 | void purple_conv_chat_unignore(PurpleConvChat *chat, const char *name); |
| 4359 | 895 | |
| 896 | /** | |
| 897 | * Sets the list of ignored users in the chat room. | |
| 898 | * | |
| 899 | * @param chat The chat. | |
| 900 | * @param ignored The list of ignored users. | |
| 901 | * | |
| 902 | * @return The list passed. | |
| 903 | */ | |
| 15884 | 904 | GList *purple_conv_chat_set_ignored(PurpleConvChat *chat, GList *ignored); |
| 4359 | 905 | |
| 906 | /** | |
| 907 | * Returns the list of ignored users in the chat room. | |
| 908 | * | |
| 909 | * @param chat The chat. | |
| 910 | * | |
| 911 | * @return The list of ignored users. | |
| 912 | */ | |
| 15884 | 913 | GList *purple_conv_chat_get_ignored(const PurpleConvChat *chat); |
| 4359 | 914 | |
| 915 | /** | |
| 916 | * Returns the actual name of the specified ignored user, if it exists in | |
| 917 | * the ignore list. | |
| 918 | * | |
| 919 | * If the user found contains a prefix, such as '+' or '\@', this is also | |
| 920 | * returned. The username passed to the function does not have to have this | |
| 921 | * formatting. | |
| 922 | * | |
| 923 | * @param chat The chat. | |
| 924 | * @param user The user to check in the ignore list. | |
| 925 | * | |
| 926 | * @return The ignored user if found, complete with prefixes, or @c NULL | |
| 927 | * if not found. | |
| 928 | */ | |
| 15884 | 929 | 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
|
930 | const char *user); |
| 4359 | 931 | |
| 932 | /** | |
| 933 | * Returns @c TRUE if the specified user is ignored. | |
| 934 | * | |
| 935 | * @param chat The chat. | |
| 936 | * @param user The user. | |
| 937 | * | |
| 938 | * @return @c TRUE if the user is in the ignore list; @c FALSE otherwise. | |
| 939 | */ | |
| 15884 | 940 | gboolean purple_conv_chat_is_user_ignored(const PurpleConvChat *chat, |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
941 | const char *user); |
| 4359 | 942 | |
| 943 | /** | |
| 944 | * Sets the chat room's topic. | |
| 945 | * | |
| 946 | * @param chat The chat. | |
| 947 | * @param who The user that set the topic. | |
| 948 | * @param topic The topic. | |
| 949 | */ | |
| 15884 | 950 | 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
|
951 | const char *topic); |
| 4359 | 952 | |
| 953 | /** | |
| 954 | * Returns the chat room's topic. | |
| 955 | * | |
| 956 | * @param chat The chat. | |
| 957 | * | |
| 958 | * @return The chat's topic. | |
| 959 | */ | |
| 15884 | 960 | const char *purple_conv_chat_get_topic(const PurpleConvChat *chat); |
| 4359 | 961 | |
| 962 | /** | |
| 963 | * Sets the chat room's ID. | |
| 964 | * | |
| 965 | * @param chat The chat. | |
| 966 | * @param id The ID. | |
| 967 | */ | |
| 15884 | 968 | void purple_conv_chat_set_id(PurpleConvChat *chat, int id); |
| 4359 | 969 | |
| 970 | /** | |
| 971 | * Returns the chat room's ID. | |
| 972 | * | |
| 973 | * @param chat The chat. | |
| 974 | * | |
| 975 | * @return The ID. | |
| 976 | */ | |
| 15884 | 977 | int purple_conv_chat_get_id(const PurpleConvChat *chat); |
| 4359 | 978 | |
| 979 | /** | |
| 980 | * Writes to a chat. | |
| 981 | * | |
| 982 | * @param chat The chat. | |
| 983 | * @param who The user who sent the message. | |
| 984 | * @param message The message to write. | |
|
6621
2a18ef3e5224
[gaim-migrate @ 7145]
Robert McQueen <robot101@debian.org>
parents:
6605
diff
changeset
|
985 | * @param flags The flags. |
| 4359 | 986 | * @param mtime The time the message was sent. |
| 987 | */ | |
| 15884 | 988 | void purple_conv_chat_write(PurpleConvChat *chat, const char *who, |
| 989 | const char *message, PurpleMessageFlags flags, | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
990 | time_t mtime); |
| 4359 | 991 | |
| 992 | /** | |
| 993 | * Sends a message to this chat conversation. | |
| 994 | * | |
| 995 | * @param chat The chat. | |
| 996 | * @param message The message to send. | |
| 997 | */ | |
| 15884 | 998 | void purple_conv_chat_send(PurpleConvChat *chat, const char *message); |
| 4359 | 999 | |
| 1000 | /** | |
|
11921
fe74264ce36c
[gaim-migrate @ 14212]
Evan Schoenberg <evands@pidgin.im>
parents:
11869
diff
changeset
|
1001 | * Sends a message to this chat conversation with specified flags. |
|
fe74264ce36c
[gaim-migrate @ 14212]
Evan Schoenberg <evands@pidgin.im>
parents:
11869
diff
changeset
|
1002 | * |
|
fe74264ce36c
[gaim-migrate @ 14212]
Evan Schoenberg <evands@pidgin.im>
parents:
11869
diff
changeset
|
1003 | * @param chat The chat. |
|
fe74264ce36c
[gaim-migrate @ 14212]
Evan Schoenberg <evands@pidgin.im>
parents:
11869
diff
changeset
|
1004 | * @param message The message to send. |
| 15884 | 1005 | * @param flags The PurpleMessageFlags flags to use. |
|
11921
fe74264ce36c
[gaim-migrate @ 14212]
Evan Schoenberg <evands@pidgin.im>
parents:
11869
diff
changeset
|
1006 | */ |
| 15884 | 1007 | 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
|
1008 | |
|
fe74264ce36c
[gaim-migrate @ 14212]
Evan Schoenberg <evands@pidgin.im>
parents:
11869
diff
changeset
|
1009 | /** |
| 4359 | 1010 | * Adds a user to a chat. |
| 1011 | * | |
| 9939 | 1012 | * @param chat The chat. |
| 1013 | * @param user The user to add. | |
| 1014 | * @param extra_msg An extra message to display with the join message. | |
| 1015 | * @param flags The users flags | |
| 1016 | * @param new_arrival Decides whether or not to show a join notice. | |
| 4359 | 1017 | */ |
| 15884 | 1018 | void purple_conv_chat_add_user(PurpleConvChat *chat, const char *user, |
| 1019 | const char *extra_msg, PurpleConvChatBuddyFlags flags, | |
|
9846
61f7349c153a
[gaim-migrate @ 10724]
Nathan Fredrickson <nathan@silverorange.com>
parents:
9718
diff
changeset
|
1020 | gboolean new_arrival); |
| 4359 | 1021 | |
| 1022 | /** | |
|
6407
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1023 | * Adds a list of users to a chat. |
|
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1024 | * |
|
11454
a604c2097a6e
[gaim-migrate @ 13693]
Richard Laager <rlaager@pidgin.im>
parents:
11338
diff
changeset
|
1025 | * 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
|
1026 | * the caller to free this list after calling this function. |
|
6407
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1027 | * |
|
11454
a604c2097a6e
[gaim-migrate @ 13693]
Richard Laager <rlaager@pidgin.im>
parents:
11338
diff
changeset
|
1028 | * @param chat The chat. |
|
a604c2097a6e
[gaim-migrate @ 13693]
Richard Laager <rlaager@pidgin.im>
parents:
11338
diff
changeset
|
1029 | * @param users The list of users to add. |
|
a604c2097a6e
[gaim-migrate @ 13693]
Richard Laager <rlaager@pidgin.im>
parents:
11338
diff
changeset
|
1030 | * @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
|
1031 | * user. This list may be shorter than @a users, in which |
|
a604c2097a6e
[gaim-migrate @ 13693]
Richard Laager <rlaager@pidgin.im>
parents:
11338
diff
changeset
|
1032 | * 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
|
1033 | * an extra message. By extension, this means that extra_msgs |
|
a604c2097a6e
[gaim-migrate @ 13693]
Richard Laager <rlaager@pidgin.im>
parents:
11338
diff
changeset
|
1034 | * 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
|
1035 | * extra message. |
|
a604c2097a6e
[gaim-migrate @ 13693]
Richard Laager <rlaager@pidgin.im>
parents:
11338
diff
changeset
|
1036 | * @param flags The list of flags for each user. |
|
a604c2097a6e
[gaim-migrate @ 13693]
Richard Laager <rlaager@pidgin.im>
parents:
11338
diff
changeset
|
1037 | * @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
|
1038 | */ |
| 15884 | 1039 | 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
|
1040 | GList *flags, gboolean new_arrivals); |
|
6407
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1041 | |
|
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1042 | /** |
| 4359 | 1043 | * Renames a user in a chat. |
| 1044 | * | |
| 1045 | * @param chat The chat. | |
| 1046 | * @param old_user The old username. | |
| 1047 | * @param new_user The new username. | |
| 1048 | */ | |
| 15884 | 1049 | 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
|
1050 | const char *new_user); |
| 4359 | 1051 | |
| 1052 | /** | |
| 1053 | * Removes a user from a chat, optionally with a reason. | |
| 1054 | * | |
|
6407
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1055 | * 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
|
1056 | * |
| 4359 | 1057 | * @param chat The chat. |
| 1058 | * @param user The user that is being removed. | |
| 1059 | * @param reason The optional reason given for the removal. Can be @c NULL. | |
| 1060 | */ | |
| 15884 | 1061 | 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
|
1062 | const char *reason); |
| 4359 | 1063 | |
| 1064 | /** | |
|
6407
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1065 | * 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
|
1066 | * |
|
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1067 | * @param chat The chat. |
|
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1068 | * @param users The users that are being removed. |
|
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1069 | * @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
|
1070 | */ |
| 15884 | 1071 | void purple_conv_chat_remove_users(PurpleConvChat *chat, GList *users, |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1072 | const char *reason); |
|
6407
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1073 | |
|
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1074 | /** |
|
9554
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1075 | * Finds a user in a chat |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1076 | * |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1077 | * @param chat The chat. |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1078 | * @param user The user to look for. |
|
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 | * @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
|
1081 | */ |
| 15884 | 1082 | 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
|
1083 | |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1084 | /** |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1085 | * Set a users flags in a chat |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1086 | * |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1087 | * @param chat The chat. |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1088 | * @param user The user to update. |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1089 | * @param flags The new flags. |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1090 | */ |
| 15884 | 1091 | void purple_conv_chat_user_set_flags(PurpleConvChat *chat, const char *user, |
| 1092 | PurpleConvChatBuddyFlags flags); | |
|
9554
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1093 | |
|
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 | * Get the flags for a user in a chat |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1096 | * |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1097 | * @param chat The chat. |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1098 | * @param user The user to find the flags for |
|
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 | * @return The flags for the user |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1101 | */ |
| 15884 | 1102 | PurpleConvChatBuddyFlags purple_conv_chat_user_get_flags(PurpleConvChat *chat, |
|
9554
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1103 | const char *user); |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1104 | |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1105 | /** |
|
6414
f78eb072fcc0
[gaim-migrate @ 6921]
Christian Hammond <chipx86@chipx86.com>
parents:
6407
diff
changeset
|
1106 | * Clears all users from a chat. |
|
f78eb072fcc0
[gaim-migrate @ 6921]
Christian Hammond <chipx86@chipx86.com>
parents:
6407
diff
changeset
|
1107 | * |
|
f78eb072fcc0
[gaim-migrate @ 6921]
Christian Hammond <chipx86@chipx86.com>
parents:
6407
diff
changeset
|
1108 | * @param chat The chat. |
|
f78eb072fcc0
[gaim-migrate @ 6921]
Christian Hammond <chipx86@chipx86.com>
parents:
6407
diff
changeset
|
1109 | */ |
| 15884 | 1110 | void purple_conv_chat_clear_users(PurpleConvChat *chat); |
|
6414
f78eb072fcc0
[gaim-migrate @ 6921]
Christian Hammond <chipx86@chipx86.com>
parents:
6407
diff
changeset
|
1111 | |
|
f78eb072fcc0
[gaim-migrate @ 6921]
Christian Hammond <chipx86@chipx86.com>
parents:
6407
diff
changeset
|
1112 | /** |
| 8158 | 1113 | * Sets your nickname (used for hilighting) for a chat. |
| 1114 | * | |
| 1115 | * @param chat The chat. | |
| 1116 | * @param nick The nick. | |
| 1117 | */ | |
| 15884 | 1118 | void purple_conv_chat_set_nick(PurpleConvChat *chat, const char *nick); |
| 8158 | 1119 | |
| 1120 | /** | |
| 1121 | * Gets your nickname (used for hilighting) for a chat. | |
| 1122 | * | |
| 1123 | * @param chat The chat. | |
| 1124 | * @return The nick. | |
| 1125 | */ | |
| 15884 | 1126 | const char *purple_conv_chat_get_nick(PurpleConvChat *chat); |
| 8158 | 1127 | |
| 1128 | /** | |
| 4359 | 1129 | * Finds a chat with the specified chat ID. |
| 1130 | * | |
| 15884 | 1131 | * @param gc The purple_connection. |
| 4359 | 1132 | * @param id The chat ID. |
| 1133 | * | |
| 1134 | * @return The chat conversation. | |
| 1135 | */ | |
| 15884 | 1136 | PurpleConversation *purple_find_chat(const PurpleConnection *gc, int id); |
| 4359 | 1137 | |
| 8256 | 1138 | /** |
| 1139 | * Lets the core know we left a chat, without destroying it. | |
| 1140 | * Called from serv_got_chat_left(). | |
| 1141 | * | |
| 1142 | * @param chat The chat. | |
| 1143 | */ | |
| 15884 | 1144 | void purple_conv_chat_left(PurpleConvChat *chat); |
| 8256 | 1145 | |
| 1146 | /** | |
| 1147 | * Returns true if we're no longer in this chat, | |
| 1148 | * and just left the window open. | |
| 1149 | * | |
| 1150 | * @param chat The chat. | |
| 1151 | * | |
| 1152 | * @return @c TRUE if we left the chat already, @c FALSE if | |
| 1153 | * we're still there. | |
| 1154 | */ | |
| 15884 | 1155 | gboolean purple_conv_chat_has_left(PurpleConvChat *chat); |
| 8256 | 1156 | |
|
9554
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1157 | /** |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1158 | * Creates a new chat buddy |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1159 | * |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1160 | * @param name The name. |
|
14027
708c2047424f
[gaim-migrate @ 16521]
Aaron Sheldon <aaronsheldon@users.sourceforge.net>
parents:
13844
diff
changeset
|
1161 | * @param alias The alias. |
|
9554
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1162 | * @param flags The flags. |
|
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 | * @return The new chat buddy |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1165 | */ |
| 15884 | 1166 | PurpleConvChatBuddy *purple_conv_chat_cb_new(const char *name, const char *alias, |
| 1167 | PurpleConvChatBuddyFlags flags); | |
|
9554
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1168 | |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1169 | /** |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1170 | * Find a chat buddy in a chat |
|
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 | * @param chat The chat. |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1173 | * @param name The name of the chat buddy to find. |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1174 | */ |
| 15884 | 1175 | 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
|
1176 | |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1177 | /** |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1178 | * Get the name of a chat buddy |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1179 | * |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1180 | * @param cb The chat buddy. |
|
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 | * @return The name of the chat buddy. |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1183 | */ |
| 15884 | 1184 | const char *purple_conv_chat_cb_get_name(PurpleConvChatBuddy *cb); |
|
9554
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1185 | |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1186 | /** |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1187 | * Destroys a chat buddy |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1188 | * |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1189 | * @param cb The chat buddy to destroy |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1190 | */ |
| 15884 | 1191 | void purple_conv_chat_cb_destroy(PurpleConvChatBuddy *cb); |
|
9554
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1192 | |
| 4359 | 1193 | /*@}*/ |
| 1194 | ||
|
4469
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1195 | /**************************************************************************/ |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1196 | /** @name Conversations Subsystem */ |
|
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 | /*@{*/ |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1199 | |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1200 | /** |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1201 | * Returns the conversation subsystem handle. |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1202 | * |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1203 | * @return The conversation subsystem handle. |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1204 | */ |
| 15884 | 1205 | void *purple_conversations_get_handle(void); |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1206 | |
|
5872
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
1207 | /** |
|
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
1208 | * Initializes the conversation subsystem. |
|
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
1209 | */ |
| 15884 | 1210 | void purple_conversations_init(void); |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1211 | |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1212 | /** |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1213 | * Uninitializes the conversation subsystem. |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1214 | */ |
| 15884 | 1215 | void purple_conversations_uninit(void); |
|
5872
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
1216 | |
|
4481
1a02f276e41e
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1217 | /*@}*/ |
|
1a02f276e41e
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1218 | |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
1219 | #ifdef __cplusplus |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
1220 | } |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
1221 | #endif |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
1222 | |
| 15884 | 1223 | #endif /* _PURPLE_CONVERSATION_H_ */ |