|
1 /* |
|
2 * gabble-media-channel-signals-marshal.c - Source for Gabble service discovery |
|
3 * |
|
4 * Copyright (C) 2006 Collabora Ltd. |
|
5 * |
|
6 * |
|
7 * This library is free software; you can redistribute it and/or |
|
8 * modify it under the terms of the GNU Lesser General Public |
|
9 * License as published by the Free Software Foundation; either |
|
10 * version 2.1 of the License, or (at your option) any later version. |
|
11 * |
|
12 * This library is distributed in the hope that it will be useful, |
|
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
15 * Lesser General Public License for more details. |
|
16 * |
|
17 * You should have received a copy of the GNU Lesser General Public |
|
18 * License along with this library; if not, write to the Free Software |
|
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
|
20 * |
|
21 * -- LET'S DISCO!!! \o/ \o_ _o/ /\o/\ _/o/- -\o\_ -- |
|
22 */ |
|
23 #include <glib-object.h> |
|
24 |
|
25 |
|
26 #ifdef G_ENABLE_DEBUG |
|
27 #define g_marshal_value_peek_boolean(v) g_value_get_boolean (v) |
|
28 #define g_marshal_value_peek_char(v) g_value_get_char (v) |
|
29 #define g_marshal_value_peek_uchar(v) g_value_get_uchar (v) |
|
30 #define g_marshal_value_peek_int(v) g_value_get_int (v) |
|
31 #define g_marshal_value_peek_uint(v) g_value_get_uint (v) |
|
32 #define g_marshal_value_peek_long(v) g_value_get_long (v) |
|
33 #define g_marshal_value_peek_ulong(v) g_value_get_ulong (v) |
|
34 #define g_marshal_value_peek_int64(v) g_value_get_int64 (v) |
|
35 #define g_marshal_value_peek_uint64(v) g_value_get_uint64 (v) |
|
36 #define g_marshal_value_peek_enum(v) g_value_get_enum (v) |
|
37 #define g_marshal_value_peek_flags(v) g_value_get_flags (v) |
|
38 #define g_marshal_value_peek_float(v) g_value_get_float (v) |
|
39 #define g_marshal_value_peek_double(v) g_value_get_double (v) |
|
40 #define g_marshal_value_peek_string(v) (char*) g_value_get_string (v) |
|
41 #define g_marshal_value_peek_param(v) g_value_get_param (v) |
|
42 #define g_marshal_value_peek_boxed(v) g_value_get_boxed (v) |
|
43 #define g_marshal_value_peek_pointer(v) g_value_get_pointer (v) |
|
44 #define g_marshal_value_peek_object(v) g_value_get_object (v) |
|
45 #else /* !G_ENABLE_DEBUG */ |
|
46 /* WARNING: This code accesses GValues directly, which is UNSUPPORTED API. |
|
47 * Do not access GValues directly in your code. Instead, use the |
|
48 * g_value_get_*() functions |
|
49 */ |
|
50 #define g_marshal_value_peek_boolean(v) (v)->data[0].v_int |
|
51 #define g_marshal_value_peek_char(v) (v)->data[0].v_int |
|
52 #define g_marshal_value_peek_uchar(v) (v)->data[0].v_uint |
|
53 #define g_marshal_value_peek_int(v) (v)->data[0].v_int |
|
54 #define g_marshal_value_peek_uint(v) (v)->data[0].v_uint |
|
55 #define g_marshal_value_peek_long(v) (v)->data[0].v_long |
|
56 #define g_marshal_value_peek_ulong(v) (v)->data[0].v_ulong |
|
57 #define g_marshal_value_peek_int64(v) (v)->data[0].v_int64 |
|
58 #define g_marshal_value_peek_uint64(v) (v)->data[0].v_uint64 |
|
59 #define g_marshal_value_peek_enum(v) (v)->data[0].v_long |
|
60 #define g_marshal_value_peek_flags(v) (v)->data[0].v_ulong |
|
61 #define g_marshal_value_peek_float(v) (v)->data[0].v_float |
|
62 #define g_marshal_value_peek_double(v) (v)->data[0].v_double |
|
63 #define g_marshal_value_peek_string(v) (v)->data[0].v_pointer |
|
64 #define g_marshal_value_peek_param(v) (v)->data[0].v_pointer |
|
65 #define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer |
|
66 #define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer |
|
67 #define g_marshal_value_peek_object(v) (v)->data[0].v_pointer |
|
68 #endif /* !G_ENABLE_DEBUG */ |
|
69 |
|
70 |
|
71 /* VOID:UINT,UINT,STRING (gabble-media-channel-signals-marshal.list:1) */ |
|
72 void |
|
73 gabble_media_channel_marshal_VOID__UINT_UINT_STRING (GClosure *closure, |
|
74 GValue *return_value, |
|
75 guint n_param_values, |
|
76 const GValue *param_values, |
|
77 gpointer invocation_hint, |
|
78 gpointer marshal_data) |
|
79 { |
|
80 typedef void (*GMarshalFunc_VOID__UINT_UINT_STRING) (gpointer data1, |
|
81 guint arg_1, |
|
82 guint arg_2, |
|
83 gpointer arg_3, |
|
84 gpointer data2); |
|
85 register GMarshalFunc_VOID__UINT_UINT_STRING callback; |
|
86 register GCClosure *cc = (GCClosure*) closure; |
|
87 register gpointer data1, data2; |
|
88 |
|
89 g_return_if_fail (n_param_values == 4); |
|
90 |
|
91 if (G_CCLOSURE_SWAP_DATA (closure)) |
|
92 { |
|
93 data1 = closure->data; |
|
94 data2 = g_value_peek_pointer (param_values + 0); |
|
95 } |
|
96 else |
|
97 { |
|
98 data1 = g_value_peek_pointer (param_values + 0); |
|
99 data2 = closure->data; |
|
100 } |
|
101 callback = (GMarshalFunc_VOID__UINT_UINT_STRING) (marshal_data ? marshal_data : cc->callback); |
|
102 |
|
103 callback (data1, |
|
104 g_marshal_value_peek_uint (param_values + 1), |
|
105 g_marshal_value_peek_uint (param_values + 2), |
|
106 g_marshal_value_peek_string (param_values + 3), |
|
107 data2); |
|
108 } |
|
109 |
|
110 /* VOID:STRING,STRING (gabble-media-channel-signals-marshal.list:2) */ |
|
111 void |
|
112 gabble_media_channel_marshal_VOID__STRING_STRING (GClosure *closure, |
|
113 GValue *return_value, |
|
114 guint n_param_values, |
|
115 const GValue *param_values, |
|
116 gpointer invocation_hint, |
|
117 gpointer marshal_data) |
|
118 { |
|
119 typedef void (*GMarshalFunc_VOID__STRING_STRING) (gpointer data1, |
|
120 gpointer arg_1, |
|
121 gpointer arg_2, |
|
122 gpointer data2); |
|
123 register GMarshalFunc_VOID__STRING_STRING callback; |
|
124 register GCClosure *cc = (GCClosure*) closure; |
|
125 register gpointer data1, data2; |
|
126 |
|
127 g_return_if_fail (n_param_values == 3); |
|
128 |
|
129 if (G_CCLOSURE_SWAP_DATA (closure)) |
|
130 { |
|
131 data1 = closure->data; |
|
132 data2 = g_value_peek_pointer (param_values + 0); |
|
133 } |
|
134 else |
|
135 { |
|
136 data1 = g_value_peek_pointer (param_values + 0); |
|
137 data2 = closure->data; |
|
138 } |
|
139 callback = (GMarshalFunc_VOID__STRING_STRING) (marshal_data ? marshal_data : cc->callback); |
|
140 |
|
141 callback (data1, |
|
142 g_marshal_value_peek_string (param_values + 1), |
|
143 g_marshal_value_peek_string (param_values + 2), |
|
144 data2); |
|
145 } |
|
146 |
|
147 /* VOID:UINT,UINT (gabble-media-channel-signals-marshal.list:3) */ |
|
148 void |
|
149 gabble_media_channel_marshal_VOID__UINT_UINT (GClosure *closure, |
|
150 GValue *return_value, |
|
151 guint n_param_values, |
|
152 const GValue *param_values, |
|
153 gpointer invocation_hint, |
|
154 gpointer marshal_data) |
|
155 { |
|
156 typedef void (*GMarshalFunc_VOID__UINT_UINT) (gpointer data1, |
|
157 guint arg_1, |
|
158 guint arg_2, |
|
159 gpointer data2); |
|
160 register GMarshalFunc_VOID__UINT_UINT callback; |
|
161 register GCClosure *cc = (GCClosure*) closure; |
|
162 register gpointer data1, data2; |
|
163 |
|
164 g_return_if_fail (n_param_values == 3); |
|
165 |
|
166 if (G_CCLOSURE_SWAP_DATA (closure)) |
|
167 { |
|
168 data1 = closure->data; |
|
169 data2 = g_value_peek_pointer (param_values + 0); |
|
170 } |
|
171 else |
|
172 { |
|
173 data1 = g_value_peek_pointer (param_values + 0); |
|
174 data2 = closure->data; |
|
175 } |
|
176 callback = (GMarshalFunc_VOID__UINT_UINT) (marshal_data ? marshal_data : cc->callback); |
|
177 |
|
178 callback (data1, |
|
179 g_marshal_value_peek_uint (param_values + 1), |
|
180 g_marshal_value_peek_uint (param_values + 2), |
|
181 data2); |
|
182 } |
|
183 |
|
184 /* VOID:UINT,UINT,UINT (gabble-media-channel-signals-marshal.list:4) */ |
|
185 void |
|
186 gabble_media_channel_marshal_VOID__UINT_UINT_UINT (GClosure *closure, |
|
187 GValue *return_value, |
|
188 guint n_param_values, |
|
189 const GValue *param_values, |
|
190 gpointer invocation_hint, |
|
191 gpointer marshal_data) |
|
192 { |
|
193 typedef void (*GMarshalFunc_VOID__UINT_UINT_UINT) (gpointer data1, |
|
194 guint arg_1, |
|
195 guint arg_2, |
|
196 guint arg_3, |
|
197 gpointer data2); |
|
198 register GMarshalFunc_VOID__UINT_UINT_UINT callback; |
|
199 register GCClosure *cc = (GCClosure*) closure; |
|
200 register gpointer data1, data2; |
|
201 |
|
202 g_return_if_fail (n_param_values == 4); |
|
203 |
|
204 if (G_CCLOSURE_SWAP_DATA (closure)) |
|
205 { |
|
206 data1 = closure->data; |
|
207 data2 = g_value_peek_pointer (param_values + 0); |
|
208 } |
|
209 else |
|
210 { |
|
211 data1 = g_value_peek_pointer (param_values + 0); |
|
212 data2 = closure->data; |
|
213 } |
|
214 callback = (GMarshalFunc_VOID__UINT_UINT_UINT) (marshal_data ? marshal_data : cc->callback); |
|
215 |
|
216 callback (data1, |
|
217 g_marshal_value_peek_uint (param_values + 1), |
|
218 g_marshal_value_peek_uint (param_values + 2), |
|
219 g_marshal_value_peek_uint (param_values + 3), |
|
220 data2); |
|
221 } |
|
222 |