2 * Copyright (c) 2014 - 2016 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.
19 #include <tizen_error.h>
21 #include "app_types.h"
23 #define _STRDUP(s) ((s) ? strdup(s) : NULL)
25 char *app_get_data_path(void)
27 const char *buf = aul_get_app_data_path();
31 char *app_get_cache_path(void)
33 const char *buf = aul_get_app_cache_path();
37 char *app_get_resource_path(void)
39 const char *buf = aul_get_app_resource_path();
43 char *app_get_shared_data_path(void)
48 ret = aul_get_app_shared_data_path(&path);
49 if (ret == AUL_R_OK && path)
50 set_last_result(APP_ERROR_NONE);
51 else if (ret == AUL_R_EREJECTED)
52 set_last_result(APP_ERROR_NOT_SUPPORTED);
54 set_last_result(APP_ERROR_OUT_OF_MEMORY);
59 char *app_get_shared_resource_path(void)
61 const char *buf = aul_get_app_shared_resource_path();
65 char *app_get_shared_trusted_path(void)
67 const char *buf = aul_get_app_shared_trusted_path();
71 char *app_get_external_data_path(void)
73 const char *buf = aul_get_app_external_data_path();
77 char *app_get_external_cache_path(void)
79 const char *buf = aul_get_app_external_cache_path();
83 char *app_get_external_shared_data_path(void)
85 const char *buf = aul_get_app_external_shared_data_path();
89 char *app_get_tep_resource_path(void)
91 const char *buf = aul_get_app_tep_resource_path();