| OLD | NEW |
| 1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2016 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_GOOGLEDRIVEFS_NODE_H_ | 5 #ifndef LIBRARIES_NACL_IO_GOOGLEDRIVEFS_NODE_H_ |
| 6 #define LIBRARIES_NACL_IO_GOOGLEDRIVEFS_NODE_H_ | 6 #define LIBRARIES_NACL_IO_GOOGLEDRIVEFS_NODE_H_ |
| 7 | 7 |
| 8 #include <sys/stat.h> | 8 #include <sys/stat.h> |
| 9 | 9 |
| 10 #include "nacl_io/googledrivefs/googledrivefs.h" | 10 #include "nacl_io/googledrivefs/googledrivefs.h" |
| 11 #include "nacl_io/kernel_handle.h" | 11 #include "nacl_io/kernel_handle.h" |
| 12 #include "nacl_io/node.h" | 12 #include "nacl_io/node.h" |
| 13 #include "nacl_io/osdirent.h" | 13 #include "nacl_io/osdirent.h" |
| 14 | 14 |
| 15 namespace nacl_io { | 15 namespace nacl_io { |
| 16 | 16 |
| 17 // This is not further implemented. |
| 18 // PNaCl is on a path to deprecation, and WebAssembly is |
| 19 // the focused technology. |
| 20 |
| 17 class GoogleDriveFsNode : public Node { | 21 class GoogleDriveFsNode : public Node { |
| 18 public: | 22 public: |
| 19 GoogleDriveFsNode(GoogleDriveFs* googledrivefs); | 23 GoogleDriveFsNode(GoogleDriveFs* googledrivefs); |
| 20 | 24 |
| 21 Error GetDents(size_t offs, struct dirent* pdir, size_t size, int* out_bytes); | 25 Error GetDents(size_t offs, struct dirent* pdir, size_t size, int* out_bytes); |
| 22 Error Write(const HandleAttr& attr, | 26 Error Write(const HandleAttr& attr, |
| 23 const void* buf, | 27 const void* buf, |
| 24 size_t count, | 28 size_t count, |
| 25 int* out_bytes); | 29 int* out_bytes); |
| 26 Error FTruncate(off_t length); | 30 Error FTruncate(off_t length); |
| 27 Error Read(const HandleAttr& attr, void* buf, size_t count, int* out_bytes); | 31 Error Read(const HandleAttr& attr, void* buf, size_t count, int* out_bytes); |
| 28 Error GetSize(off_t* out_size); | 32 Error GetSize(off_t* out_size); |
| 29 Error GetStat(struct stat* pstat); | 33 Error GetStat(struct stat* pstat); |
| 30 Error Init(int open_flags); | 34 Error Init(int open_flags); |
| 31 }; | 35 }; |
| 32 | 36 |
| 33 } // namespace nacl_io | 37 } // namespace nacl_io |
| 34 | 38 |
| 35 #endif // LIBRARIES_NACL_IO_GOOGLEDRIVEFS_NODE_H_ | 39 #endif // LIBRARIES_NACL_IO_GOOGLEDRIVEFS_NODE_H_ |
| OLD | NEW |