#include <mw/apaapp.h>
class CApaApplication : public CBase |
Public Member Functions | |
---|---|
~CApaApplication() | |
pure virtual TUid | AppDllUid() |
virtual IMPORT_C TFileName | AppFullName() |
pure virtual void | Capability(TDes8 &) |
pure virtual CApaDocument * | CreateDocumentL(CApaProcess *) |
IMPORT_C TFileName | DllName() |
IMPORT_C TInt | GenerateFileName(RFs &, TFileName &) |
virtual IMPORT_C void | NewAppServerL(CApaAppServer *&) |
IMPORT_C CDictionaryStore * | OpenIniFileL(RFs &) |
pure virtual CDictionaryStore * | OpenIniFileLC(RFs &) |
pure virtual void | PreDocConstructL() |
void | SetAppFileNameRef(const RBuf &) |
Protected Member Functions | |
---|---|
CApaApplication() |
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.
See also: CEikApplication
TUid | AppDllUid | ( | ) | const [pure virtual] |
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.
Returns: The application specific UID.
IMPORT_C TFileName | AppFullName | ( | ) | const [virtual] |
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.
See also: CApaApplication::DllName()
Returns: Full path name of the application.
void | Capability | ( | TDes8 & | aInfo | ) | const [pure virtual] |
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.
See also: CEikApplication TApaAppCapability TPckgBuf
Parameter | Description |
---|---|
aInfo | A packaged modifiable buffer descriptor (a TPckgBuf), encapsulating a TApaAppCapability object. |
CApaDocument * | CreateDocumentL | ( | CApaProcess * | aProcess | ) | [pure virtual] |
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.
See also: CApaProcess::AddNewDocumentL()
Parameter | Description |
---|---|
aProcess | A pointer to the process associated with the application. |
Returns: A pointer to the newly created document.
IMPORT_C TFileName | DllName | ( | ) | const |
Returns the full name and path of the loaded application DLL.
Returns: Full path name of the application DLL.
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.
See also: CEikAppUi
Parameter | Description |
---|---|
aFs | Handle to a file server session. |
aRootName | The full path name. |
Returns: KErrNone if successful, otherwise one of the other system-wide error codes. Specifically: KErrBadName if the file name portion of the specified full path name has invalid format; KErrArgument if the drive, path or file name parts are missing from the specified full path name; KErrOverflow if the generated filename becomes too long; KErrNoMemory if there is insufficient memory to perform the operation.
IMPORT_C void | NewAppServerL | ( | CApaAppServer *& | aAppServer | ) | [virtual] |
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.
Parameter | Description |
---|---|
aAppServer | The server pointer to be set. |
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 OpenIniFileLC() function. The function pops the pointer returned by OpenIniFileLC() from the cleanup stack.
See also: CApaApplication::OpenIniFileLC()
Parameter | Description |
---|---|
aFs | Handle to a file server session. |
Returns: A pointer to the dictionary store object representing the application's .ini file.
CDictionaryStore * | OpenIniFileLC | ( | RFs & | aFs | ) | const [pure virtual] |
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.
See also: CEikApplication
Parameter | Description |
---|---|
aFs | Handle to a file server session |
Returns: A pointer to the dictionary store object that represents the application's .ini file.
void | PreDocConstructL | ( | ) | [pure virtual] |
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.
See also: CEikApplication