summaryrefslogtreecommitdiff
path: root/modules/remote-filesystem/c++/transfer.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/remote-filesystem/c++/transfer.hpp')
-rw-r--r--modules/remote-filesystem/c++/transfer.hpp49
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>();
+ }
+
+};
+}