comparison plugins/perl/common/Conversation_Chat.xs @ 6591:d25ae4b5a204

[gaim-migrate @ 7115] Added the perl API for the conversation framework. Untested.. Should work. We'll see. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Sun, 24 Aug 2003 02:43:27 +0000
parents
children c1a36e7b198e
comparison
equal deleted inserted replaced
6590:edda487ef5df 6591:d25ae4b5a204
1 #include "module.h"
2
3 MODULE = Gaim::Conversation::Chat PACKAGE = Gaim::Conversation::Chat PREFIX = gaim_chat_
4 PROTOTYPES: ENABLE
5
6 Gaim::Conversation::Chat
7 new(account, name)
8 Gaim::Account account
9 const char *name
10 CODE:
11 RETVAL = GAIM_CHAT(gaim_conversation_new(GAIM_CONV_CHAT, account, name));
12 OUTPUT:
13 RETVAL
14
15 void
16 DESTROY(chat)
17 Gaim::Conversation::Chat chat
18 CODE:
19 gaim_conversation_destroy(gaim_chat_get_conversation(chat));
20
21
22 Gaim::Conversation
23 gaim_chat_get_conversation(chat)
24 Gaim::Conversation::Chat chat
25
26 void
27 users(chat)
28 Gaim::Conversation::Chat chat
29 PREINIT:
30 GList *l;
31 PPCODE:
32 for (l = gaim_chat_get_users(chat); l != NULL; l = l->next)
33 {
34 XPUSHs(sv_2mortal(newSVpv(l->data, 0)));
35 }
36
37 void
38 gaim_chat_ignore(chat, name)
39 Gaim::Conversation::Chat chat
40 const char *name
41
42 void
43 gaim_chat_unignore(chat, name)
44 Gaim::Conversation::Chat chat
45 const char *name
46
47 void
48 ignored_users(chat)
49 Gaim::Conversation::Chat chat
50 PREINIT:
51 GList *l;
52 PPCODE:
53 for (l = gaim_chat_get_ignored(chat); l != NULL; l = l->next)
54 {
55 XPUSHs(sv_2mortal(newSVpv(l->data, 0)));
56 }
57
58 gboolean
59 gaim_chat_is_user_ignored(chat, user)
60 Gaim::Conversation::Chat chat
61 const char *user
62
63 void
64 gaim_chat_set_topic(chat, who, topic)
65 Gaim::Conversation::Chat chat
66 const char *who
67 const char *topic
68
69 const char *
70 gaim_chat_get_topic(chat)
71 Gaim::Conversation::Chat chat
72
73 int
74 gaim_chat_get_id(chat)
75 Gaim::Conversation::Chat chat
76
77 void
78 write(chat, who, message, flags)
79 Gaim::Conversation::Chat chat
80 const char *who
81 const char *message
82 int flags
83
84 void
85 gaim_chat_send(chat, message)
86 Gaim::Conversation::Chat chat
87 const char *message
88
89
90 MODULE = Gaim::Conversation PACKAGE = Gaim PREFIX = gaim_
91 PROTOTYPES: ENABLE
92
93 void
94 chats()
95 PREINIT:
96 GList *l;
97 PPCODE:
98 for (l = gaim_get_chats(); l != NULL; l = l->next)
99 {
100 XPUSHs(sv_2mortal(gaim_perl_bless_object(l->data,
101 "Gaim::Conversation")));
102 }