#ifdef __cplusplus
-
+#include <pthread.h>
#include <mm_session.h>
#include <mm_session_private.h>
#include <mm_sound.h>
#include <mm_sound_focus.h>
+#include <sound_manager.h>
+#include <sound_manager_internal.h>
namespace tizen_media_audio {
virtual ~CAudioSessionHandler();
/* Methods */
- virtual void initialize() throw(CAudioError);
+ virtual void initialize();
virtual void finalize();
- bool isSkipSessionEvent() throw(CAudioError);
+ bool isSkipSession();
- void registerSound() throw(CAudioError);
- void unregisterSound() throw(CAudioError);
+ void registerSound();
+ void unregisterSound();
- void updatePlaying() throw(CAudioError);
- void updateStop() throw(CAudioError);
- void disableSessionHandler() throw(CAudioError);
+ void updatePlaying();
+ void updateStop();
+ void disableSessionHandler();
/* Setter & Getter */
int getId();
int getOptions();
EAudioSessionType getAudioSession();
MMSessionType getMultimediaSession();
+ void getInternalVoipStreamInfo(sound_stream_info_h *stream_info);
unsigned int getSubscribeId();
CAudioInfo getAudioInfo();
CAudioError __convertStreamType(EAudioSessionType type1, MMSessionType type2, int *index);
CAudioError __getAsmInformation(MMSessionType *type, int *options);
bool __isFocusRequired(MMSessionType type, int options);
+ bool __isFocusDisableReacquisitionRequired(MMSessionType type, int options);
+ void __lockFocusIdMutex();
+ void __unlockFocusIdMutex();
+ void __lockFocusCBMutex();
+ void __unlockFocusCBMutex();
+ bool __checkNeedBlock(const char *focus_acquired_by);
/* Static Member */
static int __sCaptureRef;
unsigned int __mSubscribeId;
bool __mUseFocus;
- mm_sound_focus_type_e __mFocusType; /* For audio focus */
- mm_sound_focus_state_e __mState; /* For audio focus */
+ int __mAcquiredFocus; /* For audio focus */
char* __mReasonForChange; /* For audio focus */
char* __mAdditionalInfo; /* For audio focus */
+
+ pthread_mutex_t __mFocusIdMutex;
+ pthread_mutex_t __mFocusCBMutex;
};