CdlEngine Class Reference

class CdlEngine

CdlEngine is a static fascade interface to the singleton CDL engine object. There is at most one CDL engine per thread. This static interface ensures that this fact can not be changed.

Member Functions Documentation

AllAvailableRefsLC()

IMPORT_C CCdlRefs *AllAvailableRefsLC()[static]

Create a collection of references to all known CDL customisation instances.

CompareNames(const TDesC &, const TDesC &)

IMPORT_C TIntCompareNames(const TDesC &aLeft,
const TDesC &aRight
)[static]

Compares two names.

Parameters

const TDesC & aLefta name to compare.
const TDesC & aRighta name to compare.

CreateCdlEngineL()

IMPORT_C CCdlEngineRef *CreateCdlEngineL()[static]

Creates a reference to the CDL engine singleton, and creates the CDL engine if it does not already exist. If your client code is unsure if the CDL exists in this thread, it should use this function to ensure that it does.

CustomisationInstance(TUid)

IMPORT_C const CCdlInstance &CustomisationInstance(TUidaCdlUid)[static]

Get a CDL instance that represents the current customisation. This instance will automatically be updated to reflect changes in customisation.

This function is normally used through a CDL compiler generated header specific to a particular CDL interface.

Parameters

TUid aCdlUidthe UID of the CDL interface that you want customisation for

EnableGlobalCustomisationL(const CCdlUids &, TBool)

IMPORT_C voidEnableGlobalCustomisationL(const CCdlUids &aCdlUids,
TBoolaEnabled
)[static]

Enable or disable global customisation for a collection of interfaces.

Parameters

const CCdlUids & aCdlUidsthe interface UIDs for which global customisation is to be enabled or disabled
TBool aEnabledare they to be enabled or disabled?

FileContentsLC(const TDesC &)

IMPORT_C CCdlRefCollection *FileContentsLC(const TDesC &aFileName)[static]

Create a collection of references for the CDL instancesthat are implemented in a named file.

Parameters

const TDesC & aFileNamethe name of the file that contains CDL instances

FileNameRelativeToLastAccessedInstance(TUid, TFileName &)

IMPORT_C voidFileNameRelativeToLastAccessedInstance(TUidaCdlUid,
TFileName &aFileName
)[static]

Modify a filename to be relative to the file containing the customisation instance that was last accessed to implement a particular CDL interface. For instance, if an interface was accessed to get a bitmap file name, a full path for that bitmap file can be generated by using this function immediately afterwards.

This function is normally used through a CDL compiler generated header specific to a particular CDL interface.

Parameters

TUid aCdlUidthe UID of the CDL interface
TFileName & aFileNamethe filename to be modified

FindCustomisationFilesLC()

IMPORT_C CCdlNames *FindCustomisationFilesLC()[static]

Create a collection of file names of files that contain CDL customisation instances.

FindInstancesLC(TUid)

IMPORT_C CCdlRefs *FindInstancesLC(TUidaCdlUid)[static]

Create a collection of CDL references that implement a particular interface.

Parameters

TUid aCdlUidthe UID of the interface in question

GetData(TUid, TInt)

IMPORT_C TAny *GetData(TUidaCdlUid,
TIntaApiId
)[static]

Parameters

TUid aCdlUid
TInt aApiId

GetFunction(TUid, TInt)

IMPORT_C TCdlEngineFunc *GetFunction(TUidaCdlUid,
TIntaApiId
)[static]

Parameters

TUid aCdlUid
TInt aApiId

GlobalStateLC(const CCdlUids &)

IMPORT_C CCdlRefs *GlobalStateLC(const CCdlUids &aCdlUids)[static]

Creates a collection of CDL instance references that describe the global customisation of a set of interfaces.

Parameters

const CCdlUids & aCdlUidsthe set of interface UIDs of interest.

Implementor(TUid, TInt)

IMPORT_C const CCdlInstance *Implementor(TUidaCdlUid,
TIntaApiId
)[static]

Parameters

TUid aCdlUid
TInt aApiId

IsCdlEngineCreated()

IMPORT_C TBoolIsCdlEngineCreated()[static]

Tests for the existence of the CDL engine. Useful for cases where the client code can work without the CDL engine, and does not want to create and hold a CCdlEngineRef to ensure the existence of the CDL engine.

IsCustomisationStarted(const SCdlInterface *)

IMPORT_C TBoolIsCustomisationStarted(const SCdlInterface *aInterfaceParams)[static]

Is customisation for this CDL interface loaded?

This function is normally used through a CDL compiler generated header specific to a particular CDL interface.

Parameters

const SCdlInterface * aInterfaceParamsthe interface in question

LastAccessedRef(TUid)

IMPORT_C const TCdlRef &LastAccessedRef(TUidaCdlUid)[static]

Get a reference for the last customisation instance which was accessed to implement a particular interface.

This function is normally used through a CDL compiler generated header specific to a particular CDL interface.

Parameters

TUid aCdlUidthe UID of the CDL interface

LastApiId()

IMPORT_C TIntLastApiId()[static]

Get the latest API id accessed by a CDL client. If used from inside a customisation instance, this will be the API id of the current implementation.

LoadCustomisationL(const TCdlRef &)

IMPORT_C voidLoadCustomisationL(const TCdlRef &aRef)[static]

Load a customisation from this reference. If no customisation has already been loaded for this interface, this customisation instance must meet any requirements already specified by the clients of the interface.

This function is normally used through a CDL compiler generated header specific to a particular CDL interface.

Parameters

const TCdlRef & aRefa CDL instance reference defining the customisation.

LocalStateLC(const CCdlUids &)

IMPORT_C CCdlRefs *LocalStateLC(const CCdlUids &aCdlUids)[static]

Creates a collection of CDL instance references that describe the local customisation of a set of interfaces.

Parameters

const CCdlUids & aCdlUidsthe set of interface UIDs of interest.

RequireCustomisationL(const SCdlInterface *)

IMPORT_C voidRequireCustomisationL(const SCdlInterface *aInterfaceParams)[static]

Set a requirement for customisations of this interface that they have to implement at least the version of the interface that the client specifies. If customisations are already loaded that do not satisfy this interface, this function will leave with KErrNotSupported.

This function is normally used through a CDL compiler generated header specific to a particular CDL interface.

Parameters

const SCdlInterface * aInterfaceParamsthe interface in question

SetAvailableRefsChangeObserverL(MCdlChangeObserver *)

IMPORT_C voidSetAvailableRefsChangeObserverL(MCdlChangeObserver *aObserver)[static]

Set an observer for changes in the set of available customisations.

Parameters

MCdlChangeObserver * aObservera implementor of the MCdlChangeObserver interface that is interested in knowing about changes to the set of all available references.

SetCustomisationChangeObserverL(MCdlChangeObserver *, TUid)

IMPORT_C voidSetCustomisationChangeObserverL(MCdlChangeObserver *aObserver,
TUidaCdlUid
)[static]

Sets a customisation change observer object for a particular interface. Using this function, client code can be informed when the current customisation for a particular interface changes. A single observer can observe changes in many interfaces.

This function is normally used through a CDL compiler generated header specific to a particular CDL interface.

Parameters

MCdlChangeObserver * aObservera pointer to an object implementing the MCdlChangeObserver interface.
TUid aCdlUidthe UID of the CDL interface that you want to observe.

SetGlobalStateL(const CCdlRefs &)

IMPORT_C voidSetGlobalStateL(const CCdlRefs &aState)[static]

Sets the global customisation as described by a collection of CDL instance references. For each reference, the instance referenced will be used to customise it's interface. If more than one instance in the collection customise the same interface, the earlier reference in the collection will be a sub-layer for the later one. This sets the global customisation. It will only affect the local customisation state if global customisation of the relevant interfaces is enabled in this thread.

Parameters

const CCdlRefs & aStatethe collection of CDL instance references that will be used for customisation.

SetLocalStateL(const CCdlRefs &)

IMPORT_C voidSetLocalStateL(const CCdlRefs &aState)[static]

Sets the current local customisation as described by a collection of CDL instance references. For each reference, the instance referenced will be used to customise it's interface. If more than one instance in the collection customise the same interface, the earlier reference in the collection will be a sub-layer for the later one. This only affects customisation in this thread.

Parameters

const CCdlRefs & aStatethe collection of CDL instance references that will be used for customisation.

StartGlobalCustomisationL()

IMPORT_C voidStartGlobalCustomisationL()[static]

Starts the global customisation of CDL interfaces that are configured for global customisation. CDL interfaces can be customised either locally or globally. Local customisation means that changes to the customisation only affect the local thread. Global customisation means that customisation settings are stored in the CDL server and affect all threads. that subscribe to customisation of that interface.