3 #include <l4/sys/capability>
4 #include <l4/re/dataspace>
5 #include <l4/cxx/ipc_stream>
8 * Interface class for remote object.
10 * Inherits vrom L4::Kobject, via the L4::Kobject_t helper
11 * template that generates the dynamic type information for the meta
14 class My_interface : public L4::Kobject_t<My_interface, L4::Kobject>
16 // Disable instantiation and copy, because we just qork via
17 // L4::Cap<...> references.
18 L4_KOBJECT(My_interface)
22 * The singe method of our object.
23 * Requesting the data space and the IRQ to notify the server.
25 int get_shared_buffer(L4::Cap<L4Re::Dataspace> ds, L4::Cap<L4::Irq> irq) throw();
31 My_interface::get_shared_buffer(L4::Cap<L4Re::Dataspace> ds, L4::Cap<L4::Irq> irq) throw()
33 L4::Ipc::Iostream s(l4_utcb());
34 // we have just a single operation, so no opcode needed
37 // put receive buffer for data-space cap and the irq cap into the stream
38 s << L4::Ipc::Small_buf(ds)
39 << L4::Ipc::Small_buf(irq);
41 return l4_error(s.call(cap()));