1.1 --- a/epoc32/include/ecom/ecomresolverparams.inl Tue Nov 24 13:55:44 2009 +0000
1.2 +++ b/epoc32/include/ecom/ecomresolverparams.inl Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -1,1 +1,126 @@
1.4 -ecomresolverparams.inl
1.5 +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
1.6 +// All rights reserved.
1.7 +// This component and the accompanying materials are made available
1.8 +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
1.9 +// which accompanies this distribution, and is available
1.10 +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.11 +//
1.12 +// Initial Contributors:
1.13 +// Nokia Corporation - initial contribution.
1.14 +//
1.15 +// Contributors:
1.16 +//
1.17 +// Description:
1.18 +// Implementation of the TEComResolverParams class.
1.19 +// Provide the inline implementation of TEComResolverParams
1.20 +// TEComResolverParams allows the user to define the characteristics
1.21 +// of the Interface Implementation plugin to be found.
1.22 +// Default constructor of TEComResolverParams. It creates an empty uninitialized
1.23 +// resolver parameter object. Such an object maybe used in calls to REComSession
1.24 +// CreateImplementationL() and ListImplementationsL() methods when no specific
1.25 +// matching or filtering is required i.e. default type matching will be used.
1.26 +//
1.27 +//
1.28 +
1.29 +
1.30 +
1.31 +
1.32 +TEComResolverParams::TEComResolverParams()
1.33 +: iDataType(NULL,0),
1.34 + iGenericMatch(EFalse)
1.35 + {
1.36 + // do nothing;
1.37 + }
1.38 +
1.39 +
1.40 +/**
1.41 +Provides read access to the Interface Implementation plugin 'datatype' match
1.42 +pattern. Note, since TEComResolveParams has a default constructor this data
1.43 +member may be an invalid descriptor which implies 'default matching'.
1.44 +
1.45 +@return The read only 'datatype' match pattern.
1.46 +@pre The object is constructed
1.47 +*/
1.48 +
1.49 +const TDesC8& TEComResolverParams::DataType() const
1.50 + {
1.51 + return iDataType;
1.52 + }
1.53 +
1.54 +
1.55 +/**
1.56 +Set the Interface Implementation plugin 'datatype' match pattern.
1.57 +
1.58 +@param aDataType The 'datatype' match pattern to be stored.
1.59 +@pre The object is constructed
1.60 +@post iDataType equals aDataType.
1.61 +*/
1.62 +
1.63 +void TEComResolverParams::SetDataType(const TDesC8& aDataType)
1.64 + {
1.65 + iDataType.Set(aDataType);
1.66 + }
1.67 +
1.68 +/**
1.69 +Check if 'generic' matching is allowed.
1.70 +
1.71 +@return ETrue if generic matching is allowed, EFalse otherwise.
1.72 +@pre The object is constructed
1.73 +*/
1.74 +TBool TEComResolverParams::IsGenericMatch() const
1.75 + {
1.76 + return iGenericMatch;
1.77 + }
1.78 +
1.79 +/**
1.80 +Indicates that a 'generic' match is required.
1.81 +
1.82 +Either allow Interface Implementation plugins that are specific (use no wildcards
1.83 +in their registry file) or generic (use wildcards in their registry file).
1.84 +
1.85 +In any case the user of a should NOT use wildcards in the datatype string that
1.86 +is passed into this object.
1.87 +
1.88 +Rationale:
1.89 +The client that sets up the resolver is expected to know what type of data
1.90 +it is handling.
1.91 +
1.92 +Use Case:
1.93 +"I have this gif to convert, but I'd prefer only gif-specific plugins" or
1.94 +"I have this gif to convert, but I'm happy with some generic image conversion
1.95 +plugin".
1.96 +
1.97 +NOT:
1.98 +"I have this image I want some plugin to convert, but I don't know the type
1.99 +of the image".
1.100 +
1.101 +@param aGenericMatch ETrue if a generic match is required, EFalse if not.
1.102 +@pre The object is constructed
1.103 +@post iGenericMatch equals aGenericMatch.
1.104 +*/
1.105 +void TEComResolverParams::SetGenericMatch(TBool aGenericMatch)
1.106 + {
1.107 + iGenericMatch=aGenericMatch;
1.108 + }
1.109 +
1.110 +
1.111 +/**
1.112 +@deprecated
1.113 +@see IsGenericMatch
1.114 +*/
1.115 +
1.116 +TBool TEComResolverParams::IsWildcardMatch() const
1.117 + {
1.118 + return iGenericMatch;
1.119 + }
1.120 +
1.121 +
1.122 +/**
1.123 +@deprecated
1.124 +@see SetGenericMatch
1.125 +*/
1.126 +
1.127 +void TEComResolverParams::SetWildcardMatch(TBool aWildcardMatch)
1.128 + {
1.129 + iGenericMatch=aWildcardMatch;
1.130 + }