| 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_NODE_H_ | 5 #ifndef LIBRARIES_NACL_IO_MOUNT_NODE_H_ |
| 6 #define LIBRARIES_NACL_IO_MOUNT_NODE_H_ | 6 #define LIBRARIES_NACL_IO_MOUNT_NODE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "nacl_io/error.h" | 10 #include "nacl_io/error.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 protected: | 30 protected: |
| 31 explicit MountNode(Mount* mount); | 31 explicit MountNode(Mount* mount); |
| 32 virtual ~MountNode(); | 32 virtual ~MountNode(); |
| 33 | 33 |
| 34 protected: | 34 protected: |
| 35 // Initialize with node specific flags, in this case stat permissions. | 35 // Initialize with node specific flags, in this case stat permissions. |
| 36 virtual Error Init(int flags); | 36 virtual Error Init(int flags); |
| 37 virtual void Destroy(); | 37 virtual void Destroy(); |
| 38 | 38 |
| 39 public: | 39 public: |
| 40 // Declared in EventEmitter. defaults to signalled. | 40 // Declared in EventEmitter. defaults to signalled. |
| 41 virtual uint32_t GetEventStatus(); | 41 virtual uint32_t GetEventStatus(); |
| 42 | 42 |
| 43 // Normal OS operations on a node (file), can be called by the kernel | 43 // Normal OS operations on a node (file), can be called by the kernel |
| 44 // directly so it must lock and unlock appropriately. These functions | 44 // directly so it must lock and unlock appropriately. These functions |
| 45 // must not be called by the mount. | 45 // must not be called by the mount. |
| 46 virtual Error FSync(); | 46 virtual Error FSync(); |
| 47 // It is expected that the derived MountNode will fill with 0 when growing | 47 // It is expected that the derived MountNode will fill with 0 when growing |
| 48 // the file. | 48 // the file. |
| 49 virtual Error FTruncate(off_t length); | 49 virtual Error FTruncate(off_t length); |
| 50 // Assume that |out_bytes| is non-NULL. | 50 // Assume that |out_bytes| is non-NULL. |
| 51 virtual Error GetDents(size_t offs, | 51 virtual Error GetDents(size_t offs, |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 friend class MountDev; | 120 friend class MountDev; |
| 121 friend class MountHtml5Fs; | 121 friend class MountHtml5Fs; |
| 122 friend class MountHttp; | 122 friend class MountHttp; |
| 123 friend class MountMem; | 123 friend class MountMem; |
| 124 friend class MountNodeDir; | 124 friend class MountNodeDir; |
| 125 }; | 125 }; |
| 126 | 126 |
| 127 } // namespace nacl_io | 127 } // namespace nacl_io |
| 128 | 128 |
| 129 #endif // LIBRARIES_NACL_IO_MOUNT_NODE_H_ | 129 #endif // LIBRARIES_NACL_IO_MOUNT_NODE_H_ |
| OLD | NEW |