4 * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
6 * Contact: Yong Yeon Kim <yy9875.kim@samsung.com>
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
23 * This file defines api utilities of contents manager engines.
25 * @file media-server-db-svc.h
26 * @author Yong Yeon Kim(yy9875.kim@samsung.com)
30 #ifndef _MEDIA_SCANNER_DB_SVC_H_
31 #define _MEDIA_SCANNER_DB_SVC_H_
33 #include "media-server-types.h"
35 typedef int (*CHECK_ITEM)(const char*, const char*, char **);
36 typedef int (*CONNECT)(void**, char **);
37 typedef int (*DISCONNECT)(void*, char **);
38 typedef int (*CHECK_ITEM_EXIST)(void*, const char*, int, char **);
39 typedef int (*INSERT_ITEM_BEGIN)(void*, int, char **);
40 typedef int (*INSERT_ITEM_END)(void*, char **);
41 typedef int (*INSERT_ITEM)(void*, const char*, int, const char*, char **);
42 typedef int (*SET_ALL_STORAGE_ITEMS_VALIDITY)(void*, int, int, char **);
43 typedef int (*SET_ITEM_VALIDITY_BEGIN)(void*, int, char **);
44 typedef int (*SET_ITEM_VALIDITY_END)(void*, char **);
45 typedef int (*SET_ITEM_VALIDITY)(void*, const char*, int, const char*, int, char **);
46 typedef int (*DELETE_ALL_ITEMS_IN_STORAGE)(void*, int, char **);
47 typedef int (*DELETE_ALL_INVALID_ITMES_IN_STORAGE)(void*, int, char **);
48 typedef int (*UPDATE_BEGIN)(void);
49 typedef int (*UPDATE_END)(void);
50 typedef int (*SET_FOLDER_ITEM_VALIDITY)(void*, const char*, int, int, char**);
51 typedef int (*DELETE_ALL_INVALID_ITEMS_IN_FOLDER)(void*, const char*, char**);
54 msc_load_functions(void);
57 msc_unload_functions(void);
60 msc_connect_db(void ***handle);
63 msc_disconnect_db(void ***handle);
66 msc_validate_item(void **handle, char *path);
69 msc_insert_item_batch(void **handle, const char *path);
72 msc_delete_all_items(void **handle, ms_storage_type_t store_type);
75 msc_invalidate_all_items(void **handle, ms_storage_type_t store_type);
78 msc_delete_invalid_items(void **handle, ms_storage_type_t store_type);
81 msc_set_folder_validity(void **handle, const char *path, int validity, int recursive);
84 msc_delete_invalid_items_in_folder(void **handle, const char*path);
86 /****************************************************************************************************
88 *****************************************************************************************************/
91 msc_register_start(void **handle);
94 msc_register_end(void **handle);
97 msc_validate_start(void **handle);
100 msc_validate_end(void **handle);
102 #endif /*_MEDIA_SCANNER_DB_SVC_H_*/