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__
21 #include <appcore-common.h>
22 #include <tzplatform_config.h>
24 // GNU gettext macro is already defined at appcore-common.h
35 #define TIZEN_PATH_MAX 1024
37 #define PATH_FMT_APP_ROOT tzplatform_getenv(TZ_USER_APP)
38 #define PATH_FMT_RES_DIR "/res"
39 #define PATH_FMT_LOCALE_DIR "/locale"
40 #define PATH_FMT_DATA_DIR "/data"
42 #define PATH_FMT_RO_APP_ROOT tzplatform_getenv(TZ_SYS_RO_APP)
43 #define PATH_FMT_RO_RES_DIR "/res"
44 #define PATH_FMT_RO_LOCALE_DIR "/local"
46 struct app_event_handler {
47 app_event_type_e type;
52 struct app_event_info {
53 app_event_type_e type;
57 app_device_orientation_e app_convert_appcore_rm(enum appcore_rm rm);
59 typedef void (*app_finalizer_cb) (void *data);
61 int app_error(app_error_e error, const char* function, const char *description);
63 app_device_orientation_e app_convert_appcore_rm(enum appcore_rm rm);
65 int app_get_package_app_name(const char *package, char **name);
67 int app_finalizer_add(app_finalizer_cb callback, void *data);
69 int app_finalizer_remove(app_finalizer_cb callback);
71 void app_finalizer_execute(void);
77 #endif /* __TIZEN_APPFW_APP_INTERNAL_H__ */