- add sources.
[platform/framework/web/crosswalk.git] / src / native_client_sdk / src / libraries / nacl_io / mount_passthrough.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_PASSTHROUGH_H_
6 #define LIBRARIES_NACL_IO_MOUNT_PASSTHROUGH_H_
7
8 #include "nacl_io/mount.h"
9 #include "nacl_io/typed_mount_factory.h"
10
11 namespace nacl_io {
12
13 class MountPassthrough : public Mount {
14  protected:
15   MountPassthrough();
16
17   virtual Error Init(int dev, StringMap_t& args, PepperInterface* ppapi);
18   virtual void Destroy();
19
20  public:
21   virtual Error Access(const Path& path, int a_mode);
22   virtual Error Open(const Path& path, int mode, ScopedMountNode* out_node);
23   virtual Error OpenResource(const Path& path, ScopedMountNode* out_node);
24   virtual Error Unlink(const Path& path);
25   virtual Error Mkdir(const Path& path, int perm);
26   virtual Error Rmdir(const Path& path);
27   virtual Error Remove(const Path& path);
28
29 private:
30  friend class TypedMountFactory<MountPassthrough>;
31  DISALLOW_COPY_AND_ASSIGN(MountPassthrough);
32 };
33
34 }  // namespace nacl_io
35
36 #endif  // LIBRARIES_NACL_IO_MOUNT_PASSTHROUGH_H_