dbus-gmarshal.c

00001 #include "dbus-gmarshal.h"
00002 
00003 #include        <glib-object.h>
00004 
00005 
00006 #ifdef G_ENABLE_DEBUG
00007 #define g_marshal_value_peek_boolean(v)  g_value_get_boolean (v)
00008 #define g_marshal_value_peek_char(v)     g_value_get_char (v)
00009 #define g_marshal_value_peek_uchar(v)    g_value_get_uchar (v)
00010 #define g_marshal_value_peek_int(v)      g_value_get_int (v)
00011 #define g_marshal_value_peek_uint(v)     g_value_get_uint (v)
00012 #define g_marshal_value_peek_long(v)     g_value_get_long (v)
00013 #define g_marshal_value_peek_ulong(v)    g_value_get_ulong (v)
00014 #define g_marshal_value_peek_int64(v)    g_value_get_int64 (v)
00015 #define g_marshal_value_peek_uint64(v)   g_value_get_uint64 (v)
00016 #define g_marshal_value_peek_enum(v)     g_value_get_enum (v)
00017 #define g_marshal_value_peek_flags(v)    g_value_get_flags (v)
00018 #define g_marshal_value_peek_float(v)    g_value_get_float (v)
00019 #define g_marshal_value_peek_double(v)   g_value_get_double (v)
00020 #define g_marshal_value_peek_string(v)   (char*) g_value_get_string (v)
00021 #define g_marshal_value_peek_param(v)    g_value_get_param (v)
00022 #define g_marshal_value_peek_boxed(v)    g_value_get_boxed (v)
00023 #define g_marshal_value_peek_pointer(v)  g_value_get_pointer (v)
00024 #define g_marshal_value_peek_object(v)   g_value_get_object (v)
00025 #else /* !G_ENABLE_DEBUG */
00026 /* WARNING: This code accesses GValues directly, which is UNSUPPORTED API.
00027  *          Do not access GValues directly in your code. Instead, use the
00028  *          g_value_get_*() functions
00029  */
00030 #define g_marshal_value_peek_boolean(v)  (v)->data[0].v_int
00031 #define g_marshal_value_peek_char(v)     (v)->data[0].v_int
00032 #define g_marshal_value_peek_uchar(v)    (v)->data[0].v_uint
00033 #define g_marshal_value_peek_int(v)      (v)->data[0].v_int
00034 #define g_marshal_value_peek_uint(v)     (v)->data[0].v_uint
00035 #define g_marshal_value_peek_long(v)     (v)->data[0].v_long
00036 #define g_marshal_value_peek_ulong(v)    (v)->data[0].v_ulong
00037 #define g_marshal_value_peek_int64(v)    (v)->data[0].v_int64
00038 #define g_marshal_value_peek_uint64(v)   (v)->data[0].v_uint64
00039 #define g_marshal_value_peek_enum(v)     (v)->data[0].v_long
00040 #define g_marshal_value_peek_flags(v)    (v)->data[0].v_ulong
00041 #define g_marshal_value_peek_float(v)    (v)->data[0].v_float
00042 #define g_marshal_value_peek_double(v)   (v)->data[0].v_double
00043 #define g_marshal_value_peek_string(v)   (v)->data[0].v_pointer
00044 #define g_marshal_value_peek_param(v)    (v)->data[0].v_pointer
00045 #define g_marshal_value_peek_boxed(v)    (v)->data[0].v_pointer
00046 #define g_marshal_value_peek_pointer(v)  (v)->data[0].v_pointer
00047 #define g_marshal_value_peek_object(v)   (v)->data[0].v_pointer
00048 #endif /* !G_ENABLE_DEBUG */
00049 
00050 
00051 /* NONE:STRING,STRING,STRING (dbus-gmarshal.list:1) */
00052 void
00053 _dbus_g_marshal_VOID__STRING_STRING_STRING (GClosure     *closure,
00054                                             GValue       *return_value,
00055                                             guint         n_param_values,
00056                                             const GValue *param_values,
00057                                             gpointer      invocation_hint,
00058                                             gpointer      marshal_data)
00059 {
00060   typedef void (*GMarshalFunc_VOID__STRING_STRING_STRING) (gpointer     data1,
00061                                                            gpointer     arg_1,
00062                                                            gpointer     arg_2,
00063                                                            gpointer     arg_3,
00064                                                            gpointer     data2);
00065   register GMarshalFunc_VOID__STRING_STRING_STRING callback;
00066   register GCClosure *cc = (GCClosure*) closure;
00067   register gpointer data1, data2;
00068 
00069   g_return_if_fail (n_param_values == 4);
00070 
00071   if (G_CCLOSURE_SWAP_DATA (closure))
00072     {
00073       data1 = closure->data;
00074       data2 = g_value_peek_pointer (param_values + 0);
00075     }
00076   else
00077     {
00078       data1 = g_value_peek_pointer (param_values + 0);
00079       data2 = closure->data;
00080     }
00081   callback = (GMarshalFunc_VOID__STRING_STRING_STRING) (marshal_data ? marshal_data : cc->callback);
00082 
00083   callback (data1,
00084             g_marshal_value_peek_string (param_values + 1),
00085             g_marshal_value_peek_string (param_values + 2),
00086             g_marshal_value_peek_string (param_values + 3),
00087             data2);
00088 }
00089 

Generated on Wed Oct 3 10:04:23 2007 for D-BUSGLibBindings by  doxygen 1.5.1