From: Jaesung Ku Date: Fri, 22 Mar 2013 12:03:15 +0000 (+0900) Subject: Update the description for OnAppTerminating X-Git-Tag: accepted/tizen_2.1/20130425.034849~234 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3820b7a28343482f056a9f00578bbc33eac8d1d1;p=framework%2Fosp%2Fappfw.git Update the description for OnAppTerminating Change-Id: Icaa1a95daf11bb96b4822a6e817873bf150535f6 Signed-off-by: Jaesung Ku --- diff --git a/inc/FAppApp.h b/inc/FAppApp.h old mode 100644 new mode 100755 index 35bee1e..ac83a45 --- a/inc/FAppApp.h +++ b/inc/FAppApp.h @@ -262,17 +262,27 @@ 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 can be terminated by either system, such as power-off and OOM, or others, such as self and other applications. @n + * When the termination by system, called an “urgent termination”, occurs, the method, OnAppTerminating(), cannot be executed properly. + * For more details, while power-off, even if OnAppTerminating() is called, it has a short time for executing. If the application is killed by OOM, OnAppTerminating() is not called. @n + * Because OnAppTerminating() is not likely to be called due to urgent termination, the application should save the critical data as they can do. + * For example, the application can set the check point or use the callback for low memory. @n + * When the termination by self or other applications, called a “normal termination”, occurs, the method, OnAppTerminating(), can be executed properly. + * It provides more time for executing than urgent termination, but limits to the time to 3 or 5 seconds. @n + * The main loop is already quitted when OnAppTerminating() is called. + * Thus, the application should not use a kind of asynchronous API of which the callback is 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