Symbian3/SDK/Source/GUID-1E4FFC56-8473-4E0A-B2E2-4E8DE8B1D00F.dita
changeset 7 51a74ef9ed63
child 8 ae94777fff8f
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Symbian3/SDK/Source/GUID-1E4FFC56-8473-4E0A-B2E2-4E8DE8B1D00F.dita	Wed Mar 31 11:11:55 2010 +0100
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
+<!-- This component and the accompanying materials are made available under the terms of the License 
+"Eclipse Public License v1.0" which accompanies this distribution, 
+and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
+<!-- Initial Contributors:
+    Nokia Corporation - initial contribution.
+Contributors: 
+-->
+<!DOCTYPE task
+  PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
+<task id="GUID-1E4FFC56-8473-4E0A-B2E2-4E8DE8B1D00F" xml:lang="en"><title>Increasing
+the Priority of a Third-Party Application</title><shortdesc>This section describes how a third-party application can increase
+its OOM priority by using OOM Monitor APIs.</shortdesc><prolog><metadata><keywords/></metadata></prolog><taskbody>
+<context id="GUID-FD9A15E9-6313-4BD3-A52A-7E3B71D39B37-GENID-1-8-1-10-1-1-8-1-5-1-6-1-5-1-3-1"><p>Third-party applications
+that needs to be running all the time can increase their priority to <codeph>High</codeph> from
+the default level (<codeph>Normal</codeph>). By increasing the priority, applications
+can protect itself from being closed by the OOM Monitor. For example:</p><ul>
+<li><p>IP Phone application receiving IP calls </p></li>
+<li><p>Instant Messaging application receiving messages</p></li>
+</ul><p>are applications which listens for events from the network all the
+time.</p></context>
+<steps id="GUID-01A482C7-3004-484D-9948-B0B892E913AF-GENID-1-8-1-10-1-1-8-1-5-1-6-1-5-1-3-2">
+<step id="GUID-83631E4F-71D0-4FD2-8FD6-46689AAFA761-GENID-1-8-1-10-1-1-8-1-5-1-6-1-5-1-3-2-1"><cmd>Create an OOM Monitor
+session</cmd>
+<info><codeblock xml:space="preserve">ROomMonitorSession ioomMonitorSession;
+CleanUpClosePushL(ioomMonitorSession);
+User::LeaveIfError(ioomMonitorSession.Connect());
+</codeblock></info>
+</step>
+<step id="GUID-3033BB28-ACC5-440C-9BDB-D1BC36CD001C-GENID-1-8-1-10-1-1-8-1-5-1-6-1-5-1-3-2-2"><cmd>Set the priority
+for the application to <codeph>High</codeph> .</cmd>
+<info><codeblock xml:space="preserve">iOomMonitorSession.SetOomPriority(ROomMonitorSession::EOomPriorityHigh);
+DoCriticalBackgroundProcessingL();
+</codeblock></info>
+</step>
+<step id="GUID-5B3E8176-528F-45E7-B1CE-57ADCFAB5C6C-GENID-1-8-1-10-1-1-8-1-5-1-6-1-5-1-3-2-3"><cmd>Close the session.</cmd>
+<info><codeblock xml:space="preserve">iOomMonitorSession.Close();
+</codeblock></info>
+</step>
+</steps>
+</taskbody><related-links>
+<link href="GUID-CE308C71-D8B2-43B3-97FD-B868285ED5FB.dita"><linktext>OOM Monitor
+Priority</linktext></link>
+<link href="GUID-88752800-83BD-4845-80A0-6B65D8D81924.dita"><linktext>OOM Monitor
+Reference</linktext></link>
+</related-links></task>
\ No newline at end of file