mount_dev.h revision d57369da7c6519fef57db42085f7b42d4c8845c1
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, 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 virtual Error Rename(const Path& path, const Path& newpath); 26 27 protected: 28 MountDev(); 29 30 virtual Error Init(const MountInitArgs& args); 31 32 private: 33 ScopedMountNode root_; 34 35 friend class TypedMountFactory<MountDev>; 36 DISALLOW_COPY_AND_ASSIGN(MountDev); 37}; 38 39} // namespace nacl_io 40 41#endif // LIBRARIES_NACL_IO_MOUNT_DEV_H_ 42