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 TInt CompareNames ( const TDesC & aLeft,
const TDesC & aRight
) [static]

Compares two names.

Parameters

const TDesC & aLeft a name to compare.
const TDesC & aRight a 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 ( TUid aCdlUid ) [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 aCdlUid the UID of the CDL interface that you want customisation for

EnableGlobalCustomisationL(const CCdlUids &, TBool)

IMPORT_C void EnableGlobalCustomisationL ( const CCdlUids & aCdlUids,
TBool aEnabled
) [static]

Enable or disable global customisation for a collection of interfaces.

Parameters

const CCdlUids & aCdlUids the interface UIDs for which global customisation is to be enabled or disabled
TBool aEnabled are 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 & aFileName the name of the file that contains CDL instances

FileNameRelativeToLastAccessedInstance(TUid, TFileName &)

IMPORT_C void FileNameRelativeToLastAccessedInstance ( TUid aCdlUid,
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 aCdlUid the UID of the CDL interface
TFileName & aFileName the 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 ( TUid aCdlUid ) [static]

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

Parameters

TUid aCdlUid the UID of the interface in question

GetData(TUid, TInt)

IMPORT_C TAny * GetData ( TUid aCdlUid,
TInt aApiId
) [static]

Parameters

TUid aCdlUid
TInt aApiId

GetFunction(TUid, TInt)

IMPORT_C TCdlEngineFunc * GetFunction ( TUid aCdlUid,
TInt aApiId
) [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 & aCdlUids the set of interface UIDs of interest.

Implementor(TUid, TInt)

IMPORT_C const CCdlInstance * Implementor ( TUid aCdlUid,
TInt aApiId
) [static]

Parameters

TUid aCdlUid
TInt aApiId

IsCdlEngineCreated()

IMPORT_C TBool IsCdlEngineCreated ( ) [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 TBool IsCustomisationStarted ( 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 * aInterfaceParams the interface in question

LastAccessedRef(TUid)

IMPORT_C const TCdlRef & LastAccessedRef ( TUid aCdlUid ) [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 aCdlUid the UID of the CDL interface

LastApiId()

IMPORT_C TInt LastApiId ( ) [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 void LoadCustomisationL ( 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 & aRef a 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 & aCdlUids the set of interface UIDs of interest.

RequireCustomisationL(const SCdlInterface *)

IMPORT_C void RequireCustomisationL ( 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 * aInterfaceParams the interface in question

SetAvailableRefsChangeObserverL(MCdlChangeObserver *)

IMPORT_C void SetAvailableRefsChangeObserverL ( MCdlChangeObserver * aObserver ) [static]

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

Parameters

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

SetCustomisationChangeObserverL(MCdlChangeObserver *, TUid)

IMPORT_C void SetCustomisationChangeObserverL ( MCdlChangeObserver * aObserver,
TUid aCdlUid
) [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 * aObserver a pointer to an object implementing the MCdlChangeObserver interface.
TUid aCdlUid the UID of the CDL interface that you want to observe.

SetGlobalStateL(const CCdlRefs &)

IMPORT_C void SetGlobalStateL ( 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 & aState the collection of CDL instance references that will be used for customisation.

SetLocalStateL(const CCdlRefs &)

IMPORT_C void SetLocalStateL ( 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 & aState the collection of CDL instance references that will be used for customisation.

StartGlobalCustomisationL()

IMPORT_C void StartGlobalCustomisationL ( ) [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.