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