File: Server.xs

package info (click to toggle)
pidgin 2.4.3-4lenny8
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 63,264 kB
  • ctags: 26,894
  • sloc: ansic: 286,555; sh: 9,224; makefile: 3,410; python: 1,150; perl: 236; cs: 209; tcl: 96; xml: 10
file content (216 lines) | stat: -rw-r--r-- 4,019 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
#include "module.h"

MODULE = Purple::Serv  PACKAGE = Purple::Serv  PREFIX = serv_
PROTOTYPES: ENABLE


void 
serv_add_deny(con, a)
	Purple::Connection con
	const char * a

void 
serv_add_permit(a, b)
	Purple::Connection a
	const char * b

void 
serv_alias_buddy(buddy)
	Purple::BuddyList::Buddy buddy 

void 
serv_chat_invite(con, a, b, c)
	Purple::Connection con
	int a
	const char * b
	const char * c

void 
serv_chat_leave(a, b)
	Purple::Connection a
	int b

int  
serv_chat_send(con, a, b, flags)
	Purple::Connection con 
	int a
	const char * b
	Purple::MessageFlags flags

void 
serv_chat_whisper(con, a, b, c)
	Purple::Connection con
	int a
	const char * b
	const char * c

void 
serv_get_info(con, a)
	Purple::Connection con 
	const char * a

void 
serv_got_alias(gc, who, alias)
	Purple::Connection gc
	const char *who
	const char *alias

void 
serv_got_chat_in(g, id, who, chatflags, message, mtime)
	Purple::Connection g
	int id
	const char *who
	Purple::MessageFlags chatflags
	const char *message
	time_t mtime

void 
serv_got_chat_invite(gc, name, who, message, components)
	Purple::Connection gc
	const char *name
	const char *who
	const char *message
	SV * components
INIT:
	HV * t_HV;
	HE * t_HE;
	SV * t_SV;
	GHashTable * t_GHash;
	I32 len;
	char *t_key, *t_value;
CODE:
	t_HV =  (HV *)SvRV(components);
	t_GHash = g_hash_table_new(g_str_hash, g_str_equal);

	for (t_HE = hv_iternext(t_HV); t_HE != NULL; t_HE = hv_iternext(t_HV) ) {
		t_key = hv_iterkey(t_HE, &len);
		t_SV = *hv_fetch(t_HV, t_key, len, 0);
 		t_value = SvPV(t_SV, PL_na);

		g_hash_table_insert(t_GHash, t_key, t_value);
	}
	serv_got_chat_invite(gc, name, who, message, t_GHash);

void 
serv_got_chat_left(g, id)
	Purple::Connection g
	int id

void 
serv_got_im(gc, who, msg, imflags, mtime)
	Purple::Connection gc
	const char *who
	const char *msg
	Purple::MessageFlags imflags
	time_t mtime

Purple::Conversation
serv_got_joined_chat(gc, id, name)
	Purple::Connection gc
	int id
	const char *name

void 
serv_got_typing(gc, name, timeout, state)
	Purple::Connection gc
	const char *name
	int timeout
	Purple::TypingState state

void 
serv_got_typing_stopped(gc, name)
	Purple::Connection gc
	const char *name

void 
serv_join_chat(con, components)
	Purple::Connection con 
	SV * components
INIT:
	HV * t_HV;
	HE * t_HE;
	SV * t_SV;
	GHashTable * t_GHash;
	I32 len;
	char *t_key, *t_value;
CODE:
	t_HV =  (HV *)SvRV(components);
	t_GHash = g_hash_table_new(g_str_hash, g_str_equal);

	for (t_HE = hv_iternext(t_HV); t_HE != NULL; t_HE = hv_iternext(t_HV) ) {
		t_key = hv_iterkey(t_HE, &len);
		t_SV = *hv_fetch(t_HV, t_key, len, 0);
 		t_value = SvPV(t_SV, PL_na);

		g_hash_table_insert(t_GHash, t_key, t_value);
	}
	serv_join_chat(con, t_GHash);

void 
serv_move_buddy(buddy, group1, group2)
	Purple::BuddyList::Buddy buddy
	Purple::BuddyList::Group group1
	Purple::BuddyList::Group group2

void 
serv_reject_chat(con, components)
	Purple::Connection con 
	SV * components
INIT:
	HV * t_HV;
	HE * t_HE;
	SV * t_SV;
	GHashTable * t_GHash;
	I32 len;
	char *t_key, *t_value;
CODE:
	t_HV =  (HV *)SvRV(components);
	t_GHash = g_hash_table_new(g_str_hash, g_str_equal);

	for (t_HE = hv_iternext(t_HV); t_HE != NULL; t_HE = hv_iternext(t_HV) ) {
		t_key = hv_iterkey(t_HE, &len);
		t_SV = *hv_fetch(t_HV, t_key, len, 0);
 		t_value = SvPV(t_SV, PL_na);

		g_hash_table_insert(t_GHash, t_key, t_value);
	}
	serv_reject_chat(con, t_GHash);

void 
serv_rem_deny(con, a)
	Purple::Connection con
	const char * 	a

void 
serv_rem_permit(con, a)
	Purple::Connection con
	const char *	a

void 
serv_send_file(gc, who, file)
	Purple::Connection gc
	const char *who
	const char *file

int  
serv_send_im(con, a, b, flags )
	Purple::Connection con
	const char * a
	const char * b
	Purple::MessageFlags flags

int  
serv_send_typing(con, a, state)
	Purple::Connection con
	const char * a
	Purple::TypingState state

void 
serv_set_info(con, a)
	Purple::Connection con 
	const char * a

void 
serv_set_permit_deny(con)
	Purple::Connection con