L4Re - L4 Runtime Environment
 All Data Structures Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
namespace
1 // -*- Mode: C++ -*-
2 // vim:ft=cpp
7 /*
8  * (c) 2008-2009 Adam Lackorzynski <adam@os.inf.tu-dresden.de>,
9  * Alexander Warg <warg@os.inf.tu-dresden.de>,
10  * Björn Döbel <doebel@os.inf.tu-dresden.de>
11  * economic rights: Technische Universität Dresden (Germany)
12  *
13  * This file is part of TUD:OS and distributed under the terms of the
14  * GNU General Public License 2.
15  * Please see the COPYING-GPL-2 file for details.
16  *
17  * As a special exception, you may use this file as part of a free software
18  * library without restriction. Specifically, if other files instantiate
19  * templates or use macros or inline functions from this file, or you compile
20  * this file and link it with other files to produce an executable, this
21  * file does not by itself cause the resulting executable to be covered by
22  * the GNU General Public License. This exception does not however
23  * invalidate any other reasons why the executable file might be covered by
24  * the GNU General Public License.
25  */
26 #pragma once
27 
28 #include <l4/sys/capability>
29 #include <l4/re/protocols>
30 
31 namespace L4Re {
32 
58  public L4::Kobject_t<Namespace, L4::Kobject, L4Re::Protocol::Namespace>
59 {
61 
62 public:
67  {
70  Rs = L4_CAP_FPAGE_RS,
71  Rws = L4_CAP_FPAGE_RWS,
72  Strong = L4_CAP_FPAGE_S,
73  Trusted = 0x008,
74 
75  Cap_flags = Ro | Rw | Strong | Trusted,
76 
77  Partly_resolved = 0x020,
78  Link = 0x100,
79  Overwrite = 0x200,
80  };
81 
82  enum Query_timeout
83  {
84  To_default = 3600000,
85  To_non_blocking = 0,
86  To_forever = ~0,
87  };
88 
104  long query(char const *name, L4::Cap<void> const &cap,
105  int timeout = To_default,
106  l4_umword_t *local_id = 0, bool iterate = true) const throw();
107 
124  long query(char const *name, unsigned len, L4::Cap<void> const &cap,
125  int timeout = To_default,
126  l4_umword_t *local_id = 0, bool iterate = true) const throw();
127 
142  long register_obj(char const *name, L4::Cap<void> const &obj,
143  unsigned flags = Rw) const throw();
144 
145  long unlink(char const *name) throw();
146  long link(char const *name, unsigned len,
147  L4::Cap<L4Re::Namespace> src_dir,
148  char const *src_name, unsigned src_len,
149  unsigned flags = Rw) throw();
150 
151 private:
152  long _query(char const *name, unsigned len,
153  L4::Cap<void> const &target, l4_umword_t *local_id,
154  bool iterate) const throw();
155 
156 };
157 
158 };
159 
L4Re - L4 Runtime Environment