syslibsapitest/syslibssvs/ecom/TestPlugin/Inc/TestEComResolver.h
changeset 31 ce057bb09d0b
parent 0 e4d67989cc36
equal deleted inserted replaced
30:e20de85af2ee 31:ce057bb09d0b
       
     1 /*
       
     2 * Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: 
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #if (!defined __TEST_ECOM_RESOLVER_H__)
       
    21 #define __TEST_ECOM_RESOLVER_H__
       
    22 
       
    23 #include <ecom/resolver.h>
       
    24 
       
    25 #define CTestEComResolver_UID	0x20003725
       
    26 
       
    27 /**
       
    28 	@internalComponent
       
    29 	@since 7.0
       
    30 	Controls the identification, (resolution), of which implementation 
       
    31 	will be used to satisfy an interface implementation instantiation.
       
    32  */
       
    33 class CTestEComResolver : public CResolver
       
    34 {
       
    35 public:
       
    36 /**
       
    37 	@fn				NewL(MPublicRegistry& aRegistry)
       
    38 	Intended Usage	: Standardized safe construction which leaves nothing 
       
    39 					on the cleanup stack.	
       
    40 	Error Condition	: Cannot fully construct because of memory limitations.	
       
    41 	@leave			KErrNoMemory
       
    42 	@since			7.0
       
    43 	@return			A pointer to the new class
       
    44 	@post			CTestEComResolver is fully constructed, 
       
    45 					and initialized.
       
    46  */
       
    47 	static CTestEComResolver* NewL(MPublicRegistry& aRegistry);
       
    48 
       
    49 /**
       
    50 	@fn				~CTestEComResolver()
       
    51 	Intended Usage	: Standard default d'tor	
       
    52 	Error Condition	: None	
       
    53 	@since			7.0
       
    54  */
       
    55 	~CTestEComResolver();
       
    56 
       
    57 /**
       
    58 	@fn				IdentifyImplementationL(TUid aInterfaceUid, 
       
    59 											const TEComResolverParams& aAdditionalParameters) const
       
    60 	Intended Usage	:	Request that the resolver identify the most appropriate 
       
    61 						interface implementation.
       
    62 	Error Condition	:	
       
    63 	@since			7.0
       
    64 	@param			aInterfaceUid The interface for which implementations are requested
       
    65 	@param			aAdditionalParameters Data to be used to refine the search further
       
    66 	@return			The Uid of the best fit interface implementation - KNullUid if no match is found
       
    67 	@pre 			Object is fully constructed and initialized
       
    68 	@post			Registry contents are not modified but registry keys may be updated
       
    69  */
       
    70 	TUid			IdentifyImplementationL(TUid aInterfaceUid, const TEComResolverParams& aAdditionalParameters) const;
       
    71 
       
    72 /**
       
    73 	@fn				ListAllL(TUid aInterfaceUid, const TEComResolverParams& aAdditionalParameters) const
       
    74 	Intended Usage	:	List all the implementations which satisfy the specified interface.
       
    75 	Error Condition	:	
       
    76 	@since			7.0
       
    77 	@param			aInterfaceUid The interface for which implementations are requested
       
    78 	@param			aAdditionalParameters Data to be used to refine the search further
       
    79 	@return			Pointer to an array of suitable implementations. Ownership of this array
       
    80 	is passed to the calling function.
       
    81 	@pre 			Object is fully constructed and initialized
       
    82 	@post			Registry contents are not modified but registry keys may be updated
       
    83  */
       
    84 	RImplInfoArray*	ListAllL(TUid aInterfaceUid, const TEComResolverParams& aAdditionalParameters) const;
       
    85 
       
    86 private:
       
    87 /**
       
    88 	@internalComponent
       
    89 	@fn				CTestEComResolver(MPublicRegistry& aRegistry)
       
    90 	Intended Usage	: Standardized default c'tor	
       
    91 	Error Condition	: None	
       
    92 	@since			7.0
       
    93 	@post			CTestEComResolver is fully constructed
       
    94  */
       
    95 	explicit CTestEComResolver(MPublicRegistry& aRegistry);
       
    96 
       
    97 /**
       
    98 	@fn				Match(const TDesC8& aImplementationType, const TDesC8& aMatchType, TBool aUseWildcards) const
       
    99 	Intended Usage	:	Searches for a match of a data type on an implementation type.
       
   100 	Match returns ETrue if aMatchType is found within aImplementationType according to 
       
   101 	the following rules:
       
   102 	1) aImplementationType is treated as a series of descriptors separated by double 
       
   103 	bars (||). ETrue is returned if aMatchType matches exactly any of the short 
       
   104 	descriptors.  If no double bar is present then aImplementationType is treated as a
       
   105 	single descriptor.
       
   106 	2) If aUseWildcards == ETrue then a '?' in aMatchType will be matched to any single
       
   107 	character and '*' will be matched to any series of characters.
       
   108 	@leave			KErrNoMemory
       
   109 	@since			7.0
       
   110 	@param			aImplementationType The implementation data type to search for a match
       
   111 	@param			aMatchType The data to search for
       
   112 	@param			aUseWildcards ETrue if wildcard matching should be allowed
       
   113 	@return			ETrue if a match was found, EFalse otherwise
       
   114 	@pre 			This object is fully constructed
       
   115  */
       
   116 	TBool			Match(const TDesC8& aImplementationType, const TDesC8& aMatchType, TBool aUseWildcards) const;
       
   117 
       
   118 private:
       
   119 	mutable RImplInfoArray*	iImplementationInfoArray;
       
   120 };
       
   121 
       
   122 #endif /* __TEST_ECOM_RESOLVER_H__ */