CWPEngine Class Reference

class CWPEngine : public CBase

CWPEngine is an engine class used by Provisioning components.

ProvisioningEngine
Since
2.0

Inherits from

Public Member Functions
~CWPEngine()
IMPORT_C voidAcceptL(MWPVisitor &)
IMPORT_C MWPBuilder &Builder()
IMPORT_C TBoolCanSetAsDefault(TInt)
IMPORT_C TIntContextDataCountL(TUint32)
IMPORT_C TBoolContextExistsL(TUint32)
IMPORT_C TBoolContextExistsL(const TDesC &)
IMPORT_C TUint32ContextL(const TDesC &)
IMPORT_C HBufC16 *ContextNameL(TUint32)
IMPORT_C CDesC16Array *ContextProxiesL(TUint32)
IMPORT_C HBufC16 *ContextTPSL(TUint32)
IMPORT_C CArrayFix< TUint32 > *ContextUidsL()
IMPORT_C TUint32CreateContextL(const TDesC &, const TDesC &, const MDesC16Array &)
IMPORT_C voidCreateLinksL()
IMPORT_C TUint32CurrentContextL()
IMPORT_C TBoolDeleteContextDataL(TUint32)
IMPORT_C voidDeleteContextL(TUint32)
IMPORT_C TIntDetailsL(TInt, MWPPairVisitor &)
IMPORT_C voidExternalizeL(RWriteStream &)
IMPORT_C TIntGetAccessDenied()
IMPORT_C voidImportDocumentL(const TDesC8 &)
IMPORT_C voidInternalizeL(RReadStream &)
IMPORT_C TIntItemCount()
IMPORT_C CWPEngine *NewL()
IMPORT_C CWPEngine *NewLC()
IMPORT_C voidPopulateL()
IMPORT_C voidRegisterContextObserverL(MWPContextObserver *)
IMPORT_C voidRestoreL(CStreamStore &, TStreamId)
IMPORT_C voidSaveL(TInt)
IMPORT_C voidSetAccessDenied(TBool)
IMPORT_C voidSetAsDefaultL(TInt)
IMPORT_C voidSetCurrentContextL(TUint32)
IMPORT_C TStreamIdStoreL(CStreamStore &)
IMPORT_C const TDesC16 &SummaryText(TInt)
IMPORT_C const TDesC16 &SummaryTitle(TInt)
IMPORT_C TIntUnregisterContextObserver(MWPContextObserver *)
Private Member Functions
CWPEngine()
CWPAdapterManager &AdapterManagerL()
voidConstructL()
MWPContextManager &ContextManager()
voidItemIndex(TInt, TInt &, TInt &)
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
TBool iAccessDenied
CWPAdapterManager *iAdapters
MWPContextManager *iManager
CWPRoot *iRoot

Constructor & Destructor Documentation

CWPEngine()

CWPEngine()[private]

C++ default constructor.

~CWPEngine()

~CWPEngine()

Destructor.

Member Functions Documentation

AcceptL(MWPVisitor &)

IMPORT_C voidAcceptL(MWPVisitor &aVisitor)

Accepts a visitor for the contents of the document.

Parameters

MWPVisitor & aVisitorVisitor is called for each element in the root of the document.

AdapterManagerL()

CWPAdapterManager &AdapterManagerL()[private]

Returns an adapter manager.

Builder()

IMPORT_C MWPBuilder &Builder()const

Returns a builder to be used for creating the document data.

CanSetAsDefault(TInt)

IMPORT_C TBoolCanSetAsDefault(TIntaItem)const

Checks if the setting can be set as default.

Parameters

TInt aItem

ConstructL()

voidConstructL()[private]

By default Symbian 2nd phase constructor is private.

ContextDataCountL(TUint32)

IMPORT_C TIntContextDataCountL(TUint32aUid)

Deletes a data item from a context.

Parameters

TUint32 aUid

ContextExistsL(TUint32)

IMPORT_C TBoolContextExistsL(TUint32aUid)

Checks if a context exists.

Parameters

TUint32 aUid

ContextExistsL(const TDesC &)

IMPORT_C TBoolContextExistsL(const TDesC &aTPS)

Checks if a context exists.

Parameters

const TDesC & aTPS

ContextL(const TDesC &)

IMPORT_C TUint32ContextL(const TDesC &aTPS)

Returns a specific context.

Parameters

const TDesC & aTPSTPS whose context should be looked for

ContextManager()

MWPContextManager &ContextManager()const [private]

Returns a context manager.

ContextNameL(TUint32)

IMPORT_C HBufC16 *ContextNameL(TUint32aUid)

Name of a context.

Parameters

TUint32 aUid

ContextProxiesL(TUint32)

IMPORT_C CDesC16Array *ContextProxiesL(TUint32aUid)

TPS of a context.

Parameters

TUint32 aUid

ContextTPSL(TUint32)

IMPORT_C HBufC16 *ContextTPSL(TUint32aUid)

TPS of a context.

Parameters

TUint32 aUid

ContextUidsL()

IMPORT_C CArrayFix< TUint32 > *ContextUidsL()

Number of contexts available.

CreateContextL(const TDesC &, const TDesC &, const MDesC16Array &)

IMPORT_C TUint32CreateContextL(const TDesC &aName,
const TDesC &aTPS,
const MDesC16Array &aProxies
)

Creates a context. Leaves with KErrOverflow if the max. number of contexts has been reached.

Parameters

const TDesC & aNameName of the context
const TDesC & aTPSTPS of the context
const MDesC16Array & aProxiesProxies that can be used in the context

CreateLinksL()

IMPORT_C voidCreateLinksL()

Creates links from logical proxy ids to logical proxies and access point ids to access points. Call this before walking through the document data.

CurrentContextL()

IMPORT_C TUint32CurrentContextL()

Returns the current context.

DeleteContextDataL(TUint32)

IMPORT_C TBoolDeleteContextDataL(TUint32aUid)

Deletes a data item from a context.

Parameters

TUint32 aUid

DeleteContextL(TUint32)

IMPORT_C voidDeleteContextL(TUint32aUid)

Deletes a context.

Parameters

TUint32 aUid

DetailsL(TInt, MWPPairVisitor &)

IMPORT_C TIntDetailsL(TIntaIndex,
MWPPairVisitor &aVisitor
)

Calls a visitor for each details line of a particular item.

Parameters

TInt aIndexThe number of the item
MWPPairVisitor & aVisitorThe visitor to call

ExternalizeL(RWriteStream &)

IMPORT_C voidExternalizeL(RWriteStream &aStream)const

Stores data to a stream.

Parameters

RWriteStream & aStreamStream to write to.

GetAccessDenied()

IMPORT_C TIntGetAccessDenied()

Retutn the status of iAccessDenied variable

ImportDocumentL(const TDesC8 &)

IMPORT_C voidImportDocumentL(const TDesC8 &aDocument)

Imports a WBXML document to the engine.

Parameters

const TDesC8 & aDocument

InternalizeL(RReadStream &)

IMPORT_C voidInternalizeL(RReadStream &aStream)

Loads data from a stream.

Parameters

RReadStream & aStreamStream to read from.

ItemCount()

IMPORT_C TIntItemCount()const

Returns the number of settings items.

ItemIndex(TInt, TInt &, TInt &)

voidItemIndex(TIntaGlobalIndex,
TInt &aAdapter,
TInt &aAdapterIndex
)const [private]

Converts an item number into a pair of adapter and adapter local item number.

Parameters

TInt aGlobalIndexThe item number
TInt & aAdapterContains adapter number after the call
TInt & aAdapterIndexContains adapter local item number after the call

NewL()

IMPORT_C CWPEngine *NewL()[static]

Two-phased constructor.

NewLC()

IMPORT_C CWPEngine *NewLC()[static]

Two-phased constructor.

PopulateL()

IMPORT_C voidPopulateL()

Populates the adapters with the document contents.

RegisterContextObserverL(MWPContextObserver *)

IMPORT_C voidRegisterContextObserverL(MWPContextObserver *aObserver)

Register an observer to context information.

Parameters

MWPContextObserver * aObserverThe new observer

RestoreL(CStreamStore &, TStreamId)

IMPORT_C voidRestoreL(CStreamStore &aStore,
TStreamIdaId
)

Restores the document data from a store.

Parameters

CStreamStore & aStoreThe store to read from.
TStreamId aIdThe stream id to read

SaveL(TInt)

IMPORT_C voidSaveL(TIntaItem)

Saves one setting.

Parameters

TInt aItemSetting number

SetAccessDenied(TBool)

IMPORT_C voidSetAccessDenied(TBoolaStatus)

Sets the iAccessDenied variable

Parameters

TBool aStatusThe status of iAccessDenied variable

SetAsDefaultL(TInt)

IMPORT_C voidSetAsDefaultL(TIntaItem)

Sets the setting as default.

Parameters

TInt aItem

SetCurrentContextL(TUint32)

IMPORT_C voidSetCurrentContextL(TUint32aUid)

Sets the current context.

Parameters

TUint32 aUid

StoreL(CStreamStore &)

IMPORT_C TStreamIdStoreL(CStreamStore &aStore)const

Stores the document data to a store.

Parameters

CStreamStore & aStoreThe store to write to.

SummaryText(TInt)

IMPORT_C const TDesC16 &SummaryText(TIntaIndex)const

Returns a summary text.

Parameters

TInt aIndexNumber of the setting item to read

SummaryTitle(TInt)

IMPORT_C const TDesC16 &SummaryTitle(TIntaIndex)const

Returns a summary title.

Parameters

TInt aIndexNumber of the setting item to read

UnregisterContextObserver(MWPContextObserver *)

IMPORT_C TIntUnregisterContextObserver(MWPContextObserver *aObserver)

Unregister an observer to context information.

Parameters

MWPContextObserver * aObserverThe observer to unregister

Member Data Documentation

TBool iAccessDenied

TBool iAccessDenied[private]

CWPAdapterManager * iAdapters

CWPAdapterManager *iAdapters[private]

MWPContextManager * iManager

MWPContextManager *iManager[private]

CWPRoot * iRoot

CWPRoot *iRoot[private]