- Info
1
6
7
13
14 #ifndef _INCLUDE__PARENT__PARENT_H_
15 #define _INCLUDE__PARENT__PARENT_H_
16
17 #include <base/exception.h>
18 #include <session/capability.h>
19 #include <root/capability.h>
20
21 namespace Genode {
22
23 class Parent
24 {
25 public:
26
27 enum { MSGBUF_SIZE = 256 };
28
29
30
33
34 class Exception : public ::Genode::Exception { };
35 class Service_denied : public Exception { };
36 class Quota_exceeded : public Exception { };
37 class Unavailable : public Exception { };
38
39 protected:
40
41 enum Opcode { EXIT, ANNOUNCE, SESSION, TRANSFER_QUOTA, CLOSE };
42
43 public:
44
45 virtual ~Parent() { }
46
47
50 virtual void exit(int exit_value) = 0;
51
52
55 virtual int announce(const char *service_name,
56 Root_capability service_root) = 0;
57
58
74 virtual Session_capability session(const char *service_name,
75 const char *args) = 0;
76
77
90 virtual void transfer_quota(Session_capability to_session,
91 const char *amount) = 0;
92
93
96 virtual void close(Session_capability session) = 0;
97 };
98 }
99
100 #endif