The data contained in this repository can be downloaded to your computer using one of several clients.
Please see the documentation of your version control software client for more information.
Please select the desired protocol below to get the URL.
This URL has Read-Only access.
main_repo / libpurple / marshallers.c @ a274da4f
History | View | Annotate | Download (15.9 KB)
1 |
#include "marshallers.h" |
---|---|
2 |
|
3 |
#include <glib-object.h> |
4 |
|
5 |
|
6 |
#ifdef G_ENABLE_DEBUG
|
7 |
#define g_marshal_value_peek_boolean(v) g_value_get_boolean (v)
|
8 |
#define g_marshal_value_peek_char(v) g_value_get_schar (v)
|
9 |
#define g_marshal_value_peek_uchar(v) g_value_get_uchar (v)
|
10 |
#define g_marshal_value_peek_int(v) g_value_get_int (v)
|
11 |
#define g_marshal_value_peek_uint(v) g_value_get_uint (v)
|
12 |
#define g_marshal_value_peek_long(v) g_value_get_long (v)
|
13 |
#define g_marshal_value_peek_ulong(v) g_value_get_ulong (v)
|
14 |
#define g_marshal_value_peek_int64(v) g_value_get_int64 (v)
|
15 |
#define g_marshal_value_peek_uint64(v) g_value_get_uint64 (v)
|
16 |
#define g_marshal_value_peek_enum(v) g_value_get_enum (v)
|
17 |
#define g_marshal_value_peek_flags(v) g_value_get_flags (v)
|
18 |
#define g_marshal_value_peek_float(v) g_value_get_float (v)
|
19 |
#define g_marshal_value_peek_double(v) g_value_get_double (v)
|
20 |
#define g_marshal_value_peek_string(v) (char*) g_value_get_string (v) |
21 |
#define g_marshal_value_peek_param(v) g_value_get_param (v)
|
22 |
#define g_marshal_value_peek_boxed(v) g_value_get_boxed (v)
|
23 |
#define g_marshal_value_peek_pointer(v) g_value_get_pointer (v)
|
24 |
#define g_marshal_value_peek_object(v) g_value_get_object (v)
|
25 |
#define g_marshal_value_peek_variant(v) g_value_get_variant (v)
|
26 |
#else /* !G_ENABLE_DEBUG */ |
27 |
/* WARNING: This code accesses GValues directly, which is UNSUPPORTED API.
|
28 |
* Do not access GValues directly in your code. Instead, use the
|
29 |
* g_value_get_*() functions
|
30 |
*/
|
31 |
#define g_marshal_value_peek_boolean(v) (v)->data[0].v_int |
32 |
#define g_marshal_value_peek_char(v) (v)->data[0].v_int |
33 |
#define g_marshal_value_peek_uchar(v) (v)->data[0].v_uint |
34 |
#define g_marshal_value_peek_int(v) (v)->data[0].v_int |
35 |
#define g_marshal_value_peek_uint(v) (v)->data[0].v_uint |
36 |
#define g_marshal_value_peek_long(v) (v)->data[0].v_long |
37 |
#define g_marshal_value_peek_ulong(v) (v)->data[0].v_ulong |
38 |
#define g_marshal_value_peek_int64(v) (v)->data[0].v_int64 |
39 |
#define g_marshal_value_peek_uint64(v) (v)->data[0].v_uint64 |
40 |
#define g_marshal_value_peek_enum(v) (v)->data[0].v_long |
41 |
#define g_marshal_value_peek_flags(v) (v)->data[0].v_ulong |
42 |
#define g_marshal_value_peek_float(v) (v)->data[0].v_float |
43 |
#define g_marshal_value_peek_double(v) (v)->data[0].v_double |
44 |
#define g_marshal_value_peek_string(v) (v)->data[0].v_pointer |
45 |
#define g_marshal_value_peek_param(v) (v)->data[0].v_pointer |
46 |
#define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer |
47 |
#define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer |
48 |
#define g_marshal_value_peek_object(v) (v)->data[0].v_pointer |
49 |
#define g_marshal_value_peek_variant(v) (v)->data[0].v_pointer |
50 |
#endif /* !G_ENABLE_DEBUG */ |
51 |
|
52 |
|
53 |
/* VOID:POINTER,POINTER,OBJECT (./marshallers.list:1) */
|
54 |
void
|
55 |
purple_smarshal_VOID__POINTER_POINTER_OBJECT (GClosure *closure, |
56 |
GValue *return_value G_GNUC_UNUSED, |
57 |
guint n_param_values, |
58 |
const GValue *param_values,
|
59 |
gpointer invocation_hint G_GNUC_UNUSED, |
60 |
gpointer marshal_data) |
61 |
{ |
62 |
typedef void (*GMarshalFunc_VOID__POINTER_POINTER_OBJECT) (gpointer data1, |
63 |
gpointer arg_1, |
64 |
gpointer arg_2, |
65 |
gpointer arg_3, |
66 |
gpointer data2); |
67 |
register GMarshalFunc_VOID__POINTER_POINTER_OBJECT callback;
|
68 |
register GCClosure *cc = (GCClosure*) closure;
|
69 |
register gpointer data1, data2;
|
70 |
|
71 |
g_return_if_fail (n_param_values == 4);
|
72 |
|
73 |
if (G_CCLOSURE_SWAP_DATA (closure))
|
74 |
{ |
75 |
data1 = closure->data; |
76 |
data2 = g_value_peek_pointer (param_values + 0);
|
77 |
} |
78 |
else
|
79 |
{ |
80 |
data1 = g_value_peek_pointer (param_values + 0);
|
81 |
data2 = closure->data; |
82 |
} |
83 |
callback = (GMarshalFunc_VOID__POINTER_POINTER_OBJECT) (marshal_data ? marshal_data : cc->callback); |
84 |
|
85 |
callback (data1, |
86 |
g_marshal_value_peek_pointer (param_values + 1),
|
87 |
g_marshal_value_peek_pointer (param_values + 2),
|
88 |
g_marshal_value_peek_object (param_values + 3),
|
89 |
data2); |
90 |
} |
91 |
|
92 |
/* BOOLEAN:OBJECT,POINTER,STRING (./marshallers.list:2) */
|
93 |
void
|
94 |
purple_smarshal_BOOLEAN__OBJECT_POINTER_STRING (GClosure *closure, |
95 |
GValue *return_value G_GNUC_UNUSED, |
96 |
guint n_param_values, |
97 |
const GValue *param_values,
|
98 |
gpointer invocation_hint G_GNUC_UNUSED, |
99 |
gpointer marshal_data) |
100 |
{ |
101 |
typedef gboolean (*GMarshalFunc_BOOLEAN__OBJECT_POINTER_STRING) (gpointer data1,
|
102 |
gpointer arg_1, |
103 |
gpointer arg_2, |
104 |
gpointer arg_3, |
105 |
gpointer data2); |
106 |
register GMarshalFunc_BOOLEAN__OBJECT_POINTER_STRING callback;
|
107 |
register GCClosure *cc = (GCClosure*) closure;
|
108 |
register gpointer data1, data2;
|
109 |
gboolean v_return; |
110 |
|
111 |
g_return_if_fail (return_value != NULL);
|
112 |
g_return_if_fail (n_param_values == 4);
|
113 |
|
114 |
if (G_CCLOSURE_SWAP_DATA (closure))
|
115 |
{ |
116 |
data1 = closure->data; |
117 |
data2 = g_value_peek_pointer (param_values + 0);
|
118 |
} |
119 |
else
|
120 |
{ |
121 |
data1 = g_value_peek_pointer (param_values + 0);
|
122 |
data2 = closure->data; |
123 |
} |
124 |
callback = (GMarshalFunc_BOOLEAN__OBJECT_POINTER_STRING) (marshal_data ? marshal_data : cc->callback); |
125 |
|
126 |
v_return = callback (data1, |
127 |
g_marshal_value_peek_object (param_values + 1),
|
128 |
g_marshal_value_peek_pointer (param_values + 2),
|
129 |
g_marshal_value_peek_string (param_values + 3),
|
130 |
data2); |
131 |
|
132 |
g_value_set_boolean (return_value, v_return); |
133 |
} |
134 |
|
135 |
/* VOID:STRING,STRING (./marshallers.list:3) */
|
136 |
void
|
137 |
purple_smarshal_VOID__STRING_STRING (GClosure *closure, |
138 |
GValue *return_value G_GNUC_UNUSED, |
139 |
guint n_param_values, |
140 |
const GValue *param_values,
|
141 |
gpointer invocation_hint G_GNUC_UNUSED, |
142 |
gpointer marshal_data) |
143 |
{ |
144 |
typedef void (*GMarshalFunc_VOID__STRING_STRING) (gpointer data1, |
145 |
gpointer arg_1, |
146 |
gpointer arg_2, |
147 |
gpointer data2); |
148 |
register GMarshalFunc_VOID__STRING_STRING callback;
|
149 |
register GCClosure *cc = (GCClosure*) closure;
|
150 |
register gpointer data1, data2;
|
151 |
|
152 |
g_return_if_fail (n_param_values == 3);
|
153 |
|
154 |
if (G_CCLOSURE_SWAP_DATA (closure))
|
155 |
{ |
156 |
data1 = closure->data; |
157 |
data2 = g_value_peek_pointer (param_values + 0);
|
158 |
} |
159 |
else
|
160 |
{ |
161 |
data1 = g_value_peek_pointer (param_values + 0);
|
162 |
data2 = closure->data; |
163 |
} |
164 |
callback = (GMarshalFunc_VOID__STRING_STRING) (marshal_data ? marshal_data : cc->callback); |
165 |
|
166 |
callback (data1, |
167 |
g_marshal_value_peek_string (param_values + 1),
|
168 |
g_marshal_value_peek_string (param_values + 2),
|
169 |
data2); |
170 |
} |
171 |
|
172 |
/* VOID:STRING,STRING,DOUBLE (./marshallers.list:4) */
|
173 |
void
|
174 |
purple_smarshal_VOID__STRING_STRING_DOUBLE (GClosure *closure, |
175 |
GValue *return_value G_GNUC_UNUSED, |
176 |
guint n_param_values, |
177 |
const GValue *param_values,
|
178 |
gpointer invocation_hint G_GNUC_UNUSED, |
179 |
gpointer marshal_data) |
180 |
{ |
181 |
typedef void (*GMarshalFunc_VOID__STRING_STRING_DOUBLE) (gpointer data1, |
182 |
gpointer arg_1, |
183 |
gpointer arg_2, |
184 |
gdouble arg_3, |
185 |
gpointer data2); |
186 |
register GMarshalFunc_VOID__STRING_STRING_DOUBLE callback;
|
187 |
register GCClosure *cc = (GCClosure*) closure;
|
188 |
register gpointer data1, data2;
|
189 |
|
190 |
g_return_if_fail (n_param_values == 4);
|
191 |
|
192 |
if (G_CCLOSURE_SWAP_DATA (closure))
|
193 |
{ |
194 |
data1 = closure->data; |
195 |
data2 = g_value_peek_pointer (param_values + 0);
|
196 |
} |
197 |
else
|
198 |
{ |
199 |
data1 = g_value_peek_pointer (param_values + 0);
|
200 |
data2 = closure->data; |
201 |
} |
202 |
callback = (GMarshalFunc_VOID__STRING_STRING_DOUBLE) (marshal_data ? marshal_data : cc->callback); |
203 |
|
204 |
callback (data1, |
205 |
g_marshal_value_peek_string (param_values + 1),
|
206 |
g_marshal_value_peek_string (param_values + 2),
|
207 |
g_marshal_value_peek_double (param_values + 3),
|
208 |
data2); |
209 |
} |
210 |
|
211 |
/* VOID:ENUM,STRING,STRING (./marshallers.list:5) */
|
212 |
void
|
213 |
purple_smarshal_VOID__ENUM_STRING_STRING (GClosure *closure, |
214 |
GValue *return_value G_GNUC_UNUSED, |
215 |
guint n_param_values, |
216 |
const GValue *param_values,
|
217 |
gpointer invocation_hint G_GNUC_UNUSED, |
218 |
gpointer marshal_data) |
219 |
{ |
220 |
typedef void (*GMarshalFunc_VOID__ENUM_STRING_STRING) (gpointer data1, |
221 |
gint arg_1, |
222 |
gpointer arg_2, |
223 |
gpointer arg_3, |
224 |
gpointer data2); |
225 |
register GMarshalFunc_VOID__ENUM_STRING_STRING callback;
|
226 |
register GCClosure *cc = (GCClosure*) closure;
|
227 |
register gpointer data1, data2;
|
228 |
|
229 |
g_return_if_fail (n_param_values == 4);
|
230 |
|
231 |
if (G_CCLOSURE_SWAP_DATA (closure))
|
232 |
{ |
233 |
data1 = closure->data; |
234 |
data2 = g_value_peek_pointer (param_values + 0);
|
235 |
} |
236 |
else
|
237 |
{ |
238 |
data1 = g_value_peek_pointer (param_values + 0);
|
239 |
data2 = closure->data; |
240 |
} |
241 |
callback = (GMarshalFunc_VOID__ENUM_STRING_STRING) (marshal_data ? marshal_data : cc->callback); |
242 |
|
243 |
callback (data1, |
244 |
g_marshal_value_peek_enum (param_values + 1),
|
245 |
g_marshal_value_peek_string (param_values + 2),
|
246 |
g_marshal_value_peek_string (param_values + 3),
|
247 |
data2); |
248 |
} |
249 |
|
250 |
/* VOID:ENUM,STRING,STRING,BOOLEAN (./marshallers.list:6) */
|
251 |
void
|
252 |
purple_smarshal_VOID__ENUM_STRING_STRING_BOOLEAN (GClosure *closure, |
253 |
GValue *return_value G_GNUC_UNUSED, |
254 |
guint n_param_values, |
255 |
const GValue *param_values,
|
256 |
gpointer invocation_hint G_GNUC_UNUSED, |
257 |
gpointer marshal_data) |
258 |
{ |
259 |
typedef void (*GMarshalFunc_VOID__ENUM_STRING_STRING_BOOLEAN) (gpointer data1, |
260 |
gint arg_1, |
261 |
gpointer arg_2, |
262 |
gpointer arg_3, |
263 |
gboolean arg_4, |
264 |
gpointer data2); |
265 |
register GMarshalFunc_VOID__ENUM_STRING_STRING_BOOLEAN callback;
|
266 |
register GCClosure *cc = (GCClosure*) closure;
|
267 |
register gpointer data1, data2;
|
268 |
|
269 |
g_return_if_fail (n_param_values == 5);
|
270 |
|
271 |
if (G_CCLOSURE_SWAP_DATA (closure))
|
272 |
{ |
273 |
data1 = closure->data; |
274 |
data2 = g_value_peek_pointer (param_values + 0);
|
275 |
} |
276 |
else
|
277 |
{ |
278 |
data1 = g_value_peek_pointer (param_values + 0);
|
279 |
data2 = closure->data; |
280 |
} |
281 |
callback = (GMarshalFunc_VOID__ENUM_STRING_STRING_BOOLEAN) (marshal_data ? marshal_data : cc->callback); |
282 |
|
283 |
callback (data1, |
284 |
g_marshal_value_peek_enum (param_values + 1),
|
285 |
g_marshal_value_peek_string (param_values + 2),
|
286 |
g_marshal_value_peek_string (param_values + 3),
|
287 |
g_marshal_value_peek_boolean (param_values + 4),
|
288 |
data2); |
289 |
} |
290 |
|
291 |
/* VOID:FLAGS,FLAGS (./marshallers.list:7) */
|
292 |
void
|
293 |
purple_smarshal_VOID__FLAGS_FLAGS (GClosure *closure, |
294 |
GValue *return_value G_GNUC_UNUSED, |
295 |
guint n_param_values, |
296 |
const GValue *param_values,
|
297 |
gpointer invocation_hint G_GNUC_UNUSED, |
298 |
gpointer marshal_data) |
299 |
{ |
300 |
typedef void (*GMarshalFunc_VOID__FLAGS_FLAGS) (gpointer data1, |
301 |
guint arg_1, |
302 |
guint arg_2, |
303 |
gpointer data2); |
304 |
register GMarshalFunc_VOID__FLAGS_FLAGS callback;
|
305 |
register GCClosure *cc = (GCClosure*) closure;
|
306 |
register gpointer data1, data2;
|
307 |
|
308 |
g_return_if_fail (n_param_values == 3);
|
309 |
|
310 |
if (G_CCLOSURE_SWAP_DATA (closure))
|
311 |
{ |
312 |
data1 = closure->data; |
313 |
data2 = g_value_peek_pointer (param_values + 0);
|
314 |
} |
315 |
else
|
316 |
{ |
317 |
data1 = g_value_peek_pointer (param_values + 0);
|
318 |
data2 = closure->data; |
319 |
} |
320 |
callback = (GMarshalFunc_VOID__FLAGS_FLAGS) (marshal_data ? marshal_data : cc->callback); |
321 |
|
322 |
callback (data1, |
323 |
g_marshal_value_peek_flags (param_values + 1),
|
324 |
g_marshal_value_peek_flags (param_values + 2),
|
325 |
data2); |
326 |
} |
327 |
|
328 |
/* VOID:STRING,STRING,OBJECT,OBJECT (./marshallers.list:8) */
|
329 |
void
|
330 |
purple_smarshal_VOID__STRING_STRING_OBJECT_OBJECT (GClosure *closure, |
331 |
GValue *return_value G_GNUC_UNUSED, |
332 |
guint n_param_values, |
333 |
const GValue *param_values,
|
334 |
gpointer invocation_hint G_GNUC_UNUSED, |
335 |
gpointer marshal_data) |
336 |
{ |
337 |
typedef void (*GMarshalFunc_VOID__STRING_STRING_OBJECT_OBJECT) (gpointer data1, |
338 |
gpointer arg_1, |
339 |
gpointer arg_2, |
340 |
gpointer arg_3, |
341 |
gpointer arg_4, |
342 |
gpointer data2); |
343 |
register GMarshalFunc_VOID__STRING_STRING_OBJECT_OBJECT callback;
|
344 |
register GCClosure *cc = (GCClosure*) closure;
|
345 |
register gpointer data1, data2;
|
346 |
|
347 |
g_return_if_fail (n_param_values == 5);
|
348 |
|
349 |
if (G_CCLOSURE_SWAP_DATA (closure))
|
350 |
{ |
351 |
data1 = closure->data; |
352 |
data2 = g_value_peek_pointer (param_values + 0);
|
353 |
} |
354 |
else
|
355 |
{ |
356 |
data1 = g_value_peek_pointer (param_values + 0);
|
357 |
data2 = closure->data; |
358 |
} |
359 |
callback = (GMarshalFunc_VOID__STRING_STRING_OBJECT_OBJECT) (marshal_data ? marshal_data : cc->callback); |
360 |
|
361 |
callback (data1, |
362 |
g_marshal_value_peek_string (param_values + 1),
|
363 |
g_marshal_value_peek_string (param_values + 2),
|
364 |
g_marshal_value_peek_object (param_values + 3),
|
365 |
g_marshal_value_peek_object (param_values + 4),
|
366 |
data2); |
367 |
} |
368 |
|