| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_JSFS_JS_FS_H_ | 5 #ifndef LIBRARIES_NACL_IO_JSFS_JS_FS_H_ |
| 6 #define LIBRARIES_NACL_IO_JSFS_JS_FS_H_ | 6 #define LIBRARIES_NACL_IO_JSFS_JS_FS_H_ |
| 7 | 7 |
| 8 #include <pthread.h> | 8 #include <pthread.h> |
| 9 #include <stdarg.h> | 9 #include <stdarg.h> |
| 10 | 10 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 public: | 28 public: |
| 29 typedef uint32_t RequestId; | 29 typedef uint32_t RequestId; |
| 30 | 30 |
| 31 protected: | 31 protected: |
| 32 JsFs(); | 32 JsFs(); |
| 33 | 33 |
| 34 virtual Error Init(const FsInitArgs& args); | 34 virtual Error Init(const FsInitArgs& args); |
| 35 virtual void Destroy(); | 35 virtual void Destroy(); |
| 36 | 36 |
| 37 public: | 37 public: |
| 38 virtual Error Open(const Path& path, int mode, ScopedNode* out_node); | 38 virtual Error OpenWithMode(const Path& path, int open_flags, mode_t mode, |
| 39 ScopedNode* out_node); |
| 39 virtual Error Unlink(const Path& path); | 40 virtual Error Unlink(const Path& path); |
| 40 virtual Error Mkdir(const Path& path, int perm); | 41 virtual Error Mkdir(const Path& path, int perm); |
| 41 virtual Error Rmdir(const Path& path); | 42 virtual Error Rmdir(const Path& path); |
| 42 virtual Error Remove(const Path& path); | 43 virtual Error Remove(const Path& path); |
| 43 virtual Error Rename(const Path& path, const Path& newpath); | 44 virtual Error Rename(const Path& path, const Path& newpath); |
| 44 virtual Error Filesystem_VIoctl(int request, va_list args); | 45 virtual Error Filesystem_VIoctl(int request, va_list args); |
| 45 | 46 |
| 46 private: | 47 private: |
| 47 bool SetDictVar(PP_Var dict, const char* key, PP_Var value); | 48 bool SetDictVar(PP_Var dict, const char* key, PP_Var value); |
| 48 PP_Var GetDictVar(PP_Var dict, const char* key); | 49 PP_Var GetDictVar(PP_Var dict, const char* key); |
| (...skipping 26 matching lines...) Expand all Loading... |
| 75 pthread_cond_t response_cond_; // protected by lock_. | 76 pthread_cond_t response_cond_; // protected by lock_. |
| 76 ResponseMap_t responses_; // protected by lock_. | 77 ResponseMap_t responses_; // protected by lock_. |
| 77 | 78 |
| 78 friend class JsFsNode; | 79 friend class JsFsNode; |
| 79 DISALLOW_COPY_AND_ASSIGN(JsFs); | 80 DISALLOW_COPY_AND_ASSIGN(JsFs); |
| 80 }; | 81 }; |
| 81 | 82 |
| 82 } // namespace nacl_io | 83 } // namespace nacl_io |
| 83 | 84 |
| 84 #endif // LIBRARIES_NACL_IO_JSFS_JS_FS_H_ | 85 #endif // LIBRARIES_NACL_IO_JSFS_JS_FS_H_ |
| OLD | NEW |