Remmina - The GTK+ Remote Desktop Client  v1.4.33
Remmina is a remote desktop client written in GTK+, aiming to be useful for system administrators and travellers, who need to work with lots of remote computers in front of either large monitors or tiny netbooks. Remmina supports multiple network protocols in an integrated and consistent user interface. Currently RDP, VNC, NX, XDMCP and SSH are supported.
remmina_marshals.c
Go to the documentation of this file.
1 /*
2  * Remmina - The GTK+ Remote Desktop Client
3  * Copyright (C) 2009-2011 Vic Lee
4  * Copyright (C) 2011 Marc-Andre Moreau
5  * Copyright (C) 2014-2015 Antenore Gatta, Fabio Castelli, Giovanni Panozzo
6  * Copyright (C) 2016-2023 Antenore Gatta, Giovanni Panozzo
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor,
21  * Boston, MA 02110-1301, USA.
22  *
23  * In addition, as a special exception, the copyright holders give
24  * permission to link the code of portions of this program with the
25  * OpenSSL library under certain conditions as described in each
26  * individual source file, and distribute linked combinations
27  * including the two.
28  * You must obey the GNU General Public License in all respects
29  * for all of the code used other than OpenSSL. * If you modify
30  * file(s) with this exception, you may extend this exception to your
31  * version of the file(s), but you are not obligated to do so. * If you
32  * do not wish to do so, delete this exception statement from your
33  * version. * If you delete this exception statement from all source
34  * files in the program, then also delete it here.
35  *
36  */
37 
38 #include <glib-object.h>
40 
41 #ifdef G_ENABLE_DEBUG
42 #define g_marshal_value_peek_boolean(v) g_value_get_boolean(v)
43 #define g_marshal_value_peek_char(v) g_value_get_char(v)
44 #define g_marshal_value_peek_uchar(v) g_value_get_uchar(v)
45 #define g_marshal_value_peek_int(v) g_value_get_int(v)
46 #define g_marshal_value_peek_uint(v) g_value_get_uint(v)
47 #define g_marshal_value_peek_long(v) g_value_get_long(v)
48 #define g_marshal_value_peek_ulong(v) g_value_get_ulong(v)
49 #define g_marshal_value_peek_int64(v) g_value_get_int64(v)
50 #define g_marshal_value_peek_uint64(v) g_value_get_uint64(v)
51 #define g_marshal_value_peek_enum(v) g_value_get_enum(v)
52 #define g_marshal_value_peek_flags(v) g_value_get_flags(v)
53 #define g_marshal_value_peek_float(v) g_value_get_float(v)
54 #define g_marshal_value_peek_double(v) g_value_get_double(v)
55 #define g_marshal_value_peek_string(v) (char*)g_value_get_string(v)
56 #define g_marshal_value_peek_param(v) g_value_get_param(v)
57 #define g_marshal_value_peek_boxed(v) g_value_get_boxed(v)
58 #define g_marshal_value_peek_pointer(v) g_value_get_pointer(v)
59 #define g_marshal_value_peek_object(v) g_value_get_object(v)
60 #else /* !G_ENABLE_DEBUG */
61 /* WARNING: This code accesses GValues directly, which is UNSUPPORTED API.
62  * Do not access GValues directly in your code. Instead, use the
63  * g_value_get_*() functions
64  */
65 #define g_marshal_value_peek_boolean(v) (v)->data[0].v_int
66 #define g_marshal_value_peek_char(v) (v)->data[0].v_int
67 #define g_marshal_value_peek_uchar(v) (v)->data[0].v_uint
68 #define g_marshal_value_peek_int(v) (v)->data[0].v_int
69 #define g_marshal_value_peek_uint(v) (v)->data[0].v_uint
70 #define g_marshal_value_peek_long(v) (v)->data[0].v_long
71 #define g_marshal_value_peek_ulong(v) (v)->data[0].v_ulong
72 #define g_marshal_value_peek_int64(v) (v)->data[0].v_int64
73 #define g_marshal_value_peek_uint64(v) (v)->data[0].v_uint64
74 #define g_marshal_value_peek_enum(v) (v)->data[0].v_long
75 #define g_marshal_value_peek_flags(v) (v)->data[0].v_ulong
76 #define g_marshal_value_peek_float(v) (v)->data[0].v_float
77 #define g_marshal_value_peek_double(v) (v)->data[0].v_double
78 #define g_marshal_value_peek_string(v) (v)->data[0].v_pointer
79 #define g_marshal_value_peek_param(v) (v)->data[0].v_pointer
80 #define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer
81 #define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer
82 #define g_marshal_value_peek_object(v) (v)->data[0].v_pointer
83 #endif /* !G_ENABLE_DEBUG */
84 
85 /* BOOLEAN:INT (remminamarshals.list:4) */
86 void
87 remmina_marshal_BOOLEAN__INT(GClosure *closure,
88  GValue *return_value G_GNUC_UNUSED,
89  guint n_param_values,
90  const GValue *param_values,
91  gpointer invocation_hint G_GNUC_UNUSED,
92  gpointer marshal_data)
93 {
94  TRACE_CALL(__func__);
95  typedef gboolean (*GMarshalFunc_BOOLEAN__INT) (gpointer data1,
96  gint arg_1,
97  gpointer data2);
98  register GMarshalFunc_BOOLEAN__INT callback;
99  register GCClosure *cc = (GCClosure*)closure;
100  register gpointer data1, data2;
101  gboolean v_return;
102 
103  g_return_if_fail(return_value != NULL);
104  g_return_if_fail(n_param_values == 2);
105 
106  if (G_CCLOSURE_SWAP_DATA(closure)) {
107  data1 = closure->data;
108  data2 = g_value_peek_pointer(param_values + 0);
109  }else {
110  data1 = g_value_peek_pointer(param_values + 0);
111  data2 = closure->data;
112  }
113  callback = (GMarshalFunc_BOOLEAN__INT)(marshal_data ? marshal_data : cc->callback);
114 
115  v_return = callback(data1,
116  g_marshal_value_peek_int(param_values + 1)
117  ,
118  data2);
119 
120  g_value_set_boolean(return_value, v_return);
121 }
122 
123 /* BOOLEAN:INT,STRING (remminamarshals.list:5) */
124 void
126  GValue *return_value G_GNUC_UNUSED,
127  guint n_param_values,
128  const GValue *param_values,
129  gpointer invocation_hint G_GNUC_UNUSED,
130  gpointer marshal_data)
131 {
132  TRACE_CALL(__func__);
133  typedef gboolean (*GMarshalFunc_BOOLEAN__INT_STRING) (gpointer data1,
134  gint arg_1,
135  gpointer arg_2,
136  gpointer data2);
137  register GMarshalFunc_BOOLEAN__INT_STRING callback;
138  register GCClosure *cc = (GCClosure*)closure;
139  register gpointer data1, data2;
140  gboolean v_return;
141 
142  g_return_if_fail(return_value != NULL);
143  g_return_if_fail(n_param_values == 3);
144 
145  if (G_CCLOSURE_SWAP_DATA(closure)) {
146  data1 = closure->data;
147  data2 = g_value_peek_pointer(param_values + 0);
148  }else {
149  data1 = g_value_peek_pointer(param_values + 0);
150  data2 = closure->data;
151  }
152  callback = (GMarshalFunc_BOOLEAN__INT_STRING)(marshal_data ? marshal_data : cc->callback);
153 
154  v_return = callback(data1,
155  g_marshal_value_peek_int(param_values + 1),
156  g_marshal_value_peek_string(param_values + 2),
157  data2);
158 
159  g_value_set_boolean(return_value, v_return);
160 }
161 
void remmina_marshal_BOOLEAN__INT_STRING(GClosure *closure, GValue *return_value G_GNUC_UNUSED, guint n_param_values, const GValue *param_values, gpointer invocation_hint G_GNUC_UNUSED, gpointer marshal_data)
void remmina_marshal_BOOLEAN__INT(GClosure *closure, GValue *return_value G_GNUC_UNUSED, guint n_param_values, const GValue *param_values, gpointer invocation_hint G_GNUC_UNUSED, gpointer marshal_data)