OLD | NEW |
1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 * Use of this source code is governed by a BSD-style license that can be | 2 * Use of this source code is governed by a BSD-style license that can be |
3 * found in the LICENSE file. | 3 * found in the LICENSE file. |
4 */ | 4 */ |
5 | |
6 #ifndef LIBRARIES_NACL_MOUNTS_KERNEL_PROXY_H_ | 5 #ifndef LIBRARIES_NACL_MOUNTS_KERNEL_PROXY_H_ |
7 #define LIBRARIES_NACL_MOUNTS_KERNEL_PROXY_H_ | 6 #define LIBRARIES_NACL_MOUNTS_KERNEL_PROXY_H_ |
8 | 7 |
9 #include <pthread.h> | 8 #include <pthread.h> |
10 | |
11 #include <map> | 9 #include <map> |
12 #include <string> | 10 #include <string> |
13 #include <vector> | 11 #include <vector> |
14 | 12 |
15 #include "nacl_mounts/path.h" | 13 #include "nacl_mounts/path.h" |
16 #include "nacl_mounts/kernel_object.h" | 14 #include "nacl_mounts/kernel_object.h" |
17 #include "nacl_mounts/mount.h" | 15 #include "nacl_mounts/mount.h" |
| 16 #include "nacl_mounts/ostypes.h" |
18 | 17 |
19 class KernelHandle; | 18 class KernelHandle; |
20 class Mount; | 19 class Mount; |
21 class MountNode; | 20 class MountNode; |
22 | 21 |
23 // KernelProxy provide one-to-one mapping for libc kernel calls. Calls to the | 22 // KernelProxy provide one-to-one mapping for libc kernel calls. Calls to the |
24 // proxy will result in IO access to the provided Mount and MountNode objects. | 23 // proxy will result in IO access to the provided Mount and MountNode objects. |
25 class KernelProxy : protected KernelObject { | 24 class KernelProxy : protected KernelObject { |
26 public: | 25 public: |
27 typedef Mount* (*MountFactory_t)(int, StringMap_t&); | 26 typedef Mount* (*MountFactory_t)(int, StringMap_t&); |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 | 82 |
84 protected: | 83 protected: |
85 MountFactoryMap_t factories_; | 84 MountFactoryMap_t factories_; |
86 int dev_; | 85 int dev_; |
87 | 86 |
88 static KernelProxy *s_instance_; | 87 static KernelProxy *s_instance_; |
89 | 88 |
90 DISALLOW_COPY_AND_ASSIGN(KernelProxy); | 89 DISALLOW_COPY_AND_ASSIGN(KernelProxy); |
91 }; | 90 }; |
92 | 91 |
93 #endif LIBRARIES_NACL_MOUNTS_KERNEL_PROXY_H_ | 92 #endif LIBRARIES_NACL_MOUNTS_KERNEL_PROXY_H_ |
OLD | NEW |