annotate plugins/perl/common/Conversation_Chat.xs @ 9869:348636e6ba89

[gaim-migrate @ 10748] gtk 2.0 again from Stu committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Wed, 25 Aug 2004 21:47:00 +0000
parents b14a7bc189b8
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6591
d25ae4b5a204 [gaim-migrate @ 7115]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1 #include "module.h"
d25ae4b5a204 [gaim-migrate @ 7115]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
2
7120
b14a7bc189b8 [gaim-migrate @ 7687]
Christian Hammond <chipx86@chipx86.com>
parents: 6618
diff changeset
3 MODULE = Gaim::Conversation::Chat PACKAGE = Gaim::Conversation::Chat PREFIX = gaim_conv_chat_
6591
d25ae4b5a204 [gaim-migrate @ 7115]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
4 PROTOTYPES: ENABLE
d25ae4b5a204 [gaim-migrate @ 7115]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
5
d25ae4b5a204 [gaim-migrate @ 7115]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
6 Gaim::Conversation::Chat
d25ae4b5a204 [gaim-migrate @ 7115]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
7 new(account, name)
d25ae4b5a204 [gaim-migrate @ 7115]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
8 Gaim::Account account
d25ae4b5a204 [gaim-migrate @ 7115]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
9 const char *name
d25ae4b5a204 [gaim-migrate @ 7115]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
10 CODE:
7120
b14a7bc189b8 [gaim-migrate @ 7687]
Christian Hammond <chipx86@chipx86.com>
parents: 6618
diff changeset
11 RETVAL = GAIM_CONV_CHAT(gaim_conversation_new(GAIM_CONV_CHAT, account, name));
6591
d25ae4b5a204 [gaim-migrate @ 7115]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
12 OUTPUT:
d25ae4b5a204 [gaim-migrate @ 7115]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
13 RETVAL
d25ae4b5a204 [gaim-migrate @ 7115]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
14
d25ae4b5a204 [gaim-migrate @ 7115]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
15 void
d25ae4b5a204 [gaim-migrate @ 7115]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
16 DESTROY(chat)
d25ae4b5a204 [gaim-migrate @ 7115]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
17 Gaim::Conversation::Chat chat
d25ae4b5a204 [gaim-migrate @ 7115]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
18 CODE:
7120
b14a7bc189b8 [gaim-migrate @ 7687]
Christian Hammond <chipx86@chipx86.com>
parents: 6618
diff changeset
19 gaim_conversation_destroy(gaim_conv_chat_get_conversation(chat));
6591
d25ae4b5a204 [gaim-migrate @ 7115]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
20
d25ae4b5a204 [gaim-migrate @ 7115]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
21
d25ae4b5a204 [gaim-migrate @ 7115]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
22 Gaim::Conversation
7120
b14a7bc189b8 [gaim-migrate @ 7687]
Christian Hammond <chipx86@chipx86.com>
parents: 6618
diff changeset
23 gaim_conv_chat_get_conversation(chat)
6591
d25ae4b5a204 [gaim-migrate @ 7115]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
24 Gaim::Conversation::Chat chat
d25ae4b5a204 [gaim-migrate @ 7115]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
25
d25ae4b5a204 [gaim-migrate @ 7115]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
26 void
d25ae4b5a204 [gaim-migrate @ 7115]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
27 users(chat)
d25ae4b5a204 [gaim-migrate @ 7115]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
28 Gaim::Conversation::Chat chat
d25ae4b5a204 [gaim-migrate @ 7115]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
29 PREINIT:
d25ae4b5a204 [gaim-migrate @ 7115]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
30 GList *l;
d25ae4b5a204 [gaim-migrate @ 7115]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
31 PPCODE:
7120
b14a7bc189b8 [gaim-migrate @ 7687]
Christian Hammond <chipx86@chipx86.com>
parents: 6618
diff changeset
32 for (l = gaim_conv_chat_get_users(chat); l != NULL; l = l->next)
6591
d25ae4b5a204 [gaim-migrate @ 7115]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
33 {
d25ae4b5a204 [gaim-migrate @ 7115]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
34 XPUSHs(sv_2mortal(newSVpv(l->data, 0)));
d25ae4b5a204 [gaim-migrate @ 7115]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
35 }
d25ae4b5a204 [gaim-migrate @ 7115]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
36
d25ae4b5a204 [gaim-migrate @ 7115]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
37 void
7120
b14a7bc189b8 [gaim-migrate @ 7687]
Christian Hammond <chipx86@chipx86.com>
parents: 6618
diff changeset
38 gaim_conv_chat_ignore(chat, name)
6591
d25ae4b5a204 [gaim-migrate @ 7115]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
39 Gaim::Conversation::Chat chat
d25ae4b5a204 [gaim-migrate @ 7115]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
40 const char *name
d25ae4b5a204 [gaim-migrate @ 7115]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
41
d25ae4b5a204 [gaim-migrate @ 7115]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
42 void
7120
b14a7bc189b8 [gaim-migrate @ 7687]
Christian Hammond <chipx86@chipx86.com>
parents: 6618
diff changeset
43 gaim_conv_chat_unignore(chat, name)
6591
d25ae4b5a204 [gaim-migrate @ 7115]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
44 Gaim::Conversation::Chat chat
d25ae4b5a204 [gaim-migrate @ 7115]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
45 const char *name
d25ae4b5a204 [gaim-migrate @ 7115]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
46
d25ae4b5a204 [gaim-migrate @ 7115]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
47 void
d25ae4b5a204 [gaim-migrate @ 7115]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
48 ignored_users(chat)
d25ae4b5a204 [gaim-migrate @ 7115]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
49 Gaim::Conversation::Chat chat
d25ae4b5a204 [gaim-migrate @ 7115]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
50 PREINIT:
d25ae4b5a204 [gaim-migrate @ 7115]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
51 GList *l;
d25ae4b5a204 [gaim-migrate @ 7115]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
52 PPCODE:
7120
b14a7bc189b8 [gaim-migrate @ 7687]
Christian Hammond <chipx86@chipx86.com>
parents: 6618
diff changeset
53 for (l = gaim_conv_chat_get_ignored(chat); l != NULL; l = l->next)
6591
d25ae4b5a204 [gaim-migrate @ 7115]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
54 {
d25ae4b5a204 [gaim-migrate @ 7115]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
55 XPUSHs(sv_2mortal(newSVpv(l->data, 0)));
d25ae4b5a204 [gaim-migrate @ 7115]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
56 }
d25ae4b5a204 [gaim-migrate @ 7115]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
57
d25ae4b5a204 [gaim-migrate @ 7115]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
58 gboolean
7120
b14a7bc189b8 [gaim-migrate @ 7687]
Christian Hammond <chipx86@chipx86.com>
parents: 6618
diff changeset
59 gaim_conv_chat_is_user_ignored(chat, user)
6591
d25ae4b5a204 [gaim-migrate @ 7115]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
60 Gaim::Conversation::Chat chat
d25ae4b5a204 [gaim-migrate @ 7115]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
61 const char *user
d25ae4b5a204 [gaim-migrate @ 7115]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
62
d25ae4b5a204 [gaim-migrate @ 7115]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
63 void
7120
b14a7bc189b8 [gaim-migrate @ 7687]
Christian Hammond <chipx86@chipx86.com>
parents: 6618
diff changeset
64 gaim_conv_chat_set_topic(chat, who, topic)
6591
d25ae4b5a204 [gaim-migrate @ 7115]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
65 Gaim::Conversation::Chat chat
d25ae4b5a204 [gaim-migrate @ 7115]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
66 const char *who
d25ae4b5a204 [gaim-migrate @ 7115]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
67 const char *topic
d25ae4b5a204 [gaim-migrate @ 7115]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
68
d25ae4b5a204 [gaim-migrate @ 7115]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
69 const char *
7120
b14a7bc189b8 [gaim-migrate @ 7687]
Christian Hammond <chipx86@chipx86.com>
parents: 6618
diff changeset
70 gaim_conv_chat_get_topic(chat)
6591
d25ae4b5a204 [gaim-migrate @ 7115]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
71 Gaim::Conversation::Chat chat
d25ae4b5a204 [gaim-migrate @ 7115]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
72
d25ae4b5a204 [gaim-migrate @ 7115]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
73 int
7120
b14a7bc189b8 [gaim-migrate @ 7687]
Christian Hammond <chipx86@chipx86.com>
parents: 6618
diff changeset
74 gaim_conv_chat_get_id(chat)
6591
d25ae4b5a204 [gaim-migrate @ 7115]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
75 Gaim::Conversation::Chat chat
d25ae4b5a204 [gaim-migrate @ 7115]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
76
d25ae4b5a204 [gaim-migrate @ 7115]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
77 void
6615
a3602428ff53 [gaim-migrate @ 7139]
Christian Hammond <chipx86@chipx86.com>
parents: 6614
diff changeset
78 write(chat, who, message, flags)
6591
d25ae4b5a204 [gaim-migrate @ 7115]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
79 Gaim::Conversation::Chat chat
d25ae4b5a204 [gaim-migrate @ 7115]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
80 const char *who
d25ae4b5a204 [gaim-migrate @ 7115]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
81 const char *message
d25ae4b5a204 [gaim-migrate @ 7115]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
82 int flags
6615
a3602428ff53 [gaim-migrate @ 7139]
Christian Hammond <chipx86@chipx86.com>
parents: 6614
diff changeset
83 CODE:
7120
b14a7bc189b8 [gaim-migrate @ 7687]
Christian Hammond <chipx86@chipx86.com>
parents: 6618
diff changeset
84 gaim_conv_chat_write(chat, who, message, flags, time(NULL));
6591
d25ae4b5a204 [gaim-migrate @ 7115]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
85
d25ae4b5a204 [gaim-migrate @ 7115]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
86 void
7120
b14a7bc189b8 [gaim-migrate @ 7687]
Christian Hammond <chipx86@chipx86.com>
parents: 6618
diff changeset
87 gaim_conv_chat_send(chat, message)
6591
d25ae4b5a204 [gaim-migrate @ 7115]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
88 Gaim::Conversation::Chat chat
d25ae4b5a204 [gaim-migrate @ 7115]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
89 const char *message
d25ae4b5a204 [gaim-migrate @ 7115]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
90
d25ae4b5a204 [gaim-migrate @ 7115]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
91
6618
adae69366f75 [gaim-migrate @ 7142]
Christian Hammond <chipx86@chipx86.com>
parents: 6617
diff changeset
92 MODULE = Gaim::Conversation::Chat PACKAGE = Gaim PREFIX = gaim_
6591
d25ae4b5a204 [gaim-migrate @ 7115]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
93 PROTOTYPES: ENABLE
d25ae4b5a204 [gaim-migrate @ 7115]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
94
d25ae4b5a204 [gaim-migrate @ 7115]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
95 void
d25ae4b5a204 [gaim-migrate @ 7115]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
96 chats()
d25ae4b5a204 [gaim-migrate @ 7115]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
97 PREINIT:
d25ae4b5a204 [gaim-migrate @ 7115]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
98 GList *l;
d25ae4b5a204 [gaim-migrate @ 7115]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
99 PPCODE:
d25ae4b5a204 [gaim-migrate @ 7115]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
100 for (l = gaim_get_chats(); l != NULL; l = l->next)
d25ae4b5a204 [gaim-migrate @ 7115]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
101 {
d25ae4b5a204 [gaim-migrate @ 7115]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
102 XPUSHs(sv_2mortal(gaim_perl_bless_object(l->data,
d25ae4b5a204 [gaim-migrate @ 7115]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
103 "Gaim::Conversation")));
d25ae4b5a204 [gaim-migrate @ 7115]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
104 }