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