lowlevellibsandfws/pluginfw/Framework/inc/EComResolverParams.inl
changeset 0 e4d67989cc36
equal deleted inserted replaced
-1:000000000000 0:e4d67989cc36
       
     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".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // Implementation of the TEComResolverParams class.
       
    15 // Provide the inline implementation of TEComResolverParams 
       
    16 // TEComResolverParams allows the user to define the characteristics
       
    17 // of the Interface Implementation plugin to be found.
       
    18 // Default constructor of TEComResolverParams. It creates an empty uninitialized
       
    19 // resolver parameter object. Such an object maybe used in calls to REComSession
       
    20 // CreateImplementationL() and ListImplementationsL() methods when no specific 
       
    21 // matching or filtering is required i.e. default type matching will be used.
       
    22 // 
       
    23 //
       
    24 
       
    25 TEComResolverParams::TEComResolverParams()
       
    26 :	iDataType(NULL,0),
       
    27 	iGenericMatch(EFalse)
       
    28 	{
       
    29 	// do nothing;
       
    30 	}
       
    31 
       
    32 
       
    33 /**
       
    34 Provides read access to the Interface Implementation plugin 'datatype' match 
       
    35 pattern. Note, since TEComResolveParams has a default constructor this data 
       
    36 member may be an invalid descriptor which implies 'default matching'.
       
    37 
       
    38 @return			The read only 'datatype' match pattern.
       
    39 @pre 			The object is constructed
       
    40 */
       
    41 
       
    42 const TDesC8& TEComResolverParams::DataType() const
       
    43 	{
       
    44 	return iDataType;
       
    45 	}
       
    46 
       
    47 
       
    48 /**
       
    49 Set the Interface Implementation plugin 'datatype' match pattern.
       
    50 
       
    51 @param			aDataType The 'datatype' match pattern to be stored.
       
    52 @pre 			The object is constructed
       
    53 @post			iDataType equals aDataType.
       
    54 */
       
    55 
       
    56 void TEComResolverParams::SetDataType(const TDesC8& aDataType)
       
    57 	{
       
    58 	iDataType.Set(aDataType);
       
    59 	}
       
    60 
       
    61 /**
       
    62 Check if 'generic' matching is allowed.
       
    63 
       
    64 @return			ETrue if generic matching is allowed, EFalse otherwise.
       
    65 @pre 			The object is constructed
       
    66 */
       
    67 TBool TEComResolverParams::IsGenericMatch() const
       
    68 	{
       
    69 	return iGenericMatch;
       
    70 	}
       
    71 
       
    72 /**
       
    73 Indicates that a 'generic' match is required.
       
    74 
       
    75 Either allow Interface Implementation plugins that are specific (use no wildcards
       
    76 in their registry file) or generic (use wildcards in their registry file).
       
    77 
       
    78 In any case the user of a should NOT use wildcards in the datatype string that
       
    79 is passed into this object.
       
    80 
       
    81 Rationale:
       
    82 The client that sets up the resolver is expected to know what type of data
       
    83 it is handling.
       
    84 
       
    85 Use Case:
       
    86 "I have this gif to convert, but I'd prefer only gif-specific plugins" or 
       
    87 "I have this gif to convert, but I'm happy with some generic image conversion
       
    88 plugin".
       
    89 
       
    90 NOT:
       
    91 "I have this image I want some plugin to convert, but I don't know the type
       
    92 of the image".
       
    93 
       
    94 @param			aGenericMatch ETrue if a generic match is required, EFalse if not.
       
    95 @pre 			The object is constructed
       
    96 @post			iGenericMatch equals aGenericMatch.
       
    97 */
       
    98 void TEComResolverParams::SetGenericMatch(TBool aGenericMatch)
       
    99 	{
       
   100 	iGenericMatch=aGenericMatch;
       
   101 	}
       
   102 	
       
   103 
       
   104 /**
       
   105 @deprecated
       
   106 @see			IsGenericMatch
       
   107 */
       
   108 
       
   109 TBool TEComResolverParams::IsWildcardMatch() const
       
   110 	{
       
   111 	return iGenericMatch;
       
   112 	}
       
   113 
       
   114 
       
   115 /**
       
   116 @deprecated
       
   117 @see			SetGenericMatch
       
   118 */
       
   119 
       
   120 void TEComResolverParams::SetWildcardMatch(TBool aWildcardMatch)
       
   121 	{
       
   122 	iGenericMatch=aWildcardMatch;
       
   123 	}
       
   124 
       
   125 
       
   126 
       
   127