1 // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // This file contains the definition of the CResolver
19 #if defined (_MSC_VER) && (_MSC_VER >= 1000)
22 #ifndef __RESOLVER_H__
23 #define __RESOLVER_H__
28 #include <ecom/ecom.h>
29 #include <ecom/publicregistry.h>
31 class TEComResolverParams;
34 The UID idnetifying the ECOM Resolver plugin interface.
39 const TUid KCustomResolverInterfaceUid = {0x10009D90};
42 Abstract base class which is used to identify the correct interface implementation
43 based on criteria supplied by the client.
44 This base class can be used to write a client specific resolver, however this is not
45 required as a default implementation is provided within ECom.
51 class CResolver : public CBase
55 Intended Usage : Request that the resolver identify the most appropriate interface
57 Error Condition : Depends on implementation.
59 @param aInterfaceUid The interface for which an implementation is requested
60 @param aAdditionalParameters The parameters which must match for an
61 implementation to be suitable
62 @return The unique Id of the implementation which satisfies the specified parameters.
63 @pre This object is fully constructed.
66 virtual TUid IdentifyImplementationL(TUid aInterfaceUid,
67 const TEComResolverParams& aAdditionalParameters) const = 0;
70 Intended Usage : List all the implementations which satisfy the specified
71 interface definition and the resolve parameters supplied.
72 Error Condition : Depends on implementation.
74 @param aInterfaceUid The interface for which implementations are requested
75 @param aAdditionalParameters The parameters which must match for an
76 implementation to be suitable
77 @return Pointer to an array of suitable implementations. Ownership of this
78 array is passed to the calling function.
79 @pre Object is fully constructed and initialized
80 @post Registry contents are not modified but registry keys may be updated
83 virtual RImplInfoArray* ListAllL(TUid aInterfaceUid,
84 const TEComResolverParams& aAdditionalParameters) const = 0;
87 inline RImplInfoArray& ListAllL(TUid aInterfaceUid)const;
91 explicit inline CResolver(MPublicRegistry& aRegistry);
94 /** A reference to the instantiated registry information */
96 const MPublicRegistry& iRegistry;
101 Intended Usage : Standardized default c'tor
102 Error Condition : None
104 @post CResolver is fully constructed
106 CResolver::CResolver(MPublicRegistry& aRegistry) :
114 Intended Usage : List all the implementations which satisfy the specified interface.
115 Error Condition : @see CRegistryData::ListImplementationsL
117 @param aInterfaceUid The interface for which implementations are requested
118 @return Array of suitable implementations
119 @pre Object is fully constructed and initialized
120 @post Registry contents are not modified but registry keys may be updated
122 RImplInfoArray& CResolver::ListAllL(TUid aInterfaceUid)const
124 return iRegistry.ListImplementationsL(aInterfaceUid);
127 #endif /* __RESOLVER_H__ */