2 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
20 #include <media_util_private.h>
21 #include <media_info_private.h>
22 #include <media_content_type.h>
25 int _media_util_get_store_type_by_path(const char *path, int *storage_type)
27 if(STRING_VALID(path))
29 if(strncmp(path, MEDIA_CONTENT_PATH_PHONE, strlen(MEDIA_CONTENT_PATH_PHONE)) == 0)
31 *storage_type = MEDIA_CONTENT_STORAGE_INTERNAL;
33 else if(strncmp (path, MEDIA_CONTENT_PATH_MMC, strlen(MEDIA_CONTENT_PATH_MMC)) == 0)
35 *storage_type = MEDIA_CONTENT_STORAGE_EXTERNAL;
40 media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
41 return MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
44 return MEDIA_CONTENT_ERROR_NONE;