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-common-utils.h
26 * @author Yong Yeon Kim(yy9875.kim@samsung.com)
31 #ifndef _MEDIA_SERVER_UTILS_H__
32 #define _MEDIA_SERVER_UTILS_H__
34 #include "media-common-types.h"
37 ms_db_init(bool need_db_create);
40 ms_is_mmc_inserted(void);
43 ms_usb_vconf_cb(void *data);
46 ms_start(bool need_db_create);
52 ms_get_storage_type_by_full(const char *path, uid_t uid);
55 ms_get_mime(const char *path, char *mimetype);
58 ms_strappend(char *res, const int size, const char *pattern,
59 const char *str1, const char *str2);
62 ms_strcopy(char *res, const int size, const char *pattern,
66 ms_config_get_int(const char *key, int *value);
69 ms_config_set_int(const char *key, int value);
72 ms_config_get_str(const char *key, char *value);
75 ms_config_set_str(const char *key, const char *value);
79 ms_check_start_time(struct timeval *start_time);
82 ms_check_end_time(struct timeval *end_time);
85 ms_check_time_diff(struct timeval *start_time, struct timeval *end_time);
92 #endif/*_MEDIA_SERVER_UTILS_H__*/