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 #ifndef LIBRARIES_NACL_IO_MOUNT_DEV_H_ | 5 #ifndef LIBRARIES_NACL_IO_MOUNT_DEV_H_ |
6 #define LIBRARIES_NACL_IO_MOUNT_DEV_H_ | 6 #define LIBRARIES_NACL_IO_MOUNT_DEV_H_ |
7 | 7 |
8 #include "nacl_io/mount.h" | 8 #include "nacl_io/mount.h" |
9 #include "nacl_io/typed_mount_factory.h" | 9 #include "nacl_io/typed_mount_factory.h" |
10 | 10 |
| 11 namespace nacl_io { |
| 12 |
11 class MountNode; | 13 class MountNode; |
12 | 14 |
13 class MountDev : public Mount { | 15 class MountDev : public Mount { |
14 public: | 16 public: |
15 virtual Error Access(const Path& path, int a_mode); | 17 virtual Error Access(const Path& path, int a_mode); |
16 virtual Error Open(const Path& path, int mode, ScopedMountNode* out_node); | 18 virtual Error Open(const Path& path, int mode, ScopedMountNode* out_node); |
17 virtual Error Unlink(const Path& path); | 19 virtual Error Unlink(const Path& path); |
18 virtual Error Mkdir(const Path& path, int permissions); | 20 virtual Error Mkdir(const Path& path, int permissions); |
19 virtual Error Rmdir(const Path& path); | 21 virtual Error Rmdir(const Path& path); |
20 virtual Error Remove(const Path& path); | 22 virtual Error Remove(const Path& path); |
21 | 23 |
22 protected: | 24 protected: |
23 MountDev(); | 25 MountDev(); |
24 | 26 |
25 virtual Error Init(int dev, StringMap_t& args, PepperInterface* ppapi); | 27 virtual Error Init(int dev, StringMap_t& args, PepperInterface* ppapi); |
26 | 28 |
27 private: | 29 private: |
28 ScopedMountNode root_; | 30 ScopedMountNode root_; |
29 | 31 |
30 friend class TypedMountFactory<MountDev>; | 32 friend class TypedMountFactory<MountDev>; |
31 DISALLOW_COPY_AND_ASSIGN(MountDev); | 33 DISALLOW_COPY_AND_ASSIGN(MountDev); |
32 }; | 34 }; |
33 | 35 |
| 36 } // namespace nacl_io |
| 37 |
34 #endif // LIBRARIES_NACL_IO_MOUNT_DEV_H_ | 38 #endif // LIBRARIES_NACL_IO_MOUNT_DEV_H_ |
OLD | NEW |