return vcd_client_foreach_command((client_foreach_command_cb)callback, user_data);
}
-int vcd_engine_agent_get_command_count(vce_cmd_h vce_command)
+int vcd_engine_agent_get_command_count(vce_cmd_h vce_command, int* count)
{
SLOG(LOG_DEBUG, TAG_VCD, "[Engine Agent] Request command length from engine");
- return vcd_client_get_length();
+ *count = vcd_client_get_length();
+ return 0;
}
int vcd_engine_agent_get_audio_type(char** audio_type)
/* for engine service */
int vcd_engine_agent_get_foreach_command(vce_cmd_h vce_command, vce_command_cb callback, void* user_data);
-int vcd_engine_agent_get_command_count(vce_cmd_h vce_command);
+int vcd_engine_agent_get_command_count(vce_cmd_h vce_command, int* count);
int vcd_engine_agent_get_audio_type(char** audio_type);
return ret;
}
-int vcd_get_command_count(vce_cmd_h vce_command)
+int vcd_get_command_count(vce_cmd_h vce_command, int* count)
{
SLOG(LOG_DEBUG, TAG_VCD, "[Server] Get command count");
int ret = 0;
- ret = vcd_engine_agent_get_command_count(vce_command);
- if (0 > ret) {
+ ret = vcd_engine_agent_get_command_count(vce_command, count);
+ if (0 != ret) {
SLOG(LOG_ERROR, TAG_VCD, "[Server ERROR] Fail to get command count : ret(%d)", ret);
}
int vcd_get_foreach_command(vce_cmd_h vce_command, vce_command_cb callback, void* user_data);
-int vcd_get_command_count(vce_cmd_h vce_command);
+int vcd_get_command_count(vce_cmd_h vce_command, int* count);
int vcd_get_audio_type(char** audio_type);
{
int ret = VCE_ERROR_NONE;
- ret = vcd_get_command_count(vce_command);
+ if (NULL == count) {
+ SLOG(LOG_ERROR, TAG_VCD, "[ERROR] Invalid parameter");
+ return VCE_ERROR_INVALID_PARAMETER;
+ }
+ ret = vcd_get_command_count(vce_command, count);
if (0 != ret) {
SLOG(LOG_ERROR, TAG_VCD, "[ERROR] Fail to get command count");
}