Symbian
Symbian OS Library

SYMBIAN OS V9.3

[Index] [Spacer] [Previous] [Next]



Location: EIKAPP.H
Link against: eikcore.lib

Class CEikApplication

class CEikApplication : public CApaApplication;

Description

The base of all Uikon applications.

CEikApplication builds on CApaApplication, providing a basis for applications working within the framework provided by Uikon. It also contains an interface to the resource file and the document.

Each Uikon application class is derived from CEikApplication. Application writers must provide at least an implementation of the pure virtual function CreateDocumentL().

The application's resource file can be changed from the default by overriding ResourceFileName().

Derivation

Members

Defined in CEikApplication:
AppCaption(), BitmapStoreName(), CEikApplication(), CEikApplication_Reserved1(), CEikApplication_Reserved2(), Capability(), CreateDocumentL(), CreateDocumentL(), EnsureCaptionIsLocalisedL(), GetDefaultDocumentFileName(), NewAppServerL(), OpenIniFileLC(), PreDocConstructL(), Process(), ResourceFileName(), ResourceFileOffset(), SetToIniFileNameL(), iCoeEnv, iResourceFileOffset, ~CEikApplication()

Inherited from CApaApplication:
AppDllUid(), AppFullName(), CApaApplication_Reserved1(), CApaApplication_Reserved2(), DllName(), GenerateFileName(), OpenIniFileL()

Inherited from CBase:
Delete(), Extension_(), operator new()

See also

See also:


Construction and destruction


~CEikApplication()

IMPORT_C ~CEikApplication();

Description

Destructor.

Deletes any resources acquired by this CEikApplication during its construction phases.


CEikApplication()

protected: IMPORT_C CEikApplication();

Description

Default constructor.

The default constructor is empty, and there are no NewL() or NewLC() functions as Uikon applications are created automatically by the application DLL framework when applications are started.

[Top]


Member functions


ResourceFileOffset()

inline TInt ResourceFileOffset() const;

Description

Gets the offset value defined for this application's default resource file.

As the resource file offset can also be accessed through iResourceFileOffset, this function should not be needed by any apps.

Return value

TInt

Offset of a resource file.


Process()

inline CApaProcess *Process() const;

Description

Gets the managing process.

Return value

CApaProcess *

A pointer to the process object managing this application's documents.


AppCaption()

inline const TApaAppCaption &AppCaption() const;

Description

Gets the caption for this application.

Captions are displayed in the task list.

Return value

const TApaAppCaption &

Application caption.


GetDefaultDocumentFileName()

virtual IMPORT_C void GetDefaultDocumentFileName(TFileName &aDocumentName) const;

Description

Gets the default document name for this application.

Parameters

TFileName &aDocumentName

On return, contains the default document file name.


BitmapStoreName()

virtual IMPORT_C TFileName BitmapStoreName() const;

Description

Gets the name of the bitmap file used by this application.

By default, this file has an extension of .mbm and uses the same name as the application file in the same directory. Language variants are supported using BaflUtils::NearestLanguageFile().

Return value

TFileName

The name of the bitmap store for this application.


OpenIniFileLC()

virtual IMPORT_C CDictionaryStore *OpenIniFileLC(RFs &aFs) const;

Description

Opens the application's .ini file, if one exists.

If a .ini file does not exist for this application, or if it is corrupt, this function creates one and opens that. .ini files are located on system drive, in the same directory as the application EXE.

Parameters

RFs &aFs

File server session to use.

Return value

CDictionaryStore *

Pointer to the dictionary store for the .ini file.


Capability()

virtual IMPORT_C void Capability(TDes8 &aInfo) const;

Description

Gets the application's capabilities.

Application developers should not need to override this function.

Parameters

TDes8 &aInfo


SetToIniFileNameL()

IMPORT_C void SetToIniFileNameL(TParse &aParser) const;

Description

Sets a supplied file name parser to contain the path of this application's .ini file.

Parameters

TParse &aParser

A file name parser. On return, this contains the path of the application's ini file.


PreDocConstructL()

protected: virtual IMPORT_C void PreDocConstructL();

Description

Prepares for document creation.

This function is called by the application DLL framework to complete construction and initialise the new application object. After this function has been called, the CEikApplication can create document objects. If there is a default resource file for this app, then it is added to the control environment.

If this function leaves, this should be treated as if construction had failed, and the object should be destroyed by the caller.


CreateDocumentL()

protected: virtual IMPORT_C CApaDocument *CreateDocumentL(CApaProcess *aProcess);

Description

Creates a new document.

This function is called by the application DLL framework during application startup to create a new instance of the document associated with this application. This implementation of the function makes a record of the CApaProcess argument, and returns a document created by the un-parameterised, private, overload.

Parameters

CApaProcess *aProcess

Return value

CApaDocument *


NewAppServerL()

protected: virtual IMPORT_C void NewAppServerL(CApaAppServer *&aAppServer);

Description

Virtual function called by the framework when the application has been launched as a server application. Applications that wish to be used as server applications must override this function to return their implementation of the server.

Base class implementation of this function leaves with KErrNotSupported, to prevent non-server applications from being launched as server applications.

Parameters

CApaAppServer *&aAppServer

The server pointer to be set.


EnsureCaptionIsLocalisedL()

protected: IMPORT_C void EnsureCaptionIsLocalisedL(const TDesC &aLocalisableResourceFile);

Description

The application Caption is ensured that it is localized. This is called at the start of applications override of CEikApplication's CreateDocumentL,when application needs to started in Critical phase of Start-Up.

Parameters

const TDesC &aLocalisableResourceFile

Location of the localized resource file


ResourceFileName()

virtual IMPORT_C TFileName ResourceFileName() const;

Description

Gets the name of the resource file used by this application.

By default, this file has an extension of .rsc and uses the same name as the application file located in the same directory. Language variants are supported through BaflUtils::NearestLanguageFile().

Return value

TFileName

The name of the resource file. Used by PreDocConstructL().


CEikApplication_Reserved1()

private: virtual IMPORT_C void CEikApplication_Reserved1();

Description


CEikApplication_Reserved2()

private: virtual IMPORT_C void CEikApplication_Reserved2();

Description


CreateDocumentL()

private: virtual CApaDocument *CreateDocumentL()=0;

Description

Return value

CApaDocument *

[Top]


Member data


iCoeEnv

protected: CCoeEnv * iCoeEnv;

Description


iResourceFileOffset

protected: TInt iResourceFileOffset;

Description