~cairo-dock-team/ubuntu/oneiric/cairo-dock-plug-ins/2.3.0-2.1

« back to all changes in this revision

Viewing changes to Dbus/src/applet-marshallers.c

  • Committer: Bazaar Package Importer
  • Author(s): Matthieu Baerts (matttbe)
  • Date: 2011-04-20 20:46:51 UTC
  • mfrom: (1.1.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20110420204651-ftnpzesj6uc7qeul
Tags: 2.3.0~1-0ubuntu1
* New Upstream Version (LP: #723995)
* Upstream short ChangeLog (since 2.3.0~0rc1):
 - Updated translations
 - Updated the integration of the new versions of kwin and compiz
    (Switcher, ShowDesktop, etc.)
 - Removed a lot of useless g_print
 - Updated a few plug-ins to fit with the new version of the API (gldit)
 - Fixed a few bugs
 - Updated MeMenu, MessagingMenu and Status-Notifier to works
    with the latest version of dbusmenu, etc.
* Switch to dpkg-source 3.0 (quilt) format
* debian/cairo-dock-plug-ins.install:
 - Added new files (interfaces for python, ruby, vala and mono)
* debian/control:
 - Added new dependences for new applets (sensors and zeitgeist)
    and new interfaces (python, valac, ruby and mono)
 - Updated the version of cairo-dock build-dependences
* debian/rules:
 - Added a new CMake flag to install python interface in debian/tmp
* Updated debian/watch

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
#include "dbus-main-spec.h"
 
27
#include "applet-marshallers.h"
 
28
 
 
29
void cd_dbus_marshal_VOID__INT_STRING (GClosure *closure,
 
30
        GValue *return_value G_GNUC_UNUSED,
 
31
        guint n_param_values,
 
32
        const GValue *param_values,
 
33
        gpointer invocation_hint G_GNUC_UNUSED,
 
34
        gpointer marshal_data)
 
35
{
 
36
        //g_print ("%s ()\n", __func__);
 
37
        typedef void (*GMarshalFunc_VOID__INT_STRING) (gpointer     data1,
 
38
                                                                                                gint        arg_1,
 
39
                                                                                                gchar      *arg_2,
 
40
                                                                                                gpointer     data2);
 
41
        register GMarshalFunc_VOID__INT_STRING callback;
 
42
        register GCClosure *cc = (GCClosure*) closure;
 
43
        register gpointer data1, data2;
 
44
        g_return_if_fail (n_param_values == 3);  // return_value est NULL ici, car la callback ne renvoit rien.
 
45
 
 
46
        if (G_CCLOSURE_SWAP_DATA (closure))
 
47
        {
 
48
                data1 = closure->data;
 
49
                data2 = g_value_peek_pointer (param_values + 0);
 
50
        }
 
51
        else
 
52
        {
 
53
                data1 = g_value_peek_pointer (param_values + 0);
 
54
                data2 = closure->data;
 
55
        }
 
56
        callback = (GMarshalFunc_VOID__INT_STRING) (marshal_data ? marshal_data : cc->callback);
 
57
 
 
58
        callback (data1,
 
59
                g_marshal_value_peek_int (param_values + 1),
 
60
                g_marshal_value_peek_string (param_values + 2),
 
61
                data2);
 
62
}
 
63
void cd_dbus_marshal_VOID__BOOLEAN_STRING (GClosure *closure,
 
64
        GValue *return_value G_GNUC_UNUSED,
 
65
        guint n_param_values,
 
66
        const GValue *param_values,
 
67
        gpointer invocation_hint G_GNUC_UNUSED,
 
68
        gpointer marshal_data)
 
69
{
 
70
        //g_print ("%s ()\n", __func__);
 
71
        typedef void (*GMarshalFunc_VOID__BOOLEAN_STRING) (gpointer     data1,
 
72
                                                                                                gboolean    arg_1,
 
73
                                                                                                gchar      *arg_2,
 
74
                                                                                                gpointer     data2);
 
75
        register GMarshalFunc_VOID__BOOLEAN_STRING callback;
 
76
        register GCClosure *cc = (GCClosure*) closure;
 
77
        register gpointer data1, data2;
 
78
        g_return_if_fail (n_param_values == 3);  // return_value est NULL ici, car la callback ne renvoit rien.
 
79
 
 
80
        if (G_CCLOSURE_SWAP_DATA (closure))
 
81
        {
 
82
                data1 = closure->data;
 
83
                data2 = g_value_peek_pointer (param_values + 0);
 
84
        }
 
85
        else
 
86
        {
 
87
                data1 = g_value_peek_pointer (param_values + 0);
 
88
                data2 = closure->data;
 
89
        }
 
90
        callback = (GMarshalFunc_VOID__BOOLEAN_STRING) (marshal_data ? marshal_data : cc->callback);
 
91
 
 
92
        callback (data1,
 
93
                g_marshal_value_peek_boolean (param_values + 1),
 
94
                g_marshal_value_peek_string (param_values + 2),
 
95
                data2);
 
96
}
 
97
void cd_dbus_marshal_VOID__STRING_STRING (GClosure *closure,
 
98
        GValue *return_value G_GNUC_UNUSED,
 
99
        guint n_param_values,
 
100
        const GValue *param_values,
 
101
        gpointer invocation_hint G_GNUC_UNUSED,
 
102
        gpointer marshal_data)
 
103
{
 
104
        //g_print ("%s ()\n", __func__);
 
105
        typedef void (*GMarshalFunc_VOID__STRING_STRING) (gpointer     data1,
 
106
                                                                                                gchar      *arg_1,
 
107
                                                                                                gchar      *arg_2,
 
108
                                                                                                gpointer     data2);
 
109
        register GMarshalFunc_VOID__STRING_STRING callback;
 
110
        register GCClosure *cc = (GCClosure*) closure;
 
111
        register gpointer data1, data2;
 
112
        g_return_if_fail (n_param_values == 3);  // return_value est NULL ici, car la callback ne renvoit rien.
 
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_VOID__STRING_STRING) (marshal_data ? marshal_data : cc->callback);
 
125
 
 
126
        callback (data1,
 
127
                g_marshal_value_peek_string (param_values + 1),
 
128
                g_marshal_value_peek_string (param_values + 2),
 
129
                data2);
 
130
}
 
131
void cd_dbus_marshal_VOID__VALUE (GClosure *closure,
 
132
        GValue *return_value G_GNUC_UNUSED,
 
133
        guint n_param_values,
 
134
        const GValue *param_values,
 
135
        gpointer invocation_hint G_GNUC_UNUSED,
 
136
        gpointer marshal_data)
 
137
{
 
138
        //g_print ("%s ()\n", __func__);
 
139
        typedef void (*GMarshalFunc_VOID__VALUE) (gpointer     data1,
 
140
                                                                                                GValue     *arg_1,
 
141
                                                                                                gpointer     data2);
 
142
        register GMarshalFunc_VOID__VALUE callback;
 
143
        register GCClosure *cc = (GCClosure*) closure;
 
144
        register gpointer data1, data2;
 
145
        g_return_if_fail (n_param_values == 2);  // return_value est NULL ici, car la callback ne renvoit rien.
 
146
 
 
147
        if (G_CCLOSURE_SWAP_DATA (closure))
 
148
        {
 
149
                data1 = closure->data;
 
150
                data2 = g_value_peek_pointer (param_values + 0);
 
151
        }
 
152
        else
 
153
        {
 
154
                data1 = g_value_peek_pointer (param_values + 0);
 
155
                data2 = closure->data;
 
156
        }
 
157
        callback = (GMarshalFunc_VOID__VALUE) (marshal_data ? marshal_data : cc->callback);
 
158
 
 
159
        callback (data1,
 
160
                g_marshal_value_peek_pointer (param_values + 1),
 
161
                data2);
 
162
}
 
163
void cd_dbus_marshal_VOID__INT_VALUE (GClosure *closure,
 
164
        GValue *return_value G_GNUC_UNUSED,
 
165
        guint n_param_values,
 
166
        const GValue *param_values,
 
167
        gpointer invocation_hint G_GNUC_UNUSED,
 
168
        gpointer marshal_data)
 
169
{
 
170
        //g_print ("%s ()\n", __func__);
 
171
        typedef void (*GMarshalFunc_VOID__INT_VALUE) (gpointer     data1,
 
172
                                                                                                gint            arg_1,
 
173
                                                                                                GValue     *arg_2,
 
174
                                                                                                gpointer     data2);
 
175
        register GMarshalFunc_VOID__INT_VALUE callback;
 
176
        register GCClosure *cc = (GCClosure*) closure;
 
177
        register gpointer data1, data2;
 
178
        g_return_if_fail (n_param_values == 3);  // return_value est NULL ici, car la callback ne renvoit rien.
 
179
 
 
180
        if (G_CCLOSURE_SWAP_DATA (closure))
 
181
        {
 
182
                data1 = closure->data;
 
183
                data2 = g_value_peek_pointer (param_values + 0);
 
184
        }
 
185
        else
 
186
        {
 
187
                data1 = g_value_peek_pointer (param_values + 0);
 
188
                data2 = closure->data;
 
189
        }
 
190
        callback = (GMarshalFunc_VOID__INT_VALUE) (marshal_data ? marshal_data : cc->callback);
 
191
 
 
192
        callback (data1,
 
193
                g_marshal_value_peek_int (param_values + 1),
 
194
                g_marshal_value_peek_pointer (param_values + 2),
 
195
                data2);
 
196
}
 
197
void cd_dbus_marshal_VOID__VALUE_STRING (GClosure *closure,
 
198
        GValue *return_value G_GNUC_UNUSED,
 
199
        guint n_param_values,
 
200
        const GValue *param_values,
 
201
        gpointer invocation_hint G_GNUC_UNUSED,
 
202
        gpointer marshal_data)
 
203
{
 
204
        //g_print ("%s ()\n", __func__);
 
205
        typedef void (*GMarshalFunc_VOID__VALUE_STRING) (gpointer     data1,
 
206
                                                                                                GValue     *arg_1,
 
207
                                                                                                gchar      *arg_2,
 
208
                                                                                                gpointer     data2);
 
209
        register GMarshalFunc_VOID__VALUE_STRING callback;
 
210
        register GCClosure *cc = (GCClosure*) closure;
 
211
        register gpointer data1, data2;
 
212
        g_return_if_fail (n_param_values == 3);  // return_value est NULL ici, car la callback ne renvoit rien.
 
213
 
 
214
        if (G_CCLOSURE_SWAP_DATA (closure))
 
215
        {
 
216
                data1 = closure->data;
 
217
                data2 = g_value_peek_pointer (param_values + 0);
 
218
        }
 
219
        else
 
220
        {
 
221
                data1 = g_value_peek_pointer (param_values + 0);
 
222
                data2 = closure->data;
 
223
        }
 
224
        callback = (GMarshalFunc_VOID__VALUE_STRING) (marshal_data ? marshal_data : cc->callback);
 
225
 
 
226
        callback (data1,
 
227
                g_marshal_value_peek_pointer (param_values + 1),
 
228
                g_marshal_value_peek_string (param_values + 2),
 
229
                data2);
 
230
}