| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 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 | 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 | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| 11 #ifndef WEBRTC_BASE_EVENT_H__ | 11 #ifndef WEBRTC_BASE_EVENT_H__ |
| 12 #define WEBRTC_BASE_EVENT_H__ | 12 #define WEBRTC_BASE_EVENT_H__ |
| 13 | 13 |
| 14 #if defined(WEBRTC_WIN) | 14 #if defined(WEBRTC_WIN) |
| 15 #include "webrtc/base/win32.h" // NOLINT: consider this a system header. | 15 #include "webrtc/base/win32.h" // NOLINT: consider this a system header. |
| 16 #elif defined(WEBRTC_POSIX) | 16 #elif defined(WEBRTC_POSIX) |
| 17 #include <pthread.h> | 17 #include <pthread.h> |
| 18 #else | 18 #else |
| 19 #error "Must define either WEBRTC_WIN or WEBRTC_POSIX." | 19 #error "Must define either WEBRTC_WIN or WEBRTC_POSIX." |
| 20 #endif | 20 #endif |
| 21 | 21 |
| 22 #include "webrtc/base/basictypes.h" | |
| 23 | |
| 24 namespace rtc { | 22 namespace rtc { |
| 25 | 23 |
| 26 class Event { | 24 class Event { |
| 27 public: | 25 public: |
| 28 static const int kForever = -1; | 26 static const int kForever = -1; |
| 29 | 27 |
| 30 Event(bool manual_reset, bool initially_signaled); | 28 Event(bool manual_reset, bool initially_signaled); |
| 31 ~Event(); | 29 ~Event(); |
| 32 | 30 |
| 33 void Set(); | 31 void Set(); |
| (...skipping 10 matching lines...) Expand all Loading... |
| 44 pthread_mutex_t event_mutex_; | 42 pthread_mutex_t event_mutex_; |
| 45 pthread_cond_t event_cond_; | 43 pthread_cond_t event_cond_; |
| 46 const bool is_manual_reset_; | 44 const bool is_manual_reset_; |
| 47 bool event_status_; | 45 bool event_status_; |
| 48 #endif | 46 #endif |
| 49 }; | 47 }; |
| 50 | 48 |
| 51 } // namespace rtc | 49 } // namespace rtc |
| 52 | 50 |
| 53 #endif // WEBRTC_BASE_EVENT_H__ | 51 #endif // WEBRTC_BASE_EVENT_H__ |
| OLD | NEW |