| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef BIN_EVENTHANDLER_WIN_H_ | 5 #ifndef BIN_EVENTHANDLER_WIN_H_ |
| 6 #define BIN_EVENTHANDLER_WIN_H_ | 6 #define BIN_EVENTHANDLER_WIN_H_ |
| 7 | 7 |
| 8 #if !defined(BIN_EVENTHANDLER_H_) | 8 #if !defined(BIN_EVENTHANDLER_H_) |
| 9 #error Do not include eventhandler_win.h directly; use eventhandler.h instead. | 9 #error Do not include eventhandler_win.h directly; use eventhandler.h instead. |
| 10 #endif | 10 #endif |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 | 227 |
| 228 void Lock(); | 228 void Lock(); |
| 229 void Unlock(); | 229 void Unlock(); |
| 230 | 230 |
| 231 bool CreateCompletionPort(HANDLE completion_port); | 231 bool CreateCompletionPort(HANDLE completion_port); |
| 232 | 232 |
| 233 void Close(); | 233 void Close(); |
| 234 virtual void DoClose(); | 234 virtual void DoClose(); |
| 235 virtual bool IsClosed() = 0; | 235 virtual bool IsClosed() = 0; |
| 236 | 236 |
| 237 bool IsHandleClosed() const { return handle_ == INVALID_HANDLE_VALUE; } |
| 238 |
| 237 void SetPortAndMask(Dart_Port port, intptr_t mask) { | 239 void SetPortAndMask(Dart_Port port, intptr_t mask) { |
| 238 port_ = port; | 240 port_ = port; |
| 239 mask_ = mask; | 241 mask_ = mask; |
| 240 } | 242 } |
| 241 Type type() { return type_; } | 243 Type type() { return type_; } |
| 242 bool is_file() { return type_ == kFile; } | 244 bool is_file() { return type_ == kFile; } |
| 243 bool is_socket() { return type_ == kListenSocket || | 245 bool is_socket() { return type_ == kListenSocket || |
| 244 type_ == kClientSocket || | 246 type_ == kClientSocket || |
| 245 type_ == kDatagramSocket; } | 247 type_ == kDatagramSocket; } |
| 246 bool is_listen_socket() { return type_ == kListenSocket; } | 248 bool is_listen_socket() { return type_ == kListenSocket; } |
| (...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 531 | 533 |
| 532 TimeoutQueue timeout_queue_; // Time for next timeout. | 534 TimeoutQueue timeout_queue_; // Time for next timeout. |
| 533 bool shutdown_; | 535 bool shutdown_; |
| 534 HANDLE completion_port_; | 536 HANDLE completion_port_; |
| 535 }; | 537 }; |
| 536 | 538 |
| 537 } // namespace bin | 539 } // namespace bin |
| 538 } // namespace dart | 540 } // namespace dart |
| 539 | 541 |
| 540 #endif // BIN_EVENTHANDLER_WIN_H_ | 542 #endif // BIN_EVENTHANDLER_WIN_H_ |
| OLD | NEW |