blob: 75571b55fb78ed060b10391743b3383480c7dee0 [file] [log] [blame]
hellner@google.com23a80652011-08-25 21:40:11 +00001/*
niklase@google.com470e71d2011-07-07 08:21:25 +00002 * 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.org5bbe0692012-12-10 10:44:37 +000011#include "webrtc/system_wrappers/interface/event_wrapper.h"
niklase@google.com470e71d2011-07-07 08:21:25 +000012
13#if defined(_WIN32)
phoglund@webrtc.org5bbe0692012-12-10 10:44:37 +000014#include <windows.h>
Minyuecf3c83e2015-04-01 16:31:38 +020015#include "webrtc/system_wrappers/source/event_win.h"
sjlee@webrtc.org414fa7f2012-09-11 17:25:46 +000016#elif defined(WEBRTC_MAC) && !defined(WEBRTC_IOS)
phoglund@webrtc.org5bbe0692012-12-10 10:44:37 +000017#include <ApplicationServices/ApplicationServices.h>
18#include <pthread.h>
Minyuecf3c83e2015-04-01 16:31:38 +020019#include "webrtc/system_wrappers/source/event_posix.h"
niklase@google.com470e71d2011-07-07 08:21:25 +000020#else
phoglund@webrtc.org5bbe0692012-12-10 10:44:37 +000021#include <pthread.h>
Minyuecf3c83e2015-04-01 16:31:38 +020022#include "webrtc/system_wrappers/source/event_posix.h"
niklase@google.com470e71d2011-07-07 08:21:25 +000023#endif
24
25namespace webrtc {
phoglund@webrtc.org5bbe0692012-12-10 10:44:37 +000026EventWrapper* EventWrapper::Create() {
Minyuecf3c83e2015-04-01 16:31:38 +020027#if defined(_WIN32)
28 return new EventWindows();
29#else
30 return EventPosix::Create();
31#endif
niklase@google.com470e71d2011-07-07 08:21:25 +000032}
pbos@webrtc.orgd900e8b2013-07-03 15:12:26 +000033} // namespace webrtc