Fri, 03 Dec 2004 03:07:47 +0000
[gaim-migrate @ 11501]
I prefer these functions like nobody's business.
| 4359 | 1 | /** |
| 2 | * @file conversation.h Conversation API | |
|
5034
077678f7b048
[gaim-migrate @ 5377]
Christian Hammond <chipx86@chipx86.com>
parents:
4890
diff
changeset
|
3 | * @ingroup core |
| 4359 | 4 | * |
| 5 | * gaim | |
| 6 | * | |
| 8046 | 7 | * Gaim is the legal property of its developers, whose names are too numerous |
| 8 | * to list here. Please refer to the COPYRIGHT file distributed with this | |
| 9 | * source distribution. | |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
10 | * |
| 4359 | 11 | * This program is free software; you can redistribute it and/or modify |
| 12 | * it under the terms of the GNU General Public License as published by | |
| 13 | * the Free Software Foundation; either version 2 of the License, or | |
| 14 | * (at your option) any later version. | |
| 15 | * | |
| 16 | * This program is distributed in the hope that it will be useful, | |
| 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 19 | * GNU General Public License for more details. | |
| 20 | * | |
| 21 | * You should have received a copy of the GNU General Public License | |
| 22 | * along with this program; if not, write to the Free Software | |
| 23 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
|
6488
6a47a95e4dbb
[gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents:
6485
diff
changeset
|
24 | * |
|
6605
665d3a8e885c
[gaim-migrate @ 7129]
Christian Hammond <chipx86@chipx86.com>
parents:
6585
diff
changeset
|
25 | * @see @ref conversation-signals |
| 4359 | 26 | */ |
|
4890
d87a9b5bbe57
[gaim-migrate @ 5220]
Christian Hammond <chipx86@chipx86.com>
parents:
4877
diff
changeset
|
27 | #ifndef _GAIM_CONVERSATION_H_ |
|
d87a9b5bbe57
[gaim-migrate @ 5220]
Christian Hammond <chipx86@chipx86.com>
parents:
4877
diff
changeset
|
28 | #define _GAIM_CONVERSATION_H_ |
| 4359 | 29 | |
| 30 | /**************************************************************************/ | |
| 31 | /** Data Structures */ | |
| 32 | /**************************************************************************/ | |
| 33 | ||
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
34 | typedef struct _GaimConvWindowUiOps GaimConvWindowUiOps; |
|
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
35 | typedef struct _GaimConvWindow GaimConvWindow; |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
36 | typedef struct _GaimConversationUiOps GaimConversationUiOps; |
|
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
37 | typedef struct _GaimConversation GaimConversation; |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
38 | typedef struct _GaimConvIm GaimConvIm; |
|
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
39 | typedef struct _GaimConvChat GaimConvChat; |
|
9554
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
40 | typedef struct _GaimConvChatBuddy GaimConvChatBuddy; |
| 4359 | 41 | |
| 42 | /** | |
| 43 | * A type of conversation. | |
| 44 | */ | |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
45 | typedef enum |
| 4359 | 46 | { |
| 47 | GAIM_CONV_UNKNOWN = 0, /**< Unknown conversation type. */ | |
| 48 | GAIM_CONV_IM, /**< Instant Message. */ | |
|
4378
3bef342997ef
[gaim-migrate @ 4644]
Christian Hammond <chipx86@chipx86.com>
parents:
4359
diff
changeset
|
49 | GAIM_CONV_CHAT, /**< Chat room. */ |
|
10246
aa5bff72f94c
[gaim-migrate @ 11386]
Mark Doliner <markdoliner@pidgin.im>
parents:
10008
diff
changeset
|
50 | GAIM_CONV_MISC, /**< A misc. conversation. */ |
|
aa5bff72f94c
[gaim-migrate @ 11386]
Mark Doliner <markdoliner@pidgin.im>
parents:
10008
diff
changeset
|
51 | GAIM_CONV_ANY /**< Any type of conversation. */ |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
52 | |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
53 | } GaimConversationType; |
| 4359 | 54 | |
| 55 | /** | |
| 56 | * Unseen text states. | |
| 57 | */ | |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
58 | typedef enum |
| 4359 | 59 | { |
| 60 | GAIM_UNSEEN_NONE = 0, /**< No unseen text in the conversation. */ | |
| 61 | GAIM_UNSEEN_TEXT, /**< Unseen text in the conversation. */ | |
|
6405
30166fa1b9a2
[gaim-migrate @ 6910]
Christian Hammond <chipx86@chipx86.com>
parents:
6311
diff
changeset
|
62 | GAIM_UNSEEN_NICK, /**< Unseen text and the nick was said. */ |
|
30166fa1b9a2
[gaim-migrate @ 6910]
Christian Hammond <chipx86@chipx86.com>
parents:
6311
diff
changeset
|
63 | GAIM_UNSEEN_EVENT /**< Unseen events in the conversation. */ |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
64 | |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
65 | } GaimUnseenState; |
| 4359 | 66 | |
| 67 | /** | |
| 68 | * Conversation update type. | |
| 69 | */ | |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
70 | typedef enum |
| 4359 | 71 | { |
| 72 | GAIM_CONV_UPDATE_ADD = 0, /**< The buddy associated with the conversation | |
| 8155 | 73 | was added. */ |
| 4359 | 74 | GAIM_CONV_UPDATE_REMOVE, /**< The buddy associated with the conversation |
| 8155 | 75 | was removed. */ |
| 4491 | 76 | GAIM_CONV_UPDATE_ACCOUNT, /**< The gaim_account was changed. */ |
| 4359 | 77 | GAIM_CONV_UPDATE_TYPING, /**< The typing state was updated. */ |
| 78 | GAIM_CONV_UPDATE_UNSEEN, /**< The unseen state was updated. */ | |
| 79 | GAIM_CONV_UPDATE_LOGGING, /**< Logging for this conversation was | |
| 8155 | 80 | enabled or disabled. */ |
| 4359 | 81 | GAIM_CONV_UPDATE_TOPIC, /**< The topic for a chat was updated. */ |
| 82 | ||
| 83 | /* | |
| 84 | * XXX These need to go when we implement a more generic core/UI event | |
| 85 | * system. | |
| 86 | */ | |
|
4378
3bef342997ef
[gaim-migrate @ 4644]
Christian Hammond <chipx86@chipx86.com>
parents:
4359
diff
changeset
|
87 | GAIM_CONV_ACCOUNT_ONLINE, /**< One of the user's accounts went online. */ |
|
3bef342997ef
[gaim-migrate @ 4644]
Christian Hammond <chipx86@chipx86.com>
parents:
4359
diff
changeset
|
88 | GAIM_CONV_ACCOUNT_OFFLINE, /**< One of the user's accounts went offline. */ |
|
6846
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
89 | GAIM_CONV_UPDATE_AWAY, /**< The other user went away. */ |
| 8155 | 90 | GAIM_CONV_UPDATE_ICON, /**< The other user's buddy icon changed. */ |
| 8256 | 91 | GAIM_CONV_UPDATE_TITLE, |
| 92 | GAIM_CONV_UPDATE_CHATLEFT | |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
93 | |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
94 | } GaimConvUpdateType; |
| 4359 | 95 | |
| 96 | /** | |
|
5872
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
97 | * The typing state of a user. |
|
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
98 | */ |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
99 | typedef enum |
|
5872
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
100 | { |
|
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
101 | GAIM_NOT_TYPING = 0, /**< Not typing. */ |
|
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
102 | GAIM_TYPING, /**< Currently typing. */ |
|
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
103 | GAIM_TYPED /**< Stopped typing momentarily. */ |
|
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
104 | |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
105 | } GaimTypingState; |
|
5872
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
106 | |
|
6621
2a18ef3e5224
[gaim-migrate @ 7145]
Robert McQueen <robot101@debian.org>
parents:
6605
diff
changeset
|
107 | /** |
|
2a18ef3e5224
[gaim-migrate @ 7145]
Robert McQueen <robot101@debian.org>
parents:
6605
diff
changeset
|
108 | * 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
|
109 | */ |
|
2a18ef3e5224
[gaim-migrate @ 7145]
Robert McQueen <robot101@debian.org>
parents:
6605
diff
changeset
|
110 | typedef enum |
|
2a18ef3e5224
[gaim-migrate @ 7145]
Robert McQueen <robot101@debian.org>
parents:
6605
diff
changeset
|
111 | { |
|
6982
12f08de92674
[gaim-migrate @ 7538]
Mark Doliner <markdoliner@pidgin.im>
parents:
6846
diff
changeset
|
112 | GAIM_MESSAGE_SEND = 0x0001, /**< Outgoing message. */ |
|
12f08de92674
[gaim-migrate @ 7538]
Mark Doliner <markdoliner@pidgin.im>
parents:
6846
diff
changeset
|
113 | GAIM_MESSAGE_RECV = 0x0002, /**< Incoming message. */ |
|
12f08de92674
[gaim-migrate @ 7538]
Mark Doliner <markdoliner@pidgin.im>
parents:
6846
diff
changeset
|
114 | GAIM_MESSAGE_SYSTEM = 0x0004, /**< System message. */ |
|
12f08de92674
[gaim-migrate @ 7538]
Mark Doliner <markdoliner@pidgin.im>
parents:
6846
diff
changeset
|
115 | GAIM_MESSAGE_AUTO_RESP = 0x0008, /**< Auto response. */ |
|
12f08de92674
[gaim-migrate @ 7538]
Mark Doliner <markdoliner@pidgin.im>
parents:
6846
diff
changeset
|
116 | GAIM_MESSAGE_COLORIZE = 0x0010, /**< Colorize nicks. */ |
|
12f08de92674
[gaim-migrate @ 7538]
Mark Doliner <markdoliner@pidgin.im>
parents:
6846
diff
changeset
|
117 | GAIM_MESSAGE_NICK = 0x0020, /**< Contains your nick. */ |
|
12f08de92674
[gaim-migrate @ 7538]
Mark Doliner <markdoliner@pidgin.im>
parents:
6846
diff
changeset
|
118 | GAIM_MESSAGE_NO_LOG = 0x0040, /**< Do not log. */ |
|
12f08de92674
[gaim-migrate @ 7538]
Mark Doliner <markdoliner@pidgin.im>
parents:
6846
diff
changeset
|
119 | GAIM_MESSAGE_WHISPER = 0x0080, /**< Whispered message. */ |
|
9584
1a6198375303
[gaim-migrate @ 10427]
Nathan Fredrickson <nathan@silverorange.com>
parents:
9554
diff
changeset
|
120 | GAIM_MESSAGE_ERROR = 0x0200, /**< Error message. */ |
|
1a6198375303
[gaim-migrate @ 10427]
Nathan Fredrickson <nathan@silverorange.com>
parents:
9554
diff
changeset
|
121 | GAIM_MESSAGE_DELAYED = 0x0400 /**< Delayed message. */ |
|
10008
1de3454a0dca
[gaim-migrate @ 10925]
Mark Doliner <markdoliner@pidgin.im>
parents:
9939
diff
changeset
|
122 | |
|
6621
2a18ef3e5224
[gaim-migrate @ 7145]
Robert McQueen <robot101@debian.org>
parents:
6605
diff
changeset
|
123 | } GaimMessageFlags; |
|
2a18ef3e5224
[gaim-migrate @ 7145]
Robert McQueen <robot101@debian.org>
parents:
6605
diff
changeset
|
124 | |
|
9554
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
125 | /** |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
126 | * Flags applicable to users in Chats. |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
127 | */ |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
128 | typedef enum |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
129 | { |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
130 | GAIM_CBFLAGS_NONE = 0x0000, /**< No flags */ |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
131 | GAIM_CBFLAGS_VOICE = 0x0001, /**< Voiced user or "Participant" */ |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
132 | GAIM_CBFLAGS_HALFOP = 0x0002, /**< Half-op */ |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
133 | GAIM_CBFLAGS_OP = 0x0004, /**< Channel Op or Moderator */ |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
134 | GAIM_CBFLAGS_FOUNDER = 0x0008 /**< Channel Founder */ |
|
10008
1de3454a0dca
[gaim-migrate @ 10925]
Mark Doliner <markdoliner@pidgin.im>
parents:
9939
diff
changeset
|
135 | |
|
9554
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
136 | } GaimConvChatBuddyFlags; |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
137 | |
|
5872
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
138 | #include "account.h" |
|
9718
aeee69c6c784
[gaim-migrate @ 10579]
Mark Doliner <markdoliner@pidgin.im>
parents:
9627
diff
changeset
|
139 | #include "buddyicon.h" |
| 7431 | 140 | #include "log.h" |
|
5872
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
141 | #include "server.h" |
|
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
142 | |
|
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
143 | /** |
| 4359 | 144 | * Conversation window operations. |
| 145 | * | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
146 | * Any UI representing a window must assign a filled-out gaim_conv_window_ops |
|
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
147 | * structure to the GaimConvWindow. |
| 4359 | 148 | */ |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
149 | struct _GaimConvWindowUiOps |
| 4359 | 150 | { |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
151 | GaimConversationUiOps *(*get_conversation_ui_ops)(void); |
| 4359 | 152 | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
153 | void (*new_window)(GaimConvWindow *win); |
|
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
154 | void (*destroy_window)(GaimConvWindow *win); |
| 4359 | 155 | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
156 | void (*show)(GaimConvWindow *win); |
|
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
157 | void (*hide)(GaimConvWindow *win); |
|
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
158 | void (*raise)(GaimConvWindow *win); |
|
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
159 | void (*flash)(GaimConvWindow *win); |
| 4359 | 160 | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
161 | void (*switch_conversation)(GaimConvWindow *win, unsigned int index); |
|
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
162 | void (*add_conversation)(GaimConvWindow *win, GaimConversation *conv); |
|
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
163 | void (*remove_conversation)(GaimConvWindow *win, GaimConversation *conv); |
|
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
164 | void (*move_conversation)(GaimConvWindow *win, GaimConversation *conv, |
| 8155 | 165 | unsigned int newIndex); |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
166 | int (*get_active_index)(const GaimConvWindow *win); |
|
9260
82d7b380220a
[gaim-migrate @ 10059]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9166
diff
changeset
|
167 | gboolean (*has_focus)(GaimConvWindow *win); |
| 4359 | 168 | }; |
| 169 | ||
| 170 | /** | |
| 171 | * Conversation operations and events. | |
| 172 | * | |
| 173 | * Any UI representing a conversation must assign a filled-out | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
174 | * GaimConversationUiOps structure to the GaimConversation. |
| 4359 | 175 | */ |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
176 | struct _GaimConversationUiOps |
| 4359 | 177 | { |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
178 | void (*destroy_conversation)(GaimConversation *conv); |
|
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
179 | void (*write_chat)(GaimConversation *conv, const char *who, |
| 8155 | 180 | const char *message, GaimMessageFlags flags, |
| 181 | time_t mtime); | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
182 | void (*write_im)(GaimConversation *conv, const char *who, |
| 8155 | 183 | const char *message, GaimMessageFlags flags, |
| 184 | time_t mtime); | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
185 | void (*write_conv)(GaimConversation *conv, const char *who, |
| 8155 | 186 | const char *message, GaimMessageFlags flags, |
| 187 | time_t mtime); | |
| 4359 | 188 | |
|
9846
61f7349c153a
[gaim-migrate @ 10724]
Nathan Fredrickson <nathan@silverorange.com>
parents:
9718
diff
changeset
|
189 | void (*chat_add_user)(GaimConversation *conv, const char *user, gboolean new_arrival); |
|
6407
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
190 | void (*chat_add_users)(GaimConversation *conv, GList *users); |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
191 | void (*chat_rename_user)(GaimConversation *conv, |
| 8155 | 192 | const char *old_name, const char *new_name); |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
193 | void (*chat_remove_user)(GaimConversation *conv, const char *user); |
|
6407
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
194 | void (*chat_remove_users)(GaimConversation *conv, GList *users); |
|
9554
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
195 | void (*chat_update_user)(GaimConversation *conv, const char *user); |
| 4359 | 196 | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
197 | void (*update_progress)(GaimConversation *conv, float percent); |
| 4359 | 198 | |
|
9260
82d7b380220a
[gaim-migrate @ 10059]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9166
diff
changeset
|
199 | gboolean (*has_focus)(GaimConversation *conv); |
|
82d7b380220a
[gaim-migrate @ 10059]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9166
diff
changeset
|
200 | |
| 4359 | 201 | /* Events */ |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
202 | void (*updated)(GaimConversation *conv, GaimConvUpdateType type); |
|
9260
82d7b380220a
[gaim-migrate @ 10059]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9166
diff
changeset
|
203 | |
| 4359 | 204 | }; |
| 205 | ||
| 206 | /** | |
| 207 | * A core representation of a graphical window containing one or more | |
| 208 | * conversations. | |
| 209 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
210 | struct _GaimConvWindow |
| 4359 | 211 | { |
|
4465
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
212 | GList *conversations; /**< The conversations in the window. */ |
|
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
213 | size_t conversation_count; /**< The number of conversations. */ |
| 4359 | 214 | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
215 | GaimConvWindowUiOps *ui_ops; /**< UI-specific window operations. */ |
|
4465
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
216 | void *ui_data; /**< UI-specific data. */ |
| 4359 | 217 | }; |
| 218 | ||
| 219 | /** | |
| 220 | * Data specific to Instant Messages. | |
| 221 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
222 | struct _GaimConvIm |
| 4359 | 223 | { |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
224 | GaimConversation *conv; /**< The parent conversation. */ |
| 4359 | 225 | |
|
5872
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
226 | GaimTypingState typing_state; /**< The current typing state. */ |
|
4465
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
227 | guint typing_timeout; /**< The typing timer handle. */ |
|
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
228 | time_t type_again; /**< The type again time. */ |
|
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
229 | guint type_again_timeout; /**< The type again timer handle. */ |
| 4359 | 230 | |
|
6846
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
231 | GaimBuddyIcon *icon; /**< The buddy icon. */ |
| 4359 | 232 | }; |
| 233 | ||
| 234 | /** | |
| 235 | * Data specific to Chats. | |
| 236 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
237 | struct _GaimConvChat |
| 4359 | 238 | { |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
239 | GaimConversation *conv; /**< The parent conversation. */ |
| 4359 | 240 | |
|
4465
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
241 | GList *in_room; /**< The users in the room. */ |
|
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
242 | GList *ignored; /**< Ignored users. */ |
|
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
243 | char *who; /**< The person who set the topic. */ |
|
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
244 | char *topic; /**< The topic. */ |
|
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
245 | int id; /**< The chat ID. */ |
| 8158 | 246 | char *nick; /**< Your nick in this chat. */ |
| 8256 | 247 | |
| 248 | gboolean left; /**< We left the chat and kept the window open */ | |
| 4359 | 249 | }; |
| 250 | ||
| 251 | /** | |
|
9554
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
252 | * Data for "Chat Buddies" |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
253 | */ |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
254 | struct _GaimConvChatBuddy |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
255 | { |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
256 | char *name; /**< The name */ |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
257 | GaimConvChatBuddyFlags flags; /**< Flags (ops, voice etc.) */ |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
258 | }; |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
259 | |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
260 | /** |
| 4359 | 261 | * A core representation of a conversation between two or more people. |
| 262 | * | |
| 263 | * The conversation can be an IM or a chat. Each conversation is kept | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
264 | * in a GaimConvWindow and has a UI representation. |
| 4359 | 265 | */ |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
266 | struct _GaimConversation |
| 4359 | 267 | { |
| 268 | GaimConversationType type; /**< The type of conversation. */ | |
| 269 | ||
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
270 | GaimAccount *account; /**< The user using this conversation. */ |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
271 | GaimConvWindow *window; /**< The parent window. */ |
| 4359 | 272 | |
| 273 | int conversation_pos; /**< The position in the window's list. */ | |
| 274 | ||
| 275 | char *name; /**< The name of the conversation. */ | |
| 276 | char *title; /**< The window title. */ | |
| 277 | ||
| 278 | gboolean logging; /**< The status of logging. */ | |
| 8158 | 279 | |
| 7431 | 280 | GaimLog *log; /**< This conversation's log */ |
| 8158 | 281 | |
| 4359 | 282 | GList *send_history; /**< The send history. */ |
| 283 | GString *history; /**< The conversation history. */ | |
| 284 | ||
| 285 | GaimUnseenState unseen; /**< The unseen tab state. */ | |
| 286 | ||
| 287 | union | |
| 288 | { | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
289 | GaimConvIm *im; /**< IM-specific data. */ |
|
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
290 | GaimConvChat *chat; /**< Chat-specific data. */ |
|
4378
3bef342997ef
[gaim-migrate @ 4644]
Christian Hammond <chipx86@chipx86.com>
parents:
4359
diff
changeset
|
291 | void *misc; /**< Misc. data. */ |
| 4359 | 292 | |
| 293 | } u; | |
|
4465
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
294 | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
295 | GaimConversationUiOps *ui_ops; /**< UI-specific operations. */ |
|
4465
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
296 | void *ui_data; /**< UI-specific data. */ |
|
4876
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
297 | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
298 | GHashTable *data; /**< Plugin-specific data. */ |
| 4359 | 299 | }; |
| 300 | ||
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
301 | typedef void (*GaimConvPlacementFunc)(GaimConversation *); |
| 4359 | 302 | |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
303 | #ifdef __cplusplus |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
304 | extern "C" { |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
305 | #endif |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
306 | |
| 4359 | 307 | /**************************************************************************/ |
| 308 | /** @name Conversation Window API */ | |
| 309 | /**************************************************************************/ | |
| 310 | /*@{*/ | |
| 311 | ||
| 312 | /** | |
| 313 | * Creates a new conversation window. | |
| 314 | * | |
| 315 | * This window is added to the list of windows, but is not shown until | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
316 | * gaim_conv_window_show() is called. |
| 4359 | 317 | * |
| 318 | * @return The new conversation window. | |
| 319 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
320 | GaimConvWindow *gaim_conv_window_new(void); |
| 4359 | 321 | |
| 322 | /** | |
| 323 | * Destroys the specified conversation window and all conversations in it. | |
| 324 | * | |
| 325 | * @param win The window to destroy. | |
| 326 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
327 | void gaim_conv_window_destroy(GaimConvWindow *win); |
| 4359 | 328 | |
| 329 | /** | |
| 330 | * Shows the specified conversation window. | |
| 331 | * | |
| 332 | * @param win The window. | |
| 333 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
334 | void gaim_conv_window_show(GaimConvWindow *win); |
| 4359 | 335 | |
| 336 | /** | |
| 337 | * Hides the specified conversation window. | |
| 338 | * | |
| 339 | * @param win The window. | |
| 340 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
341 | void gaim_conv_window_hide(GaimConvWindow *win); |
| 4359 | 342 | |
| 343 | /** | |
| 344 | * Raises the specified conversation window. | |
| 345 | * | |
| 346 | * @param win The window. | |
| 347 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
348 | void gaim_conv_window_raise(GaimConvWindow *win); |
| 4359 | 349 | |
| 350 | /** | |
| 351 | * Causes the window to flash for IM notification, if the UI supports this. | |
|
6585
8fcd3639e544
[gaim-migrate @ 7107]
Christian Hammond <chipx86@chipx86.com>
parents:
6488
diff
changeset
|
352 | * |
| 4359 | 353 | * @param win The window. |
| 354 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
355 | void gaim_conv_window_flash(GaimConvWindow *win); |
| 4359 | 356 | |
| 357 | /** | |
| 358 | * Sets the specified window's UI window operations structure. | |
| 359 | * | |
| 360 | * @param win The window. | |
| 361 | * @param ops The UI window operations structure. | |
| 362 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
363 | void gaim_conv_window_set_ui_ops(GaimConvWindow *win, |
|
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
364 | GaimConvWindowUiOps *ops); |
| 4359 | 365 | |
| 366 | /** | |
| 367 | * Returns the specified window's UI window operations structure. | |
| 368 | * | |
| 369 | * @param win The window. | |
| 370 | * | |
| 371 | * @return The UI window operations structure. | |
| 372 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
373 | GaimConvWindowUiOps *gaim_conv_window_get_ui_ops(const GaimConvWindow *win); |
| 4359 | 374 | |
| 375 | /** | |
| 376 | * Adds a conversation to this window. | |
| 377 | * | |
| 378 | * If the conversation already has a parent window, this will do nothing. | |
| 379 | * | |
| 380 | * @param win The window. | |
| 381 | * @param conv The conversation. | |
| 382 | * | |
| 383 | * @return The new index of the conversation in the window. | |
| 384 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
385 | int gaim_conv_window_add_conversation(GaimConvWindow *win, |
|
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
386 | GaimConversation *conv); |
| 4359 | 387 | |
| 388 | /** | |
| 389 | * Removes the conversation at the specified index from the window. | |
| 390 | * | |
| 391 | * If there is no conversation at this index, this will do nothing. | |
| 392 | * | |
| 393 | * @param win The window. | |
| 394 | * @param index The index of the conversation. | |
| 395 | * | |
| 396 | * @return The conversation removed. | |
| 397 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
398 | GaimConversation *gaim_conv_window_remove_conversation(GaimConvWindow *win, |
|
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
399 | unsigned int index); |
| 4359 | 400 | |
| 401 | /** | |
| 402 | * Moves the conversation at the specified index in a window to a new index. | |
| 403 | * | |
| 404 | * @param win The window. | |
| 405 | * @param index The index of the conversation to move. | |
| 406 | * @param new_index The new index. | |
| 407 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
408 | void gaim_conv_window_move_conversation(GaimConvWindow *win, |
|
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
409 | unsigned int index, |
|
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
410 | unsigned int new_index); |
| 4359 | 411 | |
| 412 | /** | |
| 413 | * Returns the conversation in the window at the specified index. | |
| 414 | * | |
| 415 | * If the index is out of range, this returns @c NULL. | |
| 416 | * | |
| 417 | * @param win The window. | |
| 418 | * @param index The index containing a conversation. | |
| 419 | * | |
| 420 | * @return The conversation at the specified index. | |
| 421 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
422 | GaimConversation *gaim_conv_window_get_conversation_at( |
|
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
423 | const GaimConvWindow *win, unsigned int index); |
| 4359 | 424 | |
| 425 | /** | |
| 426 | * Returns the number of conversations in the window. | |
| 427 | * | |
| 428 | * @param win The window. | |
| 429 | * | |
| 430 | * @return The number of conversations. | |
| 431 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
432 | size_t gaim_conv_window_get_conversation_count(const GaimConvWindow *win); |
| 4359 | 433 | |
| 434 | /** | |
| 435 | * Switches the active conversation to the one at the specified index. | |
| 436 | * | |
| 437 | * If @a index is out of range, this does nothing. | |
| 438 | * | |
| 439 | * @param win The window. | |
| 440 | * @param index The new index. | |
| 441 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
442 | void gaim_conv_window_switch_conversation(GaimConvWindow *win, |
|
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
443 | unsigned int index); |
| 4359 | 444 | |
| 445 | /** | |
| 446 | * Returns the active conversation in the window. | |
| 447 | * | |
| 448 | * @param win The window. | |
| 449 | * | |
| 450 | * @return The active conversation. | |
| 451 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
452 | GaimConversation *gaim_conv_window_get_active_conversation( |
|
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
453 | const GaimConvWindow *win); |
| 4359 | 454 | |
| 455 | /** | |
|
9260
82d7b380220a
[gaim-migrate @ 10059]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9166
diff
changeset
|
456 | * Determines if a conversation window has focus |
|
82d7b380220a
[gaim-migrate @ 10059]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9166
diff
changeset
|
457 | * |
|
82d7b380220a
[gaim-migrate @ 10059]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9166
diff
changeset
|
458 | * @param win The window. |
|
82d7b380220a
[gaim-migrate @ 10059]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9166
diff
changeset
|
459 | * |
|
82d7b380220a
[gaim-migrate @ 10059]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9166
diff
changeset
|
460 | * @return @c TRUE if the conversation window has focus, @c FALSE if |
|
82d7b380220a
[gaim-migrate @ 10059]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9166
diff
changeset
|
461 | * it does not or the UI does not have a concept of window focus |
|
82d7b380220a
[gaim-migrate @ 10059]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9166
diff
changeset
|
462 | */ |
|
82d7b380220a
[gaim-migrate @ 10059]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9166
diff
changeset
|
463 | gboolean gaim_conv_window_has_focus(GaimConvWindow *win); |
|
82d7b380220a
[gaim-migrate @ 10059]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9166
diff
changeset
|
464 | |
|
82d7b380220a
[gaim-migrate @ 10059]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9166
diff
changeset
|
465 | /** |
| 4359 | 466 | * Returns the list of conversations in the specified window. |
| 467 | * | |
| 468 | * @param win The window. | |
| 469 | * | |
| 470 | * @return The list of conversations. | |
| 471 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
472 | GList *gaim_conv_window_get_conversations(const GaimConvWindow *win); |
| 4359 | 473 | |
| 474 | /** | |
| 475 | * Returns a list of all windows. | |
| 476 | * | |
| 477 | * @return A list of windows. | |
| 478 | */ | |
| 479 | GList *gaim_get_windows(void); | |
| 480 | ||
|
4469
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
481 | /** |
|
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
482 | * Returns the first window containing a conversation of the specified type. |
|
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
483 | * |
|
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
484 | * @param type The conversation type. |
|
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
485 | * |
|
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
486 | * @return The window if found, or @c NULL if not found. |
|
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
487 | */ |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
488 | GaimConvWindow *gaim_get_first_window_with_type(GaimConversationType type); |
|
4469
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
489 | |
|
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
490 | /** |
|
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
491 | * Returns the last window containing a conversation of the specified type. |
|
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
492 | * |
|
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
493 | * @param type The conversation type. |
|
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
494 | * |
|
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
495 | * @return The window if found, or @c NULL if not found. |
|
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
496 | */ |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
497 | GaimConvWindow *gaim_get_last_window_with_type(GaimConversationType type); |
|
4469
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
498 | |
| 4359 | 499 | /*@}*/ |
| 500 | ||
| 501 | /**************************************************************************/ | |
| 502 | /** @name Conversation API */ | |
| 503 | /**************************************************************************/ | |
| 504 | /*@{*/ | |
| 505 | ||
| 506 | /** | |
| 507 | * Creates a new conversation of the specified type. | |
| 508 | * | |
|
6720
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6622
diff
changeset
|
509 | * @param type The type of conversation. |
|
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6622
diff
changeset
|
510 | * @param account The account opening the conversation window on the gaim |
|
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6622
diff
changeset
|
511 | * user's end. |
|
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6622
diff
changeset
|
512 | * @param name The name of the conversation. |
| 4359 | 513 | * |
| 514 | * @return The new conversation. | |
| 515 | */ | |
|
6585
8fcd3639e544
[gaim-migrate @ 7107]
Christian Hammond <chipx86@chipx86.com>
parents:
6488
diff
changeset
|
516 | GaimConversation *gaim_conversation_new(GaimConversationType type, |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
517 | GaimAccount *account, |
|
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
518 | const char *name); |
| 4359 | 519 | |
| 520 | /** | |
| 521 | * Destroys the specified conversation and removes it from the parent | |
| 522 | * window. | |
| 523 | * | |
| 524 | * If this conversation is the only one contained in the parent window, | |
| 525 | * that window is also destroyed. | |
| 526 | * | |
| 527 | * @param conv The conversation to destroy. | |
| 528 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
529 | void gaim_conversation_destroy(GaimConversation *conv); |
| 4359 | 530 | |
| 531 | /** | |
| 532 | * Returns the specified conversation's type. | |
| 533 | * | |
| 534 | * @param conv The conversation. | |
| 535 | * | |
| 536 | * @return The conversation's type. | |
| 537 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
538 | GaimConversationType gaim_conversation_get_type(const GaimConversation *conv); |
| 4359 | 539 | |
| 540 | /** | |
| 541 | * Sets the specified conversation's UI operations structure. | |
| 542 | * | |
| 543 | * @param conv The conversation. | |
| 544 | * @param ops The UI conversation operations structure. | |
| 545 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
546 | void gaim_conversation_set_ui_ops(GaimConversation *conv, |
|
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
547 | GaimConversationUiOps *ops); |
| 4359 | 548 | |
| 549 | /** | |
| 550 | * Returns the specified conversation's UI operations structure. | |
|
6585
8fcd3639e544
[gaim-migrate @ 7107]
Christian Hammond <chipx86@chipx86.com>
parents:
6488
diff
changeset
|
551 | * |
| 4359 | 552 | * @param conv The conversation. |
| 553 | * | |
| 554 | * @return The operations structure. | |
| 555 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
556 | GaimConversationUiOps *gaim_conversation_get_ui_ops( |
|
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
557 | const GaimConversation *conv); |
| 4359 | 558 | |
| 559 | /** | |
| 4491 | 560 | * Sets the specified conversation's gaim_account. |
| 4359 | 561 | * |
| 4491 | 562 | * This gaim_account represents the user using gaim, not the person the user |
| 4359 | 563 | * is having a conversation/chat/flame with. |
| 564 | * | |
| 565 | * @param conv The conversation. | |
| 4491 | 566 | * @param account The gaim_account. |
| 4359 | 567 | */ |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
568 | void gaim_conversation_set_account(GaimConversation *conv, |
|
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
569 | GaimAccount *account); |
| 4359 | 570 | |
| 571 | /** | |
| 4491 | 572 | * Returns the specified conversation's gaim_account. |
| 4359 | 573 | * |
| 4491 | 574 | * This gaim_account represents the user using gaim, not the person the user |
| 4359 | 575 | * is having a conversation/chat/flame with. |
| 576 | * | |
| 577 | * @param conv The conversation. | |
| 578 | * | |
| 4491 | 579 | * @return The conversation's gaim_account. |
| 4359 | 580 | */ |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
581 | GaimAccount *gaim_conversation_get_account(const GaimConversation *conv); |
| 4359 | 582 | |
| 583 | /** | |
| 584 | * Returns the specified conversation's gaim_connection. | |
| 585 | * | |
| 586 | * This is the same as gaim_conversation_get_user(conv)->gc. | |
| 587 | * | |
| 588 | * @param conv The conversation. | |
| 589 | * | |
| 590 | * @return The conversation's gaim_connection. | |
| 591 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
592 | GaimConnection *gaim_conversation_get_gc(const GaimConversation *conv); |
| 4359 | 593 | |
| 594 | /** | |
| 595 | * Sets the specified conversation's title. | |
| 596 | * | |
| 597 | * @param conv The conversation. | |
| 598 | * @param title The title. | |
| 599 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
600 | void gaim_conversation_set_title(GaimConversation *conv, const char *title); |
| 4359 | 601 | |
| 602 | /** | |
| 603 | * Returns the specified conversation's title. | |
| 604 | * | |
|
6720
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6622
diff
changeset
|
605 | * @param conv The conversation. |
| 4359 | 606 | * |
| 607 | * @return The title. | |
| 608 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
609 | const char *gaim_conversation_get_title(const GaimConversation *conv); |
| 4359 | 610 | |
| 611 | /** | |
| 612 | * Automatically sets the specified conversation's title. | |
| 613 | * | |
| 614 | * This function takes OPT_IM_ALIAS_TAB into account, as well as the | |
| 615 | * user's alias. | |
| 616 | * | |
| 617 | * @param conv The conversation. | |
| 618 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
619 | void gaim_conversation_autoset_title(GaimConversation *conv); |
| 4359 | 620 | |
| 621 | /** | |
| 622 | * Returns the specified conversation's index in the parent window. | |
| 623 | * | |
| 624 | * @param conv The conversation. | |
| 625 | * | |
| 626 | * @return The current index in the parent window. | |
| 627 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
628 | int gaim_conversation_get_index(const GaimConversation *conv); |
| 4359 | 629 | |
| 630 | /** | |
| 631 | * Sets the conversation's unseen state. | |
| 632 | * | |
| 633 | * @param conv The conversation. | |
| 634 | * @param state The new unseen state. | |
| 635 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
636 | void gaim_conversation_set_unseen(GaimConversation *conv, |
| 4359 | 637 | GaimUnseenState state); |
| 638 | ||
| 639 | /** | |
| 640 | * Returns the conversation's unseen state. | |
| 641 | * | |
| 642 | * @param conv The conversation. | |
| 643 | * | |
|
6720
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6622
diff
changeset
|
644 | * @return The conversation's unseen state. |
| 4359 | 645 | */ |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
646 | GaimUnseenState gaim_conversation_get_unseen(const GaimConversation *conv); |
| 4359 | 647 | |
| 648 | /** | |
|
7256
311c8febfc92
[gaim-migrate @ 7833]
Christian Hammond <chipx86@chipx86.com>
parents:
7122
diff
changeset
|
649 | * Sets the specified conversation's name. |
|
311c8febfc92
[gaim-migrate @ 7833]
Christian Hammond <chipx86@chipx86.com>
parents:
7122
diff
changeset
|
650 | * |
|
311c8febfc92
[gaim-migrate @ 7833]
Christian Hammond <chipx86@chipx86.com>
parents:
7122
diff
changeset
|
651 | * @param conv The conversation. |
|
311c8febfc92
[gaim-migrate @ 7833]
Christian Hammond <chipx86@chipx86.com>
parents:
7122
diff
changeset
|
652 | * @param name The conversation's name. |
|
311c8febfc92
[gaim-migrate @ 7833]
Christian Hammond <chipx86@chipx86.com>
parents:
7122
diff
changeset
|
653 | */ |
|
311c8febfc92
[gaim-migrate @ 7833]
Christian Hammond <chipx86@chipx86.com>
parents:
7122
diff
changeset
|
654 | void gaim_conversation_set_name(GaimConversation *conv, const char *name); |
|
311c8febfc92
[gaim-migrate @ 7833]
Christian Hammond <chipx86@chipx86.com>
parents:
7122
diff
changeset
|
655 | |
|
311c8febfc92
[gaim-migrate @ 7833]
Christian Hammond <chipx86@chipx86.com>
parents:
7122
diff
changeset
|
656 | /** |
| 4359 | 657 | * Returns the specified conversation's name. |
| 658 | * | |
| 659 | * @param conv The conversation. | |
| 660 | * | |
| 661 | * @return The conversation's name. | |
| 662 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
663 | const char *gaim_conversation_get_name(const GaimConversation *conv); |
| 4359 | 664 | |
| 665 | /** | |
| 666 | * Enables or disables logging for this conversation. | |
| 667 | * | |
|
6720
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6622
diff
changeset
|
668 | * @param conv The conversation. |
|
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6622
diff
changeset
|
669 | * @param log @c TRUE if logging should be enabled, or @c FALSE otherwise. |
| 4359 | 670 | */ |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
671 | void gaim_conversation_set_logging(GaimConversation *conv, gboolean log); |
| 4359 | 672 | |
| 673 | /** | |
| 674 | * Returns whether or not logging is enabled for this conversation. | |
| 675 | * | |
|
6720
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6622
diff
changeset
|
676 | * @param conv The conversation. |
|
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6622
diff
changeset
|
677 | * |
| 4359 | 678 | * @return @c TRUE if logging is enabled, or @c FALSE otherwise. |
| 679 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
680 | gboolean gaim_conversation_is_logging(const GaimConversation *conv); |
| 4359 | 681 | |
| 682 | /** | |
| 683 | * Returns the specified conversation's send history. | |
| 684 | * | |
| 685 | * @param conv The conversation. | |
| 686 | * | |
| 687 | * @return The conversation's send history. | |
| 688 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
689 | GList *gaim_conversation_get_send_history(const GaimConversation *conv); |
| 4359 | 690 | |
| 691 | /** | |
| 692 | * Sets the specified conversation's history. | |
| 693 | * | |
| 694 | * @param conv The conversation. | |
| 695 | * @param history The history. | |
| 696 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
697 | void gaim_conversation_set_history(GaimConversation *conv, GString *history); |
| 4359 | 698 | |
| 699 | /** | |
| 700 | * Returns the specified conversation's history. | |
| 701 | * | |
| 702 | * @param conv The conversation. | |
| 703 | * | |
| 704 | * @return The conversation's history. | |
| 705 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
706 | GString *gaim_conversation_get_history(const GaimConversation *conv); |
| 4359 | 707 | |
| 708 | /** | |
| 709 | * Returns the specified conversation's parent window. | |
| 710 | * | |
| 711 | * @param conv The conversation. | |
| 712 | * | |
| 713 | * @return The conversation's parent window. | |
| 714 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
715 | GaimConvWindow *gaim_conversation_get_window(const GaimConversation *conv); |
| 4359 | 716 | |
| 717 | /** | |
| 718 | * Returns the specified conversation's IM-specific data. | |
| 719 | * | |
| 720 | * If the conversation type is not GAIM_CONV_IM, this will return @c NULL. | |
| 721 | * | |
| 722 | * @param conv The conversation. | |
| 723 | * | |
| 724 | * @return The IM-specific data. | |
| 725 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
726 | GaimConvIm *gaim_conversation_get_im_data(const GaimConversation *conv); |
| 4359 | 727 | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
728 | #define GAIM_CONV_IM(c) (gaim_conversation_get_im_data(c)) |
| 4359 | 729 | |
| 730 | /** | |
| 731 | * Returns the specified conversation's chat-specific data. | |
| 732 | * | |
| 733 | * If the conversation type is not GAIM_CONV_CHAT, this will return @c NULL. | |
| 734 | * | |
| 735 | * @param conv The conversation. | |
| 736 | * | |
| 737 | * @return The chat-specific data. | |
| 738 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
739 | GaimConvChat *gaim_conversation_get_chat_data(const GaimConversation *conv); |
| 4359 | 740 | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
741 | #define GAIM_CONV_CHAT(c) (gaim_conversation_get_chat_data(c)) |
| 4359 | 742 | |
| 743 | /** | |
|
4877
7d1f4381fed0
[gaim-migrate @ 5207]
Christian Hammond <chipx86@chipx86.com>
parents:
4876
diff
changeset
|
744 | * Sets extra data for a conversation. |
|
6585
8fcd3639e544
[gaim-migrate @ 7107]
Christian Hammond <chipx86@chipx86.com>
parents:
6488
diff
changeset
|
745 | * |
|
4876
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
746 | * @param conv The conversation. |
|
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
747 | * @param key The unique key. |
|
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
748 | * @param data The data to assign. |
|
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
749 | */ |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
750 | void gaim_conversation_set_data(GaimConversation *conv, const char *key, |
|
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
751 | gpointer data); |
|
4876
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
752 | |
|
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
753 | /** |
|
4877
7d1f4381fed0
[gaim-migrate @ 5207]
Christian Hammond <chipx86@chipx86.com>
parents:
4876
diff
changeset
|
754 | * Returns extra data in a conversation. |
|
4876
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
755 | * |
|
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
756 | * @param conv The conversation. |
|
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
757 | * @param key The unqiue key. |
|
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
758 | * |
|
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
759 | * @return The data associated with the key. |
|
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
760 | */ |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
761 | gpointer gaim_conversation_get_data(GaimConversation *conv, const char *key); |
|
4876
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
762 | |
|
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
763 | /** |
| 4359 | 764 | * Returns a list of all conversations. |
| 765 | * | |
| 766 | * This list includes both IMs and chats. | |
| 767 | * | |
| 768 | * @return A GList of all conversations. | |
| 769 | */ | |
| 770 | GList *gaim_get_conversations(void); | |
| 771 | ||
| 772 | /** | |
| 773 | * Returns a list of all IMs. | |
| 774 | * | |
| 775 | * @return A GList of all IMs. | |
| 776 | */ | |
| 777 | GList *gaim_get_ims(void); | |
| 778 | ||
| 779 | /** | |
| 780 | * Returns a list of all chats. | |
| 781 | * | |
| 782 | * @return A GList of all chats. | |
| 783 | */ | |
| 784 | GList *gaim_get_chats(void); | |
| 785 | ||
| 786 | /** | |
|
10246
aa5bff72f94c
[gaim-migrate @ 11386]
Mark Doliner <markdoliner@pidgin.im>
parents:
10008
diff
changeset
|
787 | * Finds the conversation with the specified type and name. In most |
|
aa5bff72f94c
[gaim-migrate @ 11386]
Mark Doliner <markdoliner@pidgin.im>
parents:
10008
diff
changeset
|
788 | * cases you should use gaim_find_conversation_with_account() instead |
|
aa5bff72f94c
[gaim-migrate @ 11386]
Mark Doliner <markdoliner@pidgin.im>
parents:
10008
diff
changeset
|
789 | * of this. |
| 4359 | 790 | * |
|
10246
aa5bff72f94c
[gaim-migrate @ 11386]
Mark Doliner <markdoliner@pidgin.im>
parents:
10008
diff
changeset
|
791 | * @param type The type of the conversation. |
| 4359 | 792 | * @param name The name of the conversation. |
| 793 | * | |
| 794 | * @return The conversation if found, or @c NULL otherwise. | |
| 795 | */ | |
|
10246
aa5bff72f94c
[gaim-migrate @ 11386]
Mark Doliner <markdoliner@pidgin.im>
parents:
10008
diff
changeset
|
796 | GaimConversation *gaim_find_conversation(GaimConversationType type, |
|
aa5bff72f94c
[gaim-migrate @ 11386]
Mark Doliner <markdoliner@pidgin.im>
parents:
10008
diff
changeset
|
797 | const char *name); |
| 4359 | 798 | |
| 799 | /** | |
|
10246
aa5bff72f94c
[gaim-migrate @ 11386]
Mark Doliner <markdoliner@pidgin.im>
parents:
10008
diff
changeset
|
800 | * Finds a conversation with the specified type, name, and Gaim account. |
| 4359 | 801 | * |
|
10246
aa5bff72f94c
[gaim-migrate @ 11386]
Mark Doliner <markdoliner@pidgin.im>
parents:
10008
diff
changeset
|
802 | * @param type The type of the conversation. |
| 4359 | 803 | * @param name The name of the conversation. |
| 4491 | 804 | * @param account The gaim_account associated with the conversation. |
| 4359 | 805 | * |
| 806 | * @return The conversation if found, or @c NULL otherwise. | |
| 807 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
808 | GaimConversation *gaim_find_conversation_with_account( |
|
10246
aa5bff72f94c
[gaim-migrate @ 11386]
Mark Doliner <markdoliner@pidgin.im>
parents:
10008
diff
changeset
|
809 | GaimConversationType type, const char *name, |
|
aa5bff72f94c
[gaim-migrate @ 11386]
Mark Doliner <markdoliner@pidgin.im>
parents:
10008
diff
changeset
|
810 | const GaimAccount *account); |
| 4359 | 811 | |
| 812 | /** | |
| 813 | * Writes to a conversation window. | |
| 814 | * | |
| 815 | * This function should not be used to write IM or chat messages. Use | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
816 | * gaim_conv_im_write() and gaim_conv_chat_write() instead. Those functions will |
| 4359 | 817 | * most likely call this anyway, but they may do their own formatting, |
| 818 | * sound playback, etc. | |
| 819 | * | |
| 820 | * This can be used to write generic messages, such as "so and so closed | |
| 821 | * the conversation window." | |
| 822 | * | |
| 823 | * @param conv The conversation. | |
| 824 | * @param who The user who sent the message. | |
| 825 | * @param message The message. | |
|
6621
2a18ef3e5224
[gaim-migrate @ 7145]
Robert McQueen <robot101@debian.org>
parents:
6605
diff
changeset
|
826 | * @param flags The message flags. |
| 4359 | 827 | * @param mtime The time the message was sent. |
| 828 | * | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
829 | * @see gaim_conv_im_write() |
|
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
830 | * @see gaim_conv_chat_write() |
| 4359 | 831 | */ |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
832 | void gaim_conversation_write(GaimConversation *conv, const char *who, |
|
6982
12f08de92674
[gaim-migrate @ 7538]
Mark Doliner <markdoliner@pidgin.im>
parents:
6846
diff
changeset
|
833 | const char *message, GaimMessageFlags flags, |
| 4359 | 834 | time_t mtime); |
| 835 | ||
| 836 | /** | |
| 837 | * Updates the progress bar on a conversation window | |
| 838 | * (if one exists in the UI). | |
| 839 | * | |
| 840 | * This is used for loading images typically. | |
| 841 | * | |
| 842 | * @param conv The conversation. | |
| 843 | * @param percent The percentage. | |
| 844 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
845 | void gaim_conversation_update_progress(GaimConversation *conv, float percent); |
| 4359 | 846 | |
| 847 | /** | |
|
9260
82d7b380220a
[gaim-migrate @ 10059]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9166
diff
changeset
|
848 | * Determines if a conversation has focus |
|
82d7b380220a
[gaim-migrate @ 10059]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9166
diff
changeset
|
849 | * |
|
82d7b380220a
[gaim-migrate @ 10059]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9166
diff
changeset
|
850 | * @param conv The conversation. |
|
82d7b380220a
[gaim-migrate @ 10059]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9166
diff
changeset
|
851 | * |
|
82d7b380220a
[gaim-migrate @ 10059]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9166
diff
changeset
|
852 | * @return @c TRUE if the conversation has focus, @c FALSE if |
|
82d7b380220a
[gaim-migrate @ 10059]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9166
diff
changeset
|
853 | * 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
|
854 | */ |
|
82d7b380220a
[gaim-migrate @ 10059]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9166
diff
changeset
|
855 | gboolean gaim_conversation_has_focus(GaimConversation *conv); |
|
82d7b380220a
[gaim-migrate @ 10059]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9166
diff
changeset
|
856 | |
|
82d7b380220a
[gaim-migrate @ 10059]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9166
diff
changeset
|
857 | /** |
| 4359 | 858 | * Updates the visual status and UI of a conversation. |
| 859 | * | |
| 860 | * @param conv The conversation. | |
| 861 | * @param type The update type. | |
| 862 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
863 | void gaim_conversation_update(GaimConversation *conv, GaimConvUpdateType type); |
| 4359 | 864 | |
| 865 | /** | |
| 866 | * Calls a function on each conversation. | |
| 867 | * | |
| 868 | * @param func The function. | |
| 869 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
870 | void gaim_conversation_foreach(void (*func)(GaimConversation *conv)); |
| 4359 | 871 | |
| 872 | /*@}*/ | |
| 873 | ||
| 874 | ||
| 875 | /**************************************************************************/ | |
| 876 | /** @name IM Conversation API */ | |
| 877 | /**************************************************************************/ | |
| 878 | /*@{*/ | |
| 879 | ||
| 880 | /** | |
| 881 | * Gets an IM's parent conversation. | |
| 882 | * | |
| 883 | * @param im The IM. | |
| 884 | * | |
| 885 | * @return The parent conversation. | |
| 886 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
887 | GaimConversation *gaim_conv_im_get_conversation(const GaimConvIm *im); |
| 4359 | 888 | |
| 889 | /** | |
|
6846
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
890 | * Sets the IM's buddy icon. |
|
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
891 | * |
|
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
892 | * This should only be called from within Gaim. You probably want to |
|
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
893 | * call gaim_buddy_icon_set_data(). |
|
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
894 | * |
|
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
895 | * @param im The IM. |
|
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
896 | * @param icon The buddy icon. |
|
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
897 | * |
|
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
898 | * @see gaim_buddy_icon_set_data() |
|
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
899 | */ |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
900 | void gaim_conv_im_set_icon(GaimConvIm *im, GaimBuddyIcon *icon); |
|
6846
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
901 | |
|
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
902 | /** |
|
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
903 | * Returns the IM's buddy icon. |
|
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
904 | * |
|
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
905 | * @param im The IM. |
|
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
906 | * |
|
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
907 | * @return The buddy icon. |
|
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
908 | */ |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
909 | GaimBuddyIcon *gaim_conv_im_get_icon(const GaimConvIm *im); |
|
6846
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
910 | |
|
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
911 | /** |
| 4359 | 912 | * Sets the IM's typing state. |
| 913 | * | |
| 914 | * @param im The IM. | |
| 915 | * @param state The typing state. | |
| 916 | */ | |
|
8288
457cf0339c09
[gaim-migrate @ 9012]
Christian Hammond <chipx86@chipx86.com>
parents:
8256
diff
changeset
|
917 | void gaim_conv_im_set_typing_state(GaimConvIm *im, GaimTypingState state); |
| 4359 | 918 | |
| 919 | /** | |
| 920 | * Returns the IM's typing state. | |
| 921 | * | |
| 922 | * @param im The IM. | |
| 923 | * | |
| 924 | * @return The IM's typing state. | |
| 925 | */ | |
|
8288
457cf0339c09
[gaim-migrate @ 9012]
Christian Hammond <chipx86@chipx86.com>
parents:
8256
diff
changeset
|
926 | GaimTypingState gaim_conv_im_get_typing_state(const GaimConvIm *im); |
| 4359 | 927 | |
| 928 | /** | |
| 929 | * Starts the IM's typing timeout. | |
| 930 | * | |
| 931 | * @param im The IM. | |
| 932 | * @param timeout The timeout. | |
| 933 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
934 | void gaim_conv_im_start_typing_timeout(GaimConvIm *im, int timeout); |
| 4359 | 935 | |
| 936 | /** | |
| 937 | * Stops the IM's typing timeout. | |
| 938 | * | |
| 939 | * @param im The IM. | |
| 940 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
941 | void gaim_conv_im_stop_typing_timeout(GaimConvIm *im); |
| 4359 | 942 | |
| 943 | /** | |
| 944 | * Returns the IM's typing timeout. | |
| 945 | * | |
| 946 | * @param im The IM. | |
| 947 | * | |
| 948 | * @return The timeout. | |
| 949 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
950 | guint gaim_conv_im_get_typing_timeout(const GaimConvIm *im); |
| 4359 | 951 | |
| 952 | /** | |
| 953 | * Sets the IM's time until it should send another typing notification. | |
| 954 | * | |
| 955 | * @param im The IM. | |
| 956 | * @param val The time. | |
| 957 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
958 | void gaim_conv_im_set_type_again(GaimConvIm *im, time_t val); |
| 4359 | 959 | |
| 960 | /** | |
| 961 | * Returns the IM's time until it should send another typing notification. | |
| 962 | * | |
| 963 | * @param im The IM. | |
| 964 | * | |
| 965 | * @return The time. | |
| 966 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
967 | time_t gaim_conv_im_get_type_again(const GaimConvIm *im); |
| 4359 | 968 | |
| 969 | /** | |
| 970 | * Starts the IM's type again timeout. | |
| 971 | * | |
| 972 | * @param im The IM. | |
| 973 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
974 | void gaim_conv_im_start_type_again_timeout(GaimConvIm *im); |
| 4359 | 975 | |
| 976 | /** | |
| 977 | * Stops the IM's type again timeout. | |
| 978 | * | |
| 979 | * @param im The IM. | |
| 980 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
981 | void gaim_conv_im_stop_type_again_timeout(GaimConvIm *im); |
| 4359 | 982 | |
| 983 | /** | |
| 984 | * Returns the IM's type again timeout interval. | |
| 985 | * | |
| 986 | * @param im The IM. | |
| 987 | * | |
| 988 | * @return The type again timeout interval. | |
| 989 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
990 | guint gaim_conv_im_get_type_again_timeout(const GaimConvIm *im); |
| 4359 | 991 | |
| 992 | /** | |
| 993 | * Updates the visual typing notification for an IM conversation. | |
| 994 | * | |
| 995 | * @param im The IM. | |
| 996 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
997 | void gaim_conv_im_update_typing(GaimConvIm *im); |
| 4359 | 998 | |
| 999 | /** | |
| 1000 | * Writes to an IM. | |
| 1001 | * | |
| 1002 | * @param im The IM. | |
| 1003 | * @param who The user who sent the message. | |
| 1004 | * @param message The message to write. | |
|
6621
2a18ef3e5224
[gaim-migrate @ 7145]
Robert McQueen <robot101@debian.org>
parents:
6605
diff
changeset
|
1005 | * @param flags The message flags. |
| 4359 | 1006 | * @param mtime The time the message was sent. |
| 1007 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1008 | void gaim_conv_im_write(GaimConvIm *im, const char *who, |
|
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1009 | const char *message, GaimMessageFlags flags, |
|
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1010 | time_t mtime); |
| 4359 | 1011 | |
| 1012 | /** | |
| 9627 | 1013 | * Presents an IM-error to the user |
| 1014 | * | |
| 1015 | * This is a helper function to find a conversation, write an error to it, and | |
| 1016 | * raise the window. If a conversation with this user doesn't already exist, | |
| 1017 | * the function will return FALSE and the calling function can attempt to present | |
| 1018 | * the error another way (gaim_notify_error, most likely) | |
| 1019 | * | |
| 1020 | * @param who The user this error is about | |
| 1021 | * @param account The account this error is on | |
| 1022 | * @param what The error | |
| 1023 | * @return TRUE if the error was presented, else FALSE | |
| 1024 | */ | |
| 1025 | gboolean gaim_conv_present_error(const char *who, GaimAccount *account, const char *what); | |
| 1026 | ||
| 1027 | /** | |
| 4359 | 1028 | * Sends a message to this IM conversation. |
| 1029 | * | |
| 1030 | * @param im The IM. | |
| 1031 | * @param message The message to send. | |
| 1032 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1033 | void gaim_conv_im_send(GaimConvIm *im, const char *message); |
| 4359 | 1034 | |
| 1035 | /*@}*/ | |
| 1036 | ||
| 1037 | ||
| 1038 | /**************************************************************************/ | |
| 1039 | /** @name Chat Conversation API */ | |
| 1040 | /**************************************************************************/ | |
| 1041 | /*@{*/ | |
| 1042 | ||
| 1043 | /** | |
| 1044 | * Gets a chat's parent conversation. | |
| 1045 | * | |
| 1046 | * @param chat The chat. | |
| 1047 | * | |
| 1048 | * @return The parent conversation. | |
| 1049 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1050 | GaimConversation *gaim_conv_chat_get_conversation(const GaimConvChat *chat); |
| 4359 | 1051 | |
| 1052 | /** | |
| 1053 | * Sets the list of users in the chat room. | |
| 1054 | * | |
|
6407
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1055 | * @note Calling this function will not update the display of the users. |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1056 | * Please use gaim_conv_chat_add_user(), gaim_conv_chat_add_users(), |
|
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1057 | * gaim_conv_chat_remove_user(), and gaim_conv_chat_remove_users() instead. |
|
6407
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1058 | * |
| 4359 | 1059 | * @param chat The chat. |
| 1060 | * @param users The list of users. | |
| 1061 | * | |
| 1062 | * @return The list passed. | |
| 1063 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1064 | GList *gaim_conv_chat_set_users(GaimConvChat *chat, GList *users); |
| 4359 | 1065 | |
| 1066 | /** | |
| 1067 | * Returns a list of users in the chat room. | |
| 1068 | * | |
| 1069 | * @param chat The chat. | |
| 1070 | * | |
| 1071 | * @return The list of users. | |
| 1072 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1073 | GList *gaim_conv_chat_get_users(const GaimConvChat *chat); |
| 4359 | 1074 | |
| 1075 | /** | |
| 1076 | * Ignores a user in a chat room. | |
| 1077 | * | |
| 1078 | * @param chat The chat. | |
| 1079 | * @param name The name of the user. | |
| 1080 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1081 | void gaim_conv_chat_ignore(GaimConvChat *chat, const char *name); |
| 4359 | 1082 | |
| 1083 | /** | |
| 1084 | * Unignores a user in a chat room. | |
| 1085 | * | |
| 1086 | * @param chat The chat. | |
| 1087 | * @param name The name of the user. | |
| 1088 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1089 | void gaim_conv_chat_unignore(GaimConvChat *chat, const char *name); |
| 4359 | 1090 | |
| 1091 | /** | |
| 1092 | * Sets the list of ignored users in the chat room. | |
| 1093 | * | |
| 1094 | * @param chat The chat. | |
| 1095 | * @param ignored The list of ignored users. | |
| 1096 | * | |
| 1097 | * @return The list passed. | |
| 1098 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1099 | GList *gaim_conv_chat_set_ignored(GaimConvChat *chat, GList *ignored); |
| 4359 | 1100 | |
| 1101 | /** | |
| 1102 | * Returns the list of ignored users in the chat room. | |
| 1103 | * | |
| 1104 | * @param chat The chat. | |
| 1105 | * | |
| 1106 | * @return The list of ignored users. | |
| 1107 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1108 | GList *gaim_conv_chat_get_ignored(const GaimConvChat *chat); |
| 4359 | 1109 | |
| 1110 | /** | |
| 1111 | * Returns the actual name of the specified ignored user, if it exists in | |
| 1112 | * the ignore list. | |
| 1113 | * | |
| 1114 | * If the user found contains a prefix, such as '+' or '\@', this is also | |
| 1115 | * returned. The username passed to the function does not have to have this | |
| 1116 | * formatting. | |
| 1117 | * | |
| 1118 | * @param chat The chat. | |
| 1119 | * @param user The user to check in the ignore list. | |
| 1120 | * | |
| 1121 | * @return The ignored user if found, complete with prefixes, or @c NULL | |
| 1122 | * if not found. | |
| 1123 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1124 | const char *gaim_conv_chat_get_ignored_user(const GaimConvChat *chat, |
|
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1125 | const char *user); |
| 4359 | 1126 | |
| 1127 | /** | |
| 1128 | * Returns @c TRUE if the specified user is ignored. | |
| 1129 | * | |
| 1130 | * @param chat The chat. | |
| 1131 | * @param user The user. | |
| 1132 | * | |
| 1133 | * @return @c TRUE if the user is in the ignore list; @c FALSE otherwise. | |
| 1134 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1135 | gboolean gaim_conv_chat_is_user_ignored(const GaimConvChat *chat, |
|
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1136 | const char *user); |
| 4359 | 1137 | |
| 1138 | /** | |
| 1139 | * Sets the chat room's topic. | |
| 1140 | * | |
| 1141 | * @param chat The chat. | |
| 1142 | * @param who The user that set the topic. | |
| 1143 | * @param topic The topic. | |
| 1144 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1145 | void gaim_conv_chat_set_topic(GaimConvChat *chat, const char *who, |
|
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1146 | const char *topic); |
| 4359 | 1147 | |
| 1148 | /** | |
| 1149 | * Returns the chat room's topic. | |
| 1150 | * | |
| 1151 | * @param chat The chat. | |
| 1152 | * | |
| 1153 | * @return The chat's topic. | |
| 1154 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1155 | const char *gaim_conv_chat_get_topic(const GaimConvChat *chat); |
| 4359 | 1156 | |
| 1157 | /** | |
| 1158 | * Sets the chat room's ID. | |
| 1159 | * | |
| 1160 | * @param chat The chat. | |
| 1161 | * @param id The ID. | |
| 1162 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1163 | void gaim_conv_chat_set_id(GaimConvChat *chat, int id); |
| 4359 | 1164 | |
| 1165 | /** | |
| 1166 | * Returns the chat room's ID. | |
| 1167 | * | |
| 1168 | * @param chat The chat. | |
| 1169 | * | |
| 1170 | * @return The ID. | |
| 1171 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1172 | int gaim_conv_chat_get_id(const GaimConvChat *chat); |
| 4359 | 1173 | |
| 1174 | /** | |
| 1175 | * Writes to a chat. | |
| 1176 | * | |
| 1177 | * @param chat The chat. | |
| 1178 | * @param who The user who sent the message. | |
| 1179 | * @param message The message to write. | |
|
6621
2a18ef3e5224
[gaim-migrate @ 7145]
Robert McQueen <robot101@debian.org>
parents:
6605
diff
changeset
|
1180 | * @param flags The flags. |
| 4359 | 1181 | * @param mtime The time the message was sent. |
| 1182 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1183 | void gaim_conv_chat_write(GaimConvChat *chat, const char *who, |
|
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1184 | const char *message, GaimMessageFlags flags, |
|
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1185 | time_t mtime); |
| 4359 | 1186 | |
| 1187 | /** | |
| 1188 | * Sends a message to this chat conversation. | |
| 1189 | * | |
| 1190 | * @param chat The chat. | |
| 1191 | * @param message The message to send. | |
| 1192 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1193 | void gaim_conv_chat_send(GaimConvChat *chat, const char *message); |
| 4359 | 1194 | |
| 1195 | /** | |
| 1196 | * Adds a user to a chat. | |
| 1197 | * | |
| 9939 | 1198 | * @param chat The chat. |
| 1199 | * @param user The user to add. | |
| 1200 | * @param extra_msg An extra message to display with the join message. | |
| 1201 | * @param flags The users flags | |
| 1202 | * @param new_arrival Decides whether or not to show a join notice. | |
| 4359 | 1203 | */ |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1204 | void gaim_conv_chat_add_user(GaimConvChat *chat, const char *user, |
|
9846
61f7349c153a
[gaim-migrate @ 10724]
Nathan Fredrickson <nathan@silverorange.com>
parents:
9718
diff
changeset
|
1205 | const char *extra_msg, GaimConvChatBuddyFlags flags, |
|
61f7349c153a
[gaim-migrate @ 10724]
Nathan Fredrickson <nathan@silverorange.com>
parents:
9718
diff
changeset
|
1206 | gboolean new_arrival); |
| 4359 | 1207 | |
| 1208 | /** | |
|
6407
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1209 | * Adds a list of users to a chat. |
|
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1210 | * |
|
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1211 | * The data is copied from @a users, so it is up to the developer to |
|
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1212 | * free this list after calling this function. |
|
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1213 | * |
|
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1214 | * @param chat The chat. |
|
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1215 | * @param users The list of users to add. |
|
9554
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1216 | * @param flags The list of flags for each user. |
|
6407
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1217 | */ |
|
9554
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1218 | void gaim_conv_chat_add_users(GaimConvChat *chat, GList *users, GList *flags); |
|
6407
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1219 | |
|
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1220 | /** |
| 4359 | 1221 | * Renames a user in a chat. |
| 1222 | * | |
| 1223 | * @param chat The chat. | |
| 1224 | * @param old_user The old username. | |
| 1225 | * @param new_user The new username. | |
| 1226 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1227 | void gaim_conv_chat_rename_user(GaimConvChat *chat, const char *old_user, |
|
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1228 | const char *new_user); |
| 4359 | 1229 | |
| 1230 | /** | |
| 1231 | * Removes a user from a chat, optionally with a reason. | |
| 1232 | * | |
|
6407
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1233 | * 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
|
1234 | * |
| 4359 | 1235 | * @param chat The chat. |
| 1236 | * @param user The user that is being removed. | |
| 1237 | * @param reason The optional reason given for the removal. Can be @c NULL. | |
| 1238 | */ | |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1239 | void gaim_conv_chat_remove_user(GaimConvChat *chat, const char *user, |
|
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1240 | const char *reason); |
| 4359 | 1241 | |
| 1242 | /** | |
|
6407
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1243 | * 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
|
1244 | * |
|
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1245 | * @param chat The chat. |
|
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1246 | * @param users The users that are being removed. |
|
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1247 | * @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
|
1248 | */ |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1249 | void gaim_conv_chat_remove_users(GaimConvChat *chat, GList *users, |
|
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1250 | const char *reason); |
|
6407
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1251 | |
|
d67b6a6ba7d2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1252 | /** |
|
9554
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1253 | * Finds a user in a chat |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1254 | * |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1255 | * @param chat The chat. |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1256 | * @param user The user to look for. |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1257 | * |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1258 | * @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
|
1259 | */ |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1260 | gboolean gaim_conv_chat_find_user(GaimConvChat *chat, const char *user); |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1261 | |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1262 | /** |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1263 | * Set a users flags in a chat |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1264 | * |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1265 | * @param chat The chat. |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1266 | * @param user The user to update. |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1267 | * @param flags The new flags. |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1268 | */ |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1269 | void gaim_conv_chat_user_set_flags(GaimConvChat *chat, const char *user, |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1270 | GaimConvChatBuddyFlags flags); |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1271 | |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1272 | /** |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1273 | * Get the flags for a user in a chat |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1274 | * |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1275 | * @param chat The chat. |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1276 | * @param user The user to find the flags for |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1277 | * |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1278 | * @return The flags for the user |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1279 | */ |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1280 | GaimConvChatBuddyFlags gaim_conv_chat_user_get_flags(GaimConvChat *chat, |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1281 | const char *user); |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1282 | |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1283 | /** |
|
6414
f78eb072fcc0
[gaim-migrate @ 6921]
Christian Hammond <chipx86@chipx86.com>
parents:
6407
diff
changeset
|
1284 | * Clears all users from a chat. |
|
f78eb072fcc0
[gaim-migrate @ 6921]
Christian Hammond <chipx86@chipx86.com>
parents:
6407
diff
changeset
|
1285 | * |
|
f78eb072fcc0
[gaim-migrate @ 6921]
Christian Hammond <chipx86@chipx86.com>
parents:
6407
diff
changeset
|
1286 | * @param chat The chat. |
|
f78eb072fcc0
[gaim-migrate @ 6921]
Christian Hammond <chipx86@chipx86.com>
parents:
6407
diff
changeset
|
1287 | */ |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1288 | void gaim_conv_chat_clear_users(GaimConvChat *chat); |
|
6414
f78eb072fcc0
[gaim-migrate @ 6921]
Christian Hammond <chipx86@chipx86.com>
parents:
6407
diff
changeset
|
1289 | |
|
f78eb072fcc0
[gaim-migrate @ 6921]
Christian Hammond <chipx86@chipx86.com>
parents:
6407
diff
changeset
|
1290 | /** |
| 8158 | 1291 | * Sets your nickname (used for hilighting) for a chat. |
| 1292 | * | |
| 1293 | * @param chat The chat. | |
| 1294 | * @param nick The nick. | |
| 1295 | */ | |
| 1296 | void gaim_conv_chat_set_nick(GaimConvChat *chat, const char *nick); | |
| 1297 | ||
| 1298 | /** | |
| 1299 | * Gets your nickname (used for hilighting) for a chat. | |
| 1300 | * | |
| 1301 | * @param chat The chat. | |
| 1302 | * @return The nick. | |
| 1303 | */ | |
| 1304 | const char *gaim_conv_chat_get_nick(GaimConvChat *chat); | |
| 1305 | ||
| 1306 | /** | |
| 4359 | 1307 | * Finds a chat with the specified chat ID. |
| 1308 | * | |
| 1309 | * @param gc The gaim_connection. | |
| 1310 | * @param id The chat ID. | |
| 1311 | * | |
| 1312 | * @return The chat conversation. | |
| 1313 | */ | |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
1314 | GaimConversation *gaim_find_chat(const GaimConnection *gc, int id); |
| 4359 | 1315 | |
| 8256 | 1316 | /** |
| 1317 | * Lets the core know we left a chat, without destroying it. | |
| 1318 | * Called from serv_got_chat_left(). | |
| 1319 | * | |
| 1320 | * @param chat The chat. | |
| 1321 | */ | |
| 1322 | void gaim_conv_chat_left(GaimConvChat *chat); | |
| 1323 | ||
| 1324 | /** | |
| 1325 | * Returns true if we're no longer in this chat, | |
| 1326 | * and just left the window open. | |
| 1327 | * | |
| 1328 | * @param chat The chat. | |
| 1329 | * | |
| 1330 | * @return @c TRUE if we left the chat already, @c FALSE if | |
| 1331 | * we're still there. | |
| 1332 | */ | |
| 1333 | gboolean gaim_conv_chat_has_left(GaimConvChat *chat); | |
| 1334 | ||
|
9554
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1335 | /** |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1336 | * Creates a new chat buddy |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1337 | * |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1338 | * @param name The name. |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1339 | * @param flags The flags. |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1340 | * |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1341 | * @return The new chat buddy |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1342 | */ |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1343 | GaimConvChatBuddy *gaim_conv_chat_cb_new(const char *name, |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1344 | GaimConvChatBuddyFlags flags); |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1345 | |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1346 | /** |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1347 | * Find a chat buddy in a chat |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1348 | * |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1349 | * @param chat The chat. |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1350 | * @param name The name of the chat buddy to find. |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1351 | */ |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1352 | GaimConvChatBuddy *gaim_conv_chat_cb_find(GaimConvChat *chat, const char *name); |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1353 | |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1354 | /** |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1355 | * Get the name of a chat buddy |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1356 | * |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1357 | * @param cb The chat buddy. |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1358 | * |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1359 | * @return The name of the chat buddy. |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1360 | */ |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1361 | const char *gaim_conv_chat_cb_get_name(GaimConvChatBuddy *cb); |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1362 | |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1363 | /** |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1364 | * Destroys a chat buddy |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1365 | * |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1366 | * @param cb The chat buddy to destroy |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1367 | */ |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1368 | void gaim_conv_chat_cb_destroy(GaimConvChatBuddy *cb); |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
1369 | |
| 4359 | 1370 | /*@}*/ |
| 1371 | ||
|
4469
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1372 | /**************************************************************************/ |
|
7122
5f40c16a4ae4
[gaim-migrate @ 7689]
Christian Hammond <chipx86@chipx86.com>
parents:
7118
diff
changeset
|
1373 | /** @name Conversation Placement API */ |
|
4469
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1374 | /**************************************************************************/ |
|
4481
1a02f276e41e
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1375 | /*@{*/ |
|
4469
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1376 | |
|
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1377 | /** |
| 5858 | 1378 | * Returns a GList containing the IDs and Names of the registered placement |
| 1379 | * functions. | |
| 1380 | * | |
| 1381 | * @return The list of IDs and names. | |
| 1382 | */ | |
| 1383 | GList *gaim_conv_placement_get_options(void); | |
| 1384 | ||
| 1385 | /** | |
|
4469
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1386 | * Adds a conversation placement function to the list of possible functions. |
|
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1387 | * |
|
6720
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6622
diff
changeset
|
1388 | * @param id The unique ID of the placement function. |
|
4469
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1389 | * @param name The name of the function. |
|
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1390 | * @param fnc A pointer to the function. |
|
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1391 | */ |
|
6311
1e253e4b423f
[gaim-migrate @ 6810]
Christian Hammond <chipx86@chipx86.com>
parents:
6063
diff
changeset
|
1392 | void gaim_conv_placement_add_fnc(const char *id, const char *name, |
|
1e253e4b423f
[gaim-migrate @ 6810]
Christian Hammond <chipx86@chipx86.com>
parents:
6063
diff
changeset
|
1393 | GaimConvPlacementFunc fnc); |
|
4469
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1394 | |
|
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1395 | /** |
|
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1396 | * Removes a conversation placement function from the list of possible |
|
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1397 | * functions. |
|
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1398 | * |
| 5858 | 1399 | * @param id The id of the function. |
|
4469
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1400 | */ |
| 5858 | 1401 | void gaim_conv_placement_remove_fnc(const char *id); |
|
4469
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1402 | |
|
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1403 | /** |
|
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1404 | * Returns the name of the conversation placement function at the |
| 5858 | 1405 | * specified id. |
|
4469
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1406 | * |
| 5858 | 1407 | * @param id The id. |
|
4469
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1408 | * |
| 5858 | 1409 | * @return The name of the function, or @c NULL if this id is invalid. |
|
4469
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1410 | */ |
| 5858 | 1411 | const char *gaim_conv_placement_get_name(const char *id); |
|
4469
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1412 | |
|
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1413 | /** |
|
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1414 | * Returns a pointer to the conversation placement function at the |
| 5858 | 1415 | * specified id. |
|
4469
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1416 | * |
| 5858 | 1417 | * @param id The id. |
|
4469
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1418 | * |
|
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1419 | * @return A pointer to the function. |
|
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1420 | */ |
| 5858 | 1421 | GaimConvPlacementFunc gaim_conv_placement_get_fnc(const char *id); |
|
4469
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1422 | |
|
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1423 | /** |
|
7561
fd6a81f1594e
[gaim-migrate @ 8175]
Christian Hammond <chipx86@chipx86.com>
parents:
7431
diff
changeset
|
1424 | * Sets the current conversation placement function. |
|
fd6a81f1594e
[gaim-migrate @ 8175]
Christian Hammond <chipx86@chipx86.com>
parents:
7431
diff
changeset
|
1425 | * |
|
fd6a81f1594e
[gaim-migrate @ 8175]
Christian Hammond <chipx86@chipx86.com>
parents:
7431
diff
changeset
|
1426 | * @param func The new conversation placement function. |
|
fd6a81f1594e
[gaim-migrate @ 8175]
Christian Hammond <chipx86@chipx86.com>
parents:
7431
diff
changeset
|
1427 | */ |
|
fd6a81f1594e
[gaim-migrate @ 8175]
Christian Hammond <chipx86@chipx86.com>
parents:
7431
diff
changeset
|
1428 | void gaim_conv_placement_set_current_func(GaimConvPlacementFunc func); |
|
fd6a81f1594e
[gaim-migrate @ 8175]
Christian Hammond <chipx86@chipx86.com>
parents:
7431
diff
changeset
|
1429 | |
|
fd6a81f1594e
[gaim-migrate @ 8175]
Christian Hammond <chipx86@chipx86.com>
parents:
7431
diff
changeset
|
1430 | /** |
|
fd6a81f1594e
[gaim-migrate @ 8175]
Christian Hammond <chipx86@chipx86.com>
parents:
7431
diff
changeset
|
1431 | * Returns the current conversation placement function. |
|
fd6a81f1594e
[gaim-migrate @ 8175]
Christian Hammond <chipx86@chipx86.com>
parents:
7431
diff
changeset
|
1432 | * |
|
fd6a81f1594e
[gaim-migrate @ 8175]
Christian Hammond <chipx86@chipx86.com>
parents:
7431
diff
changeset
|
1433 | * @return The current conversation placement function. |
|
fd6a81f1594e
[gaim-migrate @ 8175]
Christian Hammond <chipx86@chipx86.com>
parents:
7431
diff
changeset
|
1434 | */ |
|
fd6a81f1594e
[gaim-migrate @ 8175]
Christian Hammond <chipx86@chipx86.com>
parents:
7431
diff
changeset
|
1435 | GaimConvPlacementFunc gaim_conv_placement_get_current_func(void); |
|
fd6a81f1594e
[gaim-migrate @ 8175]
Christian Hammond <chipx86@chipx86.com>
parents:
7431
diff
changeset
|
1436 | |
|
fd6a81f1594e
[gaim-migrate @ 8175]
Christian Hammond <chipx86@chipx86.com>
parents:
7431
diff
changeset
|
1437 | /** |
| 5858 | 1438 | * Returns the id of the specified conversation placement function. |
|
4469
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1439 | * |
|
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1440 | * @param fnc A pointer to the registered function. |
|
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1441 | * |
| 5858 | 1442 | * @return The id of the conversation, or NULL if the function is not |
|
4469
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1443 | * registered. |
|
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1444 | */ |
| 5858 | 1445 | const char *gaim_conv_placement_get_fnc_id(GaimConvPlacementFunc fnc); |
|
4469
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1446 | |
|
4481
1a02f276e41e
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1447 | /*@}*/ |
|
1a02f276e41e
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1448 | |
|
1a02f276e41e
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1449 | /**************************************************************************/ |
|
1a02f276e41e
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1450 | /** @name UI Registration Functions */ |
|
1a02f276e41e
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1451 | /**************************************************************************/ |
|
1a02f276e41e
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1452 | /*@{*/ |
|
1a02f276e41e
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1453 | |
|
1a02f276e41e
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1454 | /** |
|
1a02f276e41e
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1455 | * Sets the UI operations structure to be used in all gaim conversation |
|
1a02f276e41e
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1456 | * windows. |
|
1a02f276e41e
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1457 | * |
|
5207
4d3a908867a2
[gaim-migrate @ 5575]
Christian Hammond <chipx86@chipx86.com>
parents:
5034
diff
changeset
|
1458 | * @param ops The UI operations structure. |
|
4481
1a02f276e41e
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1459 | */ |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1460 | void gaim_conversations_set_win_ui_ops(GaimConvWindowUiOps *ops); |
|
4481
1a02f276e41e
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1461 | |
|
1a02f276e41e
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1462 | /** |
|
1a02f276e41e
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1463 | * Returns the gaim window UI operations structure to be used in |
|
1a02f276e41e
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1464 | * new windows. |
|
1a02f276e41e
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1465 | * |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1466 | * @return A filled-out GaimConvWindowUiOps structure. |
|
4481
1a02f276e41e
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1467 | */ |
|
7118
280b3b85a28a
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1468 | GaimConvWindowUiOps *gaim_conversations_get_win_ui_ops(void); |
|
4481
1a02f276e41e
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1469 | |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1470 | /*@}*/ |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1471 | |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1472 | /**************************************************************************/ |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1473 | /** @name Conversations Subsystem */ |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1474 | /**************************************************************************/ |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1475 | /*@{*/ |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1476 | |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1477 | /** |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1478 | * Returns the conversation subsystem handle. |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1479 | * |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1480 | * @return The conversation subsystem handle. |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1481 | */ |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1482 | void *gaim_conversations_get_handle(void); |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1483 | |
|
5872
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
1484 | /** |
|
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
1485 | * Initializes the conversation subsystem. |
|
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
1486 | */ |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1487 | void gaim_conversations_init(void); |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1488 | |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1489 | /** |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1490 | * Uninitializes the conversation subsystem. |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1491 | */ |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1492 | void gaim_conversations_uninit(void); |
|
5872
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
1493 | |
|
4481
1a02f276e41e
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1494 | /*@}*/ |
|
1a02f276e41e
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1495 | |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
1496 | #ifdef __cplusplus |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
1497 | } |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
1498 | #endif |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
1499 | |
|
4890
d87a9b5bbe57
[gaim-migrate @ 5220]
Christian Hammond <chipx86@chipx86.com>
parents:
4877
diff
changeset
|
1500 | #endif /* _GAIM_CONVERSATION_H_ */ |