SLOG(LOG_ERROR, TAG_VCC, "[ERROR] Permission is denied");
return VC_ERROR_PERMISSION_DENIED;
} else if (-1 == g_privilege_allowed) {
- if (false == __check_privilege_initialize()){
+ if (false == __check_privilege_initialize()) {
SLOG(LOG_ERROR, TAG_VCC, "[ERROR] privilege initialize is failed");
return VC_ERROR_PERMISSION_DENIED;
}
int vc_mgr_set_pre_result_cb(vc_mgr_pre_result_cb callback, void* user_data)
{
- if (NULL == callback){
+ if (NULL == callback) {
SLOG(LOG_ERROR, TAG_VCM, "[ERROR] Set error callback : callback is NULL");
return VC_ERROR_INVALID_PARAMETER;
}
if (dbus_error_is_set(&err)) {
SLOG(LOG_ERROR, TAG_VCM, "<<<< vc mgr Get Error message : Get arguments error (%s)", err.message);
dbus_error_free(&err);
- }
- else {
+ } else {
SLOG(LOG_ERROR, TAG_VCM, "<<<< vc mgr Get Error message : reason(%d), daemon_pid(%d), msg(%s)", reason, daemon_pid, err_msg);
__vc_mgr_cb_error(reason, daemon_pid, err_msg);
}
static int __vc_cmd_check_privilege()
{
- char uid[16];
+ char uid[16];
if (0 == g_privilege_allowed) {
SLOG(LOG_ERROR, TAG_VCCMD, "[ERROR] Permission is denied");
return VC_ERROR_PERMISSION_DENIED;
} else if (-1 == g_privilege_allowed) {
- if (false == __check_privilege_initialize()){
+ if (false == __check_privilege_initialize()) {
SLOG(LOG_ERROR, TAG_VCCMD, "[ERROR] privilege initialize is failed");
return VC_ERROR_PERMISSION_DENIED;
}
if (NULL != iter_cmd) {
int iter_type;
if (0 != vc_cmd_get_type((vc_cmd_h)iter_cmd, &iter_type)) {
- SLOG(LOG_ERROR,TAG_VCCMD, "[ERROR] Fail to get command type");
+ SLOG(LOG_ERROR, TAG_VCCMD, "[ERROR] Fail to get command type");
continue;
}
}
SLOG(LOG_DEBUG, vc_info_tag(), "[DEBUG] buffer size (%d)", readn);
- if (10000000 < readn || 0 > readn) {
- SLOG(LOG_DEBUG, vc_info_tag(), "[ERROR] Invalid buffer size");
- fclose(fp);
- return -1;
- }
- int tmp_readn = readn + 10;
+ if (10000000 < readn || 0 > readn) {
+ SLOG(LOG_DEBUG, vc_info_tag(), "[ERROR] Invalid buffer size");
+ fclose(fp);
+ return -1;
+ }
+ int tmp_readn = readn + 10;
*nlp_info = (char*)calloc(tmp_readn, sizeof(char));
- if (NULL == *nlp_info) {
- SLOG(LOG_ERROR, vc_info_tag(), "[ERROR] Out of memory");
- fclose(fp);
- return -1;
- }
+ if (NULL == *nlp_info) {
+ SLOG(LOG_ERROR, vc_info_tag(), "[ERROR] Out of memory");
+ fclose(fp);
+ return -1;
+ }
readn = fread(*nlp_info, 1, readn, fp);
fclose(fp);
VC_PRE_RESULT_EVENT_FINAL_RESULT = 0,
VC_PRE_RESULT_EVENT_PARTIAL_RESULT,
VC_PRE_RESULT_EVENT_ERROR
-}vc_pre_result_event_e;
+} vc_pre_result_event_e;
// support pre-result
typedef bool(*vc_mgr_pre_result_cb)(vc_pre_result_event_e event, const char* result, void *user_data);
VCP_PRE_RESULT_EVENT_FINAL_RESULT = 0,
VCP_PRE_RESULT_EVENT_PARTIAL_RESULT,
VCP_PRE_RESULT_EVENT_ERROR
-}vcp_pre_result_event_e;
+} vcp_pre_result_event_e;
// Add new
typedef void (*vcpe_pre_result_cb)(vcp_pre_result_event_e event, const char* pre_result, void *user_data);
g_bt_extend_count = 0;
#endif
- }
- else if (0 == strncmp(VCP_AUDIO_ID_MSF, g_current_audio_type, strlen(VCP_AUDIO_ID_MSF))) {
+ } else if (0 == strncmp(VCP_AUDIO_ID_MSF, g_current_audio_type, strlen(VCP_AUDIO_ID_MSF))) {
SLOG(LOG_ERROR, TAG_VCD, "[Recorder] call RegisterMSFAudioCallback() function");
#ifdef TV_MSF_WIFI_MODE
return VCD_ERROR_OPERATION_FAILED;
}
#endif
- }
- else if (0 == strncmp(VCP_AUDIO_ID_MSF, g_current_audio_type, strlen(VCP_AUDIO_ID_MSF))) {
+ } else if (0 == strncmp(VCP_AUDIO_ID_MSF, g_current_audio_type, strlen(VCP_AUDIO_ID_MSF))) {
#ifdef TV_MSF_WIFI_MODE
UnRegisterMSFAudioCallback();
stoped = true;
static int __convert_type_to_priority(vc_cmd_type_e type)
{
switch (type) {
- case VC_COMMAND_TYPE_NONE: return 0;
- case VC_COMMAND_TYPE_BACKGROUND: return 1;
- case VC_COMMAND_TYPE_FOREGROUND: return 2;
- case VC_COMMAND_TYPE_WIDGET: return 2;
- case VC_COMMAND_TYPE_SYSTEM: return 3;
- case VC_COMMAND_TYPE_EXCLUSIVE: return 3;
- default: return 0;
+ case VC_COMMAND_TYPE_NONE: return 0;
+ case VC_COMMAND_TYPE_BACKGROUND: return 1;
+ case VC_COMMAND_TYPE_FOREGROUND: return 2;
+ case VC_COMMAND_TYPE_WIDGET: return 2;
+ case VC_COMMAND_TYPE_SYSTEM: return 3;
+ case VC_COMMAND_TYPE_EXCLUSIVE: return 3;
+ default: return 0;
}
}