sl@0
|
1 |
/*
|
sl@0
|
2 |
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
sl@0
|
3 |
* All rights reserved.
|
sl@0
|
4 |
* This component and the accompanying materials are made available
|
sl@0
|
5 |
* under the terms of "Eclipse Public License v1.0"
|
sl@0
|
6 |
* which accompanies this distribution, and is available
|
sl@0
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
sl@0
|
8 |
*
|
sl@0
|
9 |
* Initial Contributors:
|
sl@0
|
10 |
* Nokia Corporation - initial contribution.
|
sl@0
|
11 |
*
|
sl@0
|
12 |
* Contributors:
|
sl@0
|
13 |
*
|
sl@0
|
14 |
* Description:
|
sl@0
|
15 |
*
|
sl@0
|
16 |
*/
|
sl@0
|
17 |
#include "dbus-gmarshal.h"
|
sl@0
|
18 |
|
sl@0
|
19 |
#include <glib-object.h>
|
sl@0
|
20 |
|
sl@0
|
21 |
|
sl@0
|
22 |
#ifdef G_ENABLE_DEBUG
|
sl@0
|
23 |
#define g_marshal_value_peek_boolean(v) g_value_get_boolean (v)
|
sl@0
|
24 |
#define g_marshal_value_peek_char(v) g_value_get_char (v)
|
sl@0
|
25 |
#define g_marshal_value_peek_uchar(v) g_value_get_uchar (v)
|
sl@0
|
26 |
#define g_marshal_value_peek_int(v) g_value_get_int (v)
|
sl@0
|
27 |
#define g_marshal_value_peek_uint(v) g_value_get_uint (v)
|
sl@0
|
28 |
#define g_marshal_value_peek_long(v) g_value_get_long (v)
|
sl@0
|
29 |
#define g_marshal_value_peek_ulong(v) g_value_get_ulong (v)
|
sl@0
|
30 |
#define g_marshal_value_peek_int64(v) g_value_get_int64 (v)
|
sl@0
|
31 |
#define g_marshal_value_peek_uint64(v) g_value_get_uint64 (v)
|
sl@0
|
32 |
#define g_marshal_value_peek_enum(v) g_value_get_enum (v)
|
sl@0
|
33 |
#define g_marshal_value_peek_flags(v) g_value_get_flags (v)
|
sl@0
|
34 |
#define g_marshal_value_peek_float(v) g_value_get_float (v)
|
sl@0
|
35 |
#define g_marshal_value_peek_double(v) g_value_get_double (v)
|
sl@0
|
36 |
#define g_marshal_value_peek_string(v) (char*) g_value_get_string (v)
|
sl@0
|
37 |
#define g_marshal_value_peek_param(v) g_value_get_param (v)
|
sl@0
|
38 |
#define g_marshal_value_peek_boxed(v) g_value_get_boxed (v)
|
sl@0
|
39 |
#define g_marshal_value_peek_pointer(v) g_value_get_pointer (v)
|
sl@0
|
40 |
#define g_marshal_value_peek_object(v) g_value_get_object (v)
|
sl@0
|
41 |
#else /* !G_ENABLE_DEBUG */
|
sl@0
|
42 |
/* WARNING: This code accesses GValues directly, which is UNSUPPORTED API.
|
sl@0
|
43 |
* Do not access GValues directly in your code. Instead, use the
|
sl@0
|
44 |
* g_value_get_*() functions
|
sl@0
|
45 |
*/
|
sl@0
|
46 |
#define g_marshal_value_peek_boolean(v) (v)->data[0].v_int
|
sl@0
|
47 |
#define g_marshal_value_peek_char(v) (v)->data[0].v_int
|
sl@0
|
48 |
#define g_marshal_value_peek_uchar(v) (v)->data[0].v_uint
|
sl@0
|
49 |
#define g_marshal_value_peek_int(v) (v)->data[0].v_int
|
sl@0
|
50 |
#define g_marshal_value_peek_uint(v) (v)->data[0].v_uint
|
sl@0
|
51 |
#define g_marshal_value_peek_long(v) (v)->data[0].v_long
|
sl@0
|
52 |
#define g_marshal_value_peek_ulong(v) (v)->data[0].v_ulong
|
sl@0
|
53 |
#define g_marshal_value_peek_int64(v) (v)->data[0].v_int64
|
sl@0
|
54 |
#define g_marshal_value_peek_uint64(v) (v)->data[0].v_uint64
|
sl@0
|
55 |
#define g_marshal_value_peek_enum(v) (v)->data[0].v_long
|
sl@0
|
56 |
#define g_marshal_value_peek_flags(v) (v)->data[0].v_ulong
|
sl@0
|
57 |
#define g_marshal_value_peek_float(v) (v)->data[0].v_float
|
sl@0
|
58 |
#define g_marshal_value_peek_double(v) (v)->data[0].v_double
|
sl@0
|
59 |
#define g_marshal_value_peek_string(v) (v)->data[0].v_pointer
|
sl@0
|
60 |
#define g_marshal_value_peek_param(v) (v)->data[0].v_pointer
|
sl@0
|
61 |
#define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer
|
sl@0
|
62 |
#define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer
|
sl@0
|
63 |
#define g_marshal_value_peek_object(v) (v)->data[0].v_pointer
|
sl@0
|
64 |
#endif /* !G_ENABLE_DEBUG */
|
sl@0
|
65 |
|
sl@0
|
66 |
|
sl@0
|
67 |
/* NONE:STRING,STRING,STRING (dbus-gmarshal.list:1) */
|
sl@0
|
68 |
void
|
sl@0
|
69 |
_dbus_g_marshal_VOID__STRING_STRING_STRING (GClosure *closure,
|
sl@0
|
70 |
GValue *return_value,
|
sl@0
|
71 |
guint n_param_values,
|
sl@0
|
72 |
const GValue *param_values,
|
sl@0
|
73 |
gpointer invocation_hint,
|
sl@0
|
74 |
gpointer marshal_data)
|
sl@0
|
75 |
{
|
sl@0
|
76 |
typedef void (*GMarshalFunc_VOID__STRING_STRING_STRING) (gpointer data1,
|
sl@0
|
77 |
gpointer arg_1,
|
sl@0
|
78 |
gpointer arg_2,
|
sl@0
|
79 |
gpointer arg_3,
|
sl@0
|
80 |
gpointer data2);
|
sl@0
|
81 |
register GMarshalFunc_VOID__STRING_STRING_STRING callback;
|
sl@0
|
82 |
register GCClosure *cc = (GCClosure*) closure;
|
sl@0
|
83 |
register gpointer data1, data2;
|
sl@0
|
84 |
|
sl@0
|
85 |
g_return_if_fail (n_param_values == 4);
|
sl@0
|
86 |
|
sl@0
|
87 |
if (G_CCLOSURE_SWAP_DATA (closure))
|
sl@0
|
88 |
{
|
sl@0
|
89 |
data1 = closure->data;
|
sl@0
|
90 |
data2 = g_value_peek_pointer (param_values + 0);
|
sl@0
|
91 |
}
|
sl@0
|
92 |
else
|
sl@0
|
93 |
{
|
sl@0
|
94 |
data1 = g_value_peek_pointer (param_values + 0);
|
sl@0
|
95 |
data2 = closure->data;
|
sl@0
|
96 |
}
|
sl@0
|
97 |
callback = (GMarshalFunc_VOID__STRING_STRING_STRING) (marshal_data ? marshal_data : cc->callback);
|
sl@0
|
98 |
|
sl@0
|
99 |
callback (data1,
|
sl@0
|
100 |
g_marshal_value_peek_string (param_values + 1),
|
sl@0
|
101 |
g_marshal_value_peek_string (param_values + 2),
|
sl@0
|
102 |
g_marshal_value_peek_string (param_values + 3),
|
sl@0
|
103 |
data2);
|
sl@0
|
104 |
}
|
sl@0
|
105 |
|