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.
spice_plugin.h
Go to the documentation of this file.
1 /*
2  * Remmina - The GTK+ Remote Desktop Client
3  * Copyright (C) 2016-2018 Denis Ollier
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor,
18  * Boston, MA 02110-1301, USA.
19  *
20  * In addition, as a special exception, the copyright holders give
21  * permission to link the code of portions of this program with the
22  * OpenSSL library under certain conditions as described in each
23  * individual source file, and distribute linked combinations
24  * including the two.
25  * You must obey the GNU General Public License in all respects
26  * for all of the code used other than OpenSSL. * If you modify
27  * file(s) with this exception, you may extend this exception to your
28  * version of the file(s), but you are not obligated to do so. * If you
29  * do not wish to do so, delete this exception statement from your
30  * version. * If you delete this exception statement from all source
31  * files in the program, then also delete it here.
32  *
33  */
34 
35 #pragma once
36 
37 #include "common/remmina_plugin.h"
38 #include <spice-client.h>
39 #ifdef SPICE_GTK_CHECK_VERSION
40 # if SPICE_GTK_CHECK_VERSION(0, 31, 0)
41 # include <spice-client-gtk.h>
42 # else
43 # include <spice-widget.h>
44 # include <usb-device-widget.h>
45 # endif
46 #else
47 # include <spice-widget.h>
48 # include <usb-device-widget.h>
49 #endif
50 
51 #define GET_PLUGIN_DATA(gp) (RemminaPluginSpiceData *)g_object_get_data(G_OBJECT(gp), "plugin-data")
52 
54 
55 #define REMMINA_PLUGIN_INFO(fmt, ...) \
56  remmina_plugin_service->_remmina_info(__func__, fmt, ##__VA_ARGS__)
57 
58 #define REMMINA_PLUGIN_MESSAGE(fmt, ...) \
59  remmina_plugin_service->_remmina_message(__func, fmt, ##__VA_ARGS__)
60 
61 #define REMMINA_PLUGIN_DEBUG(fmt, ...) \
62  remmina_plugin_service->_remmina_debug(__func__, fmt, ##__VA_ARGS__)
63 
64 #define REMMINA_PLUGIN_WARNING(fmt, ...) \
65  remmina_plugin_service->_remmina_warning(__func__, fmt, ##__VA_ARGS__)
66 
67 /* This will intentionally crash Remmina */
68 #define REMMINA_PLUGIN_ERROR(fmt, ...) \
69  remmina_plugin_service->_remmina_error(__func__, fmt, ##__VA_ARGS__)
70 
71 #define REMMINA_PLUGIN_CRITICAL(fmt, ...) \
72  remmina_plugin_service->_remmina_critical(__func__, fmt, ##__VA_ARGS__)
73 #define REMMINA_PLUGIN_AUDIT(fmt, ...) \
74  remmina_plugin_service->_remmina_audit(__func__, fmt, ##__VA_ARGS__)
75 
76 typedef struct _RemminaPluginSpiceData {
77  SpiceAudio * audio;
78  SpiceDisplay * display;
79  SpiceDisplayChannel * display_channel;
80  SpiceGtkSession * gtk_session;
81  SpiceMainChannel * main_channel;
82  SpiceSession * session;
83  gchar * unixPath;
84  gboolean isUnix;
85 
86 #ifdef SPICE_GTK_CHECK_VERSION
87 # if SPICE_GTK_CHECK_VERSION(0, 31, 0)
88  /* key: SpiceFileTransferTask, value: RemminaPluginSpiceXferWidgets */
89  GHashTable * file_transfers;
90  GtkWidget * file_transfer_dialog;
91 # endif /* SPICE_GTK_CHECK_VERSION(0, 31, 0) */
92 #endif /* SPICE_GTK_CHECK_VERSION */
SpiceDisplay * display
Definition: spice_plugin.h:78
RemminaPluginService * remmina_plugin_service
Definition: rdp_plugin.c:112
SpiceDisplayChannel * display_channel
Definition: spice_plugin.h:79
GHashTable * file_transfers
Definition: spice_plugin.h:89
struct _RemminaPluginSpiceData RemminaPluginSpiceData
GtkWidget * file_transfer_dialog
Definition: spice_plugin.h:90
SpiceGtkSession * gtk_session
Definition: spice_plugin.h:80
SpiceSession * session
Definition: spice_plugin.h:82
SpiceMainChannel * main_channel
Definition: spice_plugin.h:81