summaryrefslogtreecommitdiff
path: root/modules/codec/c++/rpc.hpp
diff options
context:
space:
mode:
authorClaudius "keldu" Holeksa <mail@keldu.de>2024-07-04 16:32:14 +0200
committerClaudius "keldu" Holeksa <mail@keldu.de>2024-07-04 16:32:14 +0200
commit40369c781e43282992e720efaaa99fa5e60c0d20 (patch)
tree3a862e006b000adf3aec77334a62eef8eb6215f4 /modules/codec/c++/rpc.hpp
parent596964ba245e17444baa196c16b4531c03f7a4b2 (diff)
Preparation work for loopback
Diffstat (limited to 'modules/codec/c++/rpc.hpp')
-rw-r--r--modules/codec/c++/rpc.hpp60
1 files changed, 3 insertions, 57 deletions
diff --git a/modules/codec/c++/rpc.hpp b/modules/codec/c++/rpc.hpp
index d172ec4..6b63580 100644
--- a/modules/codec/c++/rpc.hpp
+++ b/modules/codec/c++/rpc.hpp
@@ -70,52 +70,15 @@ public:
}
};
+
/**
* Representing data on the remote
*/
template<typename T, typename Encoding, typename Storage, typename Remote>
-class remote_data {
-private:
- id<T> id_;
-public:
- remote_data(const id<T>& id):
- id_{id}
- {}
-
- /**
- * Wait until data arrives
- */
- error_or<data<T, Encoding, Storage>> wait(wait_scope& wait);
+class remote_data;
- /**
- * Asynchronously wait for a result
- */
- conveyor<data<T, Encoding, Storage>> on_receive();
-};
-
-/**
- * Client RPC reference structure
- */
template<typename Iface, typename Encoding, typename Storage, typename Remote>
-class rpc_client {
- /**
- * request the data from the remote
- */
- template<typename IdT>
- remote_data<IdT, Encoding, Storage, Remote> request_data(id<IdT> data);
-
- /** @todo
- * Determine type based on Name
- */
- /*
- template<string_literal Name>
- error_or<
- id<
- typename schema_member_type<Name, Iface>::type
- >
- > call(data_or_id<Input> inp);
- */
-};
+class rpc_client;
/**
* Implementation of a remote server on the backend
@@ -149,22 +112,5 @@ class remote_address {
template<typename Remote>
class remote {
static_assert(always_false<Remote>, "Type of backend not supported");
-
- /**
- * Resolves an address for the remote
- */
- conveyor<remote_address<Remote>> resolve_address();
-
- /**
- * Connect to a remote
- */
- template<typename Iface, typename Encode, typename Storage>
- conveyor<rpc_client<Iface, Encode, Storage, Remote>> connect(const remote_address<Remote>& addr);
-
- /**
- * Start listening
- */
- template<typename Iface, typename Encode, typename Storage>
- rpc_server<Iface, Encode, Storage, Remote> listen();
};
}