CApaProcess Class Reference

class CApaProcess : public CBase

Maintains a list of documents and all of the potentially shared resources used by documents.

This includes the application DLLs. The class also supplies utility functions that provide the basic structure for persisted document files.

The class deals with the loading of application DLLs and manages the creation and destruction of application (CApaApplication) objects and document (CApaDocument) objects.

The class is derived from by the UI framework and further derivation by the UI application is not necessary unless it needs to add extra utility functions for the use of applications.

CApaApplication

CApaDocument

Inherits from

Public Member Functions
~CApaProcess()
IMPORT_C CApaDocument *AddNewDocumentL(TApaApplicationFactory)
IMPORT_C voidDestroyDocument(CApaDocument *)
RFs &FsSession()
IMPORT_C TPtrCMainDocFileName()
CApaDocument *MainDocument()
IMPORT_C CApaProcess *NewL(const RFs &)
IMPORT_C CApaDocument *OpenNewDocumentL(CFileStore *&, CStreamDictionary *&, const TDesC &, TUint)
IMPORT_C TApaAppIdentifierReadAppIdentifierL(const CStreamStore &, const CStreamDictionary &)
IMPORT_C CStreamDictionary *ReadRootStreamLC(RFs &, CFileStore *&, const TDesC &, TUint)
IMPORT_C CStreamDictionary *ReadRootStreamLC(CFileStore *&, const RFile &)
IMPORT_C voidResetL()
IMPORT_C voidSetMainDocFileName(const TDesC &)
IMPORT_C voidSetMainDocFileNameL(const TDesC &)
IMPORT_C voidSetMainDocument(CApaDocument *)
IMPORT_C voidWriteAppIdentifierL(CStreamStore &, CStreamDictionary &, const TApaAppIdentifier &)
IMPORT_C voidWriteRootStreamL(CPersistentStore &, CStreamDictionary &, const CApaApplication &)
IMPORT_C voidWriteRootStreamL(CPersistentStore &, CStreamDictionary &, const TApaAppIdentifier &)
Protected Member Functions
CApaProcess()
CApaProcess(const RFs &)
IMPORT_C voidCApaProcess_Reserved1()
IMPORT_C voidCApaProcess_Reserved2()
IMPORT_C voidConstructL()
IMPORT_C voidConstructL(TProcessId)
Private Member Functions
RApaApplication *AddAppL(TApaApplicationFactory)
CApaDocument *CreateDocL(CApaApplication *)
voidDeleteAllDocs()
voidDoReadRootStreamL(CStreamDictionary &, const CFileStore &)
RApaApplication *FindAppInListL(const TDesC &, TUid)
TInt IdleRemoveApplications(TAny *)
voidMarkApplicationForAsyncRemoval(const CApaApplication *)
voidRemoveApp(RApaApplication *)
voidRemoveMarkedApplications()
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
Private Attributes
CArrayPtrFlat< RApaApplication > *iAppList
CIdle *iAsyncAppRemover
TInt iCApaProcess_Reserved1
CArrayPtrFlat< CApaDocument > *iDocList
RFs iFsSession
CApaDocument *iMainDoc
HBufC *iMainDocFileName
CApaParentProcessMonitor *iMonitor

Constructor & Destructor Documentation

CApaProcess()

IMPORT_CCApaProcess()[protected]

CApaProcess(const RFs &)

IMPORT_CCApaProcess(const RFs &aFs)[protected]

Parameters

const RFs & aFs

~CApaProcess()

IMPORT_C~CApaProcess()

Member Functions Documentation

AddAppL(TApaApplicationFactory)

RApaApplication *AddAppL(TApaApplicationFactoryaApplicationFactory)[private]

Parameters

TApaApplicationFactory aApplicationFactory

AddNewDocumentL(TApaApplicationFactory)

IMPORT_C CApaDocument *AddNewDocumentL(TApaApplicationFactoryaApplicationFactory)

Parameters

TApaApplicationFactory aApplicationFactory

CApaProcess_Reserved1()

IMPORT_C voidCApaProcess_Reserved1()[protected, virtual]

CApaProcess_Reserved2()

IMPORT_C voidCApaProcess_Reserved2()[protected, virtual]

ConstructL()

IMPORT_C voidConstructL()[protected]

ConstructL(TProcessId)

IMPORT_C voidConstructL(TProcessIdaParentProcessId)[protected]

Parameters

TProcessId aParentProcessId

CreateDocL(CApaApplication *)

CApaDocument *CreateDocL(CApaApplication *aApp)[private]

Parameters

CApaApplication * aApp

DeleteAllDocs()

voidDeleteAllDocs()[private]

DestroyDocument(CApaDocument *)

IMPORT_C voidDestroyDocument(CApaDocument *aDoc)

Parameters

CApaDocument * aDoc

DoReadRootStreamL(CStreamDictionary &, const CFileStore &)

voidDoReadRootStreamL(CStreamDictionary &aStreamDictionary,
const CFileStore &aStore
)[private, static]

Parameters

CStreamDictionary & aStreamDictionary
const CFileStore & aStore

FindAppInListL(const TDesC &, TUid)

RApaApplication *FindAppInListL(const TDesC &aAppFileName,
TUidaUid
)const [private]

Parameters

const TDesC & aAppFileName
TUid aUid

FsSession()

RFs &FsSession()const [inline]

Returns a handle to the file server session used by this application process. The file server session.

IdleRemoveApplications(TAny *)

TInt IdleRemoveApplications(TAny *aApaProcess)[private, static]

Parameters

TAny * aApaProcess

MainDocFileName()

IMPORT_C TPtrCMainDocFileName()const

MainDocument()

CApaDocument *MainDocument()const [inline]

Returns a pointer to the main document. A pointer to the main document.

MarkApplicationForAsyncRemoval(const CApaApplication *)

voidMarkApplicationForAsyncRemoval(const CApaApplication *aApp)[private]

Parameters

const CApaApplication * aApp

NewL(const RFs &)

IMPORT_C CApaProcess *NewL(const RFs &aFs)[static]

Parameters

const RFs & aFs

OpenNewDocumentL(CFileStore *&, CStreamDictionary *&, const TDesC &, TUint)

IMPORT_C CApaDocument *OpenNewDocumentL(CFileStore *&aStore,
CStreamDictionary *&aStreamDic,
const TDesC &aDocFullFileName,
TUintaFileMode
)

Parameters

CFileStore *& aStore
CStreamDictionary *& aStreamDic
const TDesC & aDocFullFileName
TUint aFileMode

ReadAppIdentifierL(const CStreamStore &, const CStreamDictionary &)

IMPORT_C TApaAppIdentifierReadAppIdentifierL(const CStreamStore &aStore,
const CStreamDictionary &aStreamDic
)[static]

Parameters

const CStreamStore & aStore
const CStreamDictionary & aStreamDic

ReadRootStreamLC(RFs &, CFileStore *&, const TDesC &, TUint)

IMPORT_C CStreamDictionary *ReadRootStreamLC(RFs &aFs,
CFileStore *&aStore,
const TDesC &aDocFullFileName,
TUintaFileMode
)[static]

Parameters

RFs & aFs
CFileStore *& aStore
const TDesC & aDocFullFileName
TUint aFileMode

ReadRootStreamLC(CFileStore *&, const RFile &)

IMPORT_C CStreamDictionary *ReadRootStreamLC(CFileStore *&aStore,
const RFile &aFile
)[static]

Parameters

CFileStore *& aStore
const RFile & aFile

RemoveApp(RApaApplication *)

voidRemoveApp(RApaApplication *aApp)[private]

Parameters

RApaApplication * aApp

RemoveMarkedApplications()

voidRemoveMarkedApplications()[private]

ResetL()

IMPORT_C voidResetL()

SetMainDocFileName(const TDesC &)

IMPORT_C voidSetMainDocFileName(const TDesC &aMainDocFileName)

Parameters

const TDesC & aMainDocFileName

SetMainDocFileNameL(const TDesC &)

IMPORT_C voidSetMainDocFileNameL(const TDesC &aMainDocFileName)

Parameters

const TDesC & aMainDocFileName

SetMainDocument(CApaDocument *)

IMPORT_C voidSetMainDocument(CApaDocument *aDocument)

Parameters

CApaDocument * aDocument

WriteAppIdentifierL(CStreamStore &, CStreamDictionary &, const TApaAppIdentifier &)

IMPORT_C voidWriteAppIdentifierL(CStreamStore &aStore,
CStreamDictionary &aStreamDic,
const TApaAppIdentifier &aAppId
)[static]

Parameters

CStreamStore & aStore
CStreamDictionary & aStreamDic
const TApaAppIdentifier & aAppId

WriteRootStreamL(CPersistentStore &, CStreamDictionary &, const CApaApplication &)

IMPORT_C voidWriteRootStreamL(CPersistentStore &aStore,
CStreamDictionary &aStreamDic,
const CApaApplication &aApp
)[static]

Parameters

CPersistentStore & aStore
CStreamDictionary & aStreamDic
const CApaApplication & aApp

WriteRootStreamL(CPersistentStore &, CStreamDictionary &, const TApaAppIdentifier &)

IMPORT_C voidWriteRootStreamL(CPersistentStore &aStore,
CStreamDictionary &aStreamDic,
const TApaAppIdentifier &aAppId
)[static]

Parameters

CPersistentStore & aStore
CStreamDictionary & aStreamDic
const TApaAppIdentifier & aAppId

Member Data Documentation

CArrayPtrFlat< RApaApplication > * iAppList

CArrayPtrFlat< RApaApplication > *iAppList[private]

CIdle * iAsyncAppRemover

CIdle *iAsyncAppRemover[private]

TInt iCApaProcess_Reserved1

TInt iCApaProcess_Reserved1[private]

CArrayPtrFlat< CApaDocument > * iDocList

CArrayPtrFlat< CApaDocument > *iDocList[private]

RFs iFsSession

RFs iFsSession[private]

CApaDocument * iMainDoc

CApaDocument *iMainDoc[private]

HBufC * iMainDocFileName

HBufC *iMainDocFileName[private]

CApaParentProcessMonitor * iMonitor

CApaParentProcessMonitor *iMonitor[private]