blob: 13a979bd4eb036d4f6be86c74c916b98175855b1 [file] [log] [blame]
tkchine54467f2016-03-15 16:54:03 -07001/*
2 * Copyright 2016 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
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020011#ifndef MODULES_AUDIO_DEVICE_IOS_AUDIO_SESSION_OBSERVER_H_
12#define MODULES_AUDIO_DEVICE_IOS_AUDIO_SESSION_OBSERVER_H_
tkchine54467f2016-03-15 16:54:03 -070013
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020014#include "rtc_base/asyncinvoker.h"
15#include "rtc_base/thread.h"
tkchine54467f2016-03-15 16:54:03 -070016
17namespace webrtc {
18
19// Observer interface for listening to AVAudioSession events.
20class AudioSessionObserver {
21 public:
22 // Called when audio session interruption begins.
23 virtual void OnInterruptionBegin() = 0;
24
25 // Called when audio session interruption ends.
26 virtual void OnInterruptionEnd() = 0;
27
28 // Called when audio route changes.
29 virtual void OnValidRouteChange() = 0;
30
tkchind2511962016-05-06 18:54:15 -070031 // Called when the ability to play or record changes.
32 virtual void OnCanPlayOrRecordChange(bool can_play_or_record) = 0;
Tze Kwang Chin307a0922016-03-21 13:57:40 -070033
henrikaaf35f832017-06-16 13:22:13 +020034 virtual void OnChangedOutputVolume() = 0;
35
tkchine54467f2016-03-15 16:54:03 -070036 protected:
37 virtual ~AudioSessionObserver() {}
38};
39
40} // namespace webrtc
41
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020042#endif // MODULES_AUDIO_DEVICE_IOS_AUDIO_SESSION_OBSERVER_H_