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.
18 #ifndef __TIZEN_APPFW_APP_INTERNAL_H__
19 #define __TIZEN_APPFW_APP_INTERNAL_H__
26 #include <appcore-common.h>
28 #define TIZEN_PATH_MAX 1024
30 #define PATH_FMT_APP_ROOT "/opt/usr/apps"
31 #define PATH_FMT_RES_DIR PATH_FMT_APP_ROOT "/%s/res"
32 #define PATH_FMT_LOCALE_DIR PATH_FMT_RES_DIR "/locale"
33 #define PATH_FMT_DATA_DIR PATH_FMT_APP_ROOT "/%s/data"
35 #define PATH_FMT_RO_APP_ROOT "/usr/apps"
36 #define PATH_FMT_RO_RES_DIR PATH_FMT_RO_APP_ROOT "/%s/res"
37 #define PATH_FMT_RO_LOCALE_DIR PATH_FMT_RO_RES_DIR "/locale"
39 struct app_event_handler {
40 app_event_type_e type;
45 struct app_event_info {
46 app_event_type_e type;
50 app_device_orientation_e app_convert_appcore_rm(enum appcore_rm rm);
52 typedef void (*app_finalizer_cb) (void *data);
54 int app_error(app_error_e error, const char* function, const char *description);
56 app_device_orientation_e app_convert_appcore_rm(enum appcore_rm rm);
58 int app_get_package_app_name(const char *package, char **name);
60 int app_finalizer_add(app_finalizer_cb callback, void *data);
62 int app_finalizer_remove(app_finalizer_cb callback);
64 void app_finalizer_execute(void);
66 int app_get_package(char **package);
72 #endif /* __TIZEN_APPFW_APP_INTERNAL_H__ */