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