sl@0: /* sl@0: * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: * All rights reserved. sl@0: * This component and the accompanying materials are made available sl@0: * under the terms of "Eclipse Public License v1.0" sl@0: * which accompanies this distribution, and is available sl@0: * at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: * sl@0: * Initial Contributors: sl@0: * Nokia Corporation - initial contribution. sl@0: * sl@0: * Contributors: sl@0: * sl@0: * Description: sl@0: * sl@0: */ sl@0: #include "dbus-gmarshal.h" sl@0: sl@0: #include sl@0: sl@0: sl@0: #ifdef G_ENABLE_DEBUG sl@0: #define g_marshal_value_peek_boolean(v) g_value_get_boolean (v) sl@0: #define g_marshal_value_peek_char(v) g_value_get_char (v) sl@0: #define g_marshal_value_peek_uchar(v) g_value_get_uchar (v) sl@0: #define g_marshal_value_peek_int(v) g_value_get_int (v) sl@0: #define g_marshal_value_peek_uint(v) g_value_get_uint (v) sl@0: #define g_marshal_value_peek_long(v) g_value_get_long (v) sl@0: #define g_marshal_value_peek_ulong(v) g_value_get_ulong (v) sl@0: #define g_marshal_value_peek_int64(v) g_value_get_int64 (v) sl@0: #define g_marshal_value_peek_uint64(v) g_value_get_uint64 (v) sl@0: #define g_marshal_value_peek_enum(v) g_value_get_enum (v) sl@0: #define g_marshal_value_peek_flags(v) g_value_get_flags (v) sl@0: #define g_marshal_value_peek_float(v) g_value_get_float (v) sl@0: #define g_marshal_value_peek_double(v) g_value_get_double (v) sl@0: #define g_marshal_value_peek_string(v) (char*) g_value_get_string (v) sl@0: #define g_marshal_value_peek_param(v) g_value_get_param (v) sl@0: #define g_marshal_value_peek_boxed(v) g_value_get_boxed (v) sl@0: #define g_marshal_value_peek_pointer(v) g_value_get_pointer (v) sl@0: #define g_marshal_value_peek_object(v) g_value_get_object (v) sl@0: #else /* !G_ENABLE_DEBUG */ sl@0: /* WARNING: This code accesses GValues directly, which is UNSUPPORTED API. sl@0: * Do not access GValues directly in your code. Instead, use the sl@0: * g_value_get_*() functions sl@0: */ sl@0: #define g_marshal_value_peek_boolean(v) (v)->data[0].v_int sl@0: #define g_marshal_value_peek_char(v) (v)->data[0].v_int sl@0: #define g_marshal_value_peek_uchar(v) (v)->data[0].v_uint sl@0: #define g_marshal_value_peek_int(v) (v)->data[0].v_int sl@0: #define g_marshal_value_peek_uint(v) (v)->data[0].v_uint sl@0: #define g_marshal_value_peek_long(v) (v)->data[0].v_long sl@0: #define g_marshal_value_peek_ulong(v) (v)->data[0].v_ulong sl@0: #define g_marshal_value_peek_int64(v) (v)->data[0].v_int64 sl@0: #define g_marshal_value_peek_uint64(v) (v)->data[0].v_uint64 sl@0: #define g_marshal_value_peek_enum(v) (v)->data[0].v_long sl@0: #define g_marshal_value_peek_flags(v) (v)->data[0].v_ulong sl@0: #define g_marshal_value_peek_float(v) (v)->data[0].v_float sl@0: #define g_marshal_value_peek_double(v) (v)->data[0].v_double sl@0: #define g_marshal_value_peek_string(v) (v)->data[0].v_pointer sl@0: #define g_marshal_value_peek_param(v) (v)->data[0].v_pointer sl@0: #define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer sl@0: #define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer sl@0: #define g_marshal_value_peek_object(v) (v)->data[0].v_pointer sl@0: #endif /* !G_ENABLE_DEBUG */ sl@0: sl@0: sl@0: /* NONE:STRING,STRING,STRING (dbus-gmarshal.list:1) */ sl@0: void sl@0: _dbus_g_marshal_VOID__STRING_STRING_STRING (GClosure *closure, sl@0: GValue *return_value, sl@0: guint n_param_values, sl@0: const GValue *param_values, sl@0: gpointer invocation_hint, sl@0: gpointer marshal_data) sl@0: { sl@0: typedef void (*GMarshalFunc_VOID__STRING_STRING_STRING) (gpointer data1, sl@0: gpointer arg_1, sl@0: gpointer arg_2, sl@0: gpointer arg_3, sl@0: gpointer data2); sl@0: register GMarshalFunc_VOID__STRING_STRING_STRING callback; sl@0: register GCClosure *cc = (GCClosure*) closure; sl@0: register gpointer data1, data2; sl@0: sl@0: g_return_if_fail (n_param_values == 4); sl@0: sl@0: if (G_CCLOSURE_SWAP_DATA (closure)) sl@0: { sl@0: data1 = closure->data; sl@0: data2 = g_value_peek_pointer (param_values + 0); sl@0: } sl@0: else sl@0: { sl@0: data1 = g_value_peek_pointer (param_values + 0); sl@0: data2 = closure->data; sl@0: } sl@0: callback = (GMarshalFunc_VOID__STRING_STRING_STRING) (marshal_data ? marshal_data : cc->callback); sl@0: sl@0: callback (data1, sl@0: g_marshal_value_peek_string (param_values + 1), sl@0: g_marshal_value_peek_string (param_values + 2), sl@0: g_marshal_value_peek_string (param_values + 3), sl@0: data2); sl@0: } sl@0: