diff options
Diffstat (limited to 'modules/remote-filesystem/c++/transport.hpp')
-rw-r--r-- | modules/remote-filesystem/c++/transport.hpp | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/modules/remote-filesystem/c++/transport.hpp b/modules/remote-filesystem/c++/transport.hpp new file mode 100644 index 0000000..367f533 --- /dev/null +++ b/modules/remote-filesystem/c++/transport.hpp @@ -0,0 +1,53 @@ +#pragma once + +#include "remote.hpp" + +#include <forstio/remote/transport.hpp> + +namespace saw { +template<typename Schema, typename Encode> +class data_server<Schema, Encode, 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){ + 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>(); + } + + error_or<void> erase(id<Schema> store_id){ + return make_error<err::not_implemented>(); + } + + error_or<data<Schema,Encoding>> receive(id<Schema> store_id){ + + } + +}; +} |