epoc32/include/eikapp.h
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
     1.1 --- a/epoc32/include/eikapp.h	Tue Nov 24 13:55:44 2009 +0000
     1.2 +++ b/epoc32/include/eikapp.h	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -1,1 +1,114 @@
     1.4 -eikapp.h
     1.5 +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.6 +// All rights reserved.
     1.7 +// This component and the accompanying materials are made available
     1.8 +// 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
     1.9 +// which accompanies this distribution, and is available
    1.10 +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
    1.11 +//
    1.12 +// Initial Contributors:
    1.13 +// Nokia Corporation - initial contribution.
    1.14 +//
    1.15 +// Contributors:
    1.16 +//
    1.17 +// Description:
    1.18 +//
    1.19 +
    1.20 +#ifndef __EIKAPP_H__
    1.21 +#define __EIKAPP_H__
    1.22 +
    1.23 +#include <apparc.h>		// class CApaApplication
    1.24 +#include <apaflrec.h>
    1.25 +
    1.26 +class CCoeEnv;
    1.27 +
    1.28 +/** The base of all Uikon applications. 
    1.29 +
    1.30 +CEikApplication builds on CApaApplication, providing a basis for applications 
    1.31 +working within the framework provided by Uikon. It also contains an interface 
    1.32 +to the resource file and the document object belonging to the application.
    1.33 +
    1.34 +Each Uikon application class is derived from CEikApplication. Application 
    1.35 +writers must provide at least an implementation of the pure virtual function 
    1.36 +CreateDocumentL().
    1.37 +
    1.38 +The application's resource file can be changed from the default by overriding 
    1.39 +ResourceFileName().
    1.40 +
    1.41 +@publishedAll 
    1.42 +@released 
    1.43 +@see CEikDocument */
    1.44 +class CEikApplication : public CApaApplication
    1.45 +	{
    1.46 +public:
    1.47 +	IMPORT_C ~CEikApplication();
    1.48 +	inline TInt ResourceFileOffset() const;
    1.49 +	inline CApaProcess* Process() const;
    1.50 +	inline const TApaAppCaption& AppCaption() const;
    1.51 +	IMPORT_C virtual void GetDefaultDocumentFileName(TFileName& aDocumentName) const;
    1.52 +	IMPORT_C virtual TFileName BitmapStoreName() const;
    1.53 +public: // from CApaApplication
    1.54 +	IMPORT_C CDictionaryStore* OpenIniFileLC(RFs& aFs) const;
    1.55 +	IMPORT_C void Capability(TDes8& aInfo) const;
    1.56 +	IMPORT_C void SetToIniFileNameL(TParse& aParser) const;
    1.57 +protected: // from CApaApplication
    1.58 +	IMPORT_C void PreDocConstructL();
    1.59 +	IMPORT_C CApaDocument* CreateDocumentL(CApaProcess* aProcess);
    1.60 +	IMPORT_C void NewAppServerL(CApaAppServer*& aAppServer);
    1.61 +protected: 
    1.62 +	IMPORT_C CEikApplication();
    1.63 +	IMPORT_C void EnsureCaptionIsLocalisedL(const TDesC& aLocalisableResourceFile);
    1.64 +public: 
    1.65 +	IMPORT_C virtual TFileName ResourceFileName() const;
    1.66 +private:
    1.67 +	IMPORT_C virtual void CEikApplication_Reserved1();
    1.68 +	IMPORT_C virtual void CEikApplication_Reserved2();
    1.69 +private: 
    1.70 +	/** 
    1.71 +	@publishedAll 
    1.72 +	@released 
    1.73 +	*/
    1.74 +	virtual CApaDocument* CreateDocumentL()=0;
    1.75 +private: // internal use
    1.76 +	void InitAppNameParserWithPathAndExt(TParse& aParser, const TDesC& aPath, const TDesC& aExt) const;
    1.77 +protected:
    1.78 +	CCoeEnv* iCoeEnv;
    1.79 +	TInt iResourceFileOffset;
    1.80 +private:
    1.81 +	enum
    1.82 +		{
    1.83 +		EFlagCaptionCorrectlyLocalised =  0x00000001
    1.84 +		};	
    1.85 +private:
    1.86 +	CApaProcess* iProcess;
    1.87 +	TApaAppCaption iCaption;
    1.88 +	TApaAppCapabilityBuf* iCapabilityBuf;
    1.89 +	TUint iAppFlags;
    1.90 +	TInt iSpare;
    1.91 +	};
    1.92 +
    1.93 +/** Gets the offset value defined for this application's default resource file. 
    1.94 +
    1.95 +As the resource file offset can also be accessed through iResourceFileOffset, 
    1.96 +this function should not be needed by any apps.
    1.97 +
    1.98 +@return Offset of a resource file. */
    1.99 +inline TInt CEikApplication::ResourceFileOffset() const
   1.100 +	{ return iResourceFileOffset; }
   1.101 +
   1.102 +
   1.103 +/** Gets the managing process.
   1.104 +
   1.105 +@return A pointer to the process object managing this application's documents. */
   1.106 +inline CApaProcess* CEikApplication::Process() const
   1.107 +	{ return iProcess; }
   1.108 +
   1.109 +
   1.110 +/** Gets the caption for this application.
   1.111 +
   1.112 +Captions are displayed in the task list.
   1.113 +
   1.114 +@return Application caption. */
   1.115 +inline const TApaAppCaption& CEikApplication::AppCaption() const
   1.116 +	{ return iCaption;	}
   1.117 +
   1.118 +#endif	// __EIKAPP_H__