summaryrefslogtreecommitdiff
path: root/modules/remote-filesystem/c++
diff options
context:
space:
mode:
authorClaudius 'keldu' Holeksa <mail@keldu.de>2024-08-14 10:19:32 +0200
committerClaudius 'keldu' Holeksa <mail@keldu.de>2024-08-14 10:19:32 +0200
commit2a442407538628b7b04c63c0643d521739de6b69 (patch)
tree5fa20a4786b868e81ad26d9ccd16ec62ba159d5a /modules/remote-filesystem/c++
parentfad5d37382552af7328dd67d038c1eaf44cf0aee (diff)
Adding a macro for simpler test writing and wip on fs
Diffstat (limited to 'modules/remote-filesystem/c++')
-rw-r--r--modules/remote-filesystem/c++/SConscript24
-rw-r--r--modules/remote-filesystem/c++/remote.hpp2
-rw-r--r--modules/remote-filesystem/c++/transport.hpp4
3 files changed, 14 insertions, 16 deletions
diff --git a/modules/remote-filesystem/c++/SConscript b/modules/remote-filesystem/c++/SConscript
index 2bf03be..621afdc 100644
--- a/modules/remote-filesystem/c++/SConscript
+++ b/modules/remote-filesystem/c++/SConscript
@@ -10,29 +10,29 @@ Import('env')
dir_path = Dir('.').abspath
# Environment for base library
-remote-filesystem_env = env.Clone();
+remote_filesystem_env = env.Clone();
-remote-filesystem_env.sources = sorted(glob.glob(dir_path + "/*.cpp"))
-remote-filesystem_env.headers = sorted(glob.glob(dir_path + "/*.hpp"))
+remote_filesystem_env.sources = sorted(glob.glob(dir_path + "/*.cpp"))
+remote_filesystem_env.headers = sorted(glob.glob(dir_path + "/*.hpp"))
-env.sources += remote-filesystem_env.sources;
-env.headers += remote-filesystem_env.headers;
+env.sources += remote_filesystem_env.sources;
+env.headers += remote_filesystem_env.headers;
## Shared lib
objects_shared = []
-remote-filesystem_env.add_source_files(objects_shared, remote-filesystem_env.sources, shared=True);
-env.library_shared = remote-filesystem_env.SharedLibrary('#build/forstio-remote-filesystem', [objects_shared]);
+remote_filesystem_env.add_source_files(objects_shared, remote_filesystem_env.sources, shared=True);
+env.library_shared = remote_filesystem_env.SharedLibrary('#build/forstio-remote_filesystem', [objects_shared]);
## Static lib
objects_static = []
-remote-filesystem_env.add_source_files(objects_static, remote-filesystem_env.sources, shared=False);
-env.library_static = remote-filesystem_env.StaticLibrary('#build/forstio-remote-filesystem', [objects_static]);
+remote_filesystem_env.add_source_files(objects_static, remote_filesystem_env.sources, shared=False);
+env.library_static = remote_filesystem_env.StaticLibrary('#build/forstio-remote_filesystem', [objects_static]);
# Set Alias
-env.Alias('library_remote-filesystem', [env.library_shared, env.library_static]);
+env.Alias('library_remote_filesystem', [env.library_shared, env.library_static]);
-env.targets += ['library_remote-filesystem'];
+env.targets += ['library_remote_filesystem'];
# Install
env.Install('$prefix/lib/', [env.library_shared, env.library_static]);
-env.Install('$prefix/include/forstio/remote/filesystem/', [remote-filesystem_env.headers]);
+env.Install('$prefix/include/forstio/remote/filesystem/', [remote_filesystem_env.headers]);
diff --git a/modules/remote-filesystem/c++/remote.hpp b/modules/remote-filesystem/c++/remote.hpp
index 062d7ee..8390501 100644
--- a/modules/remote-filesystem/c++/remote.hpp
+++ b/modules/remote-filesystem/c++/remote.hpp
@@ -41,7 +41,7 @@ public:
template<typename Schema, typename Encode>
error_or<own<data_server<Schema, Encode, rmt::File>>> data_listen(ref<remote_address<rmt::File>> addr){
- auto insert_res = registered_data_servers_.emplace(std::make_pair(addr.get_path_string(),{}));
+ auto insert_res = registered_data_servers_.emplace(std::make_pair(addr().get_path_string(),ptr<i_data_server<rmt::File>>{}));
if(!insert_res.second){
return make_error<err::already_exists>();
}
diff --git a/modules/remote-filesystem/c++/transport.hpp b/modules/remote-filesystem/c++/transport.hpp
index 367f533..0db4600 100644
--- a/modules/remote-filesystem/c++/transport.hpp
+++ b/modules/remote-filesystem/c++/transport.hpp
@@ -32,12 +32,10 @@ public:
error_or<void> send(const data<Schema, Encoding>& dat, id<Schema> store_id){
try {
}
-
return make_error<err::not_implemented>();
}
error_or<void> allocate(data<typename meta_schema<Schema>::MetaSchema, Encoding> meta, id<Schema> store_id){
-
return make_error<err::not_implemented>();
}
@@ -46,7 +44,7 @@ public:
}
error_or<data<Schema,Encoding>> receive(id<Schema> store_id){
-
+ return make_error<err::not_implemented>();
}
};