tizen 2.3 release
[framework/api/application.git] / app_common / app_path.c
1 /*
2  * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
3  *
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
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  */
16
17 #include <string.h>
18 #include <aul.h>
19
20 char *app_get_data_path(void)
21 {
22         const char *buf = aul_get_app_data_path();
23         return buf != NULL ? strdup(buf) : NULL;
24 }
25
26 char *app_get_cache_path(void)
27 {
28         const char *buf = aul_get_app_cache_path();
29         return buf != NULL ? strdup(buf) : NULL;
30 }
31
32 char *app_get_resource_path(void)
33 {
34         const char *buf = aul_get_app_resource_path();
35         return buf != NULL ? strdup(buf) : NULL;
36 }
37
38 char *app_get_shared_data_path(void)
39 {
40         const char *buf = aul_get_app_shared_data_path();
41         return buf != NULL ? strdup(buf) : NULL;
42 }
43
44 char *app_get_shared_resource_path(void)
45 {
46         const char *buf = aul_get_app_shared_resource_path();
47         return buf != NULL ? strdup(buf) : NULL;
48 }
49
50 char *app_get_shared_trusted_path(void)
51 {
52         const char *buf = aul_get_app_shared_trusted_path();
53         return buf != NULL ? strdup(buf) : NULL;
54 }
55
56 char *app_get_external_data_path(void)
57 {
58         const char *buf = aul_get_app_external_data_path();
59         return buf != NULL ? strdup(buf) : NULL;
60 }
61
62 char *app_get_external_cache_path(void)
63 {
64         const char *buf = aul_get_app_external_cache_path();
65         return buf != NULL ? strdup(buf) : NULL;
66 }
67
68 char *app_get_external_shared_data_path(void)
69 {
70         const char *buf = aul_get_app_external_shared_data_path();
71         return buf != NULL ? strdup(buf) : NULL;
72 }