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-types.h
26 * @author Yong Yeon Kim(yy9875.kim@samsung.com)
31 #ifndef _MEDIA_SERVER_TYPES_H_
32 #define _MEDIA_SERVER_TYPES_H_
41 #define MS_INOTI_ENABLE 0
45 #define MS_RECURSIVE 1
46 #define MS_NON_RECURSIVE 0
48 /*This macro is used to save and check information of inserted memory card*/
49 #define MS_MMC_INFO_KEY "db/private/mediaserver/mmc_info"
51 /* store scanning status of each storage */
52 #define MS_SCAN_STATUS_INTERNAL "file/private/mediaserver/scan_internal"
53 #define MS_SCAN_STATUS_DIRECTORY "file/private/mediaserver/scan_directory"
55 P_VCONF_SCAN_DOING = 0,
59 /*Use for Poweroff sequence*/
60 #define POWEROFF_NOTI_NAME "power_off_start" /*poeroff noti from system-server*/
61 #define POWEROFF_DIR_PATH "/opt/usr/media/_POWER_OFF" /*This path uses for stopping Inotify thread and Socket thread*/
62 #define POWEROFF_DIR_NAME "_POWER_OFF" /*This path uses for stopping Inotify thread and Socket thread*/
63 #define POWEROFF -1 /*This number uses for stopping Scannig thread*/
65 #define MS_SAFE_FREE(src) { if(src) {free(src); src = NULL;} }
66 #define MS_MALLOC(src, size) { if (size > SIZE_MAX || size <= 0) {src = NULL;} \
67 else { src = malloc(size); memset(src, 0x0, size);} }
69 /*System default folder definition*/
70 #define FAT_FILENAME_LEN_MAX 255 /* not inc null */
71 #define FAT_FILEPATH_LEN_MAX 4096 /* inc null */
73 /* The following MACROs(TAF_XXX) are defined in "fs-limit.h"*/
74 #define MS_FILE_NAME_LEN_MAX FAT_FILENAME_LEN_MAX /**< File name max length on file system */
75 #define MS_FILE_PATH_LEN_MAX FAT_FILEPATH_LEN_MAX /**< File path max length (include file name) on file system */
77 #define MS_SOCK_NOT_ALLOCATE -1
80 MS_STORAGE_INTERNAL, /**< Stored only in phone */
81 MS_STORAGE_EXTERNAL, /**< Stored only in MMC */
87 MS_SCANNING_DIRECTORY,
88 } ms_scanning_location_t;
99 } ms_db_status_type_t;
101 typedef struct ms_dir_scan_info {
103 struct ms_dir_scan_info *parent;
104 struct ms_dir_scan_info *Rbrother;
105 struct ms_dir_scan_info *next;
110 ms_storage_type_t storage_type;
111 ms_dir_scan_type_t scan_type;
119 } ms_register_data_t;
125 #endif /*_MEDIA_SERVER_TYPES_H_*/