epoc32/include/eikapp.h
author William Roberts <williamr@symbian.org>
Tue, 16 Mar 2010 16:12:26 +0000
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
permissions -rw-r--r--
Final list of Symbian^2 public API header files
     1 // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     4 // under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 //
    15 
    16 #ifndef __EIKAPP_H__
    17 #define __EIKAPP_H__
    18 
    19 #include <apparc.h>		// class CApaApplication
    20 #include <apaflrec.h>
    21 
    22 class CCoeEnv;
    23 
    24 /** The base of all Uikon applications. 
    25 
    26 CEikApplication builds on CApaApplication, providing a basis for applications 
    27 working within the framework provided by Uikon. It also contains an interface 
    28 to the resource file and the document object belonging to the application.
    29 
    30 Each Uikon application class is derived from CEikApplication. Application 
    31 writers must provide at least an implementation of the pure virtual function 
    32 CreateDocumentL().
    33 
    34 The application's resource file can be changed from the default by overriding 
    35 ResourceFileName().
    36 
    37 @publishedAll 
    38 @released 
    39 @see CEikDocument */
    40 class CEikApplication : public CApaApplication
    41 	{
    42 public:
    43 	IMPORT_C ~CEikApplication();
    44 	inline TInt ResourceFileOffset() const;
    45 	inline CApaProcess* Process() const;
    46 	inline const TApaAppCaption& AppCaption() const;
    47 	IMPORT_C virtual void GetDefaultDocumentFileName(TFileName& aDocumentName) const;
    48 	IMPORT_C virtual TFileName BitmapStoreName() const;
    49 public: // from CApaApplication
    50 	IMPORT_C CDictionaryStore* OpenIniFileLC(RFs& aFs) const;
    51 	IMPORT_C void Capability(TDes8& aInfo) const;
    52 	IMPORT_C void SetToIniFileNameL(TParse& aParser) const;
    53 protected: // from CApaApplication
    54 	IMPORT_C void PreDocConstructL();
    55 	IMPORT_C CApaDocument* CreateDocumentL(CApaProcess* aProcess);
    56 	IMPORT_C void NewAppServerL(CApaAppServer*& aAppServer);
    57 protected: 
    58 	IMPORT_C CEikApplication();
    59 	IMPORT_C void EnsureCaptionIsLocalisedL(const TDesC& aLocalisableResourceFile);
    60 public: 
    61 	IMPORT_C virtual TFileName ResourceFileName() const;
    62 private:
    63 	IMPORT_C virtual void CEikApplication_Reserved1();
    64 	IMPORT_C virtual void CEikApplication_Reserved2();
    65 private: 
    66 	/** 
    67 	@publishedAll 
    68 	@released 
    69 	*/
    70 	virtual CApaDocument* CreateDocumentL()=0;
    71 private: // internal use
    72 	void InitAppNameParserWithPathAndExt(TParse& aParser, const TDesC& aPath, const TDesC& aExt) const;
    73 protected:
    74 	CCoeEnv* iCoeEnv;
    75 	TInt iResourceFileOffset;
    76 private:
    77 	enum
    78 		{
    79 		EFlagCaptionCorrectlyLocalised =  0x00000001
    80 		};	
    81 private:
    82 	CApaProcess* iProcess;
    83 	TApaAppCaption iCaption;
    84 	TApaAppCapabilityBuf* iCapabilityBuf;
    85 	TUint iAppFlags;
    86 	TInt iSpare;
    87 	};
    88 
    89 /** Gets the offset value defined for this application's default resource file. 
    90 
    91 As the resource file offset can also be accessed through iResourceFileOffset, 
    92 this function should not be needed by any apps.
    93 
    94 @return Offset of a resource file. */
    95 inline TInt CEikApplication::ResourceFileOffset() const
    96 	{ return iResourceFileOffset; }
    97 
    98 
    99 /** Gets the managing process.
   100 
   101 @return A pointer to the process object managing this application's documents. */
   102 inline CApaProcess* CEikApplication::Process() const
   103 	{ return iProcess; }
   104 
   105 
   106 /** Gets the caption for this application.
   107 
   108 Captions are displayed in the task list.
   109 
   110 @return Application caption. */
   111 inline const TApaAppCaption& CEikApplication::AppCaption() const
   112 	{ return iCaption;	}
   113 
   114 #endif	// __EIKAPP_H__