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