Back to index

bamf  0.2.120
bamf-marshal.c
Go to the documentation of this file.
00001 #include "bamf-marshal.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_schar (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 #define g_marshal_value_peek_variant(v)  g_value_get_variant (v)
00026 #else /* !G_ENABLE_DEBUG */
00027 /* WARNING: This code accesses GValues directly, which is UNSUPPORTED API.
00028  *          Do not access GValues directly in your code. Instead, use the
00029  *          g_value_get_*() functions
00030  */
00031 #define g_marshal_value_peek_boolean(v)  (v)->data[0].v_int
00032 #define g_marshal_value_peek_char(v)     (v)->data[0].v_int
00033 #define g_marshal_value_peek_uchar(v)    (v)->data[0].v_uint
00034 #define g_marshal_value_peek_int(v)      (v)->data[0].v_int
00035 #define g_marshal_value_peek_uint(v)     (v)->data[0].v_uint
00036 #define g_marshal_value_peek_long(v)     (v)->data[0].v_long
00037 #define g_marshal_value_peek_ulong(v)    (v)->data[0].v_ulong
00038 #define g_marshal_value_peek_int64(v)    (v)->data[0].v_int64
00039 #define g_marshal_value_peek_uint64(v)   (v)->data[0].v_uint64
00040 #define g_marshal_value_peek_enum(v)     (v)->data[0].v_long
00041 #define g_marshal_value_peek_flags(v)    (v)->data[0].v_ulong
00042 #define g_marshal_value_peek_float(v)    (v)->data[0].v_float
00043 #define g_marshal_value_peek_double(v)   (v)->data[0].v_double
00044 #define g_marshal_value_peek_string(v)   (v)->data[0].v_pointer
00045 #define g_marshal_value_peek_param(v)    (v)->data[0].v_pointer
00046 #define g_marshal_value_peek_boxed(v)    (v)->data[0].v_pointer
00047 #define g_marshal_value_peek_pointer(v)  (v)->data[0].v_pointer
00048 #define g_marshal_value_peek_object(v)   (v)->data[0].v_pointer
00049 #define g_marshal_value_peek_variant(v)  (v)->data[0].v_pointer
00050 #endif /* !G_ENABLE_DEBUG */
00051 
00052 
00053 /* VOID:STRING,STRING (./bamf-marshal.list:20) */
00054 void
00055 _bamf_marshal_VOID__STRING_STRING (GClosure     *closure,
00056                                    GValue       *return_value G_GNUC_UNUSED,
00057                                    guint         n_param_values,
00058                                    const GValue *param_values,
00059                                    gpointer      invocation_hint G_GNUC_UNUSED,
00060                                    gpointer      marshal_data)
00061 {
00062   typedef void (*GMarshalFunc_VOID__STRING_STRING) (gpointer     data1,
00063                                                     gpointer     arg_1,
00064                                                     gpointer     arg_2,
00065                                                     gpointer     data2);
00066   register GMarshalFunc_VOID__STRING_STRING callback;
00067   register GCClosure *cc = (GCClosure*) closure;
00068   register gpointer data1, data2;
00069 
00070   g_return_if_fail (n_param_values == 3);
00071 
00072   if (G_CCLOSURE_SWAP_DATA (closure))
00073     {
00074       data1 = closure->data;
00075       data2 = g_value_peek_pointer (param_values + 0);
00076     }
00077   else
00078     {
00079       data1 = g_value_peek_pointer (param_values + 0);
00080       data2 = closure->data;
00081     }
00082   callback = (GMarshalFunc_VOID__STRING_STRING) (marshal_data ? marshal_data : cc->callback);
00083 
00084   callback (data1,
00085             g_marshal_value_peek_string (param_values + 1),
00086             g_marshal_value_peek_string (param_values + 2),
00087             data2);
00088 }
00089 
00090 /* VOID:STRING,STRING,STRING (./bamf-marshal.list:21) */
00091 void
00092 _bamf_marshal_VOID__STRING_STRING_STRING (GClosure     *closure,
00093                                           GValue       *return_value G_GNUC_UNUSED,
00094                                           guint         n_param_values,
00095                                           const GValue *param_values,
00096                                           gpointer      invocation_hint G_GNUC_UNUSED,
00097                                           gpointer      marshal_data)
00098 {
00099   typedef void (*GMarshalFunc_VOID__STRING_STRING_STRING) (gpointer     data1,
00100                                                            gpointer     arg_1,
00101                                                            gpointer     arg_2,
00102                                                            gpointer     arg_3,
00103                                                            gpointer     data2);
00104   register GMarshalFunc_VOID__STRING_STRING_STRING callback;
00105   register GCClosure *cc = (GCClosure*) closure;
00106   register gpointer data1, data2;
00107 
00108   g_return_if_fail (n_param_values == 4);
00109 
00110   if (G_CCLOSURE_SWAP_DATA (closure))
00111     {
00112       data1 = closure->data;
00113       data2 = g_value_peek_pointer (param_values + 0);
00114     }
00115   else
00116     {
00117       data1 = g_value_peek_pointer (param_values + 0);
00118       data2 = closure->data;
00119     }
00120   callback = (GMarshalFunc_VOID__STRING_STRING_STRING) (marshal_data ? marshal_data : cc->callback);
00121 
00122   callback (data1,
00123             g_marshal_value_peek_string (param_values + 1),
00124             g_marshal_value_peek_string (param_values + 2),
00125             g_marshal_value_peek_string (param_values + 3),
00126             data2);
00127 }
00128 
00129 /* VOID:OBJECT,OBJECT (./bamf-marshal.list:22) */
00130 void
00131 _bamf_marshal_VOID__OBJECT_OBJECT (GClosure     *closure,
00132                                    GValue       *return_value G_GNUC_UNUSED,
00133                                    guint         n_param_values,
00134                                    const GValue *param_values,
00135                                    gpointer      invocation_hint G_GNUC_UNUSED,
00136                                    gpointer      marshal_data)
00137 {
00138   typedef void (*GMarshalFunc_VOID__OBJECT_OBJECT) (gpointer     data1,
00139                                                     gpointer     arg_1,
00140                                                     gpointer     arg_2,
00141                                                     gpointer     data2);
00142   register GMarshalFunc_VOID__OBJECT_OBJECT callback;
00143   register GCClosure *cc = (GCClosure*) closure;
00144   register gpointer data1, data2;
00145 
00146   g_return_if_fail (n_param_values == 3);
00147 
00148   if (G_CCLOSURE_SWAP_DATA (closure))
00149     {
00150       data1 = closure->data;
00151       data2 = g_value_peek_pointer (param_values + 0);
00152     }
00153   else
00154     {
00155       data1 = g_value_peek_pointer (param_values + 0);
00156       data2 = closure->data;
00157     }
00158   callback = (GMarshalFunc_VOID__OBJECT_OBJECT) (marshal_data ? marshal_data : cc->callback);
00159 
00160   callback (data1,
00161             g_marshal_value_peek_object (param_values + 1),
00162             g_marshal_value_peek_object (param_values + 2),
00163             data2);
00164 }
00165 
00166 /* VOID:INT,INT (./bamf-marshal.list:23) */
00167 void
00168 _bamf_marshal_VOID__INT_INT (GClosure     *closure,
00169                              GValue       *return_value G_GNUC_UNUSED,
00170                              guint         n_param_values,
00171                              const GValue *param_values,
00172                              gpointer      invocation_hint G_GNUC_UNUSED,
00173                              gpointer      marshal_data)
00174 {
00175   typedef void (*GMarshalFunc_VOID__INT_INT) (gpointer     data1,
00176                                               gint         arg_1,
00177                                               gint         arg_2,
00178                                               gpointer     data2);
00179   register GMarshalFunc_VOID__INT_INT callback;
00180   register GCClosure *cc = (GCClosure*) closure;
00181   register gpointer data1, data2;
00182 
00183   g_return_if_fail (n_param_values == 3);
00184 
00185   if (G_CCLOSURE_SWAP_DATA (closure))
00186     {
00187       data1 = closure->data;
00188       data2 = g_value_peek_pointer (param_values + 0);
00189     }
00190   else
00191     {
00192       data1 = g_value_peek_pointer (param_values + 0);
00193       data2 = closure->data;
00194     }
00195   callback = (GMarshalFunc_VOID__INT_INT) (marshal_data ? marshal_data : cc->callback);
00196 
00197   callback (data1,
00198             g_marshal_value_peek_int (param_values + 1),
00199             g_marshal_value_peek_int (param_values + 2),
00200             data2);
00201 }
00202