if (col_ptr->is_trigger) {
if (STRING_VALID(tb->trigger_name)) {
if (strncmp(table_name, MEDIA_SVC_DB_TABLE_ALBUM, strlen(MEDIA_SVC_DB_TABLE_ALBUM)) == 0)
- snprintf(temp, sizeof(temp), MEDIA_SVC_DB_QUERY_TRIGGER_WITH_COUNT, tb->trigger_name, tb->event_table, tb->action_table, tb->event_table, col_ptr->name, col_ptr->name, col_ptr->name, col_ptr->name);
+ snprintf(temp, sizeof(temp), MEDIA_SVC_DB_QUERY_TRIGGER_WITH_COUNT, tb->trigger_name, tb->event_table, tb->action_table, tb->event_table, col_ptr->name, col_ptr->name, col_ptr->name, col_ptr->name);
else
snprintf(temp, sizeof(temp), MEDIA_SVC_DB_QUERY_TRIGGER, tb->trigger_name, tb->event_table, tb->action_table, col_ptr->name, col_ptr->name);
}
mmf_error = mm_file_get_attrs(tag, &err_attr_name, MM_FILE_TAG_AUTHOR, &p, &size, NULL);
- if (mmf_error == FILEINFO_ERROR_NONE && size > 0) {
+ if (mmf_error == FILEINFO_ERROR_NONE && size > 0)
content_info->media_meta.composer = g_strdup(p);
- } else {
+ else
SAFE_FREE(err_attr_name);
- }
mmf_error = mm_file_get_attrs(tag, &err_attr_name, MM_FILE_TAG_COPYRIGHT, &p, &size, NULL);
if (mmf_error == FILEINFO_ERROR_NONE && size > 0)
{
media_svc_debug("Noti from PID(%d)", pid);
- if (update_item == MS_MEDIA_ITEM_FILE) {
+ if (update_item == MS_MEDIA_ITEM_FILE)
media_svc_debug("Noti item : MS_MEDIA_ITEM_FILE");
- } else if (update_item == MS_MEDIA_ITEM_DIRECTORY) {
+ else if (update_item == MS_MEDIA_ITEM_DIRECTORY)
media_svc_debug("Noti item : MS_MEDIA_ITEM_DIRECTORY");
- }
- if (update_type == MS_MEDIA_ITEM_INSERT) {
+ if (update_type == MS_MEDIA_ITEM_INSERT)
media_svc_debug("Noti type : MS_MEDIA_ITEM_INSERT");
- } else if (update_type == MS_MEDIA_ITEM_DELETE) {
+ else if (update_type == MS_MEDIA_ITEM_DELETE)
media_svc_debug("Noti type : MS_MEDIA_ITEM_DELETE");
- } else if (update_type == MS_MEDIA_ITEM_UPDATE) {
+ else if (update_type == MS_MEDIA_ITEM_UPDATE)
media_svc_debug("Noti type : MS_MEDIA_ITEM_UPDATE");
- }
/*media_svc_debug("content type : %d", content_type); */
printf("content type : %d\n", content_type);
media_svc_debug("File : %s\n", filepath);
file_list[idx] = strdup(filepath);
ret = media_svc_insert_item_bulk(g_db_handle, storage_type, file_list[idx], FALSE);
- if (ret != 0) {
+ if (ret != 0)
media_svc_error("media_svc_insert_item_bulk[%d] failed", idx);
- } else {
+ else
media_svc_debug("media_svc_insert_item_bulk[%d] success", idx);
- }
}
ret = media_svc_insert_item_end(tzplatform_getuid(TZ_USER_NAME));
{
int ret = MS_MEDIA_ERR_NONE;
ret = media_svc_connect(&g_db_handle, tzplatform_getuid(TZ_USER_NAME), true);
- if (ret != MS_MEDIA_ERR_NONE) {
+ if (ret != MS_MEDIA_ERR_NONE)
media_svc_error("media_svc_connect failed : %d", ret);
- } else {
+ else
media_svc_debug("media_svc_connect success");
- }
ret = test_noti();
- if (ret < MS_MEDIA_ERR_NONE) {
+ if (ret < MS_MEDIA_ERR_NONE)
media_svc_error("test_noti failed : %d", ret);
- } else {
+ else
media_svc_debug("test_noti success");
- }
media_svc_disconnect(g_db_handle);
return ret;
msg_print(__LINE__, "__load_functions");
funcHandle = dlopen(PLUGIN_SO_FILE_NAME, RTLD_LAZY);
- if (!funcHandle) {
+ if (!funcHandle)
fprintf(stderr, "error: %s\n", dlerror());
- }
svc_connect = dlsym(funcHandle, "connect");
svc_disconnect = dlsym(funcHandle, "disconnect");
{
msg_print(__LINE__, "__unload_functions");
- if (funcHandle) {
+ if (funcHandle)
dlclose(funcHandle);
- }
return 0;
}
#if 1
ret = media_svc_create_table(tzplatform_getuid(TZ_USER_NAME));
- if (ret < 0) {
+ if (ret < 0)
msg_print(__LINE__, "table already exists");
- } else {
+ else
msg_print(__LINE__, "table create success");
- }
#endif
#if 1
} /* End of While */
ret = media_svc_insert_folder(db_handle, 0, path);
- if (ret < 0) {
+ if (ret < 0)
msg_print(__LINE__, "media_svc_insert_folder error ");
- } else {
+ else
msg_print(__LINE__, "media_svc_insert_folder success");
- }
#endif
/*folder test ================================================== */