Symbian3/SDK/Source/GUID-868C1A38-3CD0-4082-8106-DC3EE1F815D8.dita
changeset 0 89d6a7a84779
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Symbian3/SDK/Source/GUID-868C1A38-3CD0-4082-8106-DC3EE1F815D8.dita	Thu Jan 21 18:18:20 2010 +0000
@@ -0,0 +1,54 @@
+<?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 concept
+  PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
+<concept id="GUID-868C1A38-3CD0-4082-8106-DC3EE1F815D8" xml:lang="en"><title>System
+events</title><prolog><metadata><keywords/></metadata></prolog><conbody>
+<p>System events are enumerated in <xref href="jar:GUID-35228542-8C95-4849-A73F-2B4F082F0C44.jar!/sdk/doc_source/reference/reference-cpp/Application_Architecture/APGTASK.HGlobals.html#%3a%3aTApaSystemEvent" format="application/java-archive"><parmname>TApaSystemEvent</parmname></xref>, which is defined in the <parmname>apgtask.h</parmname> header.
+You must override <xref href="jar:GUID-35228542-8C95-4849-A73F-2B4F082F0C44.jar!/sdk/doc_source/reference/reference-cpp/Control_Environment/CCoeAppUiClass.html#%3a%3aCCoeAppUi%3a%3aHandleSystemEventL%28const%20TWsEvent%20%26amp%3b%29" format="application/java-archive"><parmname>CCoeAppUI::HandleSystemEventL()</parmname></xref> to handle
+these events, which should be done in the UI controller. The default implementation
+is empty. The possible events are as follows:</p>
+<codeblock id="GUID-F0606F71-729A-4D6B-AAC6-876A526DDFAC" xml:space="preserve">enum TApaSystemEvent
+    {
+    EApaSystemEventShutdown = 1,
+    EApaSystemEventBackupStarting,
+    EApaSystemEventBackupComplete,
+    EApaSystemEventBroughtToForeground
+    };
+</codeblock>
+<p>The following is a code example of system event handling:</p>
+<codeblock id="GUID-86877508-AD28-4576-B9D5-55565B0F4A4A" xml:space="preserve">void CExampleAppUI::HandleSystemEvent( const TWsEvent&amp; aEvent )
+    {
+    switch( *( TApaSystemEvent* )( aEvent.EventData() ) )
+        {
+        case EApaSystemEventBackupStarting:
+            {
+            // Handle backup starting
+            //...
+            break;
+            }
+        case EApaSystemEventBackupComplete:
+            {
+            // Handle backup complete
+            //...
+            break;
+            }
+        case EApaSystemEventShutdown:
+            {
+            // Handle shutdown
+            //...
+            break;
+            }
+        }
+        // Call the base class implementation
+        CAknAppUi::HandleSystemEvent( aEvent );
+    }
+</codeblock>
+</conbody></concept>
\ No newline at end of file