Revert manifest to default one
[profile/ivi/download-provider.git] / src / agent / download-agent-plugin-install.c
1 /*
2  * Download Agent
3  *
4  * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Contact: Jungki Kwak <jungki.kwak@samsung.com>, Keunsoon Lee <keunsoon.lee@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  * @file                download-agent-plugin-install.c
21  * @brief               Platform dependency functions for installation a content to target
22  * @author              Jungki,Kwak(jungki.kwak@samsung.com)
23  ***/
24
25 #include "download-agent-plugin-install.h"
26 #include "download-agent-debug.h"
27 #include "download-agent-plugin-conf.h"
28
29 #define DA_DEFAULT_INSTALL_PATH_FOR_PHONE "/opt/media/Downloads"
30 #define DA_DEFAULT_INSTALL_PATH_FOR_MMC "/opt/storage/sdcard/Downloads"
31
32 char *PI_get_default_install_dir(void)
33 {
34         da_storage_type_t type;
35
36         if (DA_RESULT_OK != get_storage_type(&type))
37                 return NULL;
38
39         /* ToDo: need to refactoring later */
40         if (type == DA_STORAGE_MMC)
41                 return DA_DEFAULT_INSTALL_PATH_FOR_MMC;
42         else
43                 return DA_DEFAULT_INSTALL_PATH_FOR_PHONE;
44 }