Update scanner-v2, Fix some bug, and code refactoring
[platform/core/multimedia/media-server.git] / src / common / include / media-common-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 #ifndef _MEDIA_SERVER_UTILS_H__
24 #define _MEDIA_SERVER_UTILS_H__
25
26 #include "media-common-types.h"
27
28 int ms_db_init(bool need_db_create);
29 bool ms_is_mmc_inserted(void);
30 void ms_usb_vconf_cb(void *data);
31 int ms_start(bool need_db_create);
32 void ms_end(void);
33 ms_storage_type_t ms_get_storage_type_by_full(const char *path, uid_t uid);
34 int ms_strappend(char *res, const int size, const char *pattern, const char *str1, const char *str2);
35 int ms_strcopy(char *res, const int size, const char *pattern, const char *str1);
36 bool ms_config_get_int(const char *key, int *value);
37 bool ms_config_set_int(const char *key, int value);
38 bool ms_config_get_str(const char *key, char **value);
39 bool ms_config_set_str(const char *key, const char *value);
40 bool ms_config_get_bool(const char *key, int *value);
41 #ifdef FMS_PERF
42 void ms_check_start_time(struct timeval *start_time);
43 void ms_check_end_time(struct timeval *end_time);
44 void ms_check_time_diff(struct timeval *start_time, struct timeval *end_time);
45 #endif/*FMS_PERF */
46 int ms_get_remain_space(double *free_space);
47
48 #ifdef _USE_RECORDED_CONTENT
49 bool ms_is_support_pvr(void);
50 #endif
51
52 #ifdef _USE_SENIOR_MODE
53 bool ms_is_support_senior_mode(void);
54 #endif
55
56 #endif/*_MEDIA_SERVER_UTILS_H__*/
57