|
1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 #include "interfaces-marshal.h" |
|
18 |
|
19 #include <glib-object.h> |
|
20 |
|
21 |
|
22 #ifdef G_ENABLE_DEBUG |
|
23 #define g_marshal_value_peek_boolean(v) g_value_get_boolean (v) |
|
24 #define g_marshal_value_peek_char(v) g_value_get_char (v) |
|
25 #define g_marshal_value_peek_uchar(v) g_value_get_uchar (v) |
|
26 #define g_marshal_value_peek_int(v) g_value_get_int (v) |
|
27 #define g_marshal_value_peek_uint(v) g_value_get_uint (v) |
|
28 #define g_marshal_value_peek_long(v) g_value_get_long (v) |
|
29 #define g_marshal_value_peek_ulong(v) g_value_get_ulong (v) |
|
30 #define g_marshal_value_peek_int64(v) g_value_get_int64 (v) |
|
31 #define g_marshal_value_peek_uint64(v) g_value_get_uint64 (v) |
|
32 #define g_marshal_value_peek_enum(v) g_value_get_enum (v) |
|
33 #define g_marshal_value_peek_flags(v) g_value_get_flags (v) |
|
34 #define g_marshal_value_peek_float(v) g_value_get_float (v) |
|
35 #define g_marshal_value_peek_double(v) g_value_get_double (v) |
|
36 #define g_marshal_value_peek_string(v) (char*) g_value_get_string (v) |
|
37 #define g_marshal_value_peek_param(v) g_value_get_param (v) |
|
38 #define g_marshal_value_peek_boxed(v) g_value_get_boxed (v) |
|
39 #define g_marshal_value_peek_pointer(v) g_value_get_pointer (v) |
|
40 #define g_marshal_value_peek_object(v) g_value_get_object (v) |
|
41 #else /* !G_ENABLE_DEBUG */ |
|
42 /* WARNING: This code accesses GValues directly, which is UNSUPPORTED API. |
|
43 * Do not access GValues directly in your code. Instead, use the |
|
44 * g_value_get_*() functions |
|
45 */ |
|
46 #define g_marshal_value_peek_boolean(v) (v)->data[0].v_int |
|
47 #define g_marshal_value_peek_char(v) (v)->data[0].v_int |
|
48 #define g_marshal_value_peek_uchar(v) (v)->data[0].v_uint |
|
49 #define g_marshal_value_peek_int(v) (v)->data[0].v_int |
|
50 #define g_marshal_value_peek_uint(v) (v)->data[0].v_uint |
|
51 #define g_marshal_value_peek_long(v) (v)->data[0].v_long |
|
52 #define g_marshal_value_peek_ulong(v) (v)->data[0].v_ulong |
|
53 #define g_marshal_value_peek_int64(v) (v)->data[0].v_int64 |
|
54 #define g_marshal_value_peek_uint64(v) (v)->data[0].v_uint64 |
|
55 #define g_marshal_value_peek_enum(v) (v)->data[0].v_long |
|
56 #define g_marshal_value_peek_flags(v) (v)->data[0].v_ulong |
|
57 #define g_marshal_value_peek_float(v) (v)->data[0].v_float |
|
58 #define g_marshal_value_peek_double(v) (v)->data[0].v_double |
|
59 #define g_marshal_value_peek_string(v) (v)->data[0].v_pointer |
|
60 #define g_marshal_value_peek_param(v) (v)->data[0].v_pointer |
|
61 #define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer |
|
62 #define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer |
|
63 #define g_marshal_value_peek_object(v) (v)->data[0].v_pointer |
|
64 #endif /* !G_ENABLE_DEBUG */ |
|
65 |
|
66 |
|
67 /* VOID:OBJECT,BOOLEAN (interfaces-marshal.list:1) */ |
|
68 #ifdef __SYMBIAN32__ |
|
69 EXPORT_C |
|
70 #endif |
|
71 |
|
72 void |
|
73 gst_interfaces_marshal_VOID__OBJECT_BOOLEAN (GClosure *closure, |
|
74 GValue *return_value G_GNUC_UNUSED, |
|
75 guint n_param_values, |
|
76 const GValue *param_values, |
|
77 gpointer invocation_hint G_GNUC_UNUSED, |
|
78 gpointer marshal_data) |
|
79 { |
|
80 typedef void (*GMarshalFunc_VOID__OBJECT_BOOLEAN) (gpointer data1, |
|
81 gpointer arg_1, |
|
82 gboolean arg_2, |
|
83 gpointer data2); |
|
84 register GMarshalFunc_VOID__OBJECT_BOOLEAN callback; |
|
85 register GCClosure *cc = (GCClosure*) closure; |
|
86 register gpointer data1, data2; |
|
87 |
|
88 g_return_if_fail (n_param_values == 3); |
|
89 |
|
90 if (G_CCLOSURE_SWAP_DATA (closure)) |
|
91 { |
|
92 data1 = closure->data; |
|
93 data2 = g_value_peek_pointer (param_values + 0); |
|
94 } |
|
95 else |
|
96 { |
|
97 data1 = g_value_peek_pointer (param_values + 0); |
|
98 data2 = closure->data; |
|
99 } |
|
100 callback = (GMarshalFunc_VOID__OBJECT_BOOLEAN) (marshal_data ? marshal_data : cc->callback); |
|
101 |
|
102 callback (data1, |
|
103 g_marshal_value_peek_object (param_values + 1), |
|
104 g_marshal_value_peek_boolean (param_values + 2), |
|
105 data2); |
|
106 } |
|
107 |
|
108 /* VOID:OBJECT,POINTER (interfaces-marshal.list:2) */ |
|
109 #ifdef __SYMBIAN32__ |
|
110 EXPORT_C |
|
111 #endif |
|
112 |
|
113 void |
|
114 gst_interfaces_marshal_VOID__OBJECT_POINTER (GClosure *closure, |
|
115 GValue *return_value G_GNUC_UNUSED, |
|
116 guint n_param_values, |
|
117 const GValue *param_values, |
|
118 gpointer invocation_hint G_GNUC_UNUSED, |
|
119 gpointer marshal_data) |
|
120 { |
|
121 typedef void (*GMarshalFunc_VOID__OBJECT_POINTER) (gpointer data1, |
|
122 gpointer arg_1, |
|
123 gpointer arg_2, |
|
124 gpointer data2); |
|
125 register GMarshalFunc_VOID__OBJECT_POINTER callback; |
|
126 register GCClosure *cc = (GCClosure*) closure; |
|
127 register gpointer data1, data2; |
|
128 |
|
129 g_return_if_fail (n_param_values == 3); |
|
130 |
|
131 if (G_CCLOSURE_SWAP_DATA (closure)) |
|
132 { |
|
133 data1 = closure->data; |
|
134 data2 = g_value_peek_pointer (param_values + 0); |
|
135 } |
|
136 else |
|
137 { |
|
138 data1 = g_value_peek_pointer (param_values + 0); |
|
139 data2 = closure->data; |
|
140 } |
|
141 callback = (GMarshalFunc_VOID__OBJECT_POINTER) (marshal_data ? marshal_data : cc->callback); |
|
142 |
|
143 callback (data1, |
|
144 g_marshal_value_peek_object (param_values + 1), |
|
145 g_marshal_value_peek_pointer (param_values + 2), |
|
146 data2); |
|
147 } |
|
148 |
|
149 /* VOID:OBJECT,STRING (interfaces-marshal.list:3) */ |
|
150 #ifdef __SYMBIAN32__ |
|
151 EXPORT_C |
|
152 #endif |
|
153 |
|
154 void |
|
155 gst_interfaces_marshal_VOID__OBJECT_STRING (GClosure *closure, |
|
156 GValue *return_value G_GNUC_UNUSED, |
|
157 guint n_param_values, |
|
158 const GValue *param_values, |
|
159 gpointer invocation_hint G_GNUC_UNUSED, |
|
160 gpointer marshal_data) |
|
161 { |
|
162 typedef void (*GMarshalFunc_VOID__OBJECT_STRING) (gpointer data1, |
|
163 gpointer arg_1, |
|
164 gpointer arg_2, |
|
165 gpointer data2); |
|
166 register GMarshalFunc_VOID__OBJECT_STRING callback; |
|
167 register GCClosure *cc = (GCClosure*) closure; |
|
168 register gpointer data1, data2; |
|
169 |
|
170 g_return_if_fail (n_param_values == 3); |
|
171 |
|
172 if (G_CCLOSURE_SWAP_DATA (closure)) |
|
173 { |
|
174 data1 = closure->data; |
|
175 data2 = g_value_peek_pointer (param_values + 0); |
|
176 } |
|
177 else |
|
178 { |
|
179 data1 = g_value_peek_pointer (param_values + 0); |
|
180 data2 = closure->data; |
|
181 } |
|
182 callback = (GMarshalFunc_VOID__OBJECT_STRING) (marshal_data ? marshal_data : cc->callback); |
|
183 |
|
184 callback (data1, |
|
185 g_marshal_value_peek_object (param_values + 1), |
|
186 g_marshal_value_peek_string (param_values + 2), |
|
187 data2); |
|
188 } |
|
189 |
|
190 /* VOID:OBJECT,ULONG (interfaces-marshal.list:4) */ |
|
191 #ifdef __SYMBIAN32__ |
|
192 EXPORT_C |
|
193 #endif |
|
194 |
|
195 void |
|
196 gst_interfaces_marshal_VOID__OBJECT_ULONG (GClosure *closure, |
|
197 GValue *return_value G_GNUC_UNUSED, |
|
198 guint n_param_values, |
|
199 const GValue *param_values, |
|
200 gpointer invocation_hint G_GNUC_UNUSED, |
|
201 gpointer marshal_data) |
|
202 { |
|
203 typedef void (*GMarshalFunc_VOID__OBJECT_ULONG) (gpointer data1, |
|
204 gpointer arg_1, |
|
205 gulong arg_2, |
|
206 gpointer data2); |
|
207 register GMarshalFunc_VOID__OBJECT_ULONG callback; |
|
208 register GCClosure *cc = (GCClosure*) closure; |
|
209 register gpointer data1, data2; |
|
210 |
|
211 g_return_if_fail (n_param_values == 3); |
|
212 |
|
213 if (G_CCLOSURE_SWAP_DATA (closure)) |
|
214 { |
|
215 data1 = closure->data; |
|
216 data2 = g_value_peek_pointer (param_values + 0); |
|
217 } |
|
218 else |
|
219 { |
|
220 data1 = g_value_peek_pointer (param_values + 0); |
|
221 data2 = closure->data; |
|
222 } |
|
223 callback = (GMarshalFunc_VOID__OBJECT_ULONG) (marshal_data ? marshal_data : cc->callback); |
|
224 |
|
225 callback (data1, |
|
226 g_marshal_value_peek_object (param_values + 1), |
|
227 g_marshal_value_peek_ulong (param_values + 2), |
|
228 data2); |
|
229 } |
|
230 |
|
231 /* VOID:OBJECT,INT (interfaces-marshal.list:5) */ |
|
232 #ifdef __SYMBIAN32__ |
|
233 EXPORT_C |
|
234 #endif |
|
235 |
|
236 void |
|
237 gst_interfaces_marshal_VOID__OBJECT_INT (GClosure *closure, |
|
238 GValue *return_value G_GNUC_UNUSED, |
|
239 guint n_param_values, |
|
240 const GValue *param_values, |
|
241 gpointer invocation_hint G_GNUC_UNUSED, |
|
242 gpointer marshal_data) |
|
243 { |
|
244 typedef void (*GMarshalFunc_VOID__OBJECT_INT) (gpointer data1, |
|
245 gpointer arg_1, |
|
246 gint arg_2, |
|
247 gpointer data2); |
|
248 register GMarshalFunc_VOID__OBJECT_INT callback; |
|
249 register GCClosure *cc = (GCClosure*) closure; |
|
250 register gpointer data1, data2; |
|
251 |
|
252 g_return_if_fail (n_param_values == 3); |
|
253 |
|
254 if (G_CCLOSURE_SWAP_DATA (closure)) |
|
255 { |
|
256 data1 = closure->data; |
|
257 data2 = g_value_peek_pointer (param_values + 0); |
|
258 } |
|
259 else |
|
260 { |
|
261 data1 = g_value_peek_pointer (param_values + 0); |
|
262 data2 = closure->data; |
|
263 } |
|
264 callback = (GMarshalFunc_VOID__OBJECT_INT) (marshal_data ? marshal_data : cc->callback); |
|
265 |
|
266 callback (data1, |
|
267 g_marshal_value_peek_object (param_values + 1), |
|
268 g_marshal_value_peek_int (param_values + 2), |
|
269 data2); |
|
270 } |
|
271 |