Add WeeklyTime to RegisterAppLaunch param guide
[platform/framework/native/appfw.git] / inc / FAppApp.h
index 2012245..851b84f 100644 (file)
@@ -1,5 +1,4 @@
 //
-// Open Service Platform
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Apache License, Version 2.0 (the License);
@@ -42,7 +41,7 @@ class AppResource;
 
 /**
  * @class      App
- * @brief      This class is the base class of a Tizen native application.
+ * @brief      This class is the base class of a %Tizen native application.
  *
  * @since      2.0
  *
@@ -129,14 +128,14 @@ public:
        /**
         * @page        CompGetAppNamePage Compatibility for GetAppName()
         * @section     CompGetAppNamePageIssue Issues
-        * Implementing this method in OSP compatible applications has the following issues:   @n
+        * Implementation of this method in %Tizen API versions prior to 2.1 has the following issue: @n
         *
         * -# GetAppName() returns the localized name of the application while the meaning of the application name is ambiguous.
         *  There are different use cases for locale-dependent name and localized name and the platform does not provide
         *  a method for obtaining language-neutral name.
         *
         * @section     CompGetAppNamePageResolution Resolutions
-        * This issue has been resolved in Tizen.  @n 
+        * The issue mentioned above is resolved in %Tizen API version 2.1 as follows: @n
         *
         * -# GetAppDisplayName() is introduced to acquire localized name and GetAppName() returns locale-independent application name.
         */
@@ -144,7 +143,7 @@ public:
        /**
         * Gets the display name of the application. @n
         * If the system language setting is changed, the %GetAppDisplayName() method returns the localized application name.
-        * The display name is displayed in applications like Launcher, Setting, Task Manager, and so on.
+        * The display name is displayed in applications like Launcher, Setting, Task Switcher, and so on.
         *
         * @since       2.0
         *
@@ -199,8 +198,17 @@ public:
        Tizen::Base::String GetAppResourcePath(void) const;
 
        /**
+       * Gets the path of the application's shared directory to export data to other applications.
+       *
+       * @since        2.1
+       *
+       * @return       The application's shared directory path
+       */
+       Tizen::Base::String GetAppSharedPath(void) const;
+
+       /**
         * Terminates the application while it is running. @n
-        * The OnAppTerminating() method is called after the %Terminate() method is executed successfully.
+        * The %Terminate() method can be called explicitly by the application. The OnAppTerminating() method is called after this method is executed successfully.
         *
         * @since       2.0
         *
@@ -253,17 +261,26 @@ public:
        /**
         * Called when the application's state changes to App::TERMINATING. @n
         * All the activities involved in terminating the application, including saving the application's states, must be done in the %OnAppTerminating() method.
-        * After this method, the application code cannot be executed. The application is destroyed subsequently.
+        * After this method, the application code cannot be executed. The application is destroyed subsequently. @n
+        *
+        * An application's termination is triggered either by the system or other applications. @n
+        * When the termination is triggered by the system because of conditions such as power-off and OOM, it is called "urgent termination" and during these terminations %OnAppTerminating(), cannot be executed properly.
+        * When an application is terminated because of a power-off, although this method is called, it should be executed in a short duration. And when an application is killed by OOM, this method is not called. @n
+        * This implies that this method is not likely to be called during an urgent termination, and hence the application should save the critical data as often as possible.
+        * For example, the application can set a check point or use the callback for low memory.
+        * When an application is terminated by self or other applications, it is called "normal termination" and during these terminations this method is executed properly because more time is provided for executing it as compared to an urgent termination (however, it does have a limit of 3-5 seconds). @n
+        * When this method is called, the main loop has already been quit.
+        * Thus, the application should not use any kind of asynchronous API that has callbacks triggered by the main loop.
         *
         * @since       2.0
         *
         * @return      @c true if the method is successful, @n
         *                      else @c false
         * @param[in]   appRegistry         The instance that manages the application's states
-        * @param[in]   forcedTermination   Set to @c true if the application is terminated by the system or another application, @n
+        * @param[in]   urgentTermination   Set to @c true if the application is terminated by the system, @n
         *                                                                      else @c false
         */
-       virtual bool OnAppTerminating(AppRegistry& appRegistry, bool forcedTermination = false) = 0;
+       virtual bool OnAppTerminating(AppRegistry& appRegistry, bool urgentTermination = false) = 0;
 
        /**
         * Called when the system detects that the system wide memory or application heap memory is insufficient to run the application any further. @n
@@ -275,7 +292,7 @@ public:
 
        /**
         * Called when the battery level changes. @n
-        * It is recommended that the application consuming more battery power must be terminated if the battery level is Tizen::System::BATTERY_LEVEL_CRITICAL.
+        * It is recommended that the application decides whether to terminate by itself by considering its own battery power consumption, if the battery level is Tizen::System::BATTERY_LEVEL_CRITICAL.
         *
         * @since       2.0
         *
@@ -297,8 +314,7 @@ public:
        result SendUserEvent(RequestId requestId, const Tizen::Base::Collection::IList* pArgs);
 
        /**
-       * Called asynchronously when the user event is sent by the SendUserEvent() method. @n
-       * The request ID and argument format for the user event can be defined as per the requirement.
+       * Called asynchronously when the user event is sent by the SendUserEvent() method.
        *
        * @since        2.0
        *