Mercurial > audlegacy-plugins
annotate src/bluetooth/marshal.c @ 2648:6cc858a726b8
added the marshal files
author | Paula Stanciu <paula.stanciu@gmail.com> |
---|---|
date | Sun, 25 May 2008 21:44:27 +0300 |
parents | |
children |
rev | line source |
---|---|
2648
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
1 |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
2 #include <glib-object.h> |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
3 |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
4 |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
5 #ifdef G_ENABLE_DEBUG |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
6 #define g_marshal_value_peek_boolean(v) g_value_get_boolean (v) |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
7 #define g_marshal_value_peek_char(v) g_value_get_char (v) |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
8 #define g_marshal_value_peek_uchar(v) g_value_get_uchar (v) |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
9 #define g_marshal_value_peek_int(v) g_value_get_int (v) |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
10 #define g_marshal_value_peek_uint(v) g_value_get_uint (v) |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
11 #define g_marshal_value_peek_long(v) g_value_get_long (v) |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
12 #define g_marshal_value_peek_ulong(v) g_value_get_ulong (v) |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
13 #define g_marshal_value_peek_int64(v) g_value_get_int64 (v) |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
14 #define g_marshal_value_peek_uint64(v) g_value_get_uint64 (v) |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
15 #define g_marshal_value_peek_enum(v) g_value_get_enum (v) |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
16 #define g_marshal_value_peek_flags(v) g_value_get_flags (v) |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
17 #define g_marshal_value_peek_float(v) g_value_get_float (v) |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
18 #define g_marshal_value_peek_double(v) g_value_get_double (v) |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
19 #define g_marshal_value_peek_string(v) (char*) g_value_get_string (v) |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
20 #define g_marshal_value_peek_param(v) g_value_get_param (v) |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
21 #define g_marshal_value_peek_boxed(v) g_value_get_boxed (v) |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
22 #define g_marshal_value_peek_pointer(v) g_value_get_pointer (v) |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
23 #define g_marshal_value_peek_object(v) g_value_get_object (v) |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
24 #else /* !G_ENABLE_DEBUG */ |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
25 /* WARNING: This code accesses GValues directly, which is UNSUPPORTED API. |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
26 * Do not access GValues directly in your code. Instead, use the |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
27 * g_value_get_*() functions |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
28 */ |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
29 #define g_marshal_value_peek_boolean(v) (v)->data[0].v_int |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
30 #define g_marshal_value_peek_char(v) (v)->data[0].v_int |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
31 #define g_marshal_value_peek_uchar(v) (v)->data[0].v_uint |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
32 #define g_marshal_value_peek_int(v) (v)->data[0].v_int |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
33 #define g_marshal_value_peek_uint(v) (v)->data[0].v_uint |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
34 #define g_marshal_value_peek_long(v) (v)->data[0].v_long |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
35 #define g_marshal_value_peek_ulong(v) (v)->data[0].v_ulong |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
36 #define g_marshal_value_peek_int64(v) (v)->data[0].v_int64 |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
37 #define g_marshal_value_peek_uint64(v) (v)->data[0].v_uint64 |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
38 #define g_marshal_value_peek_enum(v) (v)->data[0].v_long |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
39 #define g_marshal_value_peek_flags(v) (v)->data[0].v_ulong |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
40 #define g_marshal_value_peek_float(v) (v)->data[0].v_float |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
41 #define g_marshal_value_peek_double(v) (v)->data[0].v_double |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
42 #define g_marshal_value_peek_string(v) (v)->data[0].v_pointer |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
43 #define g_marshal_value_peek_param(v) (v)->data[0].v_pointer |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
44 #define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
45 #define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
46 #define g_marshal_value_peek_object(v) (v)->data[0].v_pointer |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
47 #endif /* !G_ENABLE_DEBUG */ |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
48 |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
49 |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
50 /* VOID:STRING,UINT,INT (marshal.list:1) */ |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
51 void |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
52 marshal_VOID__STRING_UINT_INT (GClosure *closure, |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
53 GValue *return_value G_GNUC_UNUSED, |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
54 guint n_param_values, |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
55 const GValue *param_values, |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
56 gpointer invocation_hint G_GNUC_UNUSED, |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
57 gpointer marshal_data) |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
58 { |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
59 typedef void (*GMarshalFunc_VOID__STRING_UINT_INT) (gpointer data1, |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
60 gpointer arg_1, |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
61 guint arg_2, |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
62 gint arg_3, |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
63 gpointer data2); |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
64 register GMarshalFunc_VOID__STRING_UINT_INT callback; |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
65 register GCClosure *cc = (GCClosure*) closure; |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
66 register gpointer data1, data2; |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
67 |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
68 g_return_if_fail (n_param_values == 4); |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
69 |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
70 if (G_CCLOSURE_SWAP_DATA (closure)) |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
71 { |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
72 data1 = closure->data; |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
73 data2 = g_value_peek_pointer (param_values + 0); |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
74 } |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
75 else |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
76 { |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
77 data1 = g_value_peek_pointer (param_values + 0); |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
78 data2 = closure->data; |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
79 } |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
80 callback = (GMarshalFunc_VOID__STRING_UINT_INT) (marshal_data ? marshal_data : cc->callback); |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
81 |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
82 callback (data1, |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
83 g_marshal_value_peek_string (param_values + 1), |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
84 g_marshal_value_peek_uint (param_values + 2), |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
85 g_marshal_value_peek_int (param_values + 3), |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
86 data2); |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
87 } |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
88 |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
89 /* VOID:STRING,STRING (marshal.list:2) */ |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
90 void |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
91 marshal_VOID__STRING_STRING (GClosure *closure, |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
92 GValue *return_value G_GNUC_UNUSED, |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
93 guint n_param_values, |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
94 const GValue *param_values, |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
95 gpointer invocation_hint G_GNUC_UNUSED, |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
96 gpointer marshal_data) |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
97 { |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
98 typedef void (*GMarshalFunc_VOID__STRING_STRING) (gpointer data1, |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
99 gpointer arg_1, |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
100 gpointer arg_2, |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
101 gpointer data2); |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
102 register GMarshalFunc_VOID__STRING_STRING callback; |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
103 register GCClosure *cc = (GCClosure*) closure; |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
104 register gpointer data1, data2; |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
105 |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
106 g_return_if_fail (n_param_values == 3); |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
107 |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
108 if (G_CCLOSURE_SWAP_DATA (closure)) |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
109 { |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
110 data1 = closure->data; |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
111 data2 = g_value_peek_pointer (param_values + 0); |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
112 } |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
113 else |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
114 { |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
115 data1 = g_value_peek_pointer (param_values + 0); |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
116 data2 = closure->data; |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
117 } |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
118 callback = (GMarshalFunc_VOID__STRING_STRING) (marshal_data ? marshal_data : cc->callback); |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
119 |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
120 callback (data1, |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
121 g_marshal_value_peek_string (param_values + 1), |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
122 g_marshal_value_peek_string (param_values + 2), |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
123 data2); |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
124 } |
6cc858a726b8
added the marshal files
Paula Stanciu <paula.stanciu@gmail.com>
parents:
diff
changeset
|
125 |