Skip to content

Commit 9bdd197

Browse files
committed
Refactoring - Moving all plugins inside the plugins directory
1 parent da29a06 commit 9bdd197

70 files changed

Lines changed: 13397 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

plugins/CMakeLists.txt

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
# Remmina - The GTK+ Remote Desktop Client
2+
#
3+
# Copyright (C) 2011 Marc-Andre Moreau
4+
# Copyright (C) 2014-2015 Antenore Gatta, Fabio Castelli, Giovanni Panozzo
5+
# Copyright (C) 2016-2017 Antenore Gatta, Giovanni Panozzo
6+
#
7+
# This program is free software; you can redistribute it and/or modify
8+
# it under the terms of the GNU General Public License as published by
9+
# the Free Software Foundation; either version 2 of the License, or
10+
# (at your option) any later version.
11+
#
12+
# This program is distributed in the hope that it will be useful,
13+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
14+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15+
# GNU General Public License for more details.
16+
#
17+
# You should have received a copy of the GNU General Public License
18+
# along with this program; if not, write to the Free Software
19+
# Foundation, Inc., 51 Franklin Street, Fifth Floor,
20+
# Boston, MA 02110-1301, USA.
21+
#
22+
# In addition, as a special exception, the copyright holders give
23+
# permission to link the code of portions of this program with the
24+
# OpenSSL library under certain conditions as described in each
25+
# individual source file, and distribute linked combinations
26+
# including the two.
27+
# You must obey the GNU General Public License in all respects
28+
# for all of the code used other than OpenSSL. If you modify
29+
# file(s) with this exception, you may extend this exception to your
30+
# version of the file(s), but you are not obligated to do so. If you
31+
# do not wish to do so, delete this exception statement from your
32+
# version. If you delete this exception statement from all source
33+
# files in the program, then also delete it here.
34+
35+
# Needed FreeRDP version to build freerdp plugin
36+
set(FREERDP_REQUIRED_MAJOR 2)
37+
set(FREERDP_REQUIRED_MINOR 0)
38+
set(FREERDP_REQUIRED_REVISION 0)
39+
set(FREERDP_REQUIRED_VERSIONSTRING
40+
${FREERDP_REQUIRED_MAJOR}.${FREERDP_REQUIRED_MINOR}.${FREERDP_REQUIRED_REVISION})
41+
42+
include_directories(${CMAKE_SOURCE_DIR}/plugins)
43+
44+
set(APPICON16_EMBLEMS_DIR "${REMMINA_DATADIR}/icons/hicolor/16x16/emblems")
45+
set(APPICON22_EMBLEMS_DIR "${REMMINA_DATADIR}/icons/hicolor/22x22/emblems")
46+
47+
set(REMMINA_COMMON_INCLUDE_DIRS ${GTK_INCLUDE_DIRS})
48+
set(REMMINA_COMMON_LIBRARIES ${GTK_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
49+
50+
find_suggested_package(LIBSSH)
51+
if(LIBSSH_FOUND)
52+
add_definitions(-DHAVE_LIBSSH)
53+
include_directories(${SSH_INCLUDE_DIRS})
54+
target_link_libraries(remmina ${SSH_LIBRARIES})
55+
endif()
56+
57+
find_required_package(XKBFILE)
58+
59+
if(LIBSSH_FOUND AND XKBFILE_FOUND)
60+
add_subdirectory(nx)
61+
endif()
62+
63+
add_subdirectory(xdmcp)
64+
65+
find_suggested_package(FREERDP)
66+
if(FREERDP_FOUND)
67+
add_subdirectory(rdp)
68+
endif()
69+
70+
find_suggested_package(TELEPATHY)
71+
if(TELEPATHY_FOUND)
72+
add_subdirectory(telepathy)
73+
endif()
74+
75+
find_suggested_package(LIBVNCSERVER)
76+
if(LIBVNCSERVER_FOUND)
77+
add_subdirectory(vnc)
78+
endif()
79+
80+
find_suggested_package(SPICE)
81+
if(SPICE_FOUND)
82+
add_subdirectory(spice)
83+
endif()
84+
85+
if(WITH_EXAMPLES)
86+
add_subdirectory(tool_hello_world)
87+
endif()
88+
add_subdirectory(exec)

plugins/common/remmina_plugin.h

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
/*
2+
* Remmina - The GTK+ Remote Desktop Client
3+
* Copyright (C) 2010 Vic Lee
4+
* Copyright (C) 2014-2015 Antenore Gatta, Fabio Castelli, Giovanni Panozzo
5+
* Copyright (C) 2016-2017 Antenore Gatta, Giovanni Panozzo
6+
*
7+
* This program is free software; you can redistribute it and/or modify
8+
* it under the terms of the GNU General Public License as published by
9+
* the Free Software Foundation; either version 2 of the License, or
10+
* (at your option) any later version.
11+
*
12+
* This program is distributed in the hope that it will be useful,
13+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15+
* GNU General Public License for more details.
16+
*
17+
* You should have received a copy of the GNU General Public License
18+
* along with this program; if not, write to the Free Software
19+
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
20+
* Boston, MA 02110-1301, USA.
21+
*
22+
* In addition, as a special exception, the copyright holders give
23+
* permission to link the code of portions of this program with the
24+
* OpenSSL library under certain conditions as described in each
25+
* individual source file, and distribute linked combinations
26+
* including the two.
27+
* You must obey the GNU General Public License in all respects
28+
* for all of the code used other than OpenSSL. * If you modify
29+
* file(s) with this exception, you may extend this exception to your
30+
* version of the file(s), but you are not obligated to do so. * If you
31+
* do not wish to do so, delete this exception statement from your
32+
* version. * If you delete this exception statement from all source
33+
* files in the program, then also delete it here.
34+
*
35+
*/
36+
37+
#pragma once
38+
39+
#include "config.h"
40+
#include <gtk/gtk.h>
41+
#include <glib/gi18n-lib.h>
42+
#include <glib/gstdio.h>
43+
#include <remmina/plugin.h>
44+
#include <stdlib.h>
45+
#include <string.h>
46+
#include <unistd.h>
47+
#include <signal.h>
48+
#include <pthread.h>
49+
#ifdef HAVE_NETDB_H
50+
#include <netdb.h>
51+
#endif
52+
#ifdef HAVE_ARPA_INET_H
53+
#include <arpa/inet.h>
54+
#endif
55+
#ifdef HAVE_NETINET_IN_H
56+
#include <netinet/in.h>
57+
#endif
58+
#ifdef HAVE_SYS_SOCKET_H
59+
#include <sys/socket.h>
60+
#endif
61+
#ifdef HAVE_FCNTL_H
62+
#include <fcntl.h>
63+
#endif
64+
#ifdef HAVE_ERRNO_H
65+
#include <errno.h>
66+
#endif
67+
#include "remmina/remmina_trace_calls.h"
68+
69+
typedef void (*PThreadCleanupFunc)(void*);
70+
71+
72+
#define IDLE_ADD gdk_threads_add_idle
73+
#define TIMEOUT_ADD gdk_threads_add_timeout
74+
#define CANCEL_ASYNC pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL); pthread_testcancel();
75+
#define CANCEL_DEFER pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, NULL);
76+
77+
#define THREADS_ENTER _Pragma("GCC error \"THREADS_ENTER has been deprecated in Remmina 1.2\"")
78+
#define THREADS_LEAVE _Pragma("GCC error \"THREADS_LEAVE has been deprecated in Remmina 1.2\"")
79+
80+
#define MAX_X_DISPLAY_NUMBER 99
81+
#define X_UNIX_SOCKET "/tmp/.X11-unix/X%d"
82+
83+
#define INCLUDE_GET_AVAILABLE_XDISPLAY static gint \
84+
remmina_get_available_xdisplay(void) \
85+
{ \
86+
gint i; \
87+
gint display = 0; \
88+
gchar fn[200]; \
89+
for (i = 1; i < MAX_X_DISPLAY_NUMBER; i++) \
90+
{ \
91+
g_snprintf(fn, sizeof(fn), X_UNIX_SOCKET, i); \
92+
if (!g_file_test(fn, G_FILE_TEST_EXISTS)) \
93+
{ \
94+
display = i; \
95+
break; \
96+
} \
97+
} \
98+
return display; \
99+
}
100+
101+
721 Bytes
Loading
1.18 KB
Loading

plugins/exec/CMakeLists.txt

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# remmina-plugin-tool_hello_world - The GTK+ Remote Desktop Client
2+
#
3+
# Copyright (C) 2014-2015 Antenore Gatta, Fabio Castelli, Giovanni Panozzo
4+
# Copyright (C) 2016-2017 Antenore Gatta, Giovanni Panozzo
5+
#
6+
# This program is free software; you can redistribute it and/or modify
7+
# it under the terms of the GNU General Public License as published by
8+
# the Free Software Foundation; either version 2 of the License, or
9+
# (at your option) any later version.
10+
#
11+
# This program is distributed in the hope that it will be useful,
12+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
# GNU General Public License for more details.
15+
#
16+
# You should have received a copy of the GNU General Public License
17+
# along with this program; if not, write to the Free Software
18+
# Foundation, Inc., 51 Franklin Street, Fifth Floor,
19+
# Boston, MA 02110-1301, USA.
20+
#
21+
# In addition, as a special exception, the copyright holders give
22+
# permission to link the code of portions of this program with the
23+
# OpenSSL library under certain conditions as described in each
24+
# individual source file, and distribute linked combinations
25+
# including the two.
26+
# You must obey the GNU General Public License in all respects
27+
# for all of the code used other than OpenSSL. If you modify
28+
# file(s) with this exception, you may extend this exception to your
29+
# version of the file(s), but you are not obligated to do so. If you
30+
# do not wish to do so, delete this exception statement from your
31+
# version. If you delete this exception statement from all source
32+
# files in the program, then also delete it here.
33+
34+
35+
set(REMMINA_PLUGIN_EXEC_SRCS
36+
exec_plugin_config.h
37+
exec_plugin.c
38+
)
39+
40+
add_library(remmina-plugin-exec MODULE ${REMMINA_PLUGIN_EXEC_SRCS})
41+
set_target_properties(remmina-plugin-exec PROPERTIES PREFIX "")
42+
set_target_properties(remmina-plugin-exec PROPERTIES NO_SONAME 1)
43+
44+
include_directories(${REMMINA_COMMON_INCLUDE_DIRS} ${GTK_INCLUDE_DIRS})
45+
target_link_libraries(remmina-plugin-exec ${REMMINA_COMMON_LIBRARIES})
46+
47+
install(TARGETS remmina-plugin-exec DESTINATION ${REMMINA_PLUGINDIR})
48+
49+
install(FILES
50+
16x16/emblems/remmina-tool.png
51+
16x16/emblems/remmina-tool.png
52+
DESTINATION ${APPICON16_EMBLEMS_DIR})
53+
install(FILES
54+
22x22/emblems/remmina-tool.png
55+
22x22/emblems/remmina-tool.png
56+
DESTINATION ${APPICON22_EMBLEMS_DIR})

0 commit comments

Comments
 (0)