|
||
class CApaApplication : public CBase;
Defines the basic behaviour for applications.
The class defines the basic twin roles of an application class as a factory that creates concrete document objects, and as a supplier of utility functions not specific to any particular instance of a document. For example, returning an application's caption, or accessing its .ini file.
The class is derived from by the UI framework and is further derived from by the UI application.
CBase
-
Base class for all classes to be instantiated on the heap.
CApaApplication
- Defines the basic behaviour for applications.
Defined in CApaApplication
:
AppDllUid()const
Gets the application specific UID.AppFullName()const
Returns the full name and path of the application.CApaApplication()
Constructor for CApaApplication CApaApplication_Reserved1()
Reserved for future use CApaApplication_Reserved2()
Reserved for future use Capability(TDes8 &)const
Returns the capabilities of the application.CreateDocumentL(CApaProcess *)
Creates a document object.DllName()const
Returns the full name and path of the loaded application DLL.GenerateFileName(RFs &,TFileName &)
Generates a unique filename based on the file name contained within the specifie...NewAppServerL(CApaAppServer *&)
Virtual function called by the framework when the application has been launched ...OpenIniFileL(RFs &)const
Opens the .ini file associated with the application, constructs the dictionary s...OpenIniFileLC(RFs &)const
Opens the .ini file associated with the application, constructs the dictionary s...PreDocConstructL()
Completes construction of this application object.~CApaApplication()
Inherited from CBase
:
Delete(CBase *)
Deletes the specified object.Extension_(TUint,TAny *&,TAny *)
Extension function operator new(TUint)
Allocates the object from the heap and then initialises its contents to binary z...operator new(TUint,TAny *)
Initialises the object to binary zeroes.operator new(TUint,TLeave)
Allocates the object from the heap and then initialises its contents to binary z...operator new(TUint,TLeave,TUint)
Allocates the object from the heap and then initialises its contents to binary z...operator new(TUint,TUint)
Allocates the object from the heap and then initialises its contents to binary z...virtual void PreDocConstructL()=0;
Completes construction of this application object.
The function is called after an instance of a derived class has been successfully created using the ordinal 1 function of the application DLL.
After calling this function, an application can create document objects.
An implementation of this function is supplied by the UI framework.
virtual CApaDocument* CreateDocumentL(CApaProcess *aProcess)=0;
Creates a document object.
The function is called by the application process when a new document is required. The application process adds the new document to its list of documents.
An implementation of this function is supplied by the UI framework.
|
|
CApaProcess::AddNewDocumentL(TApaApplicationFactory)
Creates and adds a new document using the specified application factory.virtual TUid AppDllUid() const=0;
Gets the application specific UID.
The UID is used to differentiate between UI applications.
An implementation of this function must be supplied by the UI application.
|
IMPORT_C static TInt GenerateFileName(RFs &aFs, TFileName &aRootName);
Generates a unique filename based on the file name contained within the specified full path name.
If necessary, the function creates the directory structure that is defined in the specified full path name.
If the file name does not yet exist, then this is the file name chosen. If this file name already exists, then a file name of the form: name(nn) is generated, where nn are decimal digits. The value of nn is incremented until a name is generated that is unique within the directory structure. A minimum of two decimal digits is generated.
The function is used by the UI framework.
|
|
IMPORT_C CDictionaryStore* OpenIniFileL(RFs &aFs) const;
Opens the .ini file associated with the application, constructs the dictionary store object and returns a pointer to it.
The implementation of this function is provided by the CApaApplication::OpenIniFileLC(RFs &)const
function. The function pops the pointer returned by CApaApplication::OpenIniFileLC(RFs &)const
from the cleanup stack.
|
|
CApaApplication::OpenIniFileLC(RFs &)const
Opens the .ini file associated with the application, constructs the dictionary s...virtual CDictionaryStore* OpenIniFileLC(RFs &aFs) const=0;
Opens the .ini file associated with the application, constructs the dictionary store object, returns a pointer to it and puts the pointer onto the cleanupstack.
The .ini file must be created, if it does not already exist.
An implementation of this function is supplied by the UI framework.
|
|
IMPORT_C virtual TFileName AppFullName() const;
Returns the full name and path of the application.
The default implementation returns the full path name of the application DLL.
An application can provide its own implementation.
|
CApaApplication::DllName()const
Returns the full name and path of the loaded application DLL.virtual void Capability(TDes8 &aInfo) const=0;
Returns the capabilities of the application.
Application capability information is represented by an instance of a TApaAppCapability
object wrapped in a packaged modifiable buffer descriptor.
The function is called from a number of places within the application framework.
An implementation of this function is supplied by the UI framework.
|
TApaAppCapability
Application capabilities.IMPORT_C TFileName DllName() const;
Returns the full name and path of the loaded application DLL.
|
IMPORT_C virtual void NewAppServerL(CApaAppServer *&aAppServer);
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 implemetation of the server.
|
protected: IMPORT_C virtual void CApaApplication_Reserved2();
Reserved for future use