4 * Copyright (c) 2017 Samsung Electronics Co., Ltd. All rights reserved.
6 * Contact: Sangchul Lee <sc11.lee@samsung.com>
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
22 #ifndef __MM_SOUND_FOCUS_SOCKET_H__
23 #define __MM_SOUND_FOCUS_SOCKET_H__
29 #include "include/mm_sound.h"
30 #include "include/mm_sound_focus.h"
32 #define FOCUS_SERVER_SOCK "/tmp/.focus_server.socket"
33 #define MAX_ERROR_LEN 64
36 char func_name[MM_SOUND_NAME_NUM];
39 mm_sound_focus_type_e focus_type;
41 char ext_info[MM_SOUND_NAME_NUM];
42 bool is_in_thread; /* Called within focus callback thread */
43 } _mm_sound_mgr_focus_socket_param_t;
46 #define FOCUS_FUNC_NAME_ACQUIRE "AcquireFocus"
47 #define FOCUS_FUNC_NAME_RELEASE "ReleaseFocus"
50 #define FOCUS_ERROR_NONE "error_none"
51 #define FOCUS_ERROR_INVALID_PARAMETER "error_invalid_parameter"
52 #define FOCUS_ERROR_POLICY "error_policy"
53 #define FOCUS_ERROR_INTERNAL "error_internal"
54 #define FOCUS_ERROR_INVALID_STATE "error_invalid_state"
56 int mm_sound_focus_socket_acquire(int instance, int id, mm_sound_focus_type_e focus_type, int option, const char *ext_info, bool is_in_thread);
57 int mm_sound_focus_socket_release(int instance, int id, mm_sound_focus_type_e focus_type, int option, const char *ext_info, bool is_in_thread);
63 #endif /* __MM_SOUND_FOCUS_SOCKET_H__ */