Debian Codegraph @

Dbus/src/applet-marshallers.c

raw
1 /**
2 * This file is a part of the Cairo-Dock project
3 *
4 * Copyright : (C) see the 'copyright' file.
5 * E-mail : see the 'copyright' file.
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 3
10 * of the License, or (at your option) any later version.
11 *
12 * This program 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
15 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20 #include <unistd.h>
21 #include <glib.h>
22 #include <dbus/dbus-glib.h>
23 #include <dbus/dbus-glib-bindings.h>
24
25 #include "interface-main-methods.h"
26
27 #include "dbus-main-spec.h"
28 #include "applet-marshallers.h"
29
30 void cd_dbus_marshal_VOID__INT_STRING (GClosure *closure,
31 GValue *return_value G_GNUC_UNUSED,
32 guint n_param_values,
33 const GValue *param_values,
34 gpointer invocation_hint G_GNUC_UNUSED,
35 gpointer marshal_data)
36 {
37 //g_print ("%s ()\n", __func__);
38 typedef void (*GMarshalFunc_VOID__INT_STRING) (gpointer data1,
39 gint arg_1,
40 gchar *arg_2,
41 gpointer data2);
42 register GMarshalFunc_VOID__INT_STRING callback;
43 register GCClosure *cc = (GCClosure*) closure;
44 register gpointer data1, data2;
45 g_return_if_fail (n_param_values == 3); // return_value est NULL ici, car la callback ne renvoit rien.
46
47 if (G_CCLOSURE_SWAP_DATA (closure))
48 {
49 data1 = closure->data;
50 data2 = g_value_peek_pointer (param_values + 0);
51 }
52 else
53 {
54 data1 = g_value_peek_pointer (param_values + 0);
55 data2 = closure->data;
56 }
57 callback = (GMarshalFunc_VOID__INT_STRING) (marshal_data ? marshal_data : cc->callback);
58
59 callback (data1,
60 g_marshal_value_peek_int (param_values + 1),
61 g_marshal_value_peek_string (param_values + 2),
62 data2);
63 }
64 void cd_dbus_marshal_VOID__BOOLEAN_STRING (GClosure *closure,
65 GValue *return_value G_GNUC_UNUSED,
66 guint n_param_values,
67 const GValue *param_values,
68 gpointer invocation_hint G_GNUC_UNUSED,
69 gpointer marshal_data)
70 {
71 //g_print ("%s ()\n", __func__);
72 typedef void (*GMarshalFunc_VOID__BOOLEAN_STRING) (gpointer data1,
73 gboolean arg_1,
74 gchar *arg_2,
75 gpointer data2);
76 register GMarshalFunc_VOID__BOOLEAN_STRING callback;
77 register GCClosure *cc = (GCClosure*) closure;
78 register gpointer data1, data2;
79 g_return_if_fail (n_param_values == 3); // return_value est NULL ici, car la callback ne renvoit rien.
80
81 if (G_CCLOSURE_SWAP_DATA (closure))
82 {
83 data1 = closure->data;
84 data2 = g_value_peek_pointer (param_values + 0);
85 }
86 else
87 {
88 data1 = g_value_peek_pointer (param_values + 0);
89 data2 = closure->data;
90 }
91 callback = (GMarshalFunc_VOID__BOOLEAN_STRING) (marshal_data ? marshal_data : cc->callback);
92
93 callback (data1,
94 g_marshal_value_peek_boolean (param_values + 1),
95 g_marshal_value_peek_string (param_values + 2),
96 data2);
97 }
98 void cd_dbus_marshal_VOID__STRING_STRING (GClosure *closure,
99 GValue *return_value G_GNUC_UNUSED,
100 guint n_param_values,
101 const GValue *param_values,
102 gpointer invocation_hint G_GNUC_UNUSED,
103 gpointer marshal_data)
104 {
105 //g_print ("%s ()\n", __func__);
106 typedef void (*GMarshalFunc_VOID__STRING_STRING) (gpointer data1,
107 gchar *arg_1,
108 gchar *arg_2,
109 gpointer data2);
110 register GMarshalFunc_VOID__STRING_STRING callback;
111 register GCClosure *cc = (GCClosure*) closure;
112 register gpointer data1, data2;
113 g_return_if_fail (n_param_values == 3); // return_value est NULL ici, car la callback ne renvoit rien.
114
115 if (G_CCLOSURE_SWAP_DATA (closure))
116 {
117 data1 = closure->data;
118 data2 = g_value_peek_pointer (param_values + 0);
119 }
120 else
121 {
122 data1 = g_value_peek_pointer (param_values + 0);
123 data2 = closure->data;
124 }
125 callback = (GMarshalFunc_VOID__STRING_STRING) (marshal_data ? marshal_data : cc->callback);
126
127 callback (data1,
128 g_marshal_value_peek_string (param_values + 1),
129 g_marshal_value_peek_string (param_values + 2),
130 data2);
131 }
132 void cd_dbus_marshal_VOID__VALUE (GClosure *closure,
133 GValue *return_value G_GNUC_UNUSED,
134 guint n_param_values,
135 const GValue *param_values,
136 gpointer invocation_hint G_GNUC_UNUSED,
137 gpointer marshal_data)
138 {
139 //g_print ("%s ()\n", __func__);
140 typedef void (*GMarshalFunc_VOID__VALUE) (gpointer data1,
141 GValue *arg_1,
142 gpointer data2);
143 register GMarshalFunc_VOID__VALUE callback;
144 register GCClosure *cc = (GCClosure*) closure;
145 register gpointer data1, data2;
146 g_return_if_fail (n_param_values == 2); // return_value est NULL ici, car la callback ne renvoit rien.
147
148 if (G_CCLOSURE_SWAP_DATA (closure))
149 {
150 data1 = closure->data;
151 data2 = g_value_peek_pointer (param_values + 0);
152 }
153 else
154 {
155 data1 = g_value_peek_pointer (param_values + 0);
156 data2 = closure->data;
157 }
158 callback = (GMarshalFunc_VOID__VALUE) (marshal_data ? marshal_data : cc->callback);
159
160 callback (data1,
161 g_marshal_value_peek_pointer (param_values + 1),
162 data2);
163 }
164 void cd_dbus_marshal_VOID__INT_VALUE (GClosure *closure,
165 GValue *return_value G_GNUC_UNUSED,
166 guint n_param_values,
167 const GValue *param_values,
168 gpointer invocation_hint G_GNUC_UNUSED,
169 gpointer marshal_data)
170 {
171 //g_print ("%s ()\n", __func__);
172 typedef void (*GMarshalFunc_VOID__INT_VALUE) (gpointer data1,
173 gint arg_1,
174 GValue *arg_2,
175 gpointer data2);
176 register GMarshalFunc_VOID__INT_VALUE callback;
177 register GCClosure *cc = (GCClosure*) closure;
178 register gpointer data1, data2;
179 g_return_if_fail (n_param_values == 3); // return_value est NULL ici, car la callback ne renvoit rien.
180
181 if (G_CCLOSURE_SWAP_DATA (closure))
182 {
183 data1 = closure->data;
184 data2 = g_value_peek_pointer (param_values + 0);
185 }
186 else
187 {
188 data1 = g_value_peek_pointer (param_values + 0);
189 data2 = closure->data;
190 }
191 callback = (GMarshalFunc_VOID__INT_VALUE) (marshal_data ? marshal_data : cc->callback);
192
193 callback (data1,
194 g_marshal_value_peek_int (param_values + 1),
195 g_marshal_value_peek_pointer (param_values + 2),
196 data2);
197 }
198 void cd_dbus_marshal_VOID__VALUE_STRING (GClosure *closure,
199 GValue *return_value G_GNUC_UNUSED,
200 guint n_param_values,
201 const GValue *param_values,
202 gpointer invocation_hint G_GNUC_UNUSED,
203 gpointer marshal_data)
204 {
205 //g_print ("%s ()\n", __func__);
206 typedef void (*GMarshalFunc_VOID__VALUE_STRING) (gpointer data1,
207 GValue *arg_1,
208 gchar *arg_2,
209 gpointer data2);
210 register GMarshalFunc_VOID__VALUE_STRING callback;
211 register GCClosure *cc = (GCClosure*) closure;
212 register gpointer data1, data2;
213 g_return_if_fail (n_param_values == 3); // return_value est NULL ici, car la callback ne renvoit rien.
214
215 if (G_CCLOSURE_SWAP_DATA (closure))
216 {
217 data1 = closure->data;
218 data2 = g_value_peek_pointer (param_values + 0);
219 }
220 else
221 {
222 data1 = g_value_peek_pointer (param_values + 0);
223 data2 = closure->data;
224 }
225 callback = (GMarshalFunc_VOID__VALUE_STRING) (marshal_data ? marshal_data : cc->callback);
226
227 callback (data1,
228 g_marshal_value_peek_pointer (param_values + 1),
229 g_marshal_value_peek_string (param_values + 2),
230 data2);
231 }