Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/Remmina/Remmina.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiovanni Panozzo <giovanni@panozzo.it>2019-02-25 17:37:23 +0300
committerGiovanni Panozzo <giovanni@panozzo.it>2019-03-16 14:15:36 +0300
commitea0aab940df379f1844d9091094c189c4f39f2d9 (patch)
tree9b00ee1919a75394075f413a1ae7ec4e107f0d3e
parent379a42c9264ef244e24b62e5a816ff90ab3995ca (diff)
Add initial libfuse support
-rw-r--r--cmake/FindLIBFUSE.cmake38
-rw-r--r--src/CMakeLists.txt10
-rw-r--r--src/remmina.c4
-rw-r--r--src/remmina_fuse.c64
-rw-r--r--src/remmina_fuse.h44
5 files changed, 160 insertions, 0 deletions
diff --git a/cmake/FindLIBFUSE.cmake b/cmake/FindLIBFUSE.cmake
new file mode 100644
index 000000000..a559f91aa
--- /dev/null
+++ b/cmake/FindLIBFUSE.cmake
@@ -0,0 +1,38 @@
+# Remmina - The GTK+ Remote Desktop Client
+#
+# Copyright (C) 2016-2019 Antenore Gatta, Giovanni Panozzo
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301, USA.
+
+include(FindPackageHandleStandardArgs)
+
+pkg_check_modules(PC_LIBFUSE fuse)
+
+find_path(LIBFUSE_INCLUDE_DIR NAMES fuse.h
+ HINTS ${PC_LIBFUSE_INCLUDE_DIRS})
+
+find_library(LIBFUSE_LIBRARY NAMES fuse)
+
+if (LIBFUSE_INCLUDE_DIR AND LIBFUSE_LIBRARY)
+ find_package_handle_standard_args(LIBFUSE DEFAULT_MSG LIBFUSE_LIBRARY LIBFUSE_INCLUDE_DIR)
+endif()
+
+if (LIBFUSE_FOUND)
+ add_definitions(-DHAVE_LIBFUSE)
+endif()
+
+mark_as_advanced(LIBFUSE_INCLUDE_DIR LIBFUSE_LIBRARY)
+
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 299152754..897370900 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -60,6 +60,8 @@ list(APPEND REMMINA_SRCS
"remmina_file_manager.h"
"remmina_ftp_client.c"
"remmina_ftp_client.h"
+ "remmina_fuse.h"
+ "remmina_fuse.c"
"remmina_icon.c"
"remmina_icon.h"
"remmina_key_chooser.c"
@@ -184,6 +186,14 @@ if(VTE_FOUND)
target_link_libraries(remmina ${VTE_LIBRARIES})
endif()
+find_required_package(LIBFUSE)
+if(LIBFUSE_FOUND)
+ include_directories(${LIBFUSE_INCLUDE_DIR})
+ target_link_libraries(remmina ${LIBFUSE_LIBRARIES})
+else()
+ message(FATAL_ERROR "libfuse library not found")
+endif()
+
if(GTK3_FOUND)
find_suggested_package(APPINDICATOR)
if(APPINDICATOR_FOUND)
diff --git a/src/remmina.c b/src/remmina.c
index ef4751a05..6ed6348fb 100644
--- a/src/remmina.c
+++ b/src/remmina.c
@@ -55,6 +55,7 @@
#include "remmina_widget_pool.h"
#include "remmina/remmina_trace_calls.h"
#include "remmina_stats_sender.h"
+#include "remmina_fuse.h"
#ifdef HAVE_ERRNO_H
@@ -233,6 +234,9 @@ static void remmina_on_startup(GApplication *app)
REMMINA_RUNTIME_DATADIR G_DIR_SEPARATOR_S "icons");
g_application_hold(app);
+ /* Initialize FUSE filesystem */
+ remmina_fuse_init();
+
remmina_stats_sender_schedule();
/* Check for secret plugin and service initialization and show some warnings on the console if
diff --git a/src/remmina_fuse.c b/src/remmina_fuse.c
new file mode 100644
index 000000000..b0dc26ead
--- /dev/null
+++ b/src/remmina_fuse.c
@@ -0,0 +1,64 @@
+/*
+ * Remmina - The GTK+ Remote Desktop Client
+ * Copyright (C) 2009-2011 Vic Lee
+ * Copyright (C) 2014-2015 Antenore Gatta, Fabio Castelli, Giovanni Panozzo
+ * Copyright (C) 2016-2019 Antenore Gatta, Giovanni Panozzo
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
+ * In addition, as a special exception, the copyright holders give
+ * permission to link the code of portions of this program with the
+ * OpenSSL library under certain conditions as described in each
+ * individual source file, and distribute linked combinations
+ * including the two.
+ * You must obey the GNU General Public License in all respects
+ * for all of the code used other than OpenSSL. * If you modify
+ * file(s) with this exception, you may extend this exception to your
+ * version of the file(s), but you are not obligated to do so. * If you
+ * do not wish to do so, delete this exception statement from your
+ * version. * If you delete this exception statement from all source
+ * files in the program, then also delete it here.
+ *
+ */
+
+#include "config.h"
+
+#include <glib.h>
+#include "remmina.h"
+#include "remmina_fuse.h"
+
+#define FUSE_USE_VERSION 26
+#include <fuse_lowlevel.h>
+
+static gchar *fuse_mountpoint = NULL;
+static gboolean fuse_initialized = FALSE;
+
+void remmina_fuse_init()
+{
+ const gchar *rtdir;
+
+ if (fuse_initialized)
+ return;
+
+ rtdir = g_get_user_runtime_dir();
+
+ printf("GIO: rtdir is %s\n", rtdir);
+
+
+}
+
+
+
diff --git a/src/remmina_fuse.h b/src/remmina_fuse.h
new file mode 100644
index 000000000..1ad2e8711
--- /dev/null
+++ b/src/remmina_fuse.h
@@ -0,0 +1,44 @@
+/*
+ * Remmina - The GTK+ Remote Desktop Client
+ * Copyright (C) 2010 Vic Lee
+ * Copyright (C) 2017-2019 Antenore Gatta, Giovanni Panozzo
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
+ * In addition, as a special exception, the copyright holders give
+ * permission to link the code of portions of this program with the
+ * OpenSSL library under certain conditions as described in each
+ * individual source file, and distribute linked combinations
+ * including the two.
+ * You must obey the GNU General Public License in all respects
+ * for all of the code used other than OpenSSL. * If you modify
+ * file(s) with this exception, you may extend this exception to your
+ * version of the file(s), but you are not obligated to do so. * If you
+ * do not wish to do so, delete this exception statement from your
+ * version. * If you delete this exception statement from all source
+ * files in the program, then also delete it here.
+ *
+ */
+
+#pragma once
+
+G_BEGIN_DECLS
+
+void remmina_fuse_init(void);
+
+G_END_DECLS
+
+