RTCNativeAudioSessionDelegateAdapter.h 997 B

123456789101112131415161718192021222324252627282930313233
  1. /*
  2. * Copyright 2018 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. #import "RTCAudioSession.h"
  11. NS_ASSUME_NONNULL_BEGIN
  12. namespace webrtc {
  13. class AudioSessionObserver;
  14. }
  15. /** Adapter that forwards RTCAudioSessionDelegate calls to the appropriate
  16. * methods on the AudioSessionObserver.
  17. */
  18. @interface RTCNativeAudioSessionDelegateAdapter : NSObject <RTC_OBJC_TYPE (RTCAudioSessionDelegate)>
  19. - (instancetype)init NS_UNAVAILABLE;
  20. /** |observer| is a raw pointer and should be kept alive
  21. * for this object's lifetime.
  22. */
  23. - (instancetype)initWithObserver:(webrtc::AudioSessionObserver *)observer NS_DESIGNATED_INITIALIZER;
  24. @end
  25. NS_ASSUME_NONNULL_END