4 * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
21 #include "media-svc.h"
23 int insert_item_begin(bool with_noti, int from_pid)
25 return media_svc_insert_item_begin(with_noti, from_pid);
28 int insert_item_end(uid_t uid)
30 return media_svc_insert_item_end(uid);
33 int insert_item(sqlite3 *handle, const char *storage_id, const char *file_path, uid_t uid)
35 return media_svc_insert_item_bulk(handle, storage_id, file_path, uid);
38 int set_item_validity(const char *file_path, int validity, uid_t uid)
40 return media_svc_set_item_validity(file_path, validity, uid);
43 int send_dir_update_noti(const char *dir_path, const char *folder_id, int update_type, int pid)
45 return media_svc_send_dir_update_noti(dir_path, folder_id, update_type, pid);
48 int check_db(sqlite3 *handle, uid_t uid)
50 return media_svc_check_db(handle, uid);
53 int check_storage(sqlite3 *handle, const char *storage_id, char **storage_path, int *validity)
55 return media_svc_check_storage(handle, storage_id, storage_path, validity);
58 int insert_storage(sqlite3 *handle, const char *storage_id, const char *storage_path, uid_t uid)
60 return media_svc_insert_storage(handle, storage_id, storage_path, uid);
63 int update_storage(sqlite3 *handle, const char *storage_id, const char *storage_path, uid_t uid)
65 return media_svc_update_storage(handle, storage_id, storage_path, uid);
68 int set_storage_validity(const char *storage_id, int validity, uid_t uid)
70 return media_svc_set_storage_validity(storage_id, validity, uid);
73 int set_all_storage_validity(int validity, uid_t uid)
75 return media_svc_set_storage_validity(NULL, validity, uid);
78 int get_storage_id(sqlite3 *handle, const char *path, char *storage_id, uid_t uid)
80 return media_svc_get_storage_id(handle, path, storage_id, uid);
83 int insert_folder(sqlite3 *handle, const char *storage_id, const char *file_path, uid_t uid)
85 return media_svc_insert_folder(handle, storage_id, file_path, uid);
88 int set_folder_validity(sqlite3 *handle, const char *start_path, int validity, bool is_recursive, uid_t uid)
90 return media_svc_set_folder_validity(start_path, validity, is_recursive, uid);
93 int check_folder_exist(sqlite3 *handle, const char *folder_path)
95 return media_svc_check_folder_exist_by_path(handle, folder_path);
98 int get_media_type(const char *path, int *mediatype)
100 return media_svc_get_media_type(path, mediatype);
103 int refresh_item(sqlite3 *handle, const char *path, uid_t uid)
105 return media_svc_refresh_item(handle, true, path, uid);