diff options
author | Claudius 'keldu' Holeksa <mail@keldu.de> | 2024-08-14 10:38:42 +0200 |
---|---|---|
committer | Claudius 'keldu' Holeksa <mail@keldu.de> | 2024-08-14 10:38:42 +0200 |
commit | 991a5cbfea6b4ae6551a17e3e8ec375aec1a2a62 (patch) | |
tree | 6010d55774a62985c1974829f687496ce058b62c /modules/remote-filesystem/c++/transfer.hpp | |
parent | 2a442407538628b7b04c63c0643d521739de6b69 (diff) |
Fixed assignement in data server creation
Diffstat (limited to 'modules/remote-filesystem/c++/transfer.hpp')
-rw-r--r-- | modules/remote-filesystem/c++/transfer.hpp | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/modules/remote-filesystem/c++/transfer.hpp b/modules/remote-filesystem/c++/transfer.hpp new file mode 100644 index 0000000..e3df023 --- /dev/null +++ b/modules/remote-filesystem/c++/transfer.hpp @@ -0,0 +1,49 @@ +#pragma once + +#include "remote.hpp" + +#include <forstio/remote/transfer.hpp> + +namespace saw { +template<typename Schema, typename Encoding> +class data_server<Schema, Encoding, rmt::File> final : public i_data_server<rmt::File> { +private: + ptr<remote<rmt::File>> remote_; + remote_address<rmt::File> addr_; +public: + static constexpr std::pair<uint32_t,uint32_t> class_id{schema_hash<Schema>::apply(), schema_hash<Encoding>::apply()}; + + data_server(ptr<remote<rmt::File>> remote__, ref<remote_address<rmt::File>> addr__): + remote_{remote__}, + addr_{addr__()} + {} + + ~data_server(){ + remote_().deregister_data_server(*this); + } + + SAW_FORBID_MOVE(data_server); + SAW_FORBID_COPY(data_server); + + std::pair<uint32_t,uint32_t> get_class_id() const override { + return class_id; + } + + error_or<void> send(const data<Schema, Encoding>& dat, id<Schema> store_id){ + 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>(); + } + + error_or<void> erase(id<Schema> store_id){ + return make_error<err::not_implemented>(); + } + + error_or<data<Schema,Encoding>> receive(id<Schema> store_id){ + return make_error<err::not_implemented>(); + } + +}; +} |