S60 3rd Edition SDK for Symbian OS
Example Applications Guide

SIPExDoc.h

00001 /*
00002 * ==============================================================================
00003 *  Name        : SIPExDoc.h
00004 *  Part of     : SIPEx
00005 *  Interface   : 
00006 *  Description : 
00007 *  Version     : 
00008 *
00009 *  Copyright (c) 2004-2006 Nokia Corporation.
00010 *  This material, including documentation and any related 
00011 *  computer programs, is protected by copyright controlled by 
00012 *  Nokia Corporation.
00013 * ==============================================================================
00014 */
00015 
00016 #ifndef __CSIPEXDOC_H__
00017 #define __CSIPEXDOC_H__
00018 
00019 // INCLUDES
00020 
00021 #include <eikdoc.h>
00022 #include <e32base.h>
00023 
00024 
00025 // FORWARD DECLARATIONS
00026 class CEikApplication;
00027 class CSIPExEngine;
00028 class MSIPExGameObserver;
00029 
00030 // CLASS DECLARATION
00031 /**
00032 * The document class.
00033 * Document part of the CKON application framework for the SIPLine.
00034 * Creates appui.
00035 */
00036 class CSIPExDoc 
00037     : public CEikDocument
00038     {
00039     public:  // Constructors and destructor
00040         
00041         /**
00042         * Two-phased constructor.
00043         * @param aApp reference to the application class instance
00044         */
00045         static CSIPExDoc* NewL( CEikApplication& aApp );
00046         
00047         /**
00048         * Destructor.
00049         */
00050         virtual ~CSIPExDoc();
00051     
00052     public: // New functions
00053     
00054         /**
00055         * Creates the application engine.
00056         * @param aObserver A reference to the game observer.
00057         * @return A pointer to engine. The client gets ownership of 
00058         *         the engine.
00059         */
00060         CSIPExEngine* CreateEngineL( MSIPExGameObserver& aObserver );        
00061  
00062     public: // Functions from base classes
00063 
00064         /**
00065         * From CEikDocument
00066         * Creates instance of appui class
00067         * @return Pointer to the appui class instance
00068         */
00069         CEikAppUi* CreateAppUiL();
00070         
00071     public:
00072         
00073         /**
00074         * Info text is always stored in document. Text will be appended
00075         * to existing info text unless max size is reached. In such situation
00076         * oldest text will be removed.
00077         * @param aText info text
00078         */
00079         void StoreInfoTextL( const TDesC& aText );
00080        
00081         /**
00082         * Returns reference to current info text
00083         */
00084         const TDesC& InfoText();
00085     
00086     private:
00087 
00088         /**
00089         * C++ default constructor.
00090         * @param aApp Reference to the application class
00091         */
00092         CSIPExDoc( CEikApplication& aApp );
00093 
00094         /**
00095         * By default Symbian 2nd phase constructor is private.
00096         */
00097         void ConstructL();            
00098 
00099 
00100     private:    // Data
00101         // Owned: The application engine pointer
00102         CSIPExEngine*  iEngine;
00103         
00104         // Owned: Current info text
00105         HBufC* iInfoText;
00106     };
00107 
00108 #endif      // __CSIPEXDOC_H__   
00109             
00110 // End of File

© Nokia 2006

Back to top