usb: getting string descriptors, minor improvements
[quarnos.git] / manes / ods / ods_endpoint.h
blob28a24d908609854bcc8a28753f893ac0fa26f315
1 #ifndef _ODS_ENDPOINT_H_
2 #define _ODS_ENDPOINT_H_
4 namespace manes {
5 /**
6 * @brief Object Distribution System
8 * @details ODS is a vital part of Managed Execution System, which
9 * allows to distribute objects regardless of connection types
10 * between endpoints.
12 namespace ods {
13 /**
14 * @brief Endpoint in Object Distribution System
16 * @details Instances of this class represent an endpoint of
17 * Object Distribution System network. It is in charge
18 * of transmitting and receiving both data and
19 * procedure calls.
21 class ods_endpoint {
22 protected:
23 /**
24 * Serializer of objects transported by value.
26 p<data_transmit> data;
28 /**
29 * Serializer of objects transported by reference.
31 p<ref_transmit> ref;
33 /**
34 * Procedure calls serializer.
36 p<call_serializer> caller;
38 /**
39 * Code injector.
41 p<injector> inject_tool;
43 /** Default serializers factory */
44 typedef binary_serializers default_factory;
45 public:
46 /** Representation of public methods */
47 typedef unsigned int method_id;
48 typedef unsigned char* stack;
50 /**
51 * Catch all calls of objects methods.
52 * @param obj observed object
54 virtual void inject(p<obj_ref> obj) = 0;
56 /**
57 * Connect to ODS network
58 * @note Subclasses may require additional configuration,
59 * before connection will be established.
61 virtual void connect() = 0;
63 /** Call caught */
64 virtual void do_call(method_id, stack) = 0;
69 #endif