~ubuntu-branches/ubuntu/utopic/rhythmbox/utopic-proposed

« back to all changes in this revision

Viewing changes to rhythmdb/rhythmdb-marshal.c

Tags: upstream-0.9.2
ImportĀ upstreamĀ versionĀ 0.9.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
#ifndef __rhythmdb_marshal_MARSHAL_H__
 
3
#define __rhythmdb_marshal_MARSHAL_H__
 
4
 
 
5
#include        <glib-object.h>
 
6
 
 
7
G_BEGIN_DECLS
 
8
 
 
9
#ifdef G_ENABLE_DEBUG
 
10
#define g_marshal_value_peek_boolean(v)  g_value_get_boolean (v)
 
11
#define g_marshal_value_peek_char(v)     g_value_get_char (v)
 
12
#define g_marshal_value_peek_uchar(v)    g_value_get_uchar (v)
 
13
#define g_marshal_value_peek_int(v)      g_value_get_int (v)
 
14
#define g_marshal_value_peek_uint(v)     g_value_get_uint (v)
 
15
#define g_marshal_value_peek_long(v)     g_value_get_long (v)
 
16
#define g_marshal_value_peek_ulong(v)    g_value_get_ulong (v)
 
17
#define g_marshal_value_peek_int64(v)    g_value_get_int64 (v)
 
18
#define g_marshal_value_peek_uint64(v)   g_value_get_uint64 (v)
 
19
#define g_marshal_value_peek_enum(v)     g_value_get_enum (v)
 
20
#define g_marshal_value_peek_flags(v)    g_value_get_flags (v)
 
21
#define g_marshal_value_peek_float(v)    g_value_get_float (v)
 
22
#define g_marshal_value_peek_double(v)   g_value_get_double (v)
 
23
#define g_marshal_value_peek_string(v)   (char*) g_value_get_string (v)
 
24
#define g_marshal_value_peek_param(v)    g_value_get_param (v)
 
25
#define g_marshal_value_peek_boxed(v)    g_value_get_boxed (v)
 
26
#define g_marshal_value_peek_pointer(v)  g_value_get_pointer (v)
 
27
#define g_marshal_value_peek_object(v)   g_value_get_object (v)
 
28
#else /* !G_ENABLE_DEBUG */
 
29
/* WARNING: This code accesses GValues directly, which is UNSUPPORTED API.
 
30
 *          Do not access GValues directly in your code. Instead, use the
 
31
 *          g_value_get_*() functions
 
32
 */
 
33
#define g_marshal_value_peek_boolean(v)  (v)->data[0].v_int
 
34
#define g_marshal_value_peek_char(v)     (v)->data[0].v_int
 
35
#define g_marshal_value_peek_uchar(v)    (v)->data[0].v_uint
 
36
#define g_marshal_value_peek_int(v)      (v)->data[0].v_int
 
37
#define g_marshal_value_peek_uint(v)     (v)->data[0].v_uint
 
38
#define g_marshal_value_peek_long(v)     (v)->data[0].v_long
 
39
#define g_marshal_value_peek_ulong(v)    (v)->data[0].v_ulong
 
40
#define g_marshal_value_peek_int64(v)    (v)->data[0].v_int64
 
41
#define g_marshal_value_peek_uint64(v)   (v)->data[0].v_uint64
 
42
#define g_marshal_value_peek_enum(v)     (v)->data[0].v_long
 
43
#define g_marshal_value_peek_flags(v)    (v)->data[0].v_ulong
 
44
#define g_marshal_value_peek_float(v)    (v)->data[0].v_float
 
45
#define g_marshal_value_peek_double(v)   (v)->data[0].v_double
 
46
#define g_marshal_value_peek_string(v)   (v)->data[0].v_pointer
 
47
#define g_marshal_value_peek_param(v)    (v)->data[0].v_pointer
 
48
#define g_marshal_value_peek_boxed(v)    (v)->data[0].v_pointer
 
49
#define g_marshal_value_peek_pointer(v)  (v)->data[0].v_pointer
 
50
#define g_marshal_value_peek_object(v)   (v)->data[0].v_pointer
 
51
#endif /* !G_ENABLE_DEBUG */
 
52
 
 
53
 
 
54
/* VOID:STRING,STRING (./rhythmdb-marshal.list:1) */
 
55
extern void rhythmdb_marshal_VOID__STRING_STRING (GClosure     *closure,
 
56
                                                  GValue       *return_value,
 
57
                                                  guint         n_param_values,
 
58
                                                  const GValue *param_values,
 
59
                                                  gpointer      invocation_hint,
 
60
                                                  gpointer      marshal_data);
 
61
void
 
62
rhythmdb_marshal_VOID__STRING_STRING (GClosure     *closure,
 
63
                                      GValue       *return_value,
 
64
                                      guint         n_param_values,
 
65
                                      const GValue *param_values,
 
66
                                      gpointer      invocation_hint,
 
67
                                      gpointer      marshal_data)
 
68
{
 
69
  typedef void (*GMarshalFunc_VOID__STRING_STRING) (gpointer     data1,
 
70
                                                    gpointer     arg_1,
 
71
                                                    gpointer     arg_2,
 
72
                                                    gpointer     data2);
 
73
  register GMarshalFunc_VOID__STRING_STRING callback;
 
74
  register GCClosure *cc = (GCClosure*) closure;
 
75
  register gpointer data1, data2;
 
76
 
 
77
  g_return_if_fail (n_param_values == 3);
 
78
 
 
79
  if (G_CCLOSURE_SWAP_DATA (closure))
 
80
    {
 
81
      data1 = closure->data;
 
82
      data2 = g_value_peek_pointer (param_values + 0);
 
83
    }
 
84
  else
 
85
    {
 
86
      data1 = g_value_peek_pointer (param_values + 0);
 
87
      data2 = closure->data;
 
88
    }
 
89
  callback = (GMarshalFunc_VOID__STRING_STRING) (marshal_data ? marshal_data : cc->callback);
 
90
 
 
91
  callback (data1,
 
92
            g_marshal_value_peek_string (param_values + 1),
 
93
            g_marshal_value_peek_string (param_values + 2),
 
94
            data2);
 
95
}
 
96
 
 
97
/* VOID:POINTER,POINTER (./rhythmdb-marshal.list:2) */
 
98
extern void rhythmdb_marshal_VOID__POINTER_POINTER (GClosure     *closure,
 
99
                                                    GValue       *return_value,
 
100
                                                    guint         n_param_values,
 
101
                                                    const GValue *param_values,
 
102
                                                    gpointer      invocation_hint,
 
103
                                                    gpointer      marshal_data);
 
104
void
 
105
rhythmdb_marshal_VOID__POINTER_POINTER (GClosure     *closure,
 
106
                                        GValue       *return_value,
 
107
                                        guint         n_param_values,
 
108
                                        const GValue *param_values,
 
109
                                        gpointer      invocation_hint,
 
110
                                        gpointer      marshal_data)
 
111
{
 
112
  typedef void (*GMarshalFunc_VOID__POINTER_POINTER) (gpointer     data1,
 
113
                                                      gpointer     arg_1,
 
114
                                                      gpointer     arg_2,
 
115
                                                      gpointer     data2);
 
116
  register GMarshalFunc_VOID__POINTER_POINTER callback;
 
117
  register GCClosure *cc = (GCClosure*) closure;
 
118
  register gpointer data1, data2;
 
119
 
 
120
  g_return_if_fail (n_param_values == 3);
 
121
 
 
122
  if (G_CCLOSURE_SWAP_DATA (closure))
 
123
    {
 
124
      data1 = closure->data;
 
125
      data2 = g_value_peek_pointer (param_values + 0);
 
126
    }
 
127
  else
 
128
    {
 
129
      data1 = g_value_peek_pointer (param_values + 0);
 
130
      data2 = closure->data;
 
131
    }
 
132
  callback = (GMarshalFunc_VOID__POINTER_POINTER) (marshal_data ? marshal_data : cc->callback);
 
133
 
 
134
  callback (data1,
 
135
            g_marshal_value_peek_pointer (param_values + 1),
 
136
            g_marshal_value_peek_pointer (param_values + 2),
 
137
            data2);
 
138
}
 
139
 
 
140
/* VOID:POINTER,INT,POINTER,POINTER (./rhythmdb-marshal.list:3) */
 
141
extern void rhythmdb_marshal_VOID__POINTER_INT_POINTER_POINTER (GClosure     *closure,
 
142
                                                                GValue       *return_value,
 
143
                                                                guint         n_param_values,
 
144
                                                                const GValue *param_values,
 
145
                                                                gpointer      invocation_hint,
 
146
                                                                gpointer      marshal_data);
 
147
void
 
148
rhythmdb_marshal_VOID__POINTER_INT_POINTER_POINTER (GClosure     *closure,
 
149
                                                    GValue       *return_value,
 
150
                                                    guint         n_param_values,
 
151
                                                    const GValue *param_values,
 
152
                                                    gpointer      invocation_hint,
 
153
                                                    gpointer      marshal_data)
 
154
{
 
155
  typedef void (*GMarshalFunc_VOID__POINTER_INT_POINTER_POINTER) (gpointer     data1,
 
156
                                                                  gpointer     arg_1,
 
157
                                                                  gint         arg_2,
 
158
                                                                  gpointer     arg_3,
 
159
                                                                  gpointer     arg_4,
 
160
                                                                  gpointer     data2);
 
161
  register GMarshalFunc_VOID__POINTER_INT_POINTER_POINTER callback;
 
162
  register GCClosure *cc = (GCClosure*) closure;
 
163
  register gpointer data1, data2;
 
164
 
 
165
  g_return_if_fail (n_param_values == 5);
 
166
 
 
167
  if (G_CCLOSURE_SWAP_DATA (closure))
 
168
    {
 
169
      data1 = closure->data;
 
170
      data2 = g_value_peek_pointer (param_values + 0);
 
171
    }
 
172
  else
 
173
    {
 
174
      data1 = g_value_peek_pointer (param_values + 0);
 
175
      data2 = closure->data;
 
176
    }
 
177
  callback = (GMarshalFunc_VOID__POINTER_INT_POINTER_POINTER) (marshal_data ? marshal_data : cc->callback);
 
178
 
 
179
  callback (data1,
 
180
            g_marshal_value_peek_pointer (param_values + 1),
 
181
            g_marshal_value_peek_int (param_values + 2),
 
182
            g_marshal_value_peek_pointer (param_values + 3),
 
183
            g_marshal_value_peek_pointer (param_values + 4),
 
184
            data2);
 
185
}
 
186
 
 
187
/* VOID:POINTER (./rhythmdb-marshal.list:4) */
 
188
#define rhythmdb_marshal_VOID__POINTER  g_cclosure_marshal_VOID__POINTER
 
189
 
 
190
G_END_DECLS
 
191
 
 
192
#endif /* __rhythmdb_marshal_MARSHAL_H__ */
 
193