| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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_MOUNT_NODE_STREAM_H_ | 5 #ifndef LIBRARIES_NACL_IO_MOUNT_NODE_STREAM_H_ |
| 6 #define LIBRARIES_NACL_IO_MOUNT_NODE_STREAM_H_ | 6 #define LIBRARIES_NACL_IO_MOUNT_NODE_STREAM_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "nacl_io/event_emitter_pipe.h" | 11 #include "nacl_io/event_emitter_pipe.h" |
| 12 #include "nacl_io/mount_node.h" | 12 #include "nacl_io/mount_node.h" |
| 13 #include "sdk_util/atomicops.h" | 13 #include "sdk_util/atomicops.h" |
| 14 | 14 |
| 15 namespace nacl_io { | 15 namespace nacl_io { |
| 16 | 16 |
| 17 class MountNodeStream; | 17 class MountNodeStream; |
| 18 class MountStream; | 18 class MountStream; |
| 19 | 19 |
| 20 typedef sdk_util::ScopedRef<MountNodeStream> ScopedMountNodeStream; | 20 typedef sdk_util::ScopedRef<MountNodeStream> ScopedMountNodeStream; |
| 21 | 21 |
| 22 enum StreamStateFlags { | 22 enum StreamStateFlags { |
| 23 SSF_CONNECTING = 0x0001, | 23 SSF_CONNECTING = 0x0001, |
| 24 SSF_SENDING = 0x0002, | 24 SSF_SENDING = 0x0002, |
| 25 SSF_RECVING = 0x0004, | 25 SSF_RECVING = 0x0004, |
| 26 SSF_CLOSING = 0x0008, | 26 SSF_CLOSING = 0x0008, |
| 27 SSF_LISTENING = 0x000f, |
| 27 SSF_CAN_SEND = 0x0020, | 28 SSF_CAN_SEND = 0x0020, |
| 28 SSF_CAN_RECV = 0x0040, | 29 SSF_CAN_RECV = 0x0040, |
| 30 SSF_CAN_ACCEPT = 0x0080, |
| 31 SSF_CAN_CONNECT = 0x00f0, |
| 29 SSF_NON_BLOCK = 0x1000, | 32 SSF_NON_BLOCK = 0x1000, |
| 30 SSF_ERROR = 0x4000, | 33 SSF_ERROR = 0x4000, |
| 31 SSF_CLOSED = 0x8000 | 34 SSF_CLOSED = 0x8000 |
| 32 }; | 35 }; |
| 33 | 36 |
| 34 | 37 |
| 35 class MountNodeStream : public MountNode { | 38 class MountNodeStream : public MountNode { |
| 36 public: | 39 public: |
| 37 explicit MountNodeStream(Mount* mnt); | 40 explicit MountNodeStream(Mount* mnt); |
| 38 | 41 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 53 int read_timeout_; | 56 int read_timeout_; |
| 54 int write_timeout_; | 57 int write_timeout_; |
| 55 | 58 |
| 56 private: | 59 private: |
| 57 sdk_util::Atomic32 stream_state_flags_; | 60 sdk_util::Atomic32 stream_state_flags_; |
| 58 }; | 61 }; |
| 59 | 62 |
| 60 } // namespace nacl_io | 63 } // namespace nacl_io |
| 61 | 64 |
| 62 #endif // LIBRARIES_NACL_IO_MOUNT_NODE_STREAM_H_ | 65 #endif // LIBRARIES_NACL_IO_MOUNT_NODE_STREAM_H_ |
| OLD | NEW |