Tizen 2.1 base
[framework/multimedia/media-server.git] / common / scanner / include / media-scanner-utils.h
1 /*
2  *  Media Server
3  *
4  * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Contact: Yong Yeon Kim <yy9875.kim@samsung.com>
7  *
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
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
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.
19  *
20  */
21
22 /**
23  * This file defines api utilities of contents manager engines.
24  *
25  * @file                media-server-utils.h
26  * @author      Yong Yeon Kim(yy9875.kim@samsung.com)
27  * @version     1.0
28  * @brief
29  */
30
31 #ifndef _MEDIA_SCANNER_UTILS_H__
32 #define _MEDIA_SCANNER_UTILS_H__
33
34 #include "media-server-types.h"
35
36 bool
37 msc_is_mmc_inserted(void);
38
39 int
40 msc_update_mmc_info(void);
41
42 void
43 msc_mmc_vconf_cb(void *data);
44
45 int
46 msc_get_full_path_from_node(ms_dir_scan_info * const node, char *ret_path, int depth);
47
48 ms_storage_type_t
49 msc_get_storage_type_by_full(const char *path);
50
51 int
52 msc_strappend(char *res, const int size, const char *pattern,
53                  const char *str1, const char *str2);
54
55 int
56 msc_strcopy(char *res, const int size, const char *pattern,
57                const char *str1);
58
59 bool
60 msc_config_get_int(const char *key, int *value);
61
62 bool
63 msc_config_set_int(const char *key, int value);
64
65 bool
66 msc_config_get_str(const char *key, char *value);
67
68 bool
69 msc_config_set_str(const char *key, const char *value);
70
71 #ifdef FMS_PERF
72 void
73 msc_check_start_time(struct timeval *start_time);
74
75 void
76 msc_check_end_time(struct timeval *end_time);
77
78 void
79 msc_check_time_diff(struct timeval *start_time, struct timeval *end_time);
80 #endif/*FMS_PERF */
81
82 /**
83  * @}
84  */
85 #endif/*_MEDIA_SCANNER_UTILS_H__*/
86