sl@0: // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0: // All rights reserved.
sl@0: // This component and the accompanying materials are made available
sl@0: // under the terms of "Eclipse Public License v1.0"
sl@0: // which accompanies this distribution, and is available
sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0: //
sl@0: // Initial Contributors:
sl@0: // Nokia Corporation - initial contribution.
sl@0: //
sl@0: // Contributors:
sl@0: //
sl@0: // Description:
sl@0: // Implementation of the TEComResolverParams class.
sl@0: // Provide the inline implementation of TEComResolverParams 
sl@0: // TEComResolverParams allows the user to define the characteristics
sl@0: // of the Interface Implementation plugin to be found.
sl@0: // Default constructor of TEComResolverParams. It creates an empty uninitialized
sl@0: // resolver parameter object. Such an object maybe used in calls to REComSession
sl@0: // CreateImplementationL() and ListImplementationsL() methods when no specific 
sl@0: // matching or filtering is required i.e. default type matching will be used.
sl@0: // 
sl@0: //
sl@0: 
sl@0: TEComResolverParams::TEComResolverParams()
sl@0: :	iDataType(NULL,0),
sl@0: 	iGenericMatch(EFalse)
sl@0: 	{
sl@0: 	// do nothing;
sl@0: 	}
sl@0: 
sl@0: 
sl@0: /**
sl@0: Provides read access to the Interface Implementation plugin 'datatype' match 
sl@0: pattern. Note, since TEComResolveParams has a default constructor this data 
sl@0: member may be an invalid descriptor which implies 'default matching'.
sl@0: 
sl@0: @return			The read only 'datatype' match pattern.
sl@0: @pre 			The object is constructed
sl@0: */
sl@0: 
sl@0: const TDesC8& TEComResolverParams::DataType() const
sl@0: 	{
sl@0: 	return iDataType;
sl@0: 	}
sl@0: 
sl@0: 
sl@0: /**
sl@0: Set the Interface Implementation plugin 'datatype' match pattern.
sl@0: 
sl@0: @param			aDataType The 'datatype' match pattern to be stored.
sl@0: @pre 			The object is constructed
sl@0: @post			iDataType equals aDataType.
sl@0: */
sl@0: 
sl@0: void TEComResolverParams::SetDataType(const TDesC8& aDataType)
sl@0: 	{
sl@0: 	iDataType.Set(aDataType);
sl@0: 	}
sl@0: 
sl@0: /**
sl@0: Check if 'generic' matching is allowed.
sl@0: 
sl@0: @return			ETrue if generic matching is allowed, EFalse otherwise.
sl@0: @pre 			The object is constructed
sl@0: */
sl@0: TBool TEComResolverParams::IsGenericMatch() const
sl@0: 	{
sl@0: 	return iGenericMatch;
sl@0: 	}
sl@0: 
sl@0: /**
sl@0: Indicates that a 'generic' match is required.
sl@0: 
sl@0: Either allow Interface Implementation plugins that are specific (use no wildcards
sl@0: in their registry file) or generic (use wildcards in their registry file).
sl@0: 
sl@0: In any case the user of a should NOT use wildcards in the datatype string that
sl@0: is passed into this object.
sl@0: 
sl@0: Rationale:
sl@0: The client that sets up the resolver is expected to know what type of data
sl@0: it is handling.
sl@0: 
sl@0: Use Case:
sl@0: "I have this gif to convert, but I'd prefer only gif-specific plugins" or 
sl@0: "I have this gif to convert, but I'm happy with some generic image conversion
sl@0: plugin".
sl@0: 
sl@0: NOT:
sl@0: "I have this image I want some plugin to convert, but I don't know the type
sl@0: of the image".
sl@0: 
sl@0: @param			aGenericMatch ETrue if a generic match is required, EFalse if not.
sl@0: @pre 			The object is constructed
sl@0: @post			iGenericMatch equals aGenericMatch.
sl@0: */
sl@0: void TEComResolverParams::SetGenericMatch(TBool aGenericMatch)
sl@0: 	{
sl@0: 	iGenericMatch=aGenericMatch;
sl@0: 	}
sl@0: 	
sl@0: 
sl@0: /**
sl@0: @deprecated
sl@0: @see			IsGenericMatch
sl@0: */
sl@0: 
sl@0: TBool TEComResolverParams::IsWildcardMatch() const
sl@0: 	{
sl@0: 	return iGenericMatch;
sl@0: 	}
sl@0: 
sl@0: 
sl@0: /**
sl@0: @deprecated
sl@0: @see			SetGenericMatch
sl@0: */
sl@0: 
sl@0: void TEComResolverParams::SetWildcardMatch(TBool aWildcardMatch)
sl@0: 	{
sl@0: 	iGenericMatch=aWildcardMatch;
sl@0: 	}
sl@0: 
sl@0: 
sl@0: 
sl@0: