From: Jiwoong Im Date: Wed, 5 Aug 2015 10:36:10 +0000 (+0900) Subject: modify header files. X-Git-Tag: submit/tizen/20170725.231500~6^2~110 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5e2d56ca587cbaf84e96ba81abb3e85eca25b05c;p=platform%2Fcore%2Fapi%2Fpreference.git modify header files. - change app_private.h to app_internal.h - revise app.h Change-Id: Icf4b6d0c6d650611dde09067aab418eea94b8643 Signed-off-by: Jiwoong Im --- diff --git a/alarm/alarm.c b/alarm/alarm.c index 6ef1f17..c6851fc 100644 --- a/alarm/alarm.c +++ b/alarm/alarm.c @@ -25,7 +25,7 @@ #include #include -#include +#include #include #include diff --git a/app_common/app_error.c b/app_common/app_error.c index b3c8c0c..d3196d3 100644 --- a/app_common/app_error.c +++ b/app_common/app_error.c @@ -22,7 +22,7 @@ #include -#include +#include #ifdef LOG_TAG #undef LOG_TAG diff --git a/app_common/app_event.c b/app_common/app_event.c index 4a72e01..0cf5de0 100644 --- a/app_common/app_event.c +++ b/app_common/app_event.c @@ -18,7 +18,7 @@ #include #include -#include +#include app_device_orientation_e app_convert_appcore_rm(enum appcore_rm rm) { diff --git a/app_common/app_finalizer.c b/app_common/app_finalizer.c index ae0b41c..83f6358 100644 --- a/app_common/app_finalizer.c +++ b/app_common/app_finalizer.c @@ -19,7 +19,7 @@ #include #include -#include +#include typedef struct _app_finalizer_s_ { app_finalizer_cb callback; diff --git a/app_common/app_package.c b/app_common/app_package.c index 0c7562d..4feea11 100644 --- a/app_common/app_package.c +++ b/app_common/app_package.c @@ -23,7 +23,7 @@ #include #include -#include +#include #include #ifdef LOG_TAG diff --git a/event/event.c b/event/event.c index 64e9418..8317d20 100644 --- a/event/event.c +++ b/event/event.c @@ -21,7 +21,7 @@ #include #include #include -#include +#include #ifdef LOG_TAG #undef LOG_TAG diff --git a/include/app.h b/include/app.h index 26fc695..c27a32c 100644 --- a/include/app.h +++ b/include/app.h @@ -38,57 +38,86 @@ extern "C" { /** - * @brief Called at the start of the application. - * - * @details The callback function is called before the main loop of application starts. - * In this callback you can initialize application resources like window creation, data structure, etc. - * After this callback function returns @c true, the main loop starts up and app_service_cb() is subsequently called. - * If this callback function returns @c false, the main loop doesn't start and app_terminate_cb() is subsequently called. - * - * @param[in] user_data The user data passed from the callback registration function - * @return @c true on success, otherwise @c false - * @pre app_efl_main() will invoke this callback function. - * @see app_efl_main() - * @see #app_event_callback_s + * @brief Called when the application starts. + * + * @details The callback function is called before the main loop of the application starts. + * In this callback, you can initialize application resources like window creation, data structure, and so on. + * After this callback function returns @c true, the main loop starts up and app_control_cb() is subsequently called. + * If this callback function returns @c false, the main loop doesn't start and app_terminate_cb() is subsequently called. + * + * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @param[in] user_data The user data passed from the callback registration function + * @return @c true on success, + * otherwise @c false + * @pre ui_app_main() will invoke this callback function. + * @see ui_app_main() + * @see #ui_app_lifecycle_callback_s */ typedef bool (*app_create_cb) (void *user_data); /** - * @brief Called when the application is completely obscured by another application and becomes invisible. + * @brief Called when the application is completely obscured by another application and becomes invisible. * - * @details The application is not terminated and still running in paused state. + * @details The application is not terminated and still running in the paused state. * - * @param[in] user_data The user data passed from the callback registration function - * @see app_efl_main() - * @see #app_event_callback_s + * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @param[in] user_data The user data passed from the callback registration function + * @see ui_app_main() + * @see #ui_app_lifecycle_callback_s */ typedef void (*app_pause_cb) (void *user_data); /** - * @brief Called when the application becomes visible. + * @brief Called when the application becomes visible. * - * @remarks This callback function is not called when the application moved from created state to running state. + * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * - * @param[in] user_data The user data passed from the callback registration function - * @see app_efl_main() - * @see #app_event_callback_s + * @param[in] user_data The user data passed from the callback registration function + * @see ui_app_main() + * @see #ui_app_lifecycle_callback_s */ typedef void (*app_resume_cb) (void *user_data); /** - * @brief Called once after the main loop of application exits. + * @brief Called when the application's main loop exits. * @details You should release the application's resources in this function. * - * @param[in] user_data The user data passed from the callback registration function - * @see app_efl_main() - * @see #app_event_callback_s + * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @param[in] user_data The user data passed from the callback registration function + * @see ui_app_main() + * @see #ui_app_lifecycle_callback_s */ typedef void (*app_terminate_cb) (void *user_data); +/** + * @brief Called when another application sends a launch request to the application. + * + * @details When the application is launched, this callback function is called after the main loop of the application starts up. + * The passed app_control handle describes the launch request and contains the information about why the application is launched. + * If the launch request is sent to the application in the running or pause state, + * this callback function can be called again to notify that the application has been asked to launch. + * + * The application could be explicitly launched by the user from the application launcher or be launched to perform the specific operation by another application. + * The application is responsible for handling each launch request and responding appropriately. + * Using the App Control API, the application can get information about what is to be performed. + * If the application is launched from the application launcher or explicitly launched by another application, + * the passed app_control handle may include only the default operation (#APP_CONTROL_OPERATION_DEFAULT) without any data. + * For more information, see The @ref CAPI_APP_CONTROL_MODULE API description. + * + * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @param[in] app_control The handle to the app_control + * @param[in] user_data The user data passed from the callback registration function + * @see ui_app_main() + * @see #ui_app_lifecycle_callback_s + * @see @ref CAPI_APP_CONTROL_MODULE API + */ +typedef void (*app_control_cb) (app_control_h app_control, void *user_data); + + /** * @brief Called when other application send the launch request to the application. * @@ -113,30 +142,6 @@ typedef void (*app_terminate_cb) (void *user_data); typedef void (*app_service_cb) (service_h service, void *user_data); -/** - * @brief Called when other application send the launch request to the application. - * - * @details When the application is launched, this callback function is called after the main loop of application starts up. - * The passed app_control handle describes the launch request and contains the information about why the application is launched. - * If the launch request is sent to the application on running or pause state, - * this callback function can be called again to notify that the application is asked to be launched. - * - * The application could be explicitly launched by the user from the application launcher or be launched to perform the specific operation by the other application. - * The application is responsible for handling each launch request and responding accordingly. - * Using the app_control API, the application can get the information it needs to perform. - * If the application is launched from the application launcher or explicitly launched by other application, - * the passed app_control handle may include only the default operation (#APP_CONTROL_OPERATION_DEFAULT) without any data - * For more information, see The @ref CAPI_APP_CONTROL_MODULE API description. - * - * @param[in] app_control_h The handle to the app_control - * @param[in] user_data The user data passed from the callback registration function - * @see app_efl_main() - * @see #app_event_callback_s - * @see @ref CAPI_APP_CONTROL_MODULE API - */ -typedef void (*app_control_cb) (app_control_h app_control, void *user_data); - - /** * @brief Called when the system memory is running low. * @@ -227,6 +232,7 @@ typedef struct * @brief The structure type containing the set of callback functions for handling application lifecycle events. * @details It is one of the input parameters of the ui_app_main() function. * + * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @see ui_app_main() * @see app_create_cb() * @see app_pause_cb() @@ -292,6 +298,7 @@ void app_efl_exit(void); /** * @brief Gets the current device orientation. * + * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @return The current device orientation */ app_device_orientation_e app_get_device_orientation(void); @@ -317,6 +324,7 @@ void app_set_reclaiming_system_cache_on_pause(bool enable); * If the app_create_cb() callback function returns false, the main loop doesn't start up and app_terminate_cb() callback function is called. * This main loop supports event handling for the Ecore Main Loop. * + * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @param[in] argc The argument count * @param[in] argv The argument vector * @param[in] callback The set of callback functions to handle application lifecycle events @@ -343,6 +351,7 @@ int ui_app_main(int argc, char **argv, ui_app_lifecycle_callback_s *callback, vo * @brief Exits the main loop of application. * * @details The main loop of application stops and app_terminate_cb() is invoked. + * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @see ui_app_main() * @see app_terminate_cb() @@ -353,6 +362,7 @@ void ui_app_exit(void); /** * @brief Adds the system event handler * + * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @param[out] event_handler The event handler * @param[in] event_type The system event type * @param[in] callback The callback function @@ -373,6 +383,7 @@ int ui_app_add_event_handler(app_event_handler_h *event_handler, app_event_type_ /** * @brief Removes registered event handler * + * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @param[in] event_handler The event handler * * @return 0 on success, otherwise a negative error value diff --git a/include/app_internal.h b/include/app_internal.h new file mode 100644 index 0000000..1bd73d5 --- /dev/null +++ b/include/app_internal.h @@ -0,0 +1,77 @@ +/* + * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved + * + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +#ifndef __TIZEN_APPFW_APP_INTERNAL_H__ +#define __TIZEN_APPFW_APP_INTERNAL_H__ + +#include +#include + +// GNU gettext macro is already defined at appcore-common.h +#ifdef _ +#undef _ +#endif + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +#define TIZEN_PATH_MAX 1024 + +#define PATH_FMT_APP_ROOT tzplatform_getenv(TZ_USER_APP) +#define PATH_FMT_RES_DIR "/res" +#define PATH_FMT_LOCALE_DIR "/locale" +#define PATH_FMT_DATA_DIR "/data" + +#define PATH_FMT_RO_APP_ROOT tzplatform_getenv(TZ_SYS_RO_APP) +#define PATH_FMT_RO_RES_DIR "/res" +#define PATH_FMT_RO_LOCALE_DIR "/local" + +struct app_event_handler { + app_event_type_e type; + app_event_cb cb; + void *data; +}; + +struct app_event_info { + app_event_type_e type; + void *value; +}; + +app_device_orientation_e app_convert_appcore_rm(enum appcore_rm rm); + +typedef void (*app_finalizer_cb) (void *data); + +int app_error(app_error_e error, const char* function, const char *description); + +app_device_orientation_e app_convert_appcore_rm(enum appcore_rm rm); + +int app_get_package_app_name(const char *package, char **name); + +int app_finalizer_add(app_finalizer_cb callback, void *data); + +int app_finalizer_remove(app_finalizer_cb callback); + +void app_finalizer_execute(void); + +#ifdef __cplusplus +} +#endif + +#endif /* __TIZEN_APPFW_APP_INTERNAL_H__ */ diff --git a/include/app_preference_internal.h b/include/app_preference_internal.h old mode 100755 new mode 100644 diff --git a/include/app_preference_log.h b/include/app_preference_log.h old mode 100755 new mode 100644 diff --git a/include/app_preference_private.h b/include/app_preference_private.h deleted file mode 100644 index aaf4a87..0000000 --- a/include/app_preference_private.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * Licensed under the Apache License, Version 2.0 (the License); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an AS IS BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - -#ifndef __TIZEN_APPFW_PREFERENCE_PRIVATE_H__ -#define __TIZEN_APPFW_PREFERENCE_PRIVATE_H__ - -#ifdef __cplusplus -extern "C" { -#endif - -#define PREF_DB_NAME ".pref.db" -#define PREF_TBL_NAME "pref" -#define PREF_F_KEY_NAME "pref_key" -#define PREF_F_TYPE_NAME "pref_type" -#define PREF_F_DATA_NAME "pref_data" -#define BUF_LEN (4096) - -typedef enum -{ - PREFERENCE_TYPE_INT = 1, - PREFERENCE_TYPE_BOOLEAN, - PREFERENCE_TYPE_DOUBLE, - PREFERENCE_TYPE_STRING -} preference_type_e; - -typedef struct _pref_changed_cb_node_t{ - char *key; - preference_changed_cb cb; - void *user_data; - struct _pref_changed_cb_node_t *prev; - struct _pref_changed_cb_node_t *next; -} pref_changed_cb_node_t; - -#ifdef __cplusplus -} -#endif - -#endif /* __TIZEN_APPFW_PREFERENCE_PRIVATE_H__ */ diff --git a/include/app_private.h b/include/app_private.h deleted file mode 100644 index 52db85c..0000000 --- a/include/app_private.h +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * Licensed under the Apache License, Version 2.0 (the License); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an AS IS BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - -#ifndef __TIZEN_APPFW_APP_PRIVATE_H__ -#define __TIZEN_APPFW_APP_PRIVATE_H__ - -#include -#include - -// GNU gettext macro is already defined at appcore-common.h -#ifdef _ -#undef _ -#endif - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -#define TIZEN_PATH_MAX 1024 - -#define PATH_FMT_APP_ROOT tzplatform_getenv(TZ_USER_APP) -#define PATH_FMT_RES_DIR "/res" -#define PATH_FMT_LOCALE_DIR "/locale" -#define PATH_FMT_DATA_DIR "/data" - -#define PATH_FMT_RO_APP_ROOT tzplatform_getenv(TZ_SYS_RO_APP) -#define PATH_FMT_RO_RES_DIR "/res" -#define PATH_FMT_RO_LOCALE_DIR "/local" - -struct app_event_handler { - app_event_type_e type; - app_event_cb cb; - void *data; -}; - -struct app_event_info { - app_event_type_e type; - void *value; -}; - -app_device_orientation_e app_convert_appcore_rm(enum appcore_rm rm); - -typedef void (*app_finalizer_cb) (void *data); - -int app_error(app_error_e error, const char* function, const char *description); - -app_device_orientation_e app_convert_appcore_rm(enum appcore_rm rm); - -int app_get_package_app_name(const char *package, char **name); - -int app_finalizer_add(app_finalizer_cb callback, void *data); - -int app_finalizer_remove(app_finalizer_cb callback); - -void app_finalizer_execute(void); - -#ifdef __cplusplus -} -#endif - -#endif /* __TIZEN_APPFW_APP_PRIVATE_H__ */ diff --git a/src/app_device.c b/src/app_device.c index a28c3f9..ff193c1 100644 --- a/src/app_device.c +++ b/src/app_device.c @@ -29,7 +29,7 @@ #include #include -#include +#include #include #ifdef LOG_TAG diff --git a/src/app_main.c b/src/app_main.c index 46ab839..04fba7e 100644 --- a/src/app_main.c +++ b/src/app_main.c @@ -31,7 +31,7 @@ #include -#include +#include #include #include