epoc32/include/ecom/ecomresolverparams.inl
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
child 4 837f303aceeb
equal deleted inserted replaced
1:666f914201fb 2:2fe1408b6811
     1 ecomresolverparams.inl
     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 the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.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 
       
    26 
       
    27 
       
    28 TEComResolverParams::TEComResolverParams()
       
    29 :	iDataType(NULL,0),
       
    30 	iGenericMatch(EFalse)
       
    31 	{
       
    32 	// do nothing;
       
    33 	}
       
    34 
       
    35 
       
    36 /**
       
    37 Provides read access to the Interface Implementation plugin 'datatype' match 
       
    38 pattern. Note, since TEComResolveParams has a default constructor this data 
       
    39 member may be an invalid descriptor which implies 'default matching'.
       
    40 
       
    41 @return			The read only 'datatype' match pattern.
       
    42 @pre 			The object is constructed
       
    43 */
       
    44 
       
    45 const TDesC8& TEComResolverParams::DataType() const
       
    46 	{
       
    47 	return iDataType;
       
    48 	}
       
    49 
       
    50 
       
    51 /**
       
    52 Set the Interface Implementation plugin 'datatype' match pattern.
       
    53 
       
    54 @param			aDataType The 'datatype' match pattern to be stored.
       
    55 @pre 			The object is constructed
       
    56 @post			iDataType equals aDataType.
       
    57 */
       
    58 
       
    59 void TEComResolverParams::SetDataType(const TDesC8& aDataType)
       
    60 	{
       
    61 	iDataType.Set(aDataType);
       
    62 	}
       
    63 
       
    64 /**
       
    65 Check if 'generic' matching is allowed.
       
    66 
       
    67 @return			ETrue if generic matching is allowed, EFalse otherwise.
       
    68 @pre 			The object is constructed
       
    69 */
       
    70 TBool TEComResolverParams::IsGenericMatch() const
       
    71 	{
       
    72 	return iGenericMatch;
       
    73 	}
       
    74 
       
    75 /**
       
    76 Indicates that a 'generic' match is required.
       
    77 
       
    78 Either allow Interface Implementation plugins that are specific (use no wildcards
       
    79 in their registry file) or generic (use wildcards in their registry file).
       
    80 
       
    81 In any case the user of a should NOT use wildcards in the datatype string that
       
    82 is passed into this object.
       
    83 
       
    84 Rationale:
       
    85 The client that sets up the resolver is expected to know what type of data
       
    86 it is handling.
       
    87 
       
    88 Use Case:
       
    89 "I have this gif to convert, but I'd prefer only gif-specific plugins" or 
       
    90 "I have this gif to convert, but I'm happy with some generic image conversion
       
    91 plugin".
       
    92 
       
    93 NOT:
       
    94 "I have this image I want some plugin to convert, but I don't know the type
       
    95 of the image".
       
    96 
       
    97 @param			aGenericMatch ETrue if a generic match is required, EFalse if not.
       
    98 @pre 			The object is constructed
       
    99 @post			iGenericMatch equals aGenericMatch.
       
   100 */
       
   101 void TEComResolverParams::SetGenericMatch(TBool aGenericMatch)
       
   102 	{
       
   103 	iGenericMatch=aGenericMatch;
       
   104 	}
       
   105 	
       
   106 
       
   107 /**
       
   108 @deprecated
       
   109 @see			IsGenericMatch
       
   110 */
       
   111 
       
   112 TBool TEComResolverParams::IsWildcardMatch() const
       
   113 	{
       
   114 	return iGenericMatch;
       
   115 	}
       
   116 
       
   117 
       
   118 /**
       
   119 @deprecated
       
   120 @see			SetGenericMatch
       
   121 */
       
   122 
       
   123 void TEComResolverParams::SetWildcardMatch(TBool aWildcardMatch)
       
   124 	{
       
   125 	iGenericMatch=aWildcardMatch;
       
   126 	}