Index: webrtc/modules/audio_device/ios/objc/RTCAudioSessionDelegateAdapter.h |
diff --git a/webrtc/modules/audio_device/ios/objc/RTCAudioSessionDelegateAdapter.h b/webrtc/modules/audio_device/ios/objc/RTCAudioSessionDelegateAdapter.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..ee324d7551f1a505f611ea02d9f353e6798badf1 |
--- /dev/null |
+++ b/webrtc/modules/audio_device/ios/objc/RTCAudioSessionDelegateAdapter.h |
@@ -0,0 +1,36 @@ |
+/* |
+ * Copyright 2016 The WebRTC Project Authors. All rights reserved. |
+ * |
+ * Use of this source code is governed by a BSD-style license |
+ * that can be found in the LICENSE file in the root of the source |
+ * tree. An additional intellectual property rights grant can be found |
+ * in the file PATENTS. All contributing project authors may |
+ * be found in the AUTHORS file in the root of the source tree. |
+ */ |
+ |
+#import "webrtc/modules/audio_device/ios/objc/RTCAudioSession.h" |
+ |
+namespace webrtc { |
+ class AudioDeviceIOS; |
+} |
+ |
+namespace rtc { |
+ class Thread; |
+} |
+ |
+/** Adapter that forwards RTCAudioSessionDelegate calls to the appropriate |
+ * methods on the audio device. In addition, calls those methods async on the |
+ * thread supplied during construction. |
+ */ |
+@interface RTCAudioSessionDelegateAdapter : NSObject <RTCAudioSessionDelegate> |
+ |
+- (instancetype)init NS_UNAVAILABLE; |
+ |
+/** Audio device and callback thread are raw pointers and should be kept alive |
henrika_webrtc
2016/03/15 08:53:44
Are there any restrictions on the thread here in o
tkchin_webrtc
2016/03/15 20:14:58
Good pt. Edited interfaces a bit.
|
+ * for this object's lifetime. |
+ */ |
+- (instancetype)initWithAudioDevice:(webrtc::AudioDeviceIOS *)device |
+ callbackThread:(rtc::Thread *)callbackThread |
+ NS_DESIGNATED_INITIALIZER; |
+ |
+@end |