static void __on_connected(rpc_port_proxy_vc_setting_proxy_vc_setting_h h, void* user_data)
{
- unsigned int pid = (uintptr_t)user_data;
+ unsigned int pid = (intptr_t)user_data;
vc_setting_tidl_info_s* info = __get_tidl_info_s(pid);
RETM_IF(NULL == info, TAG_VCC, "[ERROR] Fail to get tidl info");
static void __on_disconnected(rpc_port_proxy_vc_setting_proxy_vc_setting_h h, void* user_data)
{
- unsigned int pid = (uintptr_t)user_data;
+ unsigned int pid = (intptr_t)user_data;
vc_setting_tidl_info_s* info = __get_tidl_info_s(pid);
RETM_IF(NULL == info, TAG_VCC, "[ERROR] Fail to get tidl info");
static void __on_rejected(rpc_port_proxy_vc_setting_proxy_vc_setting_h h, void* user_data)
{
- unsigned int pid = (uintptr_t)user_data;
+ unsigned int pid = (intptr_t)user_data;
vc_setting_tidl_info_s* info = __get_tidl_info_s(pid);
RETM_IF(NULL == info, TAG_VCC, "[ERROR] Fail to get tidl info");
};
rpc_port_proxy_vc_setting_proxy_vc_setting_h handle = NULL;
- uintptr_t ptr_pid = pid;
+ intptr_t ptr_pid = pid;
if (0 != rpc_port_proxy_vc_setting_proxy_vc_setting_create(engine_app_id, &rpc_callback, (void*)ptr_pid, &handle)) {
SLOG(LOG_ERROR, TAG_VCC, "[ERROR] Fail rpc_port_proxy_vc_setting_proxy_vc_setting_create");
return NULL;
static void __on_connected(rpc_port_proxy_vc_proxy_vc_h h, void* user_data)
{
- unsigned int pid = (uintptr_t)user_data;
+ unsigned int pid = (intptr_t)user_data;
vc_tidl_info_s* info = __get_tidl_info_s(pid);
RETM_IF(NULL == info, TAG_VCC, "[ERROR] Fail to get tidl info");
static void __on_disconnected(rpc_port_proxy_vc_proxy_vc_h h, void* user_data)
{
- unsigned int pid = (uintptr_t)user_data;
+ unsigned int pid = (intptr_t)user_data;
vc_tidl_info_s* info = __get_tidl_info_s(pid);
RETM_IF(NULL == info, TAG_VCC, "[ERROR] Fail to get tidl info");
//LCOV_EXCL_START
static void __on_rejected(rpc_port_proxy_vc_proxy_vc_h h, void* user_data)
{
- unsigned int pid = (uintptr_t)user_data;
+ unsigned int pid = (intptr_t)user_data;
vc_tidl_info_s* info = __get_tidl_info_s(pid);
RETM_IF(NULL == info, TAG_VCC, "[ERROR] Fail to get tidl info");
};
rpc_port_proxy_vc_proxy_vc_h handle = NULL;
- uintptr_t ptr_pid = pid;
+ intptr_t ptr_pid = pid;
if (0 != rpc_port_proxy_vc_proxy_vc_create(engine_app_id, &rpc_callback, (void*)ptr_pid, &handle)) {
return NULL;
}
SLOG(LOG_DEBUG, TAG_VCCONFIG, " language is NONE");
} else {
unsigned int index = 1;
- for (auto language : __supportedLanguages) {
+ for (auto &language : __supportedLanguages) {
SLOG(LOG_DEBUG, TAG_VCCONFIG, " [%uth] %s", index, language.c_str());
index++;
}
bool VoiceControlEngineInfo::isLanguageValid(const std::string language)
{
- for (auto supportedLanguage : __supportedLanguages) {
+ for (auto &supportedLanguage : __supportedLanguages) {
SLOG(LOG_DEBUG, TAG_VCCONFIG, "Compare language(%s), Target(%s)", supportedLanguage.c_str(), language.c_str());
if (0 == supportedLanguage.compare(language)) {
SLOG(LOG_INFO, TAG_VCCONFIG, "Language(%s) is valid", language.c_str());
SLOG(LOG_DEBUG, TAG_VCCONFIG, " No Engine in engine directory");
} else {
unsigned int index = 0;
- for (auto engineInfo : __engines) {
+ for (auto &engineInfo : __engines) {
SLOG(LOG_DEBUG, TAG_VCCONFIG, "[%uth]", index);
engineInfo.printOutEngine();
}
return nullptr;
}
- SLOG(LOG_INFO, TAG_VCCONFIG, "Get first engine info. size(%u)", __engines.size());
+ SLOG(LOG_INFO, TAG_VCCONFIG, "Get first engine info. size(%zu)", __engines.size());
return make_shared<VoiceControlEngineInfo>(__engines[0]);
}
std::vector<VoiceControlEngineInfo> VoiceControlEngines::getEngines()
{
unique_lock<mutex> lock(__enginesMutex);
- SLOG(LOG_INFO, TAG_VCCONFIG, "Get engines. size(%u)", __engines.size());
+ SLOG(LOG_INFO, TAG_VCCONFIG, "Get engines. size(%zu)", __engines.size());
return __engines;
}
bool VoiceControlEngines::isEngineEmpty()
{
unique_lock<mutex> lock(__enginesMutex);
- SLOG(LOG_INFO, TAG_VCCONFIG, "Length of engines (%u)", __engines.size());
+ SLOG(LOG_INFO, TAG_VCCONFIG, "Length of engines (%zu)", __engines.size());
return __engines.empty();
}
rpc_port_stub_vcd_stub_vc_context_get_tag(context, &tag);
if (NULL != tag) {
- int pid = (uintptr_t)tag;
+ int pid = (intptr_t)tag;
SLOG(LOG_DEBUG, TAG_VCD, "@@@ VC FINALIZE. pid(%u)", pid);
pthread_mutex_lock(&g_client_tidl_info_mutex);
SLOG(LOG_ERROR, TAG_VCD, "[TIDL ERROR] Fail to add tidl info.");
return ret;
}
-
+
ret = vcd_client_set_tidl_notify_cb(pid, callback, user_data);
if (0 != ret) {
SLOG(LOG_ERROR, TAG_VCD, "[TIDL ERROR] Fail to set notify callback.");
SLOG(LOG_ERROR, TAG_VCD, "[TIDL ERROR] Fail to add tidl info.");
return ret;
}
-
+
ret = vcd_client_set_tidl_feedback_cb(pid, callback, user_data);
if (0 != ret) {
SLOG(LOG_ERROR, TAG_VCD, "[TIDL ERROR] Fail to set feedback callback.");
int ret = VCD_ERROR_OPERATION_FAILED;
- uintptr_t ptr_pid = pid;
+ intptr_t ptr_pid = pid;
rpc_port_stub_vcd_stub_vc_context_set_tag(context, (void*)ptr_pid);
ret = vcd_server_initialize(pid);
} else {
SLOG(LOG_ERROR, TAG_VCD, "[ERROR] Fail to vcd unset command : pid(%d), cmd_type(%d) ret(%d)", pid, cmd_type, ret);
}
-
+
return ret;
}
SLOG(LOG_ERROR, TAG_VCD, "[ERROR] Fail to vcd set foreground : pid(%d) ret(%d)", pid, ret);
return ret;
}
-
+
SLOG(LOG_INFO, TAG_VCD, "[IN] vcd set foreground : pid(%d)", pid);
vcdc_send_request_set_foreground(pid, value);
} else {
SLOG(LOG_ERROR, TAG_VCD, "[ERROR] Fail to vcd set server dialog : pid(%d), app_id(%s) ret(%d)", pid, app_id, ret);
}
-
+
return ret;
}
} else {
SLOG(LOG_ERROR, TAG_VCD, "[ERROR] Fail to vcd request dialog : pid(%d), disp_text(%s), utt_text(%s), continuous(%d), ret(%d)", pid, disp_text, utt_text, continuous, ret);
}
-
+
return VCD_ERROR_NONE;
}
} else {
SLOG(LOG_ERROR, TAG_VCD, "[ERROR] Fail to vcd check system command is valid : pid(%d), ret(%d)", pid, ret);
}
-
+
return ret;
}
} else {
SLOG(LOG_ERROR, TAG_VCD, "[ERROR] Fail to vcd request tts : pid(%d), text(%s), language(%s), to_vcm(%d), ret(%d)", pid, text, lang, to_vcm, ret);
}
-
+
return ret;
}
} else {
SLOG(LOG_ERROR, TAG_VCD, "[ERROR] Fail to vcd cancel tts : pid(%d), utt_id(%d), ret(%d)", pid, utt_id, ret);
}
-
+
return ret;
}
} else {
SLOG(LOG_ERROR, TAG_VCD, "[ERROR] Fail to vcd get tts audio format : pid(%d) ret(%d)", pid, ret);
}
-
+
return ret;
}
{
SLOG(LOG_INFO, TAG_VCD, "@@@ VCD Widget Initialize");
- uintptr_t ptr_pid = pid;
+ intptr_t ptr_pid = pid;
int ret = -1;
rpc_port_stub_vcd_widget_stub_vc_widget_context_set_tag(context, (void*)ptr_pid);
SLOG(LOG_ERROR, TAG_VCD, "[TIDL ERROR] Fail to add tidl info.");
return ret;
}
-
+
ret = vcd_client_setting_set_tidl_notify_cb(pid, callback, user_data);
if (0 != ret) {
SLOG(LOG_ERROR, TAG_VCD, "[TIDL ERROR] Fail to set notify callback.");
bundle_add_str(msg, VC_BUNDLE_METHOD, VCD_METHOD_SET_SERVICE_STATE);
bundle_add_str(msg, VC_BUNDLE_SERVICE_STATE, tmp_state);
-
+
__send_signal(msg, VCD_CLIENT_TYPE_MANAGER);
__send_signal(msg, VCD_CLIENT_TYPE_NORMAL);
__send_signal(msg, VCD_CLIENT_TYPE_WIDGET);