diff options
author | SukHyung, Kang <shine.kang@samsung.com> | 2016-01-14 08:06:28 +0900 |
---|---|---|
committer | SukHyung, Kang <shine.kang@samsung.com> | 2016-01-14 08:06:28 +0900 |
commit | bb9d43e21b66b8b337ba983bec96305469912bf2 (patch) | |
tree | 607dc35c01ef2ca651a12555d5bba1aaa7f9aaad | |
parent | eca37187bb8bef9f882b011ba04372759d8faca2 (diff) | |
download | application-submit/tizen/20160114.013004.tar.gz application-submit/tizen/20160114.013004.tar.bz2 application-submit/tizen/20160114.013004.zip |
add doc files for API referencesubmit/tizen/20160114.013004accepted/tizen/wearable/20160114.063402accepted/tizen/tv/20160114.063323accepted/tizen/mobile/20160114.063243
Change-Id: Ide12f95e26b51aca848f6c7dd206f224a6c69b5e
Signed-off-by: SukHyung, Kang <shine.kang@samsung.com>
-rwxr-xr-x | doc/appfw_alarm_doc.h | 65 | ||||
-rwxr-xr-x | doc/appfw_app_common_doc.h | 84 | ||||
-rwxr-xr-x | doc/appfw_app_control_doc.h | 34 | ||||
-rwxr-xr-x | doc/appfw_app_doc.h | 324 | ||||
-rwxr-xr-x | doc/appfw_event_doc.h | 276 | ||||
-rwxr-xr-x | doc/appfw_i18n_doc.h | 45 | ||||
-rwxr-xr-x | doc/appfw_preference_doc.h | 44 | ||||
-rwxr-xr-x | doc/appfw_resource_manager_doc.h | 81 | ||||
-rwxr-xr-x | doc/images/capi_appfw_application_lifecycle.png | bin | 0 -> 30482 bytes | |||
-rwxr-xr-x | doc/images/capi_appfw_application_package.png | bin | 0 -> 8295 bytes | |||
-rwxr-xr-x | doc/images/capi_appfw_application_resource.png | bin | 0 -> 26662 bytes | |||
-rwxr-xr-x | doc/images/capi_appfw_application_states.png | bin | 0 -> 32111 bytes |
12 files changed, 953 insertions, 0 deletions
diff --git a/doc/appfw_alarm_doc.h b/doc/appfw_alarm_doc.h new file mode 100755 index 0000000..3504336 --- /dev/null +++ b/doc/appfw_alarm_doc.h @@ -0,0 +1,65 @@ +/* + * 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_ALARM_DOC_H__ +#define __TIZEN_APPFW_ALARM_DOC_H__ + + /** + * @ingroup CAPI_APPLICATION_MODULE + * @defgroup CAPI_ALARM_MODULE Alarm + * @brief The @ref CAPI_ALARM_MODULE API allows setting an "alarm clock" for the delivery of a notification at some point in the future. + * + * @section CAPI_ALARM_MODULE_HEADER Required Header + * \#include <app_alarm.h> + * + * @section CAPI_ALARM_MODULE_OVERVIEW Overview + * Mobile devices typically give constant access to information from various sources. Some of this information is best delivered + * through alarms - the most obvious case is a calendar scheduling application which lets you know when a meeting is about to start. + * Alarms are certainly better than actively waiting in a loop. They are also better than putting an interface to sleep because they do not + * block your main UI thread. Use of alarms helps build smooth user experiences and implements unattended data synchronization tasks. + * If an application is installed after setting the alarm, your alarm is cancelled automatically.\n + * When the alarm is expired, Alarm Manager will turn on LCD to prohibit background jobs. + * If you want to use alarm API without turning on LCD, you can use alarm_schedule_after_delay(). + * + * There are 3 ways to set an alarm. + * <table> + * <tr> + * <th>FUNCTION</th> + * <th>DESCRIPTION </th> + * </tr> + * <tr> + * <td>alarm_schedule_once_after_delay()</td> + * <td>Sets an alarm to be triggered at specific time once</td> + * </tr> + * <tr> + * <td>alarm_schedule_once_at_date()</td> + * <td>Sets an alarm to be triggered after specific delay once</td> + * </tr> + * <tr> + * <td>alarm_schedule_with_recurrence_week_flag()</td> + * <td>Sets an alarm to be triggered at specific time with recurrent days of the week(can repeat on days of the week)</td> + * </tr> + * <tr> + * <td>alarm_schedule_after_delay()</td> + * <td>Sets an alarm to be triggered after specific time(Since 2.4, this api does not support exact period and delay for minimizing the wakeups of the device. The system can adjust when the alarm expires.)</td> + * </tr> + * </table> + * \n + * + */ + +#endif /* __TIZEN_APPFW_ALARM_DOC_H__ */ diff --git a/doc/appfw_app_common_doc.h b/doc/appfw_app_common_doc.h new file mode 100755 index 0000000..d91cd20 --- /dev/null +++ b/doc/appfw_app_common_doc.h @@ -0,0 +1,84 @@ +/* + * Copyright (c) 2014 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_COMMON_DOC_H__ +#define __TIZEN_APPFW_APP_COMMON_DOC_H__ + + /** + * @ingroup CAPI_APPLICATION_MODULE + * @defgroup CAPI_APP_COMMON_MODULE App Common + * @brief The @ref CAPI_APP_COMMON_MODULE API provides functions to getting information about the application. + * + * @addtogroup CAPI_APP_COMMON_MODULE + * + * @section CAPI_APP_COMMON_MODULE_HEADER Required Header + * \#include <app_common.h> + * + * @section CAPI_APP_COMMON_MODULE_OVERVIEW Overview + * + * The App common API provides common apis that can be used at UI application and Service application. + * This API provides interfaces for getting information about the application. + * + * @subsection CAPI_APPLICATION_MODULE_PACKAGE Application Package + * The Tizen native application consists of structured directories to manage the application executable file, library files, resource files, and data. + * When you build the application, the Tizen SDK packages those as an application package for distribution. + * + * @image html capi_appfw_application_package.png "Application package" + * + * <table> + * <tr> + * <th>Directories</th> + * <th>Description</th> + * </tr> + * <tr> + * <td><package id></td> + * <td>The fully qualified name of an application (such as org.tizen.calculator).</td> + * </tr> + * <tr> + * <td>bin</td> + * <td>The executable file of the application.</td> + * </tr> + * <tr> + * <td>lib</td> + * <td>The application library files</td> + * </tr> + * <tr> + * <td>res</td> + * <td>The root directory in which all resource files are located.\n + * The application cannot write and modify any resource files</td> + * </tr> + * <tr> + * <td>data</td> + * <td>The root directory in which an application's private data is located.\n + * The application can read and write its own data files in the application's data directory.</td> + * </tr> + * <tr> + * <td>shared/</td> + * <td>The shared directory for sharing with other applications.</td> + * </tr> + * </table> + * + * @subsection CAPI_APPLICATION_MODULE_GET_INFORMATION Getting Information About the Application + * The API provides functions for obtaining an application's package name and absolute path to specified resources + * like Image, Sound, Video, UI layout (EDJ), and so on. + * It also provides functions to : + * - Get the current orientation of the device + * - Get the Internal/External root folders which are shared among all applications + * + */ + +#endif /* __TIZEN_APPFW_APP_COMMON_DOC_H__ */ diff --git a/doc/appfw_app_control_doc.h b/doc/appfw_app_control_doc.h new file mode 100755 index 0000000..150dda0 --- /dev/null +++ b/doc/appfw_app_control_doc.h @@ -0,0 +1,34 @@ +/* + * 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_CONTROL_DOC_H__ +#define __TIZEN_APPFW_APP_CONTROL_DOC_H__ + + /** + * @ingroup CAPI_APPLICATION_MODULE + * @defgroup CAPI_APP_CONTROL_MODULE App Control + * @brief The @ref CAPI_APP_CONTROL_MODULE API provides functions to launch other applications. + * + * @section CAPI_APP_CONTROL_MODULE_HEADER Required Header + * \#include <app_control.h> + * + * @section CAPI_APP_CONTROLMODULE_OVERVIEW Overview + * <a href="https://developer.tizen.org/development/guides/native-application/application-framework/application#platform_appcontrol">Platform Application Controls</a> + * + */ + +#endif /* __TIZEN_APPFW_APP_CONTROL_DOC_H__ */ diff --git a/doc/appfw_app_doc.h b/doc/appfw_app_doc.h new file mode 100755 index 0000000..6da6fac --- /dev/null +++ b/doc/appfw_app_doc.h @@ -0,0 +1,324 @@ +/* + * 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_DOC_H__ +#define __TIZEN_APPFW_APP_DOC_H__ + +/** +* @ingroup CAPI_APPLICATION_FRAMEWORK +* @defgroup CAPI_APPLICATION_MODULE Application +* +* @addtogroup CAPI_APPLICATION_MODULE +* +* @brief The @ref CAPI_APPLICATION_MODULE API provides functions to manage the main event loop, the application's state change events, basic system events, +* and get information about the application. +* +* +* @section CAPI_APPLICATION_MODULE_HEADER Required Header +* \#include <app.h> +* +* @section CAPI_APPLICATION_MODULE_OVERVIEW Overview +* +* The Application API handles an application state change or system events and provides mechanisms that launch other applications. +* +* The Tizen native application is similar to a conventional Linux application, but has some additional features optimized for mobile +* devices, which may have constraints such as relatively small screen sizes and lack of system resources compared to a larger system. +* For example, for power management reasons, the application may wish to take actions to reduce usage when it finds out that it had its display window +* covered over by another application's window. State change events are delivered so that this is possible. +* +* The Application API provides interfaces for the following three categories: +* - Starting or exiting the main event loop (mandatory for every Tizen native application) +* - Registering callbacks for application state change events +* - Registering callbacks for basic system events +* +* @subsection CAPI_APPLICATION_MODULE_EVENT_LOOP Event Loop +* For an application to operate successfully, it must receive events from the platform. +* For this, it needs to start the main event loop - this is mandatory for all Tizen native applications. +* The ui_app_main() function is used to start the event loop. +* Before calling this function, you should set up the #ui_app_lifecycle_callback_s structure which is passed to the function (see the following sections). +* +* @subsection CAPI_APPLICATION_MODULE_STATE_CHANGE_EVENT Registering Callbacks for Application State Change Events +* The application state change events include the following: +* <p> +* <table> +* <tr> +* <th> State </th> +* <th> Description </th> +* </tr> +* <tr> +* <td> app_create_cb() </td> +* <td>Hook to take necessary actions before the main event loop starts. +* Your UI generation code should be placed here so that you do not miss any events from your application UI. +* </td> +* </tr> +* <tr> +* <td> app_pause_cb() </td> +* <td> Hook to take necessary actions when an application becomes invisible. +* For example, you might wish to release memory resources so other applications can use these resources. +* It is important not to starve the application in front, which is interacting with the user. +* </td> +* </tr> +* <tr> +* <td> app_resume_cb() </td> +* <td> Hook to take necessary actions when an application becomes visible. +* If anything is relinquished in app_pause_cb() but is necessary to resume +* the application, it must be re-allocated here. +* </td> +* </tr> +* <tr> +* <td> app_terminate_cb() </td> +* <td> Hook to take necessary actions when your application is terminating. +* Your application should release all resources, especially any +* allocations and shared resources must be freed here so other running applications can fully use these shared resources. +* </td> +* </tr> +* <tr> +* <td> app_control_cb() </td> +* <td> Hook to take necessary actions when your application called by another application. +* When the application gets launch request, this callback function is called. +* The application can get information about what is to be performed by using App Control API from app_control handle. +* </td> +* </tr> +* </table> +* +* For further explanation of application state changes, see the @ref CAPI_APPLICATION_MODULE_STATES_TRANSITIONS section. +* +* @subsection CAPI_APPLICATION_MODULE_SYSTEM_EVENT Registering Callbacks for System Events +* The system event callbacks can be registered using ui_app_add_event_handler(). Multiple system event callbacks can be registered. +* The basic system event includes the following: +* <p> +* <table> +* <tr> +* <th> System event types </th> +* <th> Description </th> +* </tr> +* <tr> +* <td> APP_EVENT_LOW_MEMORY </td> +* <td> The system memory is running low. +* Recommended actions are as follows: +* - Action 1. Save data in main memory to persistent memory/storage +* to avoid data loss in case the Tizen platform Low Memory Killer kills your application to get more free memory. +* The explanation of how Low Memory Killer behaves is here(link), but basically if the low memory notice does not lead to enough +* memory being freed, something will be killed. Release cached data in main memory to secure more free memory. +* </td> +* </tr> +* <tr> +* <td> APP_EVENT_LOW_BATTERY </td> +* <td> The battery power is running low. +* Recommended actions are as follows: +* - Action 1. Save data in main memory to persistent memory/storage to avoid sudden loss of data in case power goes off completely. +* - Action 2. Stop heavy CPU consumption or power consumption activities to save remaining power. +* </td> +* </tr> +* <tr> +* <td> APP_EVENT_DEVICE_ORIENT </td> +* <td> The orientation of device is changed. +* Recommended action is as follows: change display orientation to match display orientation +* </td> +* </tr> +* <tr> +* <td> APP_EVANG_LANGUAGE_CHANGED </td> +* <td> The language setting is changed. +* Recommended action: refresh the display into the new language +* </td> +* </tr> +* <tr> +* <td> APP_EVENT_REGION_FORMAT_CHANGED </td> +* <td> The region format setting changed. +* Region change means a different time zone; the application UI may need to update the time to reflect the time zone change. +* </td> +* </tr> +* <tr> +* <td> APP_EVENT_SUSPENDED_STATE_CHANGED </td> +* <td> The suspended state is changed. +* The application will enter to the suspended state, or exited from the state. Do the necessary action before or after the suspended; the application shall not respond to requests of the other modules. +* </td> +* </tr> +* </table> +* +* @subsection CAPI_APPLICATION_MODULE_STATES_TRANSITIONS The Application States and Transitions +* The Tizen native application can be in one of the several different states. Typically, the application is launched by the user from the Launcher, or by +* another application. As the application is starting, app_create_cb() is executed, and then the main event loop starts. After executing event loop, app_control_cb() and app_resume_cb() will be invoked. +* The application now normally becomes the front-most window, with focus. When the application loses the front-most/focus status, the app_pause_cb() callback is invoked. There +* are many scenarios for your application to go into the pause state, which means your application is not terminated, but is running in the background: +* - A new application is launched from the request of your application +* - The user requests to go to the home screen +* - A system event occurs and it causes a resident application with higher priority (e.g. a phone call is received) to become active, and hides +* your application temporarily +* - An alarm went off for another application so it now becomes the top-most window and hides your application +* +* Since Tizen 2.4, the application on the background goes in to a suspended state. In the suspended state, the application process is executed with limited CPU resources. In other words, the platform does +* not allow the running of the background applications. +* +* When your application becomes visible again, the app_resume_cb() callback is invoked. Some possible scenarios for your application to become visible are: +* - Another application requests your application to run (perhaps the Task Navigator which shows all running applications and lets +* the user select any app to run) +* - All applications on top of your application in the window stack finish +* - An alarm is going off for your application so it becomes the top-most window and hides other applications +* +* When your application starts exiting, the app_pause_cb() callback is invoked if the application is visible, and then the app_terminate_cb() callback is invoked. Possible scenarios to start termination of your application are: +* - Your application itself requests to exit by calling ui_app_exit() to terminate the event loop +* - The Low Memory Killer is killing your application in a low memory situation. +* +* Note that a service application doesn't have UI, so the service application doesn't have Paused state. +* +* Application state changes are managed by the underlying framework. +* Refer to the following state diagram to see the possible transitions: +* @image html capi_appfw_application_states.png "Application states" +* <p> +* <table> +* <tr> +* <th> State </th> +* <th> Description </th> +* </tr> +* <tr> +* <td> READY </td> +* <td> The application is launched. </td> +* </tr> +* <tr> +* <td> CREATED </td> +* <td> The application starts the main loop. </td> +* </tr> +* <tr> +* <td> RUNNING </td> +* <td> The application is running and visible to the user. </td> +* </tr> +* <tr> +* <td> PAUSED </td> +* <td> The application is running but invisible to the user. </td> +* </tr> +* <tr> +* <td> TERMINATED </td> +* <td> The application is terminated </td> +* </tr> +* </table> +* +* The Application API defines five states with their corresponding transition handlers. +* The state transition is notified through the state transition callback function, +* whether the application is created, is running, is paused, is resumed, or is terminated. +* And the application has to perform a specific task that is appropriate to those state changes. +* +* @image html capi_appfw_application_lifecycle.png "General application lifecycle" +* +* @subsection CAPI_APPLICATION_MODULE_HOW_TO_START How to start the Tizen native application +* An application can be launched by the user from the Launcher or by another application. +* +* Regardless of how an application is launched, the Application Framework starts an application by creating a new process and calls +* the entry point of the application. Like a conventional Linux application, the main function of its application is the entry point. +* In the Tizen application, the main task is to hand over control to the Application Framework by calling the ui_app_main() function. +* @code +* bool app_create(void *user_data) +* { +* // Hook to take necessary actions before the main event loop starts +* // Initialize UI resources and application's data +* // If this function returns @c true, the main loop of the application starts +* // If this function returns @c false, the application is terminated +* return true; +* } +* +* void app_control(app_control_h app_control, void *user_data) +* { +* // Handle the launch request +* } +* +* void app_pause(void *user_data) +* { +* // Take necessary actions when the application becomes invisible +* } +* +* void app_resume(void *user_data) +* { +* // Take necessary actions when the application becomes visible. +* } +* +* void app_terminate(void *user_data) +* { +* // Release all resources +* } +* +* int main(int argc, char *argv[]) +* { +* struct appdata ad; +* +* ui_app_lifecycle_callback_s event_callback = {0,}; +* +* event_callback.create = app_create; +* event_callback.terminate = app_terminate; +* event_callback.pause = app_pause; +* event_callback.resume = app_resume; +* event_callback.app_control = app_control; +* +* memset(&ad, 0x0, sizeof(struct appdata)); +* +* return ui_app_main(argc, argv, &event_callback, &ad); +* } +* @endcode +* +* The ui_app_main() function initializes the application and then starts the main loop. +* +* The ui_app_main() function takes four parameters and uses them to initialize the application. +* The @a argc and @a argv parameters contain the values from the Application Framework, so that you should never have to change the values. +* The third parameter is a state transition handler that is responsible for managing the state +* transitions that the application goes through while it is running. The fourth parameter is the application data to be passed to each state handler. +* +* When ui_app_main() is first invoked, the application moves from the ready state to the created state. +* The application has to initialize itself. +* +* During this transition, the Application Framework calls the application's app_create_cb() state transition callback function just +* before the application enters the main loop. Within the registered app_create_cb() callback function, you should initialize the +* application's resources and create the main window. +* +* If the app_create_cb() callback function returns @c false, the application moves to the terminated state.\n +* If the app_create_cb() callback function returns @c true, the application enters the main loop. +* +* @subsection CAPI_APPLICATION_MODULE_LAUNCH_OPTIONS Handling the launch options +* The Application Framework calls the application's app_control_cb() callback function just after the application enters the main loop. +* This callback function is passed to the app_control containing the reason due to which the application is launched. +* For example, the application might be launched to open a file to handle the request that has been sent by another application. +* In all of these cases, the application is responsible for checking the contents of the app_control and responding appropriately. The contents +* of the app_control can be empty in situations where the application is launched by the user from the Launcher. +* +* @code +* static void app_control(app_control_h app_control, void *user_data) +* { +* struct appdata *ad = (struct appdata *)user_data; +* char *operation; +* char *uri; +* char *mime_type; +* +* app_control_get_operation(app_control, operation); +* +* if (!strcmp(operation, SERVICE_OPERATION_VIEW)) +* { +* app_control_get_uri(app_control, &uri); +* app_control_get_mime(app_control, &mime_type); +* +* if (uri && !strcmp(mime_type, "image/jpg")) +* { +* display_image_file(ad, uri); // display a specific image file +* } +* } +* +* if (ad->win) +* elm_win_activate(ad->win); +* +* } +* @endcode +* +*/ + +#endif /* __TIZEN_APPFW_APP_DOC_H__ */ diff --git a/doc/appfw_event_doc.h b/doc/appfw_event_doc.h new file mode 100755 index 0000000..54bf3ba --- /dev/null +++ b/doc/appfw_event_doc.h @@ -0,0 +1,276 @@ +/* + * Copyright (c) 2015 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_EVENT_DOC_H__ +#define __TIZEN_APPFW_EVENT_DOC_H__ + + /** + * @ingroup CAPI_APPLICATION_MODULE + * @defgroup CAPI_EVENT_MODULE Event + * @brief The @ref CAPI_EVENT_MODULE API provides functions to serve publication and subscription of event. + * + * @section CAPI_EVENT_MODULE_HEADER Required Header + * \#include <app_event.h> + * + * @section CAPI_EVENT_MODULE_OVERVIEW Overview + * + * The @ref CAPI_EVENT_MODULE API provides functions to broadcast user-defined event. + * - event_publish_app_event() + * - event_publish_trusted_app_event() + * If you want to send an event to trusted application, you can use event_publish_trusted_app_event() API. Only applications which have same signature with sender application can receive the event. + * + * The @ref CAPI_EVENT_MODULE API provides functions to add and remove the event handler for event subscription. + * The event handler's function will be called when the interested event occurs. + * Adding multiple event handlers to one event is possible. + * + * There are two types event. + * - User-Event is user-defined event. + * - System-Event is pre-defined platform event. See definitions for system event. NOTE: You can't receive the system-event which is not supported on the target device, even if you register event handler for that event. Some system-events require the privilege. (Refer to @ref CAPI_EVENT_MODULE_PRIVILEGED_SYSTEM_EVENT) + * + * The type of event data is bundle type. + * - For System-Event, see definitions for key and value of system event. + * + * @subsection CAPI_EVENT_MODULE_EVENT_FORMAT The name-format of User-Event. + * The format of User-Event's name MUST be "event.{sender's appid}.{user-defined name}", unless the API calls using event_name will be failed. + * The {user-defined name} have some restrictions. + * - Must have length of Min 1 byte and Max 127 bytes. + * - Must only contain the characters("[A~Z][a~z][0~9]_") and not begin with a digit. + * For example, + * "event.org.tizen.testapp.user_event_1". + * + * @subsection CAPI_EVENT_MODULE_LAUNCH_ON_EVENT Launch-On-Event (Service Application only) + * Service application can be launched by event triggering. + * For Launch-On-Event, + * - The APP_CONTROL_OPERATION_LAUNCH_ON_EVENT must be defined in the manifest file. + * - The uri name represents event name and the format is "event://{event name"}". + * For uri example, + * "event://tizen.system.event.battery_charger_status". (System-Event) + * - The APP_CONTROL_OPERATION_LAUNCH_ON_EVENT can not be requested via app_control_send_launch_request(). + * + * How to know the triggered event after launch by event triggering. + * - You can get the event name and data in the first called app_control_cb which is called after 'Created' of application states. + * @code + * static void + * app_control(app_control_h app_control, void *data) + * { + * //check "launch on event" + * int ret = 0; + * const char *event_uri = "event://tizen.system.event.battery_charger_status"; + * char *operation = NULL; + * char *uri = NULL; + * char *event_value = NULL; + * + * ret = app_control_get_operation(app_control, &operation); + * if (ret == APP_CONTROL_ERROR_NONE && operation && + * strcmp(operation, APP_CONTROL_OPERATION_LAUNCH_ON_EVENT) == 0) { + * ret = app_control_get_uri(app_control, &uri); + * if (ret == APP_CONTROL_ERROR_NONE && uri) { + * if (strncmp(uri, event_uri, strlen(event_uri) + 1) == 0) { + * ret = app_control_get_extra_data(app_control, "battery_charger_status", &event_value); + * if (ret == APP_CONTROL_ERROR_NONE && event_value) { + * free(event_value); + * } + * } + * free(uri); + * } + * free(operation); + * } + * } + * @endcode + * - Use event_add_event_handler() API in the first called app_control_cb for further subscription of that event. + * + * NOTE : Only several of System-Events support Launch-On-Event. + * The System-Events and their Conditions which support Launch-On-Event are listed in the table below. + * <table> + * <tr> + * <th>Name</th> + * <th>Condition</th> + * </tr> + * <tr> + * <td>SYSTEM_EVENT_BATTERY_CHARGER_STATUS</td> + * <td>When Charger CONNECTED</td> + * </tr> + * <tr> + * <td>SYSTEM_EVENT_USB_STATUS</td> + * <td>When Usb CONNECTED</td> + * </tr> + * <tr> + * <td>SYSTEM_EVENT_EARJACK_STATUS</td> + * <td>When Earjack CONNECTED</td> + * </tr> + * <tr> + * <td>SYSTEM_EVENT_INCOMMING_MSG</td> + * <td>When MSG_TYPE & MSG_ID exist</td> + * </tr> + * </table> + * + * @subsection CAPI_EVENT_MODULE_PRIVILEGED_SYSTEM_EVENT Privileged System-Events. + * There are some system-events which need the privilege for normal operation. + * You can know these privileged system-events from the 'privilege' comment of the definition of each system-event. + * If you try to add event handler for these events without privilege, you will get EVENT_ERROR_PERMISSION_DENIED return when you use the API for adding event handler. + * Also, If you declare app_control operation and uri in the manifest file for these events to enable 'Launch On Event' without privilege, there will be no real launch. + * + * @subsection CAPI_EVENT_MODULE_SYSTEM_EVENT Supported System-Events. + * The supported system-event's name, keys and values of each event are listed in the table below. + * <table> + * <tr> + * <th>Name</th> + * <th>Key</th> + * <th>Value</th> + * </tr> + * <tr> + * <td>SYSTEM_EVENT_BATTERY_CHARGER_STATUS</td> + * <td>EVENT_KEY_BATTERY_CHARGER_STATUS</td> + * <td>EVENT_VAL_BATTERY_CHARGER_DISCONNECTED<br/>EVENT_VAL_BATTERY_CHARGER_CONNECTED<br/>EVENT_VAL_BATTERY_CHARGER_CHARGING<br/>EVENT_VAL_BATTERY_CHARGER_DISCHARGING</td> + * </tr> + * <tr> + * <td>SYSTEM_EVENT_BATTERY_LEVEL_STATUS</td> + * <td>EVENT_KEY_BATTERY_LEVEL_STATUS</td> + * <td>EVENT_VAL_BATTERY_LEVEL_EMPTY<br/>EVENT_VAL_BATTERY_LEVEL_CRITICAL<br/>EVENT_VAL_BATTERY_LEVEL_LOW<br/>EVENT_VAL_BATTERY_LEVEL_HIGH<br/>EVENT_VAL_BATTERY_LEVEL_FULL</td> + * </tr> + * <tr> + * <td>SYSTEM_EVENT_USB_STATUS</td> + * <td>EVENT_KEY_USB_STATUS</td> + * <td>EVENT_VAL_USB_DISCONNECTED<br/>EVENT_VAL_USB_CONNECTED<br/>EVENT_VAL_USB_AVAILABLE</td> + * </tr> + * <tr> + * <td>SYSTEM_EVENT_EARJACK_STATUS</td> + * <td>EVENT_KEY_EARJACK_STATUS</td> + * <td>EVENT_VAL_EARJACK_DISCONNECTED<br/>EVENT_VAL_EARJACK_CONNECTED</td> + * </tr> + * <tr> + * <td>SYSTEM_EVENT_DISPLAY_STATE</td> + * <td>EVENT_KEY_DISPLAY_STATE</td> + * <td>EVENT_VAL_DISPLAY_NORMAL<br/>EVENT_VAL_DISPLAY_DIM<br/>EVENT_VAL_DISPLAY_OFF</td> + * </tr> + * <tr> + * <td>SYSTEM_EVENT_BOOT_COMPLETED</td> + * <td>N/A</td> + * <td>N/A</td> + * </tr> + * <tr> + * <td>SYSTEM_EVENT_SYSTEM_SHUTDOWN</td> + * <td>N/A</td> + * <td>N/A</td> + * </tr> + * <tr> + * <td>SYSTEM_EVENT_LOW_MEMORY</td> + * <td>EVENT_KEY_LOW_MEMORY</td> + * <td>EVENT_VAL_MEMORY_NORMAL<br/>EVENT_VAL_MEMORY_SOFT_WARNING<br/>EVENT_VAL_MEMORY_HARD_WARNING</td> + * </tr> + * <tr> + * <td>SYSTEM_EVENT_WIFI_STATE</td> + * <td>EVENT_KEY_WIFI_STATE</td> + * <td>EVENT_VAL_WIFI_OFF<br/>EVENT_VAL_WIFI_ON<br/>EVENT_VAL_WIFI_CONNECTED</td> + * </tr> + * <tr> + * <td rowspan="3">SYSTEM_EVENT_BT_STATE</td> + * <td>EVENT_KEY_BT_STATE</td> + * <td>EVENT_VAL_BT_OFF<br/>EVENT_VAL_BT_ON</td> + * </tr> + * <tr> + * <td>EVENT_KEY_BT_LE_STATE</td> + * <td>EVENT_VAL_BT_LE_OFF<br/>EVENT_VAL_BT_LE_ON</td> + * </tr> + * <tr> + * <td>EVENT_KEY_BT_TRANSFERING_STATE</td> + * <td>EVENT_VAL_BT_NON_TRANSFERING<br/>EVENT_VAL_BT_TRANSFERING</td> + * </tr> + * <tr> + * <td>SYSTEM_EVENT_LOCATION_ENABLE_STATE</td> + * <td>EVENT_KEY_LOCATION_ENABLE_STATE</td> + * <td>EVENT_VAL_LOCATION_DISABLED<br/>EVENT_VAL_LOCATION_ENABLED</td> + * </tr> + * <tr> + * <td>SYSTEM_EVENT_GPS_ENABLE_STATE</td> + * <td>EVENT_KEY_GPS_ENABLE_STATE</td> + * <td>EVENT_VAL_GPS_DISABLED<br/>EVENT_VAL_GPS_ENABLED</td> + * </tr> + * <tr> + * <td>SYSTEM_EVENT_NPS_ENABLE_STATE</td> + * <td>EVENT_KEY_NPS_ENABLE_STATE</td> + * <td>EVENT_VAL_NPS_DISABLED<br/>EVENT_VAL_NPS_ENABLED</td> + * </tr> + * <tr> + * <td rowspan="2">SYSTEM_EVENT_INCOMMING_MSG</td> + * <td>EVENT_KEY_MSG_TYPE</td> + * <td>EVENT_VAL_SMS<br/>EVENT_VAL_PUSH<br/>EVENT_VAL_CB</td> + * </tr> + * <tr> + * <td>EVENT_KEY_MSG_ID</td> + * <td>string of unsigned int type value.</td> + * </tr> + * <tr> + * <td>SYSTEM_EVENT_TIME_CHANGED</td> + * <td>N/A</td> + * <td>N/A</td> + * </tr> + * <tr> + * <td>SYSTEM_EVENT_TIME_ZONE</td> + * <td>EVENT_KEY_TIME_ZONE</td> + * <td>The value of this key is timezone value of tz database, for example,<br/> "Asia/Seoul", "America/New_York",<br/>refer to the Time Zone Database of IANA.</td> + * </tr> + * <tr> + * <td>SYSTEM_EVENT_HOUR_FORMAT</td> + * <td>EVENT_KEY_HOUR_FORMAT</td> + * <td>EVENT_VAL_HOURFORMAT_12<br/>EVENT_VAL_HOURFORMAT_24</td> + * </tr> + * <tr> + * <td>SYSTEM_EVENT_LANGUAGE_SET</td> + * <td>EVENT_KEY_LANGUAGE_SET</td> + * <td>The value of this key is full name of locale, for example,<br/> "ko_KR.UTF8" : in case of Korean language<br/> "en_US.UTF8" : in case of USA language,<br/>refer to linux locale info.</td> + * </tr> + * <tr> + * <td>SYSTEM_EVENT_REGION_FORMAT</td> + * <td>EVENT_KEY_REGION_FORMAT</td> + * <td>The value of this key is full name of locale, for example,<br/> "ko_KR.UTF8" : in case of Korean region format<br/> "en_US.UTF8" : in case of USA region format,<br/>refer to linux locale info.</td> + * </tr> + * <tr> + * <td>SYSTEM_EVENT_SILENT_MODE</td> + * <td>EVENT_KEY_SILENT_MODE</td> + * <td>EVENT_VAL_SILENTMODE_ON<br/>EVENT_VAL_SILENTMODE_OFF</td> + * </tr> + * <tr> + * <td>SYSTEM_EVENT_VIBRATION_STATE</td> + * <td>EVENT_KEY_VIBRATION_STATE</td> + * <td>EVENT_VAL_VIBRATION_ON<br/>EVENT_VAL_VIBRATION_OFF</td> + * </tr> + * <tr> + * <td>SYSTEM_EVENT_SCREEN_AUTOROTATE_STATE</td> + * <td>EVENT_KEY_SCREEN_AUTOROTATE_STATE</td> + * <td>EVENT_VAL_SCREEN_AUTOROTATE_ON<br/>EVENT_VAL_SCREEN_AUTOROTATE_OFF</td> + * </tr> + * <tr> + * <td>SYSTEM_EVENT_MOBILE_DATA_STATE</td> + * <td>EVENT_KEY_MOBILE_DATA_STATE</td> + * <td>EVENT_VAL_MOBILE_DATA_OFF<br/>EVENT_VAL_MOBILE_DATA_ON</td> + * </tr> + * <tr> + * <td>SYSTEM_EVENT_DATA_ROAMING_STATE</td> + * <td>EVENT_KEY_DATA_ROAMING_STATE</td> + * <td>EVENT_VAL_DATA_ROAMING_OFF<br/>EVENT_VAL_DATA_ROAMING_ON</td> + * </tr> + * <tr> + * <td>SYSTEM_EVENT_FONT_SET</td> + * <td>EVENT_KEY_FONT_SET</td> + * <td>The value of this key is font name of string type by font-config.</td> + * </tr> + * </table> + * + */ + +#endif /* __TIZEN_APPFW_EVENT_DOC_H__ */ diff --git a/doc/appfw_i18n_doc.h b/doc/appfw_i18n_doc.h new file mode 100755 index 0000000..8b874f3 --- /dev/null +++ b/doc/appfw_i18n_doc.h @@ -0,0 +1,45 @@ +/* + * 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_I18N_DOC_H__ +#define __TIZEN_APPFW_I18N_DOC_H__ + + + /** + * @ingroup CAPI_APPLICATION_MODULE + * @defgroup CAPI_I18N_MODULE Internationalization + * @brief The Internationalization API provides functions to write multilingual applications through GNU gettext. + * + * @section CAPI_I18_MODULE_HEADER Required Header + * \#include <app.h> + * + * @section CAPI_I18N_MODULE_OVERVIEW Overview + * The @ref CAPI_I18N_MODULE API provides functions to write multilingual applications through GNU gettext. + * <p> + * Tizen provides all the features of the GNU gettext library through the Internationalization API + * and allows you to manage message catalogs from SDK. + * <p> + * The Internationalization API consists of i18n_get_text() for message translation + * and macros to use i18n_get_text() in an easy to use form. + * These macros allow you to mark strings for translation in source codes, + * which are replaced with the translated strings at runtime. + * <p> + */ + + + +#endif /* __TIZEN_APPFW_I18N_DOC_H__ */ diff --git a/doc/appfw_preference_doc.h b/doc/appfw_preference_doc.h new file mode 100755 index 0000000..2b04552 --- /dev/null +++ b/doc/appfw_preference_doc.h @@ -0,0 +1,44 @@ +/* + * 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_DOC_H__ +#define __TIZEN_APPFW_PREFERENCE_DOC_H__ + + /** + * @ingroup CAPI_APPLICATION_MODULE + * @defgroup CAPI_PREFERENCE_MODULE Preference + * @brief The @ref CAPI_PREFERENCE_MODULE API provides functions to store and retrieve small pieces of data, used for application preferences. + * + * @addtogroup CAPI_PREFERENCE_MODULE + * + * @section CAPI_PREFERENCE_MODULE_HEADER Required Header + * \#include <app_preference.h> + * + * @section CAPI_PREFERENCE_MODULE_OVERVIEW Overview + * + * The Preference API provides a mechanism that saves data items in the form of key/value pairs for this application, and later retrieves them. + * A typical usecase would be for an application preference screen where the user can pick some values for some options. The Preference API + * has pairs of functions, one to set such a pair, another to retrieve the stored value given in the key. Keys are always text strings, but + * there are functions for each of the possible value types: integer, double, string, and boolean. There is also a function to clear all of the preferences. + * + * The @ref CAPI_PREFERENCE_MODULE API provides a way to register a callback to get notified when a value for a particular key changes. It is useful to know + * when the display should be updated or some behavior is altered as a result. + * + * There is an iterator function which steps through all the data pairs, invoking a callback for each one. + */ + +#endif /* __TIZEN_APPFW_PREFERENCE_DOC_H__ */ diff --git a/doc/appfw_resource_manager_doc.h b/doc/appfw_resource_manager_doc.h new file mode 100755 index 0000000..8f45226 --- /dev/null +++ b/doc/appfw_resource_manager_doc.h @@ -0,0 +1,81 @@ +/* + * Copyright (c) 2015 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_RESOURCE_MANAGER_DOC_H__ +#define __TIZEN_APPFW_APP_RESOURCE_MANAGER_DOC_H__ + +/** + * @ingroup CAPI_APPLICATION_MODULE + * @defgroup CAPI_RESOURCE_MANAGER_MODULE Resource Manager + * @brief The @ref CAPI_RESOURCE_MANAGER_MODULE API provides functions to get/set the common resource for multiple devices. + * + * @section CAPI_RESOURCE_MANAGER_MODULE_HEADER Required Header + * \#include <app_resource_manager.h> + * + * @section CAPI_RESOURCE_MANAGER_MODULE_OVERVIEW Overview + * + * The @ref CAPI_RESOURCE_MANAGER_MODULE API provides functions to use different resources(images, layout, sounds) between each devices have different device specification. + * For example, if you want to change button image of application depends on device's current language setting, put resource files into different folders which are managed by SDK as the same filename. + * Then call app_resource_manager_get() with resource ID described below to get appropriate resource filepath then OS will choose resources for specific device. + * You should get the path of the resource file that is managed by the resource manager with app_resource_manager_get() API. Tizen may remove unnecessary resource files for a certain device, so you may fail to access if you access the resource file with the path that is not gotten with app_resource_manager_get() API. + * Make sure app_resource_manager_init() should be called first and app_resource_manager_release should be called after using resource manager. + * + * @section CAPI_RESOURCE_MANAGER_MODULE_RESOURCE_ID Resource ID + * + * Resource ID is an identifier for specific resource. It consists of sub directories and filename including its extension. + * Same resources are located at different location with same filename for supporting multi devices. + * If you want to get actual filename with given resourceID, refer app_resource_manager_get(). + * + * @section CAPI_RESOURCE_MANAGER_MODULE_RESOURCE_TYPE Resource Type + * + * For now, 4 resource types are supported. + * + * Resource which has same resource type are grouped as folder. + * Folder name is irrelevant with its actual resource type. + * The managed folders for each type will be generated by SDK tools. + * In source codes, you can use resource types listed below. + * (Types will be added for further needs) + * + * <table> + * <tr> + * <th>TYPE</th> + * <th>Description</th> + * </tr> + * <tr> + * <td>RSC_TYPE_IMAGE</td> + * <td>Image resources.</td> + * </tr> + * <tr> + * <td>RSC_TYPE_LAYOUT</td> + * <td>Application's layout to be displayed.</td> + * </tr> + * <tr> + * <td>RSC_TYPE_SOUND</td> + * <td>Sound, audio resources.</td> + * </tr> + * <tr> + * <td>RSC_TYPE_BIN</td> + * <td>All other resources to be needed but not specified above.</td> + * </tr> + * </table> + * + * @subsection CAPI_RESOURCE_MANAGER_MODULE_MATCHING_ALGORITHM Matching Algorithm + * + * @image html capi_appfw_application_resource.png "Matching Algorithm" + * + */ + +#endif /* __TIZEN_APPFW_APP_RESOURCE_MANAGER_DOC_H__ */ diff --git a/doc/images/capi_appfw_application_lifecycle.png b/doc/images/capi_appfw_application_lifecycle.png Binary files differnew file mode 100755 index 0000000..840505c --- /dev/null +++ b/doc/images/capi_appfw_application_lifecycle.png diff --git a/doc/images/capi_appfw_application_package.png b/doc/images/capi_appfw_application_package.png Binary files differnew file mode 100755 index 0000000..21d43f6 --- /dev/null +++ b/doc/images/capi_appfw_application_package.png diff --git a/doc/images/capi_appfw_application_resource.png b/doc/images/capi_appfw_application_resource.png Binary files differnew file mode 100755 index 0000000..db6129b --- /dev/null +++ b/doc/images/capi_appfw_application_resource.png diff --git a/doc/images/capi_appfw_application_states.png b/doc/images/capi_appfw_application_states.png Binary files differnew file mode 100755 index 0000000..3bcec5a --- /dev/null +++ b/doc/images/capi_appfw_application_states.png |