- add sources.
[platform/framework/web/crosswalk.git] / src / native_client_sdk / src / libraries / nacl_io / mount_dev.h
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
3 // found in the LICENSE file.
4
5 #ifndef LIBRARIES_NACL_IO_MOUNT_DEV_H_
6 #define LIBRARIES_NACL_IO_MOUNT_DEV_H_
7
8 #include "nacl_io/mount.h"
9 #include "nacl_io/typed_mount_factory.h"
10
11 namespace nacl_io {
12
13 class MountNode;
14
15 class MountDev : public Mount {
16  public:
17   virtual Error Access(const Path& path, int a_mode);
18   virtual Error Open(const Path& path,
19                      int open_flags,
20                      ScopedMountNode* out_node);
21   virtual Error Unlink(const Path& path);
22   virtual Error Mkdir(const Path& path, int permissions);
23   virtual Error Rmdir(const Path& path);
24   virtual Error Remove(const Path& path);
25
26  protected:
27   MountDev();
28
29   virtual Error Init(int dev, StringMap_t& args, PepperInterface* ppapi);
30
31  private:
32   ScopedMountNode root_;
33
34   friend class TypedMountFactory<MountDev>;
35   DISALLOW_COPY_AND_ASSIGN(MountDev);
36 };
37
38 }  // namespace nacl_io
39
40 #endif  // LIBRARIES_NACL_IO_MOUNT_DEV_H_