Sun, 11 May 2008 05:08:08 +0000
Assorted cleanups, mostly to the Doxygen comments. I added a few missing
@since tags.
| 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 |
|
20889
3d0ef192f98c
All the links to libpurple signal pages were in the comment containing the
Will Thompson <resiak@pidgin.im>
parents:
20147
diff
changeset
|
4 | * @see @ref conversation-signals |
|
20147
66f05a854eee
applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents:
19904
diff
changeset
|
5 | */ |
|
66f05a854eee
applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents:
19904
diff
changeset
|
6 | |
|
66f05a854eee
applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents:
19904
diff
changeset
|
7 | /* purple |
| 4359 | 8 | * |
| 15884 | 9 | * Purple is the legal property of its developers, whose names are too numerous |
| 8046 | 10 | * to list here. Please refer to the COPYRIGHT file distributed with this |
| 11 | * source distribution. | |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
12 | * |
| 4359 | 13 | * This program is free software; you can redistribute it and/or modify |
| 14 | * it under the terms of the GNU General Public License as published by | |
| 15 | * the Free Software Foundation; either version 2 of the License, or | |
| 16 | * (at your option) any later version. | |
| 17 | * | |
| 18 | * This program is distributed in the hope that it will be useful, | |
| 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 21 | * GNU General Public License for more details. | |
| 22 | * | |
| 23 | * You should have received a copy of the GNU General Public License | |
| 24 | * 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
|
25 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
| 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- |
|
23063
9458eafda32c
Assorted cleanups, mostly to the Doxygen comments. I added a few missing
Richard Laager <rlaager@pidgin.im>
parents:
22082
diff
changeset
|
122 | linkified @since 2.1.0 */ |
|
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); |
|
21099
584da62ea174
Documentation tweaks for the write_conv uiop and for prpl_info.offline_message.
Will Thompson <resiak@pidgin.im>
parents:
20971
diff
changeset
|
174 | /** Write a message to a conversation. This is used rather than the |
|
584da62ea174
Documentation tweaks for the write_conv uiop and for prpl_info.offline_message.
Will Thompson <resiak@pidgin.im>
parents:
20971
diff
changeset
|
175 | * chat- or im-specific ops for errors, system messages (such as "x is |
|
584da62ea174
Documentation tweaks for the write_conv uiop and for prpl_info.offline_message.
Will Thompson <resiak@pidgin.im>
parents:
20971
diff
changeset
|
176 | * now know as y"), and as the fallback if #write_im and #write_chat |
|
584da62ea174
Documentation tweaks for the write_conv uiop and for prpl_info.offline_message.
Will Thompson <resiak@pidgin.im>
parents:
20971
diff
changeset
|
177 | * are not implemented. It should be implemented, or the UI will miss |
|
584da62ea174
Documentation tweaks for the write_conv uiop and for prpl_info.offline_message.
Will Thompson <resiak@pidgin.im>
parents:
20971
diff
changeset
|
178 | * conversation error messages and your users will hate you. |
|
584da62ea174
Documentation tweaks for the write_conv uiop and for prpl_info.offline_message.
Will Thompson <resiak@pidgin.im>
parents:
20971
diff
changeset
|
179 | * |
|
19120
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
180 | * @see purple_conversation_write() |
|
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
181 | */ |
|
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
182 | void (*write_conv)(PurpleConversation *conv, |
|
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
183 | const char *name, |
|
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
184 | const char *alias, |
|
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
185 | const char *message, |
|
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
186 | PurpleMessageFlags flags, |
| 8155 | 187 | time_t mtime); |
| 4359 | 188 | |
|
19120
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
189 | /** 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
|
190 | * @param cbuddies A @c GList of #PurpleConvChatBuddy structs. |
|
19120
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
191 | * @param new_arrivals Whether join notices should be shown. |
|
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
192 | * (Join notices are actually written to the |
|
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
193 | * conversation by #purple_conv_chat_add_users().) |
|
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
194 | */ |
|
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
195 | void (*chat_add_users)(PurpleConversation *conv, |
|
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
196 | GList *cbuddies, |
|
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
197 | gboolean new_arrivals); |
|
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
198 | /** 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
|
199 | * rename message is written to the conversation by libpurple.) |
|
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
200 | * @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
|
201 | * @see purple_conv_chat_add_users() |
|
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
202 | */ |
| 15884 | 203 | 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
|
204 | const char *new_name, const char *new_alias); |
|
19120
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
205 | /** 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
|
206 | * @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
|
207 | * @see purple_conv_chat_rename_user() |
|
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
208 | */ |
| 15884 | 209 | void (*chat_remove_users)(PurpleConversation *conv, GList *users); |
|
19120
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
210 | /** Called when a user's flags are changed. |
|
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
211 | * @see purple_conv_chat_user_set_flags() |
|
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
212 | */ |
| 15884 | 213 | void (*chat_update_user)(PurpleConversation *conv, const char *user); |
| 4359 | 214 | |
|
19120
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
215 | /** Present this conversation to the user; for example, by displaying |
|
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
216 | * the IM dialog. |
|
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
217 | */ |
| 15884 | 218 | void (*present)(PurpleConversation *conv); |
| 4359 | 219 | |
|
19120
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
220 | /** 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
|
221 | * this conversation has the focus, return @c TRUE; otherwise, return |
|
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
222 | * @c FALSE. |
|
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
223 | */ |
| 15884 | 224 | gboolean (*has_focus)(PurpleConversation *conv); |
|
9260
82d7b380220a
[gaim-migrate @ 10059]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9166
diff
changeset
|
225 | |
| 10526 | 226 | /* Custom Smileys */ |
| 15884 | 227 | gboolean (*custom_smiley_add)(PurpleConversation *conv, const char *smile, gboolean remote); |
| 228 | void (*custom_smiley_write)(PurpleConversation *conv, const char *smile, | |
|
11137
cf40226ddff7
[gaim-migrate @ 13201]
Mark Doliner <markdoliner@pidgin.im>
parents:
11035
diff
changeset
|
229 | const guchar *data, gsize size); |
| 15884 | 230 | void (*custom_smiley_close)(PurpleConversation *conv, const char *smile); |
| 14582 | 231 | |
|
19120
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
232 | /** 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
|
233 | * 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
|
234 | * 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
|
235 | * #purple_request_action(). |
|
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
236 | */ |
| 15884 | 237 | 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
|
238 | |
|
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_reserved1)(void); |
|
1ce5ffe12e2a
Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents:
16007
diff
changeset
|
240 | 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
|
241 | 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
|
242 | void (*_purple_reserved4)(void); |
| 4359 | 243 | }; |
| 244 | ||
| 245 | /** | |
| 246 | * Data specific to Instant Messages. | |
| 247 | */ | |
| 15884 | 248 | struct _PurpleConvIm |
| 4359 | 249 | { |
| 15884 | 250 | PurpleConversation *conv; /**< The parent conversation. */ |
| 4359 | 251 | |
| 15884 | 252 | PurpleTypingState typing_state; /**< The current typing state. */ |
|
4465
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
253 | guint typing_timeout; /**< The typing timer handle. */ |
|
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
254 | time_t type_again; /**< The type again time. */ |
|
13844
835b8f7b3d1d
[gaim-migrate @ 16295]
Mark Doliner <markdoliner@pidgin.im>
parents:
13840
diff
changeset
|
255 | guint send_typed_timeout; /**< The type again timer handle. */ |
| 4359 | 256 | |
| 15884 | 257 | PurpleBuddyIcon *icon; /**< The buddy icon. */ |
| 4359 | 258 | }; |
| 259 | ||
| 260 | /** | |
| 261 | * Data specific to Chats. | |
| 262 | */ | |
| 15884 | 263 | struct _PurpleConvChat |
| 4359 | 264 | { |
| 15884 | 265 | PurpleConversation *conv; /**< The parent conversation. */ |
| 4359 | 266 | |
|
4465
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
267 | GList *in_room; /**< The users in the room. */ |
|
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
268 | GList *ignored; /**< Ignored users. */ |
|
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
269 | char *who; /**< The person who set the topic. */ |
|
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
270 | char *topic; /**< The topic. */ |
|
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
271 | int id; /**< The chat ID. */ |
| 8158 | 272 | char *nick; /**< Your nick in this chat. */ |
| 8256 | 273 | |
| 274 | gboolean left; /**< We left the chat and kept the window open */ | |
| 4359 | 275 | }; |
| 276 | ||
| 277 | /** | |
|
9554
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
278 | * Data for "Chat Buddies" |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
279 | */ |
| 15884 | 280 | struct _PurpleConvChatBuddy |
|
9554
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
281 | { |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
282 | char *name; /**< The name */ |
|
14027
708c2047424f
[gaim-migrate @ 16521]
Aaron Sheldon <aaronsheldon@users.sourceforge.net>
parents:
13844
diff
changeset
|
283 | char *alias; /**< The alias */ |
|
708c2047424f
[gaim-migrate @ 16521]
Aaron Sheldon <aaronsheldon@users.sourceforge.net>
parents:
13844
diff
changeset
|
284 | char *alias_key; /**< The alias key */ |
|
708c2047424f
[gaim-migrate @ 16521]
Aaron Sheldon <aaronsheldon@users.sourceforge.net>
parents:
13844
diff
changeset
|
285 | gboolean buddy; /**< ChatBuddy is on the blist */ |
| 15884 | 286 | PurpleConvChatBuddyFlags flags; /**< Flags (ops, voice etc.) */ |
|
9554
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
287 | }; |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
288 | |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
289 | /** |
|
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
|
290 | * Description of a conversation message |
|
20940
925d3d68b3af
Doxygen @since tags for libpurple and pidgin.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20889
diff
changeset
|
291 | * |
|
925d3d68b3af
Doxygen @since tags for libpurple and pidgin.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20889
diff
changeset
|
292 | * @since 2.2.0 |
|
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
|
293 | */ |
|
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 | 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
|
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 | 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
|
297 | 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
|
298 | 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
|
299 | time_t when; |
|
21255
48d8d4eb9ece
Fix doxygen foo, thanks to resiak\!
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21253
diff
changeset
|
300 | PurpleConversation *conv; /**< @since 2.3.0 */ |
|
48d8d4eb9ece
Fix doxygen foo, thanks to resiak\!
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21253
diff
changeset
|
301 | char *alias; /**< @since 2.3.0 */ |
|
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
|
302 | }; |
|
cf4e3e71bbc0
Store message history in a conversation, and provide API to access the history.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
19120
diff
changeset
|
303 | |
|
cf4e3e71bbc0
Store message history in a conversation, and provide API to access the history.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
19120
diff
changeset
|
304 | /** |
| 4359 | 305 | * A core representation of a conversation between two or more people. |
| 306 | * | |
| 11581 | 307 | * The conversation can be an IM or a chat. |
| 4359 | 308 | */ |
| 15884 | 309 | struct _PurpleConversation |
| 4359 | 310 | { |
| 15884 | 311 | PurpleConversationType type; /**< The type of conversation. */ |
| 4359 | 312 | |
| 15884 | 313 | PurpleAccount *account; /**< The user using this conversation. */ |
| 4359 | 314 | |
| 315 | ||
| 316 | char *name; /**< The name of the conversation. */ | |
| 317 | char *title; /**< The window title. */ | |
| 318 | ||
| 319 | gboolean logging; /**< The status of logging. */ | |
| 8158 | 320 | |
|
11454
a604c2097a6e
[gaim-migrate @ 13693]
Richard Laager <rlaager@pidgin.im>
parents:
11338
diff
changeset
|
321 | GList *logs; /**< This conversation's logs */ |
| 8158 | 322 | |
| 4359 | 323 | union |
| 324 | { | |
| 15884 | 325 | PurpleConvIm *im; /**< IM-specific data. */ |
| 326 | PurpleConvChat *chat; /**< Chat-specific data. */ | |
|
4378
3bef342997ef
[gaim-migrate @ 4644]
Christian Hammond <chipx86@chipx86.com>
parents:
4359
diff
changeset
|
327 | void *misc; /**< Misc. data. */ |
| 4359 | 328 | |
| 329 | } u; | |
|
4465
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
330 | |
| 15884 | 331 | PurpleConversationUiOps *ui_ops; /**< UI-specific operations. */ |
|
4465
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
332 | void *ui_data; /**< UI-specific data. */ |
|
4876
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
333 | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
334 | GHashTable *data; /**< Plugin-specific data. */ |
|
10849
476d68d7a435
[gaim-migrate @ 12521]
Richard Laager <rlaager@pidgin.im>
parents:
10827
diff
changeset
|
335 | |
| 15884 | 336 | PurpleConnectionFlags features; /**< The supported features */ |
|
19904
8abf4c2056eb
Keep the message history in PurpleConversation.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
19862
diff
changeset
|
337 | GList *message_history; /**< Message history, as a GList of PurpleConvMessage's */ |
| 4359 | 338 | }; |
| 339 | ||
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
340 | #ifdef __cplusplus |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
341 | extern "C" { |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
342 | #endif |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
343 | |
| 4359 | 344 | /**************************************************************************/ |
| 345 | /** @name Conversation API */ | |
| 346 | /**************************************************************************/ | |
| 347 | /*@{*/ | |
| 348 | ||
| 349 | /** | |
| 350 | * Creates a new conversation of the specified type. | |
| 351 | * | |
|
6720
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6622
diff
changeset
|
352 | * @param type The type of conversation. |
| 15884 | 353 | * @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
|
354 | * user's end. |
|
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6622
diff
changeset
|
355 | * @param name The name of the conversation. |
| 4359 | 356 | * |
| 357 | * @return The new conversation. | |
| 358 | */ | |
| 15884 | 359 | PurpleConversation *purple_conversation_new(PurpleConversationType type, |
| 360 | PurpleAccount *account, | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
361 | const char *name); |
| 4359 | 362 | |
| 363 | /** | |
| 364 | * Destroys the specified conversation and removes it from the parent | |
| 365 | * window. | |
| 366 | * | |
| 367 | * If this conversation is the only one contained in the parent window, | |
| 368 | * that window is also destroyed. | |
| 369 | * | |
| 370 | * @param conv The conversation to destroy. | |
| 371 | */ | |
| 15884 | 372 | void purple_conversation_destroy(PurpleConversation *conv); |
| 4359 | 373 | |
|
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 | /** |
|
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12618
diff
changeset
|
376 | * 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
|
377 | * conversation by displaying the IM dialog. |
|
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12618
diff
changeset
|
378 | * @param conv The conversation to present |
|
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12618
diff
changeset
|
379 | */ |
| 15884 | 380 | void purple_conversation_present(PurpleConversation *conv); |
|
12624
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12618
diff
changeset
|
381 | |
|
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12618
diff
changeset
|
382 | |
| 4359 | 383 | /** |
| 384 | * Returns the specified conversation's type. | |
| 385 | * | |
| 386 | * @param conv The conversation. | |
| 387 | * | |
| 388 | * @return The conversation's type. | |
| 389 | */ | |
| 15884 | 390 | PurpleConversationType purple_conversation_get_type(const PurpleConversation *conv); |
| 4359 | 391 | |
| 392 | /** | |
| 393 | * Sets the specified conversation's UI operations structure. | |
| 394 | * | |
| 395 | * @param conv The conversation. | |
| 396 | * @param ops The UI conversation operations structure. | |
| 397 | */ | |
| 15884 | 398 | void purple_conversation_set_ui_ops(PurpleConversation *conv, |
| 399 | PurpleConversationUiOps *ops); | |
| 4359 | 400 | |
| 401 | /** | |
| 11581 | 402 | * Sets the default conversation UI operations structure. |
| 403 | * | |
| 404 | * @param ops The UI conversation operations structure. | |
| 405 | */ | |
| 15884 | 406 | void purple_conversations_set_ui_ops(PurpleConversationUiOps *ops); |
| 11581 | 407 | |
| 408 | /** | |
| 4359 | 409 | * Returns the specified conversation's UI operations structure. |
|
6585
8fcd3639e544
[gaim-migrate @ 7107]
Christian Hammond <chipx86@chipx86.com>
parents:
6488
diff
changeset
|
410 | * |
| 4359 | 411 | * @param conv The conversation. |
| 412 | * | |
| 413 | * @return The operations structure. | |
| 414 | */ | |
| 15884 | 415 | PurpleConversationUiOps *purple_conversation_get_ui_ops( |
| 416 | const PurpleConversation *conv); | |
| 4359 | 417 | |
| 418 | /** | |
| 15884 | 419 | * Sets the specified conversation's purple_account. |
| 4359 | 420 | * |
| 15884 | 421 | * This purple_account represents the user using purple, not the person the user |
| 4359 | 422 | * is having a conversation/chat/flame with. |
| 423 | * | |
| 424 | * @param conv The conversation. | |
| 15884 | 425 | * @param account The purple_account. |
| 4359 | 426 | */ |
| 15884 | 427 | void purple_conversation_set_account(PurpleConversation *conv, |
| 428 | PurpleAccount *account); | |
| 4359 | 429 | |
| 430 | /** | |
| 15884 | 431 | * Returns the specified conversation's purple_account. |
| 4359 | 432 | * |
| 15884 | 433 | * This purple_account represents the user using purple, not the person the user |
| 4359 | 434 | * is having a conversation/chat/flame with. |
| 435 | * | |
| 436 | * @param conv The conversation. | |
| 437 | * | |
| 15884 | 438 | * @return The conversation's purple_account. |
| 4359 | 439 | */ |
| 15884 | 440 | PurpleAccount *purple_conversation_get_account(const PurpleConversation *conv); |
| 4359 | 441 | |
| 442 | /** | |
| 15884 | 443 | * Returns the specified conversation's purple_connection. |
| 4359 | 444 | * |
| 15884 | 445 | * This is the same as purple_conversation_get_user(conv)->gc. |
| 4359 | 446 | * |
| 447 | * @param conv The conversation. | |
| 448 | * | |
| 15884 | 449 | * @return The conversation's purple_connection. |
| 4359 | 450 | */ |
| 15884 | 451 | PurpleConnection *purple_conversation_get_gc(const PurpleConversation *conv); |
| 4359 | 452 | |
| 453 | /** | |
| 454 | * Sets the specified conversation's title. | |
| 455 | * | |
| 456 | * @param conv The conversation. | |
| 457 | * @param title The title. | |
| 458 | */ | |
| 15884 | 459 | void purple_conversation_set_title(PurpleConversation *conv, const char *title); |
| 4359 | 460 | |
| 461 | /** | |
| 462 | * Returns the specified conversation's title. | |
| 463 | * | |
|
6720
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6622
diff
changeset
|
464 | * @param conv The conversation. |
| 4359 | 465 | * |
| 466 | * @return The title. | |
| 467 | */ | |
| 15884 | 468 | const char *purple_conversation_get_title(const PurpleConversation *conv); |
| 4359 | 469 | |
| 470 | /** | |
| 471 | * Automatically sets the specified conversation's title. | |
| 472 | * | |
| 473 | * This function takes OPT_IM_ALIAS_TAB into account, as well as the | |
| 474 | * user's alias. | |
| 475 | * | |
| 476 | * @param conv The conversation. | |
| 477 | */ | |
| 15884 | 478 | void purple_conversation_autoset_title(PurpleConversation *conv); |
| 4359 | 479 | |
| 480 | /** | |
|
7256
311c8febfc92
[gaim-migrate @ 7833]
Christian Hammond <chipx86@chipx86.com>
parents:
7122
diff
changeset
|
481 | * Sets the specified conversation's name. |
|
311c8febfc92
[gaim-migrate @ 7833]
Christian Hammond <chipx86@chipx86.com>
parents:
7122
diff
changeset
|
482 | * |
|
311c8febfc92
[gaim-migrate @ 7833]
Christian Hammond <chipx86@chipx86.com>
parents:
7122
diff
changeset
|
483 | * @param conv The conversation. |
|
311c8febfc92
[gaim-migrate @ 7833]
Christian Hammond <chipx86@chipx86.com>
parents:
7122
diff
changeset
|
484 | * @param name The conversation's name. |
|
311c8febfc92
[gaim-migrate @ 7833]
Christian Hammond <chipx86@chipx86.com>
parents:
7122
diff
changeset
|
485 | */ |
| 15884 | 486 | void purple_conversation_set_name(PurpleConversation *conv, const char *name); |
|
7256
311c8febfc92
[gaim-migrate @ 7833]
Christian Hammond <chipx86@chipx86.com>
parents:
7122
diff
changeset
|
487 | |
|
311c8febfc92
[gaim-migrate @ 7833]
Christian Hammond <chipx86@chipx86.com>
parents:
7122
diff
changeset
|
488 | /** |
| 4359 | 489 | * Returns the specified conversation's name. |
| 490 | * | |
| 491 | * @param conv The conversation. | |
| 492 | * | |
|
22082
617ac5b2b597
Docu patch from Simon Wenner. Closes #4497.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21453
diff
changeset
|
493 | * @return The conversation's name. If the conversation is an IM with a PurpleBuddy, |
|
617ac5b2b597
Docu patch from Simon Wenner. Closes #4497.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21453
diff
changeset
|
494 | * then it's the name of the PurpleBuddy. |
| 4359 | 495 | */ |
| 15884 | 496 | const char *purple_conversation_get_name(const PurpleConversation *conv); |
| 4359 | 497 | |
| 498 | /** | |
| 499 | * Enables or disables logging 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 | * @param log @c TRUE if logging should be enabled, or @c FALSE otherwise. |
| 4359 | 503 | */ |
| 15884 | 504 | void purple_conversation_set_logging(PurpleConversation *conv, gboolean log); |
| 4359 | 505 | |
| 506 | /** | |
| 507 | * Returns whether or not logging is enabled for this conversation. | |
| 508 | * | |
|
6720
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6622
diff
changeset
|
509 | * @param conv The conversation. |
|
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6622
diff
changeset
|
510 | * |
| 4359 | 511 | * @return @c TRUE if logging is enabled, or @c FALSE otherwise. |
| 512 | */ | |
| 15884 | 513 | gboolean purple_conversation_is_logging(const PurpleConversation *conv); |
| 4359 | 514 | |
| 515 | /** | |
|
11672
018c70c8134c
[gaim-migrate @ 13958]
Richard Laager <rlaager@pidgin.im>
parents:
11664
diff
changeset
|
516 | * Closes any open logs for this conversation. |
|
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 | * 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
|
519 | * message, if the conversation has logging enabled. To disable logging for |
| 15884 | 520 | * the remainder of the conversation, use purple_conversation_set_logging(). |
|
11672
018c70c8134c
[gaim-migrate @ 13958]
Richard Laager <rlaager@pidgin.im>
parents:
11664
diff
changeset
|
521 | * |
|
018c70c8134c
[gaim-migrate @ 13958]
Richard Laager <rlaager@pidgin.im>
parents:
11664
diff
changeset
|
522 | * @param conv The conversation. |
|
018c70c8134c
[gaim-migrate @ 13958]
Richard Laager <rlaager@pidgin.im>
parents:
11664
diff
changeset
|
523 | */ |
| 15884 | 524 | void purple_conversation_close_logs(PurpleConversation *conv); |
|
11672
018c70c8134c
[gaim-migrate @ 13958]
Richard Laager <rlaager@pidgin.im>
parents:
11664
diff
changeset
|
525 | |
|
018c70c8134c
[gaim-migrate @ 13958]
Richard Laager <rlaager@pidgin.im>
parents:
11664
diff
changeset
|
526 | /** |
| 4359 | 527 | * Returns the specified conversation's IM-specific data. |
| 528 | * | |
| 15884 | 529 | * If the conversation type is not PURPLE_CONV_TYPE_IM, this will return @c NULL. |
| 4359 | 530 | * |
| 531 | * @param conv The conversation. | |
| 532 | * | |
| 533 | * @return The IM-specific data. | |
| 534 | */ | |
| 15884 | 535 | PurpleConvIm *purple_conversation_get_im_data(const PurpleConversation *conv); |
| 4359 | 536 | |
| 15884 | 537 | #define PURPLE_CONV_IM(c) (purple_conversation_get_im_data(c)) |
| 4359 | 538 | |
| 539 | /** | |
| 540 | * Returns the specified conversation's chat-specific data. | |
| 541 | * | |
| 15884 | 542 | * If the conversation type is not PURPLE_CONV_TYPE_CHAT, this will return @c NULL. |
| 4359 | 543 | * |
| 544 | * @param conv The conversation. | |
| 545 | * | |
| 546 | * @return The chat-specific data. | |
| 547 | */ | |
| 15884 | 548 | PurpleConvChat *purple_conversation_get_chat_data(const PurpleConversation *conv); |
| 4359 | 549 | |
| 15884 | 550 | #define PURPLE_CONV_CHAT(c) (purple_conversation_get_chat_data(c)) |
| 4359 | 551 | |
| 552 | /** | |
|
4877
7d1f4381fed0
[gaim-migrate @ 5207]
Christian Hammond <chipx86@chipx86.com>
parents:
4876
diff
changeset
|
553 | * Sets extra data for a conversation. |
|
6585
8fcd3639e544
[gaim-migrate @ 7107]
Christian Hammond <chipx86@chipx86.com>
parents:
6488
diff
changeset
|
554 | * |
|
4876
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
555 | * @param conv The conversation. |
|
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
556 | * @param key The unique key. |
|
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
557 | * @param data The data to assign. |
|
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
558 | */ |
| 15884 | 559 | void purple_conversation_set_data(PurpleConversation *conv, const char *key, |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
560 | gpointer data); |
|
4876
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
561 | |
|
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
562 | /** |
|
4877
7d1f4381fed0
[gaim-migrate @ 5207]
Christian Hammond <chipx86@chipx86.com>
parents:
4876
diff
changeset
|
563 | * Returns extra data in a conversation. |
|
4876
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
564 | * |
|
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
565 | * @param conv The conversation. |
|
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
566 | * @param key The unqiue key. |
|
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
567 | * |
|
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
568 | * @return The data associated with the key. |
|
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
569 | */ |
| 15884 | 570 | gpointer purple_conversation_get_data(PurpleConversation *conv, const char *key); |
|
4876
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
571 | |
|
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
572 | /** |
| 4359 | 573 | * Returns a list of all conversations. |
| 574 | * | |
| 575 | * This list includes both IMs and chats. | |
| 576 | * | |
|
18190
bcf28ef7e8ff
Re-fix the DBus list handling code by killing const GList* / const GSList*
Richard Laager <rlaager@pidgin.im>
parents:
18122
diff
changeset
|
577 | * @constreturn A GList of all conversations. |
| 4359 | 578 | */ |
|
18122
9bf9970c1b6a
disapproval of revision '2d8ea56b90971e7851442d96b7d74ecb4f052126'
Richard Laager <rlaager@pidgin.im>
parents:
18121
diff
changeset
|
579 | GList *purple_get_conversations(void); |
| 4359 | 580 | |
| 581 | /** | |
| 582 | * Returns a list of all IMs. | |
| 583 | * | |
|
18190
bcf28ef7e8ff
Re-fix the DBus list handling code by killing const GList* / const GSList*
Richard Laager <rlaager@pidgin.im>
parents:
18122
diff
changeset
|
584 | * @constreturn A GList of all IMs. |
| 4359 | 585 | */ |
|
18122
9bf9970c1b6a
disapproval of revision '2d8ea56b90971e7851442d96b7d74ecb4f052126'
Richard Laager <rlaager@pidgin.im>
parents:
18121
diff
changeset
|
586 | GList *purple_get_ims(void); |
| 4359 | 587 | |
| 588 | /** | |
| 589 | * Returns a list of all chats. | |
| 590 | * | |
|
18190
bcf28ef7e8ff
Re-fix the DBus list handling code by killing const GList* / const GSList*
Richard Laager <rlaager@pidgin.im>
parents:
18122
diff
changeset
|
591 | * @constreturn A GList of all chats. |
| 4359 | 592 | */ |
|
18122
9bf9970c1b6a
disapproval of revision '2d8ea56b90971e7851442d96b7d74ecb4f052126'
Richard Laager <rlaager@pidgin.im>
parents:
18121
diff
changeset
|
593 | GList *purple_get_chats(void); |
| 4359 | 594 | |
| 595 | /** | |
| 15884 | 596 | * Finds a conversation with the specified type, name, and Purple account. |
| 4359 | 597 | * |
|
10246
aa5bff72f94c
[gaim-migrate @ 11386]
Mark Doliner <markdoliner@pidgin.im>
parents:
10008
diff
changeset
|
598 | * @param type The type of the conversation. |
| 4359 | 599 | * @param name The name of the conversation. |
| 15884 | 600 | * @param account The purple_account associated with the conversation. |
| 4359 | 601 | * |
| 602 | * @return The conversation if found, or @c NULL otherwise. | |
| 603 | */ | |
| 15884 | 604 | PurpleConversation *purple_find_conversation_with_account( |
| 605 | PurpleConversationType type, const char *name, | |
| 606 | const PurpleAccount *account); | |
| 4359 | 607 | |
| 608 | /** | |
| 609 | * Writes to a conversation window. | |
| 610 | * | |
| 611 | * This function should not be used to write IM or chat messages. Use | |
| 15884 | 612 | * purple_conv_im_write() and purple_conv_chat_write() instead. Those functions will |
| 4359 | 613 | * most likely call this anyway, but they may do their own formatting, |
| 614 | * sound playback, etc. | |
| 615 | * | |
| 616 | * This can be used to write generic messages, such as "so and so closed | |
| 617 | * the conversation window." | |
| 618 | * | |
| 619 | * @param conv The conversation. | |
| 620 | * @param who The user who sent the message. | |
| 621 | * @param message The message. | |
|
6621
2a18ef3e5224
[gaim-migrate @ 7145]
Robert McQueen <robot101@debian.org>
parents:
6605
diff
changeset
|
622 | * @param flags The message flags. |
| 4359 | 623 | * @param mtime The time the message was sent. |
| 624 | * | |
| 15884 | 625 | * @see purple_conv_im_write() |
| 626 | * @see purple_conv_chat_write() | |
| 4359 | 627 | */ |
| 15884 | 628 | void purple_conversation_write(PurpleConversation *conv, const char *who, |
| 629 | const char *message, PurpleMessageFlags flags, | |
| 10665 | 630 | time_t mtime); |
| 631 | ||
| 632 | ||
| 633 | /** | |
| 634 | Set the features as supported for the given conversation. | |
| 635 | @param conv The conversation | |
| 636 | @param features Bitset defining supported features | |
| 637 | */ | |
| 15884 | 638 | void purple_conversation_set_features(PurpleConversation *conv, |
| 639 | PurpleConnectionFlags features); | |
| 10665 | 640 | |
| 641 | ||
| 642 | /** | |
| 643 | Get the features supported by the given conversation. | |
| 644 | @param conv The conversation | |
| 645 | */ | |
| 15884 | 646 | PurpleConnectionFlags purple_conversation_get_features(PurpleConversation *conv); |
| 4359 | 647 | |
| 648 | /** | |
|
9260
82d7b380220a
[gaim-migrate @ 10059]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9166
diff
changeset
|
649 | * Determines if a conversation has focus |
|
82d7b380220a
[gaim-migrate @ 10059]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9166
diff
changeset
|
650 | * |
|
82d7b380220a
[gaim-migrate @ 10059]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9166
diff
changeset
|
651 | * @param conv The conversation. |
|
82d7b380220a
[gaim-migrate @ 10059]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9166
diff
changeset
|
652 | * |
|
82d7b380220a
[gaim-migrate @ 10059]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9166
diff
changeset
|
653 | * @return @c TRUE if the conversation has focus, @c FALSE if |
|
82d7b380220a
[gaim-migrate @ 10059]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9166
diff
changeset
|
654 | * 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
|
655 | */ |
| 15884 | 656 | gboolean purple_conversation_has_focus(PurpleConversation *conv); |
|
9260
82d7b380220a
[gaim-migrate @ 10059]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9166
diff
changeset
|
657 | |
|
82d7b380220a
[gaim-migrate @ 10059]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9166
diff
changeset
|
658 | /** |
| 4359 | 659 | * Updates the visual status and UI of a conversation. |
| 660 | * | |
| 661 | * @param conv The conversation. | |
| 662 | * @param type The update type. | |
| 663 | */ | |
| 15884 | 664 | void purple_conversation_update(PurpleConversation *conv, PurpleConvUpdateType type); |
| 4359 | 665 | |
| 666 | /** | |
| 667 | * Calls a function on each conversation. | |
| 668 | * | |
| 669 | * @param func The function. | |
| 670 | */ | |
| 15884 | 671 | void purple_conversation_foreach(void (*func)(PurpleConversation *conv)); |
| 4359 | 672 | |
|
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
|
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 | * 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
|
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 | * @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
|
677 | * |
|
19733
ec657d978c5a
disapproval of revision 'f08436883bb16f29affdc63e9fd86ff278ed368f'
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
19732
diff
changeset
|
678 | * @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
|
679 | * 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
|
680 | * the end. |
|
20940
925d3d68b3af
Doxygen @since tags for libpurple and pidgin.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20889
diff
changeset
|
681 | * |
|
925d3d68b3af
Doxygen @since tags for libpurple and pidgin.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20889
diff
changeset
|
682 | * @since 2.2.0 |
|
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
|
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 | 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
|
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 | /** |
|
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 | * 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
|
688 | * |
|
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 | * @param conv The conversation |
|
20940
925d3d68b3af
Doxygen @since tags for libpurple and pidgin.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20889
diff
changeset
|
690 | * |
|
925d3d68b3af
Doxygen @since tags for libpurple and pidgin.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20889
diff
changeset
|
691 | * @since 2.2.0 |
|
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
|
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 | 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
|
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 | /** |
|
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 | * 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
|
697 | * |
|
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 | * @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
|
699 | * |
|
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 | * @return The name of the sender of the message |
|
20940
925d3d68b3af
Doxygen @since tags for libpurple and pidgin.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20889
diff
changeset
|
701 | * |
|
925d3d68b3af
Doxygen @since tags for libpurple and pidgin.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20889
diff
changeset
|
702 | * @since 2.2.0 |
|
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
|
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 | 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
|
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 | /** |
|
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 | * 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
|
708 | * |
|
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 | * @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
|
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 | * @return The name of the sender of the message |
|
20940
925d3d68b3af
Doxygen @since tags for libpurple and pidgin.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20889
diff
changeset
|
712 | * |
|
925d3d68b3af
Doxygen @since tags for libpurple and pidgin.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20889
diff
changeset
|
713 | * @since 2.2.0 |
|
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
|
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 | 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
|
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 | /** |
|
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 | * 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
|
719 | * |
|
cf4e3e71bbc0
Store message history in a conversation, and provide API to access the history.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
19120
diff
changeset
|
720 | * @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
|
721 | * |
|
22082
617ac5b2b597
Docu patch from Simon Wenner. Closes #4497.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21453
diff
changeset
|
722 | * @return The message flags |
|
20940
925d3d68b3af
Doxygen @since tags for libpurple and pidgin.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20889
diff
changeset
|
723 | * |
|
925d3d68b3af
Doxygen @since tags for libpurple and pidgin.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20889
diff
changeset
|
724 | * @since 2.2.0 |
|
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
|
725 | */ |
|
cf4e3e71bbc0
Store message history in a conversation, and provide API to access the history.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
19120
diff
changeset
|
726 | 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
|
727 | |
|
cf4e3e71bbc0
Store message history in a conversation, and provide API to access the history.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
19120
diff
changeset
|
728 | /** |
|
cf4e3e71bbc0
Store message history in a conversation, and provide API to access the history.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
19120
diff
changeset
|
729 | * 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
|
730 | * |
|
cf4e3e71bbc0
Store message history in a conversation, and provide API to access the history.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
19120
diff
changeset
|
731 | * @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
|
732 | * |
|
22082
617ac5b2b597
Docu patch from Simon Wenner. Closes #4497.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21453
diff
changeset
|
733 | * @return The timestamp of the message |
|
20940
925d3d68b3af
Doxygen @since tags for libpurple and pidgin.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20889
diff
changeset
|
734 | * |
|
925d3d68b3af
Doxygen @since tags for libpurple and pidgin.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20889
diff
changeset
|
735 | * @since 2.2.0 |
|
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
|
736 | */ |
|
cf4e3e71bbc0
Store message history in a conversation, and provide API to access the history.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
19120
diff
changeset
|
737 | 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
|
738 | |
| 4359 | 739 | /*@}*/ |
| 740 | ||
| 741 | ||
| 742 | /**************************************************************************/ | |
| 743 | /** @name IM Conversation API */ | |
| 744 | /**************************************************************************/ | |
| 745 | /*@{*/ | |
| 746 | ||
| 747 | /** | |
| 748 | * Gets an IM's parent conversation. | |
| 749 | * | |
| 750 | * @param im The IM. | |
| 751 | * | |
| 752 | * @return The parent conversation. | |
| 753 | */ | |
| 15884 | 754 | PurpleConversation *purple_conv_im_get_conversation(const PurpleConvIm *im); |
| 4359 | 755 | |
| 756 | /** | |
|
6846
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
757 | * Sets the IM's buddy icon. |
|
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
758 | * |
| 15884 | 759 | * This should only be called from within Purple. You probably want to |
| 760 | * call purple_buddy_icon_set_data(). | |
|
6846
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
761 | * |
|
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
762 | * @param im The IM. |
|
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
763 | * @param icon The buddy icon. |
|
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
764 | * |
| 15884 | 765 | * @see purple_buddy_icon_set_data() |
|
6846
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
766 | */ |
| 15884 | 767 | void purple_conv_im_set_icon(PurpleConvIm *im, PurpleBuddyIcon *icon); |
|
6846
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
768 | |
|
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
769 | /** |
|
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
770 | * Returns the IM's buddy icon. |
|
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
771 | * |
|
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
772 | * @param im The IM. |
|
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
773 | * |
|
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
774 | * @return The buddy icon. |
|
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
775 | */ |
| 15884 | 776 | PurpleBuddyIcon *purple_conv_im_get_icon(const PurpleConvIm *im); |
|
6846
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
777 | |
|
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
778 | /** |
| 4359 | 779 | * Sets the IM's typing state. |
| 780 | * | |
| 781 | * @param im The IM. | |
| 782 | * @param state The typing state. | |
| 783 | */ | |
| 15884 | 784 | void purple_conv_im_set_typing_state(PurpleConvIm *im, PurpleTypingState state); |
| 4359 | 785 | |
| 786 | /** | |
| 787 | * Returns the IM's typing state. | |
| 788 | * | |
| 789 | * @param im The IM. | |
| 790 | * | |
| 791 | * @return The IM's typing state. | |
| 792 | */ | |
| 15884 | 793 | PurpleTypingState purple_conv_im_get_typing_state(const PurpleConvIm *im); |
| 4359 | 794 | |
| 795 | /** | |
| 796 | * Starts the IM's typing timeout. | |
| 797 | * | |
| 798 | * @param im The IM. | |
| 799 | * @param timeout The timeout. | |
| 800 | */ | |
| 15884 | 801 | void purple_conv_im_start_typing_timeout(PurpleConvIm *im, int timeout); |
| 4359 | 802 | |
| 803 | /** | |
| 804 | * Stops the IM's typing timeout. | |
| 805 | * | |
| 806 | * @param im The IM. | |
| 807 | */ | |
| 15884 | 808 | void purple_conv_im_stop_typing_timeout(PurpleConvIm *im); |
| 4359 | 809 | |
| 810 | /** | |
| 811 | * Returns the IM's typing timeout. | |
| 812 | * | |
| 813 | * @param im The IM. | |
| 814 | * | |
| 815 | * @return The timeout. | |
| 816 | */ | |
| 15884 | 817 | guint purple_conv_im_get_typing_timeout(const PurpleConvIm *im); |
| 4359 | 818 | |
| 819 | /** | |
| 15884 | 820 | * 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
|
821 | * Few protocols need this (maybe only MSN). If the user is still |
| 15884 | 822 | * typing after this quiet-period, then another PURPLE_TYPING message |
|
13844
835b8f7b3d1d
[gaim-migrate @ 16295]
Mark Doliner <markdoliner@pidgin.im>
parents:
13840
diff
changeset
|
823 | * will be sent. |
| 4359 | 824 | * |
| 825 | * @param im The IM. | |
|
13844
835b8f7b3d1d
[gaim-migrate @ 16295]
Mark Doliner <markdoliner@pidgin.im>
parents:
13840
diff
changeset
|
826 | * @param val The number of seconds to wait before allowing another |
| 15884 | 827 | * PURPLE_TYPING message to be sent to the user. Or 0 to |
| 828 | * not send another PURPLE_TYPING message. | |
| 4359 | 829 | */ |
| 15884 | 830 | void purple_conv_im_set_type_again(PurpleConvIm *im, unsigned int val); |
| 4359 | 831 | |
| 832 | /** | |
| 15884 | 833 | * Returns the time after which another PURPLE_TYPING message should be sent. |
| 4359 | 834 | * |
| 835 | * @param im The IM. | |
| 836 | * | |
|
13844
835b8f7b3d1d
[gaim-migrate @ 16295]
Mark Doliner <markdoliner@pidgin.im>
parents:
13840
diff
changeset
|
837 | * @return The time in seconds since the epoch. Or 0 if no additional |
| 15884 | 838 | * PURPLE_TYPING message should be sent. |
| 4359 | 839 | */ |
| 15884 | 840 | time_t purple_conv_im_get_type_again(const PurpleConvIm *im); |
| 4359 | 841 | |
| 842 | /** | |
| 843 | * Starts the IM's type again timeout. | |
| 844 | * | |
| 845 | * @param im The IM. | |
| 846 | */ | |
| 15884 | 847 | void purple_conv_im_start_send_typed_timeout(PurpleConvIm *im); |
| 4359 | 848 | |
| 849 | /** | |
| 850 | * Stops the IM's type again timeout. | |
| 851 | * | |
| 852 | * @param im The IM. | |
| 853 | */ | |
| 15884 | 854 | void purple_conv_im_stop_send_typed_timeout(PurpleConvIm *im); |
| 4359 | 855 | |
| 856 | /** | |
| 857 | * Returns the IM's type again timeout interval. | |
| 858 | * | |
| 859 | * @param im The IM. | |
| 860 | * | |
| 861 | * @return The type again timeout interval. | |
| 862 | */ | |
| 15884 | 863 | guint purple_conv_im_get_send_typed_timeout(const PurpleConvIm *im); |
| 4359 | 864 | |
| 865 | /** | |
| 866 | * Updates the visual typing notification for an IM conversation. | |
| 867 | * | |
| 868 | * @param im The IM. | |
| 869 | */ | |
| 15884 | 870 | void purple_conv_im_update_typing(PurpleConvIm *im); |
| 4359 | 871 | |
| 872 | /** | |
| 873 | * Writes to an IM. | |
| 874 | * | |
| 875 | * @param im The IM. | |
| 876 | * @param who The user who sent the message. | |
| 877 | * @param message The message to write. | |
|
6621
2a18ef3e5224
[gaim-migrate @ 7145]
Robert McQueen <robot101@debian.org>
parents:
6605
diff
changeset
|
878 | * @param flags The message flags. |
| 4359 | 879 | * @param mtime The time the message was sent. |
| 880 | */ | |
| 15884 | 881 | void purple_conv_im_write(PurpleConvIm *im, const char *who, |
| 882 | const char *message, PurpleMessageFlags flags, | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
883 | time_t mtime); |
| 4359 | 884 | |
| 885 | /** | |
| 9627 | 886 | * Presents an IM-error to the user |
| 11581 | 887 | * |
| 9627 | 888 | * This is a helper function to find a conversation, write an error to it, and |
| 889 | * raise the window. If a conversation with this user doesn't already exist, | |
| 890 | * the function will return FALSE and the calling function can attempt to present | |
| 15884 | 891 | * the error another way (purple_notify_error, most likely) |
| 9627 | 892 | * |
| 893 | * @param who The user this error is about | |
| 894 | * @param account The account this error is on | |
| 895 | * @param what The error | |
| 896 | * @return TRUE if the error was presented, else FALSE | |
| 897 | */ | |
| 15884 | 898 | gboolean purple_conv_present_error(const char *who, PurpleAccount *account, const char *what); |
| 9627 | 899 | |
| 900 | /** | |
| 4359 | 901 | * Sends a message to this IM conversation. |
| 902 | * | |
| 903 | * @param im The IM. | |
| 904 | * @param message The message to send. | |
| 905 | */ | |
| 15884 | 906 | void purple_conv_im_send(PurpleConvIm *im, const char *message); |
| 4359 | 907 | |
| 10526 | 908 | /** |
| 14582 | 909 | * Sends a message to a conversation after confirming with |
| 910 | * the user. | |
| 911 | * | |
| 912 | * This function is intended for use in cases where the user | |
| 913 | * hasn't explicitly and knowingly caused a message to be sent. | |
| 914 | * The confirmation ensures that the user isn't sending a | |
| 915 | * message by mistake. | |
| 916 | * | |
| 917 | * @param conv The conversation. | |
| 918 | * @param message The message to send. | |
| 919 | */ | |
| 15884 | 920 | void purple_conv_send_confirm(PurpleConversation *conv, const char *message); |
| 14582 | 921 | |
| 922 | /** | |
|
11921
fe74264ce36c
[gaim-migrate @ 14212]
Evan Schoenberg <evands@pidgin.im>
parents:
11869
diff
changeset
|
923 | * Sends a message to this IM conversation with specified flags. |
|
fe74264ce36c
[gaim-migrate @ 14212]
Evan Schoenberg <evands@pidgin.im>
parents:
11869
diff
changeset
|
924 | * |
|
fe74264ce36c
[gaim-migrate @ 14212]
Evan Schoenberg <evands@pidgin.im>
parents:
11869
diff
changeset
|
925 | * @param im The IM. |
|
fe74264ce36c
[gaim-migrate @ 14212]
Evan Schoenberg <evands@pidgin.im>
parents:
11869
diff
changeset
|
926 | * @param message The message to send. |
| 15884 | 927 | * @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
|
928 | */ |
| 15884 | 929 | 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
|
930 | |
|
fe74264ce36c
[gaim-migrate @ 14212]
Evan Schoenberg <evands@pidgin.im>
parents:
11869
diff
changeset
|
931 | /** |
| 10528 | 932 | * Adds a smiley to the conversation's smiley tree. If this returns |
| 15884 | 933 | * @c TRUE you should call purple_conv_custom_smiley_write() one or more |
| 934 | * times, and then purple_conv_custom_smiley_close(). If this returns | |
| 10528 | 935 | * @c FALSE, either the conv or smile were invalid, or the icon was |
| 936 | * found in the cache. In either case, calling write or close would | |
| 937 | * be an error. | |
| 10526 | 938 | * |
| 939 | * @param conv The conversation to associate the smiley with. | |
| 940 | * @param smile The text associated with the smiley | |
| 941 | * @param cksum_type The type of checksum. | |
| 942 | * @param chksum The checksum, as a NUL terminated base64 string. | |
|
12618
b83b6bab0703
[gaim-migrate @ 14954]
Richard Laager <rlaager@pidgin.im>
parents:
12463
diff
changeset
|
943 | * @param remote @c TRUE if the custom smiley is set by the remote user (buddy). |
| 10528 | 944 | * @return @c TRUE if an icon is expected, else FALSE. Note that |
| 15884 | 945 | * it is an error to never call purple_conv_custom_smiley_close if |
| 10526 | 946 | * this function returns @c TRUE, but an error to call it if |
| 947 | * @c FALSE is returned. | |
| 948 | */ | |
| 949 | ||
| 15884 | 950 | 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
|
951 | const char *cksum_type, const char *chksum, |
|
b83b6bab0703
[gaim-migrate @ 14954]
Richard Laager <rlaager@pidgin.im>
parents:
12463
diff
changeset
|
952 | gboolean remote); |
| 10526 | 953 | |
| 954 | ||
| 955 | /** | |
| 956 | * Updates the image associated with the current smiley. | |
| 957 | * | |
| 958 | * @param conv The conversation associated with the smiley. | |
| 959 | * @param smile The text associated with the smiley. | |
| 960 | * @param data The actual image data. | |
| 961 | * @param size The length of the data. | |
| 962 | */ | |
| 963 | ||
| 15884 | 964 | void purple_conv_custom_smiley_write(PurpleConversation *conv, |
|
11137
cf40226ddff7
[gaim-migrate @ 13201]
Mark Doliner <markdoliner@pidgin.im>
parents:
11035
diff
changeset
|
965 | const char *smile, |
|
cf40226ddff7
[gaim-migrate @ 13201]
Mark Doliner <markdoliner@pidgin.im>
parents:
11035
diff
changeset
|
966 | const guchar *data, |
|
cf40226ddff7
[gaim-migrate @ 13201]
Mark Doliner <markdoliner@pidgin.im>
parents:
11035
diff
changeset
|
967 | gsize size); |
| 10526 | 968 | |
| 969 | /** | |
| 970 | * Close the custom smiley, all data has been written with | |
| 15884 | 971 | * purple_conv_custom_smiley_write, and it is no longer valid |
| 10526 | 972 | * to call that function on that smiley. |
| 973 | * | |
| 15884 | 974 | * @param conv The purple conversation associated with the smiley. |
| 10526 | 975 | * @param smile The text associated with the smiley |
| 976 | */ | |
| 977 | ||
| 15884 | 978 | void purple_conv_custom_smiley_close(PurpleConversation *conv, const char *smile); |
| 10526 | 979 | |
| 4359 | 980 | /*@}*/ |
| 981 | ||
| 982 | ||
| 983 | /**************************************************************************/ | |
| 984 | /** @name Chat Conversation API */ | |
| 985 | /**************************************************************************/ | |
| 986 | /*@{*/ | |
| 987 | ||
| 988 | /** | |
| 989 | * Gets a chat's parent conversation. | |
| 990 | * | |
| 991 | * @param chat The chat. | |
| 992 | * | |
| 993 | * @return The parent conversation. | |
| 994 | */ | |
| 15884 | 995 | PurpleConversation *purple_conv_chat_get_conversation(const PurpleConvChat *chat); |
| 4359 | 996 | |
| 997 | /** | |
| 998 | * Sets the list of users in the chat room. | |
| 999 | * | |
|
6407
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1000 | * @note Calling this function will not update the display of the users. |
| 15884 | 1001 | * Please use purple_conv_chat_add_user(), purple_conv_chat_add_users(), |
| 1002 | * 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
|
1003 | * |
| 4359 | 1004 | * @param chat The chat. |
| 1005 | * @param users The list of users. | |
| 1006 | * | |
| 1007 | * @return The list passed. | |
| 1008 | */ | |
| 15884 | 1009 | GList *purple_conv_chat_set_users(PurpleConvChat *chat, GList *users); |
| 4359 | 1010 | |
| 1011 | /** | |
| 1012 | * Returns a list of users in the chat room. | |
| 1013 | * | |
| 1014 | * @param chat The chat. | |
| 1015 | * | |
|
18190
bcf28ef7e8ff
Re-fix the DBus list handling code by killing const GList* / const GSList*
Richard Laager <rlaager@pidgin.im>
parents:
18122
diff
changeset
|
1016 | * @constreturn The list of users. |
| 4359 | 1017 | */ |
|
18122
9bf9970c1b6a
disapproval of revision '2d8ea56b90971e7851442d96b7d74ecb4f052126'
Richard Laager <rlaager@pidgin.im>
parents:
18121
diff
changeset
|
1018 | GList *purple_conv_chat_get_users(const PurpleConvChat *chat); |
| 4359 | 1019 | |
| 1020 | /** | |
| 1021 | * Ignores a user in a chat room. | |
| 1022 | * | |
| 1023 | * @param chat The chat. | |
| 1024 | * @param name The name of the user. | |
| 1025 | */ | |
| 15884 | 1026 | void purple_conv_chat_ignore(PurpleConvChat *chat, const char *name); |
| 4359 | 1027 | |
| 1028 | /** | |
| 1029 | * Unignores a user in a chat room. | |
| 1030 | * | |
| 1031 | * @param chat The chat. | |
| 1032 | * @param name The name of the user. | |
| 1033 | */ | |
| 15884 | 1034 | void purple_conv_chat_unignore(PurpleConvChat *chat, const char *name); |
| 4359 | 1035 | |
| 1036 | /** | |
| 1037 | * Sets the list of ignored users in the chat room. | |
| 1038 | * | |
| 1039 | * @param chat The chat. | |
| 1040 | * @param ignored The list of ignored users. | |
| 1041 | * | |
| 1042 | * @return The list passed. | |
| 1043 | */ | |
| 15884 | 1044 | GList *purple_conv_chat_set_ignored(PurpleConvChat *chat, GList *ignored); |
| 4359 | 1045 | |
| 1046 | /** | |
| 1047 | * Returns the list of ignored users in the chat room. | |
| 1048 | * | |
| 1049 | * @param chat The chat. | |
| 1050 | * | |
|
20971
b5e1eb080f33
Replace a bunch of @return markers with @constreturn markers. I believe these
Etan Reisner <deryni@pidgin.im>
parents:
20940
diff
changeset
|
1051 | * @constreturn The list of ignored users. |
| 4359 | 1052 | */ |
|
18122
9bf9970c1b6a
disapproval of revision '2d8ea56b90971e7851442d96b7d74ecb4f052126'
Richard Laager <rlaager@pidgin.im>
parents:
18121
diff
changeset
|
1053 | GList *purple_conv_chat_get_ignored(const PurpleConvChat *chat); |
| 4359 | 1054 | |
| 1055 | /** | |
| 1056 | * Returns the actual name of the specified ignored user, if it exists in | |
| 1057 | * the ignore list. | |
| 1058 | * | |
| 1059 | * If the user found contains a prefix, such as '+' or '\@', this is also | |
| 1060 | * returned. The username passed to the function does not have to have this | |
| 1061 | * formatting. | |
| 1062 | * | |
| 1063 | * @param chat The chat. | |
| 1064 | * @param user The user to check in the ignore list. | |
| 1065 | * | |
| 1066 | * @return The ignored user if found, complete with prefixes, or @c NULL | |
| 1067 | * if not found. | |
| 1068 | */ | |
| 15884 | 1069 | 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
|
1070 | const char *user); |
| 4359 | 1071 | |
| 1072 | /** | |
| 1073 | * Returns @c TRUE if the specified user is ignored. | |
| 1074 | * | |
| 1075 | * @param chat The chat. | |
| 1076 | * @param user The user. | |
| 1077 | * | |
| 1078 | * @return @c TRUE if the user is in the ignore list; @c FALSE otherwise. | |
| 1079 | */ | |
| 15884 | 1080 | gboolean purple_conv_chat_is_user_ignored(const PurpleConvChat *chat, |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1081 | const char *user); |
| 4359 | 1082 | |
| 1083 | /** | |
| 1084 | * Sets the chat room's topic. | |
| 1085 | * | |
| 1086 | * @param chat The chat. | |
| 1087 | * @param who The user that set the topic. | |
| 1088 | * @param topic The topic. | |
| 1089 | */ | |
| 15884 | 1090 | 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
|
1091 | const char *topic); |
| 4359 | 1092 | |
| 1093 | /** | |
| 1094 | * Returns the chat room's topic. | |
| 1095 | * | |
| 1096 | * @param chat The chat. | |
| 1097 | * | |
| 1098 | * @return The chat's topic. | |
| 1099 | */ | |
| 15884 | 1100 | const char *purple_conv_chat_get_topic(const PurpleConvChat *chat); |
| 4359 | 1101 | |
| 1102 | /** | |
| 1103 | * Sets the chat room's ID. | |
| 1104 | * | |
| 1105 | * @param chat The chat. | |
| 1106 | * @param id The ID. | |
| 1107 | */ | |
| 15884 | 1108 | void purple_conv_chat_set_id(PurpleConvChat *chat, int id); |
| 4359 | 1109 | |
| 1110 | /** | |
| 1111 | * Returns the chat room's ID. | |
| 1112 | * | |
| 1113 | * @param chat The chat. | |
| 1114 | * | |
| 1115 | * @return The ID. | |
| 1116 | */ | |
| 15884 | 1117 | int purple_conv_chat_get_id(const PurpleConvChat *chat); |
| 4359 | 1118 | |
| 1119 | /** | |
| 1120 | * Writes to a chat. | |
| 1121 | * | |
| 1122 | * @param chat The chat. | |
| 1123 | * @param who The user who sent the message. | |
| 1124 | * @param message The message to write. | |
|
6621
2a18ef3e5224
[gaim-migrate @ 7145]
Robert McQueen <robot101@debian.org>
parents:
6605
diff
changeset
|
1125 | * @param flags The flags. |
| 4359 | 1126 | * @param mtime The time the message was sent. |
| 1127 | */ | |
| 15884 | 1128 | void purple_conv_chat_write(PurpleConvChat *chat, const char *who, |
| 1129 | const char *message, PurpleMessageFlags flags, | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1130 | time_t mtime); |
| 4359 | 1131 | |
| 1132 | /** | |
| 1133 | * Sends a message to this chat conversation. | |
| 1134 | * | |
| 1135 | * @param chat The chat. | |
| 1136 | * @param message The message to send. | |
| 1137 | */ | |
| 15884 | 1138 | void purple_conv_chat_send(PurpleConvChat *chat, const char *message); |
| 4359 | 1139 | |
| 1140 | /** | |
|
11921
fe74264ce36c
[gaim-migrate @ 14212]
Evan Schoenberg <evands@pidgin.im>
parents:
11869
diff
changeset
|
1141 | * Sends a message to this chat conversation with specified flags. |
|
fe74264ce36c
[gaim-migrate @ 14212]
Evan Schoenberg <evands@pidgin.im>
parents:
11869
diff
changeset
|
1142 | * |
|
fe74264ce36c
[gaim-migrate @ 14212]
Evan Schoenberg <evands@pidgin.im>
parents:
11869
diff
changeset
|
1143 | * @param chat The chat. |
|
fe74264ce36c
[gaim-migrate @ 14212]
Evan Schoenberg <evands@pidgin.im>
parents:
11869
diff
changeset
|
1144 | * @param message The message to send. |
| 15884 | 1145 | * @param flags The PurpleMessageFlags flags to use. |
|
11921
fe74264ce36c
[gaim-migrate @ 14212]
Evan Schoenberg <evands@pidgin.im>
parents:
11869
diff
changeset
|
1146 | */ |
| 15884 | 1147 | 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
|
1148 | |
|
fe74264ce36c
[gaim-migrate @ 14212]
Evan Schoenberg <evands@pidgin.im>
parents:
11869
diff
changeset
|
1149 | /** |
| 4359 | 1150 | * Adds a user to a chat. |
| 1151 | * | |
| 9939 | 1152 | * @param chat The chat. |
| 1153 | * @param user The user to add. | |
| 1154 | * @param extra_msg An extra message to display with the join message. | |
| 1155 | * @param flags The users flags | |
| 1156 | * @param new_arrival Decides whether or not to show a join notice. | |
| 4359 | 1157 | */ |
| 15884 | 1158 | void purple_conv_chat_add_user(PurpleConvChat *chat, const char *user, |
| 1159 | const char *extra_msg, PurpleConvChatBuddyFlags flags, | |
|
9846
61f7349c153a
[gaim-migrate @ 10724]
Nathan Fredrickson <nathan@silverorange.com>
parents:
9718
diff
changeset
|
1160 | gboolean new_arrival); |
| 4359 | 1161 | |
| 1162 | /** | |
|
6407
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1163 | * Adds a list of users to a chat. |
|
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1164 | * |
|
11454
a604c2097a6e
[gaim-migrate @ 13693]
Richard Laager <rlaager@pidgin.im>
parents:
11338
diff
changeset
|
1165 | * 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
|
1166 | * the caller to free this list after calling this function. |
|
6407
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1167 | * |
|
11454
a604c2097a6e
[gaim-migrate @ 13693]
Richard Laager <rlaager@pidgin.im>
parents:
11338
diff
changeset
|
1168 | * @param chat The chat. |
|
a604c2097a6e
[gaim-migrate @ 13693]
Richard Laager <rlaager@pidgin.im>
parents:
11338
diff
changeset
|
1169 | * @param users The list of users to add. |
|
a604c2097a6e
[gaim-migrate @ 13693]
Richard Laager <rlaager@pidgin.im>
parents:
11338
diff
changeset
|
1170 | * @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
|
1171 | * user. This list may be shorter than @a users, in which |
|
a604c2097a6e
[gaim-migrate @ 13693]
Richard Laager <rlaager@pidgin.im>
parents:
11338
diff
changeset
|
1172 | * 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
|
1173 | * an extra message. By extension, this means that extra_msgs |
|
a604c2097a6e
[gaim-migrate @ 13693]
Richard Laager <rlaager@pidgin.im>
parents:
11338
diff
changeset
|
1174 | * 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
|
1175 | * extra message. |
|
a604c2097a6e
[gaim-migrate @ 13693]
Richard Laager <rlaager@pidgin.im>
parents:
11338
diff
changeset
|
1176 | * @param flags The list of flags for each user. |
|
a604c2097a6e
[gaim-migrate @ 13693]
Richard Laager <rlaager@pidgin.im>
parents:
11338
diff
changeset
|
1177 | * @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
|
1178 | */ |
| 15884 | 1179 | 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
|
1180 | GList *flags, gboolean new_arrivals); |
|
6407
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1181 | |
|
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1182 | /** |
| 4359 | 1183 | * Renames a user in a chat. |
| 1184 | * | |
| 1185 | * @param chat The chat. | |
| 1186 | * @param old_user The old username. | |
| 1187 | * @param new_user The new username. | |
| 1188 | */ | |
| 15884 | 1189 | 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
|
1190 | const char *new_user); |
| 4359 | 1191 | |
| 1192 | /** | |
| 1193 | * Removes a user from a chat, optionally with a reason. | |
| 1194 | * | |
|
6407
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1195 | * 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
|
1196 | * |
| 4359 | 1197 | * @param chat The chat. |
| 1198 | * @param user The user that is being removed. | |
| 1199 | * @param reason The optional reason given for the removal. Can be @c NULL. | |
| 1200 | */ | |
| 15884 | 1201 | 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
|
1202 | const char *reason); |
| 4359 | 1203 | |
| 1204 | /** | |
|
6407
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1205 | * 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
|
1206 | * |
|
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1207 | * @param chat The chat. |
|
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1208 | * @param users The users that are being removed. |
|
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1209 | * @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
|
1210 | */ |
| 15884 | 1211 | void purple_conv_chat_remove_users(PurpleConvChat *chat, GList *users, |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1212 | const char *reason); |
|
6407
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1213 | |
|
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1214 | /** |
|
9554
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1215 | * Finds 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 look 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 TRUE if the user is in the chat, FALSE if not |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1221 | */ |
| 15884 | 1222 | 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
|
1223 | |
|
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 | * Set a users flags in a chat |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1226 | * |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1227 | * @param chat The chat. |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1228 | * @param user The user to update. |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1229 | * @param flags The new flags. |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1230 | */ |
| 15884 | 1231 | void purple_conv_chat_user_set_flags(PurpleConvChat *chat, const char *user, |
| 1232 | PurpleConvChatBuddyFlags flags); | |
|
9554
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1233 | |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1234 | /** |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1235 | * Get the flags for a user in a chat |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1236 | * |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1237 | * @param chat The chat. |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1238 | * @param user The user to find the flags for |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1239 | * |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1240 | * @return The flags for the user |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1241 | */ |
| 15884 | 1242 | PurpleConvChatBuddyFlags purple_conv_chat_user_get_flags(PurpleConvChat *chat, |
|
9554
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1243 | const char *user); |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1244 | |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1245 | /** |
|
6414
f78eb072fcc0
[gaim-migrate @ 6921]
Christian Hammond <chipx86@chipx86.com>
parents:
6407
diff
changeset
|
1246 | * Clears all users from a chat. |
|
f78eb072fcc0
[gaim-migrate @ 6921]
Christian Hammond <chipx86@chipx86.com>
parents:
6407
diff
changeset
|
1247 | * |
|
f78eb072fcc0
[gaim-migrate @ 6921]
Christian Hammond <chipx86@chipx86.com>
parents:
6407
diff
changeset
|
1248 | * @param chat The chat. |
|
f78eb072fcc0
[gaim-migrate @ 6921]
Christian Hammond <chipx86@chipx86.com>
parents:
6407
diff
changeset
|
1249 | */ |
| 15884 | 1250 | void purple_conv_chat_clear_users(PurpleConvChat *chat); |
|
6414
f78eb072fcc0
[gaim-migrate @ 6921]
Christian Hammond <chipx86@chipx86.com>
parents:
6407
diff
changeset
|
1251 | |
|
f78eb072fcc0
[gaim-migrate @ 6921]
Christian Hammond <chipx86@chipx86.com>
parents:
6407
diff
changeset
|
1252 | /** |
| 8158 | 1253 | * Sets your nickname (used for hilighting) for a chat. |
| 1254 | * | |
| 1255 | * @param chat The chat. | |
| 1256 | * @param nick The nick. | |
| 1257 | */ | |
| 15884 | 1258 | void purple_conv_chat_set_nick(PurpleConvChat *chat, const char *nick); |
| 8158 | 1259 | |
| 1260 | /** | |
| 1261 | * Gets your nickname (used for hilighting) for a chat. | |
| 1262 | * | |
| 1263 | * @param chat The chat. | |
| 1264 | * @return The nick. | |
| 1265 | */ | |
| 15884 | 1266 | const char *purple_conv_chat_get_nick(PurpleConvChat *chat); |
| 8158 | 1267 | |
| 1268 | /** | |
| 4359 | 1269 | * Finds a chat with the specified chat ID. |
| 1270 | * | |
| 15884 | 1271 | * @param gc The purple_connection. |
| 4359 | 1272 | * @param id The chat ID. |
| 1273 | * | |
| 1274 | * @return The chat conversation. | |
| 1275 | */ | |
| 15884 | 1276 | PurpleConversation *purple_find_chat(const PurpleConnection *gc, int id); |
| 4359 | 1277 | |
| 8256 | 1278 | /** |
| 1279 | * Lets the core know we left a chat, without destroying it. | |
| 1280 | * Called from serv_got_chat_left(). | |
| 1281 | * | |
| 1282 | * @param chat The chat. | |
| 1283 | */ | |
| 15884 | 1284 | void purple_conv_chat_left(PurpleConvChat *chat); |
| 8256 | 1285 | |
| 1286 | /** | |
| 1287 | * Returns true if we're no longer in this chat, | |
| 1288 | * and just left the window open. | |
| 1289 | * | |
| 1290 | * @param chat The chat. | |
| 1291 | * | |
| 1292 | * @return @c TRUE if we left the chat already, @c FALSE if | |
| 1293 | * we're still there. | |
| 1294 | */ | |
| 15884 | 1295 | gboolean purple_conv_chat_has_left(PurpleConvChat *chat); |
| 8256 | 1296 | |
|
9554
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 | * Creates a new 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 name The name. |
|
14027
708c2047424f
[gaim-migrate @ 16521]
Aaron Sheldon <aaronsheldon@users.sourceforge.net>
parents:
13844
diff
changeset
|
1301 | * @param alias The alias. |
|
9554
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1302 | * @param flags The flags. |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1303 | * |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1304 | * @return The new chat buddy |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1305 | */ |
| 15884 | 1306 | PurpleConvChatBuddy *purple_conv_chat_cb_new(const char *name, const char *alias, |
| 1307 | PurpleConvChatBuddyFlags flags); | |
|
9554
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 | /** |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1310 | * Find a chat buddy in a chat |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1311 | * |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1312 | * @param chat The chat. |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1313 | * @param name The name of the chat buddy to find. |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1314 | */ |
| 15884 | 1315 | 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
|
1316 | |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1317 | /** |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1318 | * Get the name of a chat buddy |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1319 | * |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1320 | * @param cb The chat buddy. |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1321 | * |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1322 | * @return The name of the chat buddy. |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1323 | */ |
| 15884 | 1324 | const char *purple_conv_chat_cb_get_name(PurpleConvChatBuddy *cb); |
|
9554
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1325 | |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1326 | /** |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1327 | * Destroys a chat buddy |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1328 | * |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1329 | * @param cb The chat buddy to destroy |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1330 | */ |
| 15884 | 1331 | void purple_conv_chat_cb_destroy(PurpleConvChatBuddy *cb); |
|
9554
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1332 | |
|
17265
fd5b0ca330a3
New api function purple_conversation_get_extended_menu.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16743
diff
changeset
|
1333 | /** |
|
fd5b0ca330a3
New api function purple_conversation_get_extended_menu.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16743
diff
changeset
|
1334 | * 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
|
1335 | * |
|
fd5b0ca330a3
New api function purple_conversation_get_extended_menu.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16743
diff
changeset
|
1336 | * @param conv The conversation. |
|
fd5b0ca330a3
New api function purple_conversation_get_extended_menu.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16743
diff
changeset
|
1337 | * |
|
fd5b0ca330a3
New api function purple_conversation_get_extended_menu.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16743
diff
changeset
|
1338 | * @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
|
1339 | * 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
|
1340 | * items should be freed by the caller. |
|
20940
925d3d68b3af
Doxygen @since tags for libpurple and pidgin.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20889
diff
changeset
|
1341 | * |
|
925d3d68b3af
Doxygen @since tags for libpurple and pidgin.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20889
diff
changeset
|
1342 | * @since 2.1.0 |
|
17265
fd5b0ca330a3
New api function purple_conversation_get_extended_menu.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16743
diff
changeset
|
1343 | */ |
|
fd5b0ca330a3
New api function purple_conversation_get_extended_menu.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16743
diff
changeset
|
1344 | 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
|
1345 | |
|
17266
d4dc6a9ca244
New function purple_conversation_do_command. This is almost like
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17265
diff
changeset
|
1346 | /** |
|
d4dc6a9ca244
New function purple_conversation_do_command. This is almost like
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17265
diff
changeset
|
1347 | * 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
|
1348 | * |
|
d4dc6a9ca244
New function purple_conversation_do_command. This is almost like
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17265
diff
changeset
|
1349 | * @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
|
1350 | * @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
|
1351 | * @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
|
1352 | * @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
|
1353 | * 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
|
1354 | * |
|
d4dc6a9ca244
New function purple_conversation_do_command. This is almost like
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17265
diff
changeset
|
1355 | * @return @c TRUE if the command was executed successfully, @c FALSE otherwise. |
|
20940
925d3d68b3af
Doxygen @since tags for libpurple and pidgin.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20889
diff
changeset
|
1356 | * |
|
925d3d68b3af
Doxygen @since tags for libpurple and pidgin.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20889
diff
changeset
|
1357 | * @since 2.1.0 |
|
17266
d4dc6a9ca244
New function purple_conversation_do_command. This is almost like
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17265
diff
changeset
|
1358 | */ |
|
d4dc6a9ca244
New function purple_conversation_do_command. This is almost like
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17265
diff
changeset
|
1359 | 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
|
1360 | |
| 4359 | 1361 | /*@}*/ |
| 1362 | ||
|
4469
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1363 | /**************************************************************************/ |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1364 | /** @name Conversations Subsystem */ |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1365 | /**************************************************************************/ |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1366 | /*@{*/ |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1367 | |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1368 | /** |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1369 | * Returns the conversation subsystem handle. |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1370 | * |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1371 | * @return The conversation subsystem handle. |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1372 | */ |
| 15884 | 1373 | void *purple_conversations_get_handle(void); |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1374 | |
|
5872
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
1375 | /** |
|
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
1376 | * Initializes the conversation subsystem. |
|
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
1377 | */ |
| 15884 | 1378 | void purple_conversations_init(void); |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1379 | |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1380 | /** |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1381 | * Uninitializes the conversation subsystem. |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1382 | */ |
| 15884 | 1383 | void purple_conversations_uninit(void); |
|
5872
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
1384 | |
|
4481
1a02f276e41e
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1385 | /*@}*/ |
|
1a02f276e41e
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1386 | |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
1387 | #ifdef __cplusplus |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
1388 | } |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
1389 | #endif |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
1390 | |
| 15884 | 1391 | #endif /* _PURPLE_CONVERSATION_H_ */ |