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