| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_STREAM_STREAM_H_ | 5 #ifndef LIBRARIES_NACL_IO_STREAM_STREAM_H_ |
| 6 #define LIBRARIES_NACL_IO_STREAM_STREAM_H_ | 6 #define LIBRARIES_NACL_IO_STREAM_STREAM_H_ |
| 7 | 7 |
| 8 #include "nacl_io/filesystem.h" | 8 #include "nacl_io/filesystem.h" |
| 9 | 9 |
| 10 #include "ppapi/c/pp_completion_callback.h" | 10 #include "ppapi/c/pp_completion_callback.h" |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 void EnqueueWork(Work* work); | 47 void EnqueueWork(Work* work); |
| 48 | 48 |
| 49 // Returns a completion callback which will execute the StartWork member | 49 // Returns a completion callback which will execute the StartWork member |
| 50 // of a MountSocketWork object. | 50 // of a MountSocketWork object. |
| 51 static PP_CompletionCallback GetStartCompletion(Work* work); | 51 static PP_CompletionCallback GetStartCompletion(Work* work); |
| 52 | 52 |
| 53 // Returns a completion callback which will execute the RunCallback member | 53 // Returns a completion callback which will execute the RunCallback member |
| 54 // of a MountSocketWork object. | 54 // of a MountSocketWork object. |
| 55 static PP_CompletionCallback GetRunCompletion(Work* work); | 55 static PP_CompletionCallback GetRunCompletion(Work* work); |
| 56 | 56 |
| 57 virtual Error Open(const Path& path, int o_flags, ScopedNode* out_node); | 57 virtual Error OpenWithMode(const Path& path, int o_flags, mode_t mode, |
| 58 ScopedNode* out_node); |
| 58 virtual Error Unlink(const Path& path); | 59 virtual Error Unlink(const Path& path); |
| 59 virtual Error Mkdir(const Path& path, int permissions); | 60 virtual Error Mkdir(const Path& path, int permissions); |
| 60 virtual Error Rmdir(const Path& path); | 61 virtual Error Rmdir(const Path& path); |
| 61 virtual Error Remove(const Path& path); | 62 virtual Error Remove(const Path& path); |
| 62 virtual Error Rename(const Path& path, const Path& newpath); | 63 virtual Error Rename(const Path& path, const Path& newpath); |
| 63 | 64 |
| 64 static void* StreamThreadThunk(void*); | 65 static void* StreamThreadThunk(void*); |
| 65 void StreamThread(); | 66 void StreamThread(); |
| 66 | 67 |
| 67 private: | 68 private: |
| 68 PP_Resource message_loop_; | 69 PP_Resource message_loop_; |
| 69 pthread_cond_t message_cond_; | 70 pthread_cond_t message_cond_; |
| 70 sdk_util::SimpleLock message_lock_; | 71 sdk_util::SimpleLock message_lock_; |
| 71 | 72 |
| 72 friend class KernelProxy; | 73 friend class KernelProxy; |
| 73 DISALLOW_COPY_AND_ASSIGN(StreamFs); | 74 DISALLOW_COPY_AND_ASSIGN(StreamFs); |
| 74 }; | 75 }; |
| 75 | 76 |
| 76 } // namespace nacl_io | 77 } // namespace nacl_io |
| 77 | 78 |
| 78 #endif // LIBRARIES_NACL_IO_STREAM_STREAM_H_ | 79 #endif // LIBRARIES_NACL_IO_STREAM_STREAM_H_ |
| OLD | NEW |