diff -r 51a74ef9ed63 -r ae94777fff8f Symbian3/SDK/Source/GUID-8F8E3814-7ED6-4218-BEEF-741AE0E9366F.dita --- a/Symbian3/SDK/Source/GUID-8F8E3814-7ED6-4218-BEEF-741AE0E9366F.dita Wed Mar 31 11:11:55 2010 +0100 +++ b/Symbian3/SDK/Source/GUID-8F8E3814-7ED6-4218-BEEF-741AE0E9366F.dita Fri Jun 11 12:39:03 2010 +0100 @@ -1,58 +1,58 @@ - - - - - -Changing -the PriorityThis section describes how an application (internal or third-party) -can change its priority by using OOM Monitor APIs. -

An application -which is processing a task in the background can change its priority at runtime -to protect itself from being closed by the OOM Monitor. For example:

    -
  • Music Player playing music in the background

  • -
  • Download Manager downloading a file in the background

  • -

If an application is processing a task for the user in the background, -the application is said to be Busy and the OOM Monitor must -not close a Busy application. An application can declare -itself to be Busy using ROomMonitorSession::SetOomPriority(EOomPriorityBusy) method. -When the application finishes its background job and becomes idle, it should -change its priority to Normal.

- -Create an OOM Monitor -session -ROomMonitorSession ioomMonitorSession; -CleanUpClosePushL(ioomMonitorSession); -User::LeaveIfError(ioomMonitorSession.Connect()); - - -Set the priority -for the application to Busy before performing the background -task -iOomMonitorSession.SetOomPriority(ROomMonitorSession::EOomPriorityBusy); -DoCriticalBackgroundProcessingL(); - - -Set the priority -for the application to Normal after the task is completed. -iOomMonitorSession.SetOomPriority(ROomMonitorSession::EOomPriorityNormal); - - -Close the session. -iOomMonitorSession.Close(); - - - -
-OOM Monitor -Priority -OOM Monitor -Overview -OOM Monitor -Reference + + + + + +Changing +the PriorityThis section describes how an application (internal or third-party) +can change its priority by using OOM Monitor APIs. +

An application +which is processing a task in the background can change its priority at runtime +to protect itself from being closed by the OOM Monitor. For example:

    +
  • Music Player playing music in the background

  • +
  • Download Manager downloading a file in the background

  • +

If an application is processing a task for the user in the background, +the application is said to be Busy and the OOM Monitor must +not close a Busy application. An application can declare +itself to be Busy using ROomMonitorSession::SetOomPriority(EOomPriorityBusy) method. +When the application finishes its background job and becomes idle, it should +change its priority to Normal.

+ +Create an OOM Monitor +session +ROomMonitorSession ioomMonitorSession; +CleanUpClosePushL(ioomMonitorSession); +User::LeaveIfError(ioomMonitorSession.Connect()); + + +Set the priority +for the application to Busy before performing the background +task +iOomMonitorSession.SetOomPriority(ROomMonitorSession::EOomPriorityBusy); +DoCriticalBackgroundProcessingL(); + + +Set the priority +for the application to Normal after the task is completed. +iOomMonitorSession.SetOomPriority(ROomMonitorSession::EOomPriorityNormal); + + +Close the session. +iOomMonitorSession.Close(); + + + +
+OOM Monitor +Priority +OOM Monitor +Overview +OOM Monitor +Reference
\ No newline at end of file