logsui/AppSrc/CLogsDocument.h
changeset 0 e686773b3f54
equal deleted inserted replaced
-1:000000000000 0:e686773b3f54
       
     1 /*
       
     2 * Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: 
       
    15 *     Logs document class
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef     __Logs_App_CLogsDocument_H__
       
    21 #define     __Logs_App_CLogsDocument_H__
       
    22 
       
    23 //  INCLUDES
       
    24 #include <AknDoc.h> 
       
    25 #include <coemain.h>
       
    26 #include <apgwgnam.h>
       
    27 
       
    28 // CONSTANTS
       
    29 
       
    30 // MACROS
       
    31 
       
    32 // DATA TYPES
       
    33 
       
    34 // FUNCTION PROTOTYPES
       
    35 
       
    36 // FORWARD DECLARATIONS
       
    37 class CAknApplication;
       
    38 class CEikAppUi;
       
    39 class CLogsEngine;
       
    40 
       
    41 // CLASS DECLARATION
       
    42 
       
    43 /**
       
    44  *  Logs document class. An object of this class is created by the Symbian OS 
       
    45  *  framework by a call to CLogsApplication::CreateDocumentL(). The document 
       
    46  *  object creates and owns the application engine and provides access to it by
       
    47  *  the Engine() function. The application framework creates the Logs 
       
    48  *  application UI object (CLogsAppUi) by a call to the virtual function 
       
    49  *  CreateAppUiL().
       
    50  */
       
    51 class   CLogsDocument :	public CAknDocument, MCoeForegroundObserver
       
    52     {
       
    53     private:  // construction
       
    54         /**
       
    55          *  Constructor.
       
    56          *
       
    57          *  @param aApp The application object.
       
    58          */
       
    59         CLogsDocument( CAknApplication& aApp );
       
    60 
       
    61         /**
       
    62          *  Constructor, second phase. Creates the engine object.
       
    63          */
       
    64         void ConstructL();
       
    65 
       
    66     public:  // interface
       
    67         /**
       
    68          *  Standard creation function. Creates and returns a new object of
       
    69          *  this class.
       
    70          *  @param application reference
       
    71          *  @return new object
       
    72          */
       
    73         static CLogsDocument* NewL( CAknApplication& aApp );
       
    74 
       
    75         /**
       
    76          *  Destructor. Deletes the engine object.
       
    77          */
       
    78         ~CLogsDocument();
       
    79 
       
    80         /**
       
    81          *  Returns the pointer of the engine.
       
    82          *  @return iEngine
       
    83          */
       
    84         CLogsEngine* Engine();
       
    85 
       
    86 
       
    87     private: // from CEikDocument
       
    88         /**
       
    89          *  Creates and returns the Logs application UI object (CLogsAppUi).
       
    90          *  Called by the application framework.
       
    91          *
       
    92          *  @return new Logs application UI object
       
    93          *
       
    94          *  @exception KErrNoMemory if out of memory.
       
    95          *  @exception anything thrown by CLogsAppUi construction.
       
    96          */
       
    97         CEikAppUi* CreateAppUiL();  // Create the Logs Application UI object
       
    98         
       
    99         
       
   100 	public:	// from MCoeForegroundObserver
       
   101 
       
   102 		/**
       
   103 		 * Handles the application coming to the foreground.
       
   104 		 */
       
   105 		void HandleGainingForeground();
       
   106 
       
   107 		/**
       
   108 		 * Leaving version of the HandleGainingForeground.
       
   109 		 * Handles the application coming to the foreground.
       
   110 		 */
       
   111 		void HandleGainingForegroundL();
       
   112 
       
   113 		/**
       
   114 		 * Handles the application going into the background.
       
   115 		 */
       
   116 		void HandleLosingForeground();
       
   117 
       
   118 		/**
       
   119 		 * Leaving version of the HandleLosingForeground
       
   120 		 * Handles the application going into the background.
       
   121 		 */
       
   122 		void HandleLosingForegroundL();
       
   123 
       
   124 	public: // new methods
       
   125 
       
   126 		/**
       
   127 		 * Updates the task in fast swap windows
       
   128 		 *
       
   129 		 * @param aWgName the window group name
       
   130 		 */
       
   131 		void UpdateTaskNameL( CApaWindowGroupName* aWgName );
       
   132 
       
   133     private:  // data
       
   134         /// Own: Logs engine.
       
   135         CLogsEngine*    iEngine;
       
   136 
       
   137     };
       
   138 
       
   139 
       
   140 #endif  // __Logs_App_CLogsDocument_H__
       
   141 
       
   142 
       
   143 // End of File
       
   144