Remove deprecated APIs and codes for session backward compatibility
[platform/core/multimedia/libmm-sound.git] / focus_server / include / mm_sound_mgr_focus.h
index e8b687e..7c60f5d 100644 (file)
 #include "../include/mm_sound.h"
 #include "../include/mm_sound_focus.h"
 #include "../include/mm_sound_stream.h"
-#include "../include/mm_ipc.h"
 #include "mm_sound_mgr_focus_ipc.h"
 
-typedef enum
-{
+typedef enum {
        FOCUS_COMMAND_RELEASE,
        FOCUS_COMMAND_ACQUIRE,
 } focus_command_e;
 
-typedef enum
-{
+typedef enum {
        FOCUS_TYPE_PLAYBACK = 1,
        FOCUS_TYPE_CAPTURE,
        FOCUS_TYPE_BOTH,
 } focus_type_e;
 
-typedef enum
-{
+typedef enum {
        FOCUS_STATUS_DEACTIVATED,
        FOCUS_STATUS_ACTIVATED_PLAYBACK,
        FOCUS_STATUS_ACTIVATED_CAPTURE,
@@ -53,20 +49,19 @@ typedef struct {
        int pid;
        int handle_id;
        char stream_type[MAX_STREAM_TYPE_LEN];
-       char option[MM_SOUND_NAME_NUM];
+       char ext_info[MM_SOUND_NAME_NUM];
        focus_type_e request_type;
+       int option;
        void *callback;
        void *cbdata;
        bool reacquisition;
-
-       bool is_for_session;    /* will be removed when the session concept is completely left out*/
+       bool is_in_thread;
+       int handle_id_dst;
 } _mm_sound_mgr_focus_param_t;
 
-typedef struct _taken_by_id
-{
+typedef struct _taken_by_id {
        int pid;
        int handle_id;
-       bool by_session;
 } _focus_taken_by_id_t;
 
 typedef struct {
@@ -75,28 +70,28 @@ typedef struct {
        int priority;
        bool is_for_watch;
        char stream_type[MAX_STREAM_TYPE_LEN];
-       char option[NUM_OF_STREAM_IO_TYPE][MM_SOUND_NAME_NUM];
+       char ext_info[NUM_OF_STREAM_IO_TYPE][MM_SOUND_NAME_NUM];
+       int option[NUM_OF_STREAM_IO_TYPE];
        focus_status_e status;
        _focus_taken_by_id_t taken_by_id[NUM_OF_STREAM_IO_TYPE];
        _focus_taken_by_id_t taken_backup[NUM_OF_STREAM_IO_TYPE];
        void *callback;
        void *cbdata;
+       bool during_cb;
        bool reacquisition;
-
-       bool is_for_session;    /* will be removed when the session concept is completely left out*/
-
 } focus_node_t;
 
 int MMSoundMgrFocusInit(void);
 int MMSoundMgrFocusFini(void);
-int mm_sound_mgr_focus_create_node (const _mm_sound_mgr_focus_param_t *param);
-int mm_sound_mgr_focus_destroy_node (const _mm_sound_mgr_focus_param_t *param);
-int mm_sound_mgr_focus_set_reacquisition (const _mm_sound_mgr_focus_param_t *param);
-int mm_sound_mgr_focus_get_stream_type_of_acquired_focus(focus_type_e focus_type, char **stream_type, char **additional_info);
-int mm_sound_mgr_focus_request_acquire (const _mm_sound_mgr_focus_param_t *param);
-int mm_sound_mgr_focus_request_release (const _mm_sound_mgr_focus_param_t *param);
-int mm_sound_mgr_focus_set_watch_cb (const _mm_sound_mgr_focus_param_t *param);
-int mm_sound_mgr_focus_unset_watch_cb (const _mm_sound_mgr_focus_param_t *param);
+int mm_sound_mgr_focus_create_node(const _mm_sound_mgr_focus_param_t *param);
+int mm_sound_mgr_focus_destroy_node(const _mm_sound_mgr_focus_param_t *param);
+int mm_sound_mgr_focus_set_reacquisition(const _mm_sound_mgr_focus_param_t *param);
+int mm_sound_mgr_focus_get_stream_type_of_acquired_focus(focus_type_e focus_type, char **stream_type, int *option, char **ext_info);
+int mm_sound_mgr_focus_request_acquire(const _mm_sound_mgr_focus_param_t *param);
+int mm_sound_mgr_focus_request_release(const _mm_sound_mgr_focus_param_t *param);
+int mm_sound_mgr_focus_set_watch_cb(const _mm_sound_mgr_focus_param_t *param);
+int mm_sound_mgr_focus_unset_watch_cb(const _mm_sound_mgr_focus_param_t *param);
+int mm_sound_mgr_focus_deliver(const _mm_sound_mgr_focus_param_t *param);
 int mm_sound_mgr_focus_emergent_exit(const _mm_sound_mgr_focus_param_t *param);
 
 #endif /* __MM_SOUND_MGR_FOCUS_H__ */