Symbian3/SDK/Source/GUID-1E4FFC56-8473-4E0A-B2E2-4E8DE8B1D00F.dita
changeset 8 ae94777fff8f
parent 7 51a74ef9ed63
child 13 48780e181b38
equal deleted inserted replaced
7:51a74ef9ed63 8:ae94777fff8f
    10 <!DOCTYPE task
    10 <!DOCTYPE task
    11   PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
    11   PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
    12 <task id="GUID-1E4FFC56-8473-4E0A-B2E2-4E8DE8B1D00F" xml:lang="en"><title>Increasing
    12 <task id="GUID-1E4FFC56-8473-4E0A-B2E2-4E8DE8B1D00F" xml:lang="en"><title>Increasing
    13 the Priority of a Third-Party Application</title><shortdesc>This section describes how a third-party application can increase
    13 the Priority of a Third-Party Application</title><shortdesc>This section describes how a third-party application can increase
    14 its OOM priority by using OOM Monitor APIs.</shortdesc><prolog><metadata><keywords/></metadata></prolog><taskbody>
    14 its OOM priority by using OOM Monitor APIs.</shortdesc><prolog><metadata><keywords/></metadata></prolog><taskbody>
    15 <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
    15 <context id="GUID-FD9A15E9-6313-4BD3-A52A-7E3B71D39B37-GENID-1-10-1-10-1-1-8-1-5-1-6-1-5-1-3-1"><p>Third-party applications
    16 that needs to be running all the time can increase their priority to <codeph>High</codeph> from
    16 that needs to be running all the time can increase their priority to <codeph>High</codeph> from
    17 the default level (<codeph>Normal</codeph>). By increasing the priority, applications
    17 the default level (<codeph>Normal</codeph>). By increasing the priority, applications
    18 can protect itself from being closed by the OOM Monitor. For example:</p><ul>
    18 can protect itself from being closed by the OOM Monitor. For example:</p><ul>
    19 <li><p>IP Phone application receiving IP calls </p></li>
    19 <li><p>IP Phone application receiving IP calls </p></li>
    20 <li><p>Instant Messaging application receiving messages</p></li>
    20 <li><p>Instant Messaging application receiving messages</p></li>
    21 </ul><p>are applications which listens for events from the network all the
    21 </ul><p>are applications which listens for events from the network all the
    22 time.</p></context>
    22 time.</p></context>
    23 <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">
    23 <steps id="GUID-01A482C7-3004-484D-9948-B0B892E913AF-GENID-1-10-1-10-1-1-8-1-5-1-6-1-5-1-3-2">
    24 <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
    24 <step id="GUID-83631E4F-71D0-4FD2-8FD6-46689AAFA761-GENID-1-10-1-10-1-1-8-1-5-1-6-1-5-1-3-2-1"><cmd>Create an OOM Monitor
    25 session</cmd>
    25 session</cmd>
    26 <info><codeblock xml:space="preserve">ROomMonitorSession ioomMonitorSession;
    26 <info><codeblock xml:space="preserve">ROomMonitorSession ioomMonitorSession;
    27 CleanUpClosePushL(ioomMonitorSession);
    27 CleanUpClosePushL(ioomMonitorSession);
    28 User::LeaveIfError(ioomMonitorSession.Connect());
    28 User::LeaveIfError(ioomMonitorSession.Connect());
    29 </codeblock></info>
    29 </codeblock></info>
    30 </step>
    30 </step>
    31 <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
    31 <step id="GUID-3033BB28-ACC5-440C-9BDB-D1BC36CD001C-GENID-1-10-1-10-1-1-8-1-5-1-6-1-5-1-3-2-2"><cmd>Set the priority
    32 for the application to <codeph>High</codeph> .</cmd>
    32 for the application to <codeph>High</codeph> .</cmd>
    33 <info><codeblock xml:space="preserve">iOomMonitorSession.SetOomPriority(ROomMonitorSession::EOomPriorityHigh);
    33 <info><codeblock xml:space="preserve">iOomMonitorSession.SetOomPriority(ROomMonitorSession::EOomPriorityHigh);
    34 DoCriticalBackgroundProcessingL();
    34 DoCriticalBackgroundProcessingL();
    35 </codeblock></info>
    35 </codeblock></info>
    36 </step>
    36 </step>
    37 <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>
    37 <step id="GUID-5B3E8176-528F-45E7-B1CE-57ADCFAB5C6C-GENID-1-10-1-10-1-1-8-1-5-1-6-1-5-1-3-2-3"><cmd>Close the session.</cmd>
    38 <info><codeblock xml:space="preserve">iOomMonitorSession.Close();
    38 <info><codeblock xml:space="preserve">iOomMonitorSession.Close();
    39 </codeblock></info>
    39 </codeblock></info>
    40 </step>
    40 </step>
    41 </steps>
    41 </steps>
    42 </taskbody><related-links>
    42 </taskbody><related-links>