| |
1 /** |
| |
2 * @file chat.h Chat stuff |
| |
3 * |
| |
4 * purple |
| |
5 * |
| |
6 * Copyright (C) 2003 Nathan Walp <faceprint@faceprint.com> |
| |
7 * |
| |
8 * This program is free software; you can redistribute it and/or modify |
| |
9 * it under the terms of the GNU General Public License as published by |
| |
10 * the Free Software Foundation; either version 2 of the License, or |
| |
11 * (at your option) any later version. |
| |
12 * |
| |
13 * This program is distributed in the hope that it will be useful, |
| |
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| |
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| |
16 * GNU General Public License for more details. |
| |
17 * |
| |
18 * You should have received a copy of the GNU General Public License |
| |
19 * along with this program; if not, write to the Free Software |
| |
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| |
21 */ |
| |
22 #ifndef _PURPLE_JABBER_CHAT_H_ |
| |
23 #define _PURPLE_JABBER_CHAT_H_ |
| |
24 |
| |
25 #include "internal.h" |
| |
26 #include "connection.h" |
| |
27 #include "conversation.h" |
| |
28 #include "request.h" |
| |
29 #include "roomlist.h" |
| |
30 |
| |
31 #include "jabber.h" |
| |
32 |
| |
33 typedef struct _JabberChatMember { |
| |
34 char *handle; |
| |
35 char *jid; |
| |
36 } JabberChatMember; |
| |
37 |
| |
38 |
| |
39 typedef struct _JabberChat { |
| |
40 JabberStream *js; |
| |
41 char *room; |
| |
42 char *server; |
| |
43 char *handle; |
| |
44 int id; |
| |
45 PurpleConversation *conv; |
| |
46 gboolean muc; |
| |
47 gboolean xhtml; |
| |
48 PurpleRequestType config_dialog_type; |
| |
49 void *config_dialog_handle; |
| |
50 GHashTable *members; |
| |
51 } JabberChat; |
| |
52 |
| |
53 GList *jabber_chat_info(PurpleConnection *gc); |
| |
54 GHashTable *jabber_chat_info_defaults(PurpleConnection *gc, const char *chat_name); |
| |
55 char *jabber_get_chat_name(GHashTable *data); |
| |
56 void jabber_chat_join(PurpleConnection *gc, GHashTable *data); |
| |
57 JabberChat *jabber_chat_find(JabberStream *js, const char *room, |
| |
58 const char *server); |
| |
59 JabberChat *jabber_chat_find_by_id(JabberStream *js, int id); |
| |
60 JabberChat *jabber_chat_find_by_conv(PurpleConversation *conv); |
| |
61 void jabber_chat_destroy(JabberChat *chat); |
| |
62 void jabber_chat_free(JabberChat *chat); |
| |
63 gboolean jabber_chat_find_buddy(PurpleConversation *conv, const char *name); |
| |
64 void jabber_chat_invite(PurpleConnection *gc, int id, const char *message, |
| |
65 const char *name); |
| |
66 void jabber_chat_leave(PurpleConnection *gc, int id); |
| |
67 char *jabber_chat_buddy_real_name(PurpleConnection *gc, int id, const char *who); |
| |
68 void jabber_chat_request_room_configure(JabberChat *chat); |
| |
69 void jabber_chat_create_instant_room(JabberChat *chat); |
| |
70 void jabber_chat_register(JabberChat *chat); |
| |
71 void jabber_chat_change_topic(JabberChat *chat, const char *topic); |
| |
72 void jabber_chat_set_topic(PurpleConnection *gc, int id, const char *topic); |
| |
73 void jabber_chat_change_nick(JabberChat *chat, const char *nick); |
| |
74 void jabber_chat_part(JabberChat *chat, const char *msg); |
| |
75 void jabber_chat_track_handle(JabberChat *chat, const char *handle, |
| |
76 const char *jid, const char *affiliation, const char *role); |
| |
77 void jabber_chat_remove_handle(JabberChat *chat, const char *handle); |
| |
78 gboolean jabber_chat_ban_user(JabberChat *chat, const char *who, |
| |
79 const char *why); |
| |
80 gboolean jabber_chat_affiliate_user(JabberChat *chat, const char *who, |
| |
81 const char *affiliation); |
| |
82 gboolean jabber_chat_role_user(JabberChat *chat, const char *who, |
| |
83 const char *role); |
| |
84 gboolean jabber_chat_kick_user(JabberChat *chat, const char *who, |
| |
85 const char *why); |
| |
86 |
| |
87 PurpleRoomlist *jabber_roomlist_get_list(PurpleConnection *gc); |
| |
88 void jabber_roomlist_cancel(PurpleRoomlist *list); |
| |
89 |
| |
90 void jabber_chat_disco_traffic(JabberChat *chat); |
| |
91 |
| |
92 char *jabber_roomlist_room_serialize(PurpleRoomlistRoom *room); |
| |
93 |
| |
94 |
| |
95 #endif /* _PURPLE_JABBER_CHAT_H_ */ |