Symbian
 Developer Library

DEVELOPER LIBRARY

[Index] [Glossary] [Previous] [Next]



Location: resolver.h
Link against: ecom.lib

Class CResolver

CResolver

Support

Supported from 7.0

Description

Abstract base class for resolver classes, which select an appropriate interface implementation based on criteria supplied by the client.

A default resolver is provided as part of the ECom framework. If the algorithm used by that is inappropriate, an interface definition can specialise this class to provide another.

Note that resolvers are created by the ECom framework as required, in response to REComSession::CreateImplementationL() calls that specify to use a non-default resolver.

Derivation

CBaseBase class for all classes to be instantiated on the heap
CResolverAbstract base class for resolver classes, which select an appropriate interface implementation based on criteria supplied by the client

Defined in CResolver:
CResolver(), IdentifyImplementationL(), ListAllL(), ListAllL(), iRegistry

Inherited from CBase:
operator new()

See also:


Construction


CResolver()

protected: explicit CResolver(MPublicRegistry& aRegistry);

Description

Constructor that takes a MPublicRegistry, allowing access to a list of implementations for a particular interface.

Derived classes must supply a public constructor of this form and call the base class constructor.

Parameters

MPublicRegistry& aRegistry

Registry access, used to initialise iRegistry

[Top]


Interface implementation selection


IdentifyImplementationL()

virtual TUid IdentifyImplementationL(TUid aInterfaceUid, const TEComResolverParams& aAdditionalParameters) const = 0;

Description

Identifies the most appropriate implementation of a specified interface.

The TEComResolverParams argument supplies data, possibly using wildcards, to match against implementations' data identifer (IMPLEMENTATION_INFO::default_data). If a number of implementations are equally suitable, any may be selected.

Parameters

TUid aInterfaceUid

The UID of the interface for which an implementation is requested

const TEComResolverParams& aAdditionalParameters

The parameters which must match for an implementation to be suitable

Return value

TUid

The UID of the implementation which satisfies the specified parameters. If there is no suitable implementation, then KNullUid


ListAllL()

RImplInfoArray& ListAllL(TUid aInterfaceUid) const;

Description

Lists all the implementations of the specified interface definition.

Parameters

TUid aInterfaceUid

The UID of the interface of which to list implementations

Return value

RImplInfoArray&

Array of suitable implementations

Leave codes

KEComErrNoInterfaceIdentified

No suitable interface implementation exists


ListAllL()

virtual RImplInfoArray* ListAllL(TUid aInterfaceUid, const TEComResolverParams& aAdditionalParameters) const = 0;

Description

Lists all the implementations of the specified interface definition that satisfy the supplied resolution parameters.

Parameters

TUid aInterfaceUid

The UID of the interface of which to list implementations

const TEComResolverParams& aAdditionalParameters

The parameters that must match for an implementation to be suitable

Return value

RImplInfoArray*

Pointer to an array of suitable implementations. Ownership of this array is passed to the calling function, which should close and delete the array when its use is complete

[Top]


Data members


iRegistry

protected: const MPublicRegistry& iRegistry;

Description

Registry access object, initialised by the constructor.