14192
|
1 #include "module.h"
|
|
2
|
|
3 MODULE = Gaim::Serv PACKAGE = Gaim::Serv PREFIX = serv_
|
|
4 PROTOTYPES: ENABLE
|
|
5
|
|
6
|
|
7 void
|
|
8 serv_add_deny(con, a)
|
|
9 Gaim::Connection con
|
|
10 const char * a
|
|
11
|
|
12 void
|
|
13 serv_add_permit(a, b)
|
|
14 Gaim::Connection a
|
|
15 const char * b
|
|
16
|
|
17 void
|
|
18 serv_alias_buddy(buddy)
|
|
19 Gaim::BuddyList::Buddy buddy
|
|
20
|
|
21 void
|
|
22 serv_chat_invite(con, a, b, c)
|
|
23 Gaim::Connection con
|
|
24 int a
|
|
25 const char * b
|
|
26 const char * c
|
|
27
|
|
28 void
|
|
29 serv_chat_leave(a, b)
|
|
30 Gaim::Connection a
|
|
31 int b
|
|
32
|
|
33 int
|
|
34 serv_chat_send(con, a, b, flags)
|
|
35 Gaim::Connection con
|
|
36 int a
|
|
37 const char * b
|
|
38 Gaim::MessageFlags flags
|
|
39
|
|
40 void
|
|
41 serv_chat_whisper(con, a, b, c)
|
|
42 Gaim::Connection con
|
|
43 int a
|
|
44 const char * b
|
|
45 const char * c
|
|
46
|
|
47 void
|
|
48 serv_get_info(con, a)
|
|
49 Gaim::Connection con
|
|
50 const char * a
|
|
51
|
|
52 void
|
|
53 serv_got_alias(gc, who, alias)
|
|
54 Gaim::Connection gc
|
|
55 const char *who
|
|
56 const char *alias
|
|
57
|
|
58 void
|
|
59 serv_got_chat_in(g, id, who, chatflags, message, mtime)
|
|
60 Gaim::Connection g
|
|
61 int id
|
|
62 const char *who
|
|
63 Gaim::MessageFlags chatflags
|
|
64 const char *message
|
|
65 time_t mtime
|
|
66
|
|
67 void
|
|
68 serv_got_chat_invite(gc, name, who, message, components)
|
|
69 Gaim::Connection gc
|
|
70 const char *name
|
|
71 const char *who
|
|
72 const char *message
|
|
73 SV * components
|
|
74 INIT:
|
|
75 HV * t_HV;
|
|
76 HE * t_HE;
|
|
77 SV * t_SV;
|
|
78 GHashTable * t_GHash;
|
|
79 I32 len;
|
|
80 char *t_key, *t_value;
|
|
81 CODE:
|
|
82 t_HV = (HV *)SvRV(components);
|
|
83 t_GHash = g_hash_table_new(NULL, NULL);
|
|
84
|
|
85 for (t_HE = hv_iternext(t_HV); t_HE != NULL; t_HE = hv_iternext(t_HV) ) {
|
|
86 t_key = hv_iterkey(t_HE, &len);
|
|
87 t_SV = *hv_fetch(t_HV, t_key, len, 0);
|
|
88 t_value = SvPV(t_SV, PL_na);
|
|
89
|
|
90 g_hash_table_insert(t_GHash, t_key, t_value);
|
|
91 }
|
|
92 serv_got_chat_invite(gc, name, who, message, t_GHash);
|
|
93
|
|
94 void
|
|
95 serv_got_chat_left(g, id)
|
|
96 Gaim::Connection g
|
|
97 int id
|
|
98
|
|
99 void
|
|
100 serv_got_im(gc, who, msg, imflags, mtime)
|
|
101 Gaim::Connection gc
|
|
102 const char *who
|
|
103 const char *msg
|
|
104 Gaim::MessageFlags imflags
|
|
105 time_t mtime
|
|
106
|
|
107 Gaim::Conversation
|
|
108 serv_got_joined_chat(gc, id, name)
|
|
109 Gaim::Connection gc
|
|
110 int id
|
|
111 const char *name
|
|
112
|
|
113 void
|
|
114 serv_got_typing(gc, name, timeout, state)
|
|
115 Gaim::Connection gc
|
|
116 const char *name
|
|
117 int timeout
|
|
118 Gaim::TypingState state
|
|
119
|
|
120 void
|
|
121 serv_got_typing_stopped(gc, name)
|
|
122 Gaim::Connection gc
|
|
123 const char *name
|
|
124
|
|
125 void
|
|
126 serv_join_chat(con, components)
|
|
127 Gaim::Connection con
|
|
128 SV * components
|
|
129 INIT:
|
|
130 HV * t_HV;
|
|
131 HE * t_HE;
|
|
132 SV * t_SV;
|
|
133 GHashTable * t_GHash;
|
|
134 I32 len;
|
|
135 char *t_key, *t_value;
|
|
136 CODE:
|
|
137 t_HV = (HV *)SvRV(components);
|
|
138 t_GHash = g_hash_table_new(NULL, NULL);
|
|
139
|
|
140 for (t_HE = hv_iternext(t_HV); t_HE != NULL; t_HE = hv_iternext(t_HV) ) {
|
|
141 t_key = hv_iterkey(t_HE, &len);
|
|
142 t_SV = *hv_fetch(t_HV, t_key, len, 0);
|
|
143 t_value = SvPV(t_SV, PL_na);
|
|
144
|
|
145 g_hash_table_insert(t_GHash, t_key, t_value);
|
|
146 }
|
|
147 serv_join_chat(con, t_GHash);
|
|
148
|
|
149 void
|
|
150 serv_move_buddy(buddy, group1, group2)
|
|
151 Gaim::BuddyList::Buddy buddy
|
|
152 Gaim::BuddyList::Group group1
|
|
153 Gaim::BuddyList::Group group2
|
|
154
|
|
155 void
|
|
156 serv_reject_chat(con, components)
|
|
157 Gaim::Connection con
|
|
158 SV * components
|
|
159 INIT:
|
|
160 HV * t_HV;
|
|
161 HE * t_HE;
|
|
162 SV * t_SV;
|
|
163 GHashTable * t_GHash;
|
|
164 I32 len;
|
|
165 char *t_key, *t_value;
|
|
166 CODE:
|
|
167 t_HV = (HV *)SvRV(components);
|
|
168 t_GHash = g_hash_table_new(NULL, NULL);
|
|
169
|
|
170 for (t_HE = hv_iternext(t_HV); t_HE != NULL; t_HE = hv_iternext(t_HV) ) {
|
|
171 t_key = hv_iterkey(t_HE, &len);
|
|
172 t_SV = *hv_fetch(t_HV, t_key, len, 0);
|
|
173 t_value = SvPV(t_SV, PL_na);
|
|
174
|
|
175 g_hash_table_insert(t_GHash, t_key, t_value);
|
|
176 }
|
|
177 serv_reject_chat(con, t_GHash);
|
|
178
|
|
179 void
|
|
180 serv_rem_deny(con, a)
|
|
181 Gaim::Connection con
|
|
182 const char * a
|
|
183
|
|
184 void
|
|
185 serv_rem_permit(con, a)
|
|
186 Gaim::Connection con
|
|
187 const char * a
|
|
188
|
|
189 void
|
|
190 serv_send_file(gc, who, file)
|
|
191 Gaim::Connection gc
|
|
192 const char *who
|
|
193 const char *file
|
|
194
|
|
195 int
|
|
196 serv_send_im(con, a, b, flags )
|
|
197 Gaim::Connection con
|
|
198 const char * a
|
|
199 const char * b
|
|
200 Gaim::MessageFlags flags
|
|
201
|
|
202 int
|
|
203 serv_send_typing(con, a, state)
|
|
204 Gaim::Connection con
|
|
205 const char * a
|
|
206 Gaim::TypingState state
|
|
207
|
|
208 void
|
|
209 serv_set_buddyicon(gc, filename)
|
|
210 Gaim::Connection gc
|
|
211 const char *filename
|
|
212
|
|
213 void
|
|
214 serv_set_info(con, a)
|
|
215 Gaim::Connection con
|
|
216 const char * a
|
|
217
|
|
218 void
|
|
219 serv_set_permit_deny(con)
|
|
220 Gaim::Connection con
|
|
221
|