*/
#include <string.h>
-#include <sys/stat.h>
#include <mm_file.h>
#include <media-util.h>
#include "media-svc.h"
return MS_MEDIA_ERR_NONE;
}
-int check_item_exist(sqlite3 *handle, const char *storage_id, const char *file_path, bool *modified)
-{
- int ret = MS_MEDIA_ERR_NONE;
- *modified = TRUE;
-
- time_t modified_time = 0;
- unsigned long long file_size = 0;
- struct stat st;
-
- ret = media_svc_get_file_info(handle, storage_id, file_path, &modified_time, &file_size);
- if (ret == MS_MEDIA_ERR_NONE) {
- memset(&st, 0, sizeof(struct stat));
- if (stat(file_path, &st) == 0) {
- if ((st.st_mtime != modified_time) || (st.st_size != file_size))
- *modified = TRUE;
- else
- *modified = FALSE;
- }
-
- return ret;
- }
-
- return ret;
-}
-
int insert_item_begin(int item_cnt, int with_noti, int from_pid)
{
return media_svc_insert_item_begin(item_cnt, with_noti, from_pid);