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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
19 #include <apparc.h> // class CApaApplication
24 /** The base of all Uikon applications.
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.
30 Each Uikon application class is derived from CEikApplication. Application
31 writers must provide at least an implementation of the pure virtual function
34 The application's resource file can be changed from the default by overriding
40 class CEikApplication : public CApaApplication
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);
58 IMPORT_C CEikApplication();
59 IMPORT_C void EnsureCaptionIsLocalisedL(const TDesC& aLocalisableResourceFile);
61 IMPORT_C virtual TFileName ResourceFileName() const;
63 IMPORT_C virtual void CEikApplication_Reserved1();
64 IMPORT_C virtual void CEikApplication_Reserved2();
70 virtual CApaDocument* CreateDocumentL()=0;
71 private: // internal use
72 void InitAppNameParserWithPathAndExt(TParse& aParser, const TDesC& aPath, const TDesC& aExt) const;
75 TInt iResourceFileOffset;
79 EFlagCaptionCorrectlyLocalised = 0x00000001
82 CApaProcess* iProcess;
83 TApaAppCaption iCaption;
84 TApaAppCapabilityBuf* iCapabilityBuf;
89 /** Gets the offset value defined for this application's default resource file.
91 As the resource file offset can also be accessed through iResourceFileOffset,
92 this function should not be needed by any apps.
94 @return Offset of a resource file. */
95 inline TInt CEikApplication::ResourceFileOffset() const
96 { return iResourceFileOffset; }
99 /** Gets the managing process.
101 @return A pointer to the process object managing this application's documents. */
102 inline CApaProcess* CEikApplication::Process() const
106 /** Gets the caption for this application.
108 Captions are displayed in the task list.
110 @return Application caption. */
111 inline const TApaAppCaption& CEikApplication::AppCaption() const
114 #endif // __EIKAPP_H__