andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. |
| 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license |
| 5 | * that can be found in the LICENSE file in the root of the source |
| 6 | * tree. An additional intellectual property rights grant can be found |
| 7 | * in the file PATENTS. All contributing project authors may |
| 8 | * be found in the AUTHORS file in the root of the source tree. |
| 9 | */ |
| 10 | |
phoglund@webrtc.org | 80b6205 | 2012-12-10 10:44:37 | [diff] [blame] | 11 | #ifndef WEBRTC_SYSTEM_WRAPPERS_SOURCE_EVENT_WIN_H_ |
| 12 | #define WEBRTC_SYSTEM_WRAPPERS_SOURCE_EVENT_WIN_H_ |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 | [diff] [blame] | 13 | |
| 14 | #include <windows.h> |
| 15 | |
Henrik Kjellander | 78f65d0 | 2015-10-28 17:17:40 | [diff] [blame] | 16 | #include "webrtc/system_wrappers/include/event_wrapper.h" |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 | [diff] [blame] | 17 | |
phoglund@webrtc.org | 80b6205 | 2012-12-10 10:44:37 | [diff] [blame] | 18 | #include "webrtc/typedefs.h" |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 | [diff] [blame] | 19 | |
| 20 | namespace webrtc { |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 | [diff] [blame] | 21 | |
Peter Boström | a8c4f43 | 2015-04-08 09:24:19 | [diff] [blame] | 22 | class EventTimerWin : public EventTimerWrapper { |
phoglund@webrtc.org | 80b6205 | 2012-12-10 10:44:37 | [diff] [blame] | 23 | public: |
Peter Boström | a8c4f43 | 2015-04-08 09:24:19 | [diff] [blame] | 24 | EventTimerWin(); |
| 25 | virtual ~EventTimerWin(); |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 | [diff] [blame] | 26 | |
phoglund@webrtc.org | 80b6205 | 2012-12-10 10:44:37 | [diff] [blame] | 27 | virtual EventTypeWrapper Wait(unsigned long max_time); |
| 28 | virtual bool Set(); |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 | [diff] [blame] | 29 | |
phoglund@webrtc.org | 80b6205 | 2012-12-10 10:44:37 | [diff] [blame] | 30 | virtual bool StartTimer(bool periodic, unsigned long time); |
| 31 | virtual bool StopTimer(); |
| 32 | |
| 33 | private: |
| 34 | HANDLE event_; |
pbos@webrtc.org | c0231af | 2013-04-09 09:06:11 | [diff] [blame] | 35 | uint32_t timerID_; |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 | [diff] [blame] | 36 | }; |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 | [diff] [blame] | 37 | |
phoglund@webrtc.org | 80b6205 | 2012-12-10 10:44:37 | [diff] [blame] | 38 | } // namespace webrtc |
| 39 | |
| 40 | #endif // WEBRTC_SYSTEM_WRAPPERS_SOURCE_EVENT_WIN_H_ |