usb: getting string descriptors, minor improvements
[quarnos.git] / manes / ods / efc.h
blob781e245d3114bb856cc81c3b468943e44b02a78a
1 #include "rpc_caller.h"
3 #include "object_stream.h"
5 namespace manes {
6 namespace ods {
7 class efc_stub : public rpc_stub {
8 public:
9 virtual ~efc_stub(){}
10 buffer vtable;
11 void *main;
13 void serialize(manes::ods::object_stream &ostr) {
14 ostr.start<efc_stub>();
15 ostr << vtable;
16 ostr << main;
19 void deserialize(manes::ods::object_stream &ostr) {
20 ostr >> vtable;
21 ostr >> main;
25 class efc : public rpc_caller {
26 protected:
27 struct obj_stub {
28 void *vtable;
29 void *object;
32 public:
33 virtual void inject(p<obj_ref> obj, caller_type tpe);
34 virtual p<rpc_stub> create_stub(p<obj_ref> obj, caller_type tpe);
35 virtual p<obj_ref> ref_from_stub(p<rpc_stub> stub);
37 virtual unsigned int call(p<obj_ref>, method_id, buffer&);
39 virtual unsigned int call_local(p<obj_ref>, method_id, buffer&);
40 virtual unsigned int call_far(p<obj_ref>, method_id, buffer&);
41 virtual unsigned int call_remote(p<obj_ref>, method_id, buffer&);
43 static void create() {
44 instance = new efc();