int __mm_sound_mgr_focus_ipc_register_focus(int client_pid, int handle_id, const char* stream_type, bool is_for_session);
int __mm_sound_mgr_focus_ipc_set_focus_reacquisition(int pid, int handle_id, bool reacquisition);
int __mm_sound_mgr_focus_ipc_get_acquired_focus_stream_type(int focus_type, char **stream_type, int *option, char **ext_info);
-int __mm_sound_mgr_focus_ipc_acquire_focus(int pid, int handle_id, int focus_type, int option, const char *ext_info);
-int __mm_sound_mgr_focus_ipc_release_focus(int pid, int handle_id, int focus_type, int option, const char *ext_info);
+int __mm_sound_mgr_focus_ipc_acquire_focus(int pid, int handle_id, int focus_type, int option, const char *ext_info, bool is_for_session);
+int __mm_sound_mgr_focus_ipc_release_focus(int pid, int handle_id, int focus_type, int option, const char *ext_info, bool is_for_session);
int __mm_sound_mgr_focus_ipc_watch_focus(int pid, int handle_id, int focus_type, bool is_for_session);
int __mm_sound_mgr_focus_ipc_unwatch_focus(int pid, int handle_id);
int __mm_sound_mgr_focus_ipc_unregister_focus(int pid, int handle_id);
x_node->taken_##x_postfix[i].by_session = x_by_session; \
} while (0)
+#define CHECK_MY_NODE(x_node, x_param) \
+ (x_node && !x_node->is_for_watch && (x_node->pid == x_param->pid) && (x_node->handle_id == x_param->handle_id) && (x_node->is_for_session == x_param->is_for_session))
+
static char* __get_focus_pipe_path(int instance_id, int handle, const char* postfix, bool is_watch)
{
gchar* path = NULL;
for (list = g_focus_node_list; list != NULL; list = list->next) {
node = (focus_node_t *)list->data;
- if (node && !node->is_for_watch && (node->pid == param->pid) && (node->handle_id == param->handle_id)) {
+ if (CHECK_MY_NODE(node, param)) {
debug_error("the node of pid[%d]/handle_id[%d] is already created\n", param->pid, param->handle_id);
ret = MM_ERROR_INVALID_ARGUMENT;
goto FINISH;
for (list = g_focus_node_list; list != NULL; list = list->next) {
node = (focus_node_t *)list->data;
- if (node && !node->is_for_watch && (node->pid == param->pid) && (node->handle_id == param->handle_id)) {
+ if (CHECK_MY_NODE(node, param)) {
debug_log("found the node of pid[%d]/handle_id[%d]\n", param->pid, param->handle_id);
my_node = node;
break;
/* Find node to set reacquisition */
for (list = g_focus_node_list; list != NULL; list = list->next) {
node = (focus_node_t *)list->data;
- if (node && !node->is_for_watch && (node->pid == param->pid) && (node->handle_id == param->handle_id)) {
+ if (CHECK_MY_NODE(node, param)) {
if (node->reacquisition == param->reacquisition) {
debug_msg("it is already set as same value of reacquisition(%d)\n", param->reacquisition);
goto FINISH;
for (list = g_focus_node_list; list != NULL; list = list->next) {
node = (focus_node_t *)list->data;
- if (node && !node->is_for_watch && (node->pid == param->pid) && (node->handle_id == param->handle_id)) {
+ if (CHECK_MY_NODE(node, param)) {
my_node = node;
if ((my_node->status > FOCUS_STATUS_DEACTIVATED) && (my_node->status & param->request_type)) {
debug_error("focus status is already activated");
for (list = g_focus_node_list; list != NULL; list = list->next) {
node = (focus_node_t *)list->data;
- if (node && !node->is_for_watch && (node->pid == param->pid) && (node->handle_id == param->handle_id)) {
+ if (CHECK_MY_NODE(node, param)) {
my_node = node;
if (my_node->status == FOCUS_STATUS_DEACTIVATED) {
debug_error("focus status is already deactivated");
}
g_variant_get(params, "(iiiisb)", &pid, &handle_id, &focus_type, &option, &ext_info, &is_for_session);
- ret = __mm_sound_mgr_focus_ipc_acquire_focus((is_for_session) ? pid : _get_sender_pid(invocation), handle_id, focus_type, option, ext_info);
+ ret = __mm_sound_mgr_focus_ipc_acquire_focus((is_for_session) ? pid : _get_sender_pid(invocation), handle_id, focus_type, option, ext_info, is_for_session);
send_reply:
if (ret == MM_ERROR_NONE) {
}
g_variant_get(params, "(iiiisb)", &pid, &handle_id, &focus_type, &option, &ext_info, &is_for_session);
- ret = __mm_sound_mgr_focus_ipc_release_focus((is_for_session) ? pid : _get_sender_pid(invocation), handle_id, focus_type, option, ext_info);
+ ret = __mm_sound_mgr_focus_ipc_release_focus((is_for_session) ? pid : _get_sender_pid(invocation), handle_id, focus_type, option, ext_info, is_for_session);
send_reply:
if (ret == MM_ERROR_NONE) {
param.pid = pid;
param.handle_id = handle_id;
param.reacquisition = reacquisition;
+ param.is_for_session = false;
ret = mm_sound_mgr_focus_set_reacquisition(¶m);
}
// method -> callback
-int __mm_sound_mgr_focus_ipc_acquire_focus(int pid, int handle_id, int focus_type, int option, const char *ext_info)
+int __mm_sound_mgr_focus_ipc_acquire_focus(int pid, int handle_id, int focus_type, int option, const char *ext_info, bool is_for_session)
{
_mm_sound_mgr_focus_param_t param;
int ret = MM_ERROR_NONE;
param.handle_id = handle_id;
param.request_type = focus_type;
param.option = option;
+ param.is_for_session = is_for_session;
MMSOUND_STRNCPY(param.ext_info, ext_info, MM_SOUND_NAME_NUM);
ret = mm_sound_mgr_focus_request_acquire(¶m);
}
// method -> callback
-int __mm_sound_mgr_focus_ipc_release_focus(int pid, int handle_id, int focus_type, int option, const char *ext_info)
+int __mm_sound_mgr_focus_ipc_release_focus(int pid, int handle_id, int focus_type, int option, const char *ext_info, bool is_for_session)
{
_mm_sound_mgr_focus_param_t param;
int ret = MM_ERROR_NONE;
param.handle_id = handle_id;
param.request_type = focus_type;
param.option = option;
+ param.is_for_session = is_for_session;
MMSOUND_STRNCPY(param.ext_info, ext_info, MM_SOUND_NAME_NUM);
ret = mm_sound_mgr_focus_request_release(¶m);
Name: libmm-sound
Summary: MMSound Package contains client lib and sound_server binary
-Version: 0.10.68
+Version: 0.10.69
Release: 0
Group: System/Libraries
License: Apache-2.0