2 // Open Service Platform
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
9 // http://www.apache.org/licenses/LICENSE-2.0
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
19 * @file FMediaIAudioSessionEventListener.h
20 * @brief This is the header file for the AudioSessionEventListener interface.
22 * This header files contains all the commons things required for IAudioSessionEventListener and associated classes
25 #ifndef _FMEDIA_IAUDIO_SESSION_EVENT_LISTENER_H_
26 #define _FMEDIA_IAUDIO_SESSION_EVENT_LISTENER_H_
28 #include <FMediaAudioManagerTypes.h>
29 #include "FBaseRtIEventListener.h"
31 namespace Tizen { namespace Media
35 * @interface IAudioSessionEventListener
36 * @brief This interface provides a listener that receives events associated with the audio sessions.
42 * The %IAudioSessionEventListener interface specifies the methods used to notify when the application
43 * audio session is interrupted or released.
47 class _OSP_EXPORT_ IAudioSessionEventListener
48 : virtual public Tizen::Base::Runtime::IEventListener
53 * This polymorphic destructor should be overridden if required. This way, the destructors of the derived classes are called when the destructor@n
54 * of this interface is called.
61 virtual ~IAudioSessionEventListener(void) { }
65 * Called when the audio session is interrupted.
72 virtual void OnAudioSessionInterrupted(void) = 0;
76 * Called when the interrupted session is released.
83 virtual void OnAudioSessionInterruptReleased(void) = 0;
85 * Called when an audio recording or playback focus is changed to another application.
88 * @remarks After the audio focus is being changed, the playback or recording task is paused or stopped.
89 * @remarks An application can play or record again, but the interaction between device and user needs for doing it again. Because there is a possibility of a race condition between applications which try to play without the interaction
91 virtual void OnAudioSessionAudioFocusChanged(void) {}
94 // This method is for internal use only. Using this method can cause behavioral, security-related,
95 // and consistency-related issues in the application.
97 // This method is reserved and may change its name at any time without
102 virtual void IAudioSessionEventListener_Reserved1(void) {}
105 // This method is for internal use only. Using this method can cause behavioral, security-related,
106 // and consistency-related issues in the application.
108 // This method is reserved and may change its name at any time without
113 virtual void IAudioSessionEventListener_Reserved2(void) {}
116 // This method is for internal use only. Using this method can cause behavioral, security-related,
117 // and consistency-related issues in the application.
119 // This method is reserved and may change its name at any time without
124 virtual void IAudioSessionEventListener_Reserved3(void) {}