epoc32/include/ecom/ecomresolverparams.inl
author William Roberts <williamr@symbian.org>
Tue, 16 Mar 2010 16:12:26 +0000
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
child 4 837f303aceeb
permissions -rw-r--r--
Final list of Symbian^2 public API header files
williamr@2
     1
// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
williamr@2
     2
// All rights reserved.
williamr@2
     3
// This component and the accompanying materials are made available
williamr@2
     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
williamr@2
     5
// which accompanies this distribution, and is available
williamr@2
     6
// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
williamr@2
     7
//
williamr@2
     8
// Initial Contributors:
williamr@2
     9
// Nokia Corporation - initial contribution.
williamr@2
    10
//
williamr@2
    11
// Contributors:
williamr@2
    12
//
williamr@2
    13
// Description:
williamr@2
    14
// Implementation of the TEComResolverParams class.
williamr@2
    15
// Provide the inline implementation of TEComResolverParams 
williamr@2
    16
// TEComResolverParams allows the user to define the characteristics
williamr@2
    17
// of the Interface Implementation plugin to be found.
williamr@2
    18
// Default constructor of TEComResolverParams. It creates an empty uninitialized
williamr@2
    19
// resolver parameter object. Such an object maybe used in calls to REComSession
williamr@2
    20
// CreateImplementationL() and ListImplementationsL() methods when no specific 
williamr@2
    21
// matching or filtering is required i.e. default type matching will be used.
williamr@2
    22
// 
williamr@2
    23
//
williamr@2
    24
williamr@2
    25
williamr@2
    26
williamr@2
    27
williamr@2
    28
TEComResolverParams::TEComResolverParams()
williamr@2
    29
:	iDataType(NULL,0),
williamr@2
    30
	iGenericMatch(EFalse)
williamr@2
    31
	{
williamr@2
    32
	// do nothing;
williamr@2
    33
	}
williamr@2
    34
williamr@2
    35
williamr@2
    36
/**
williamr@2
    37
Provides read access to the Interface Implementation plugin 'datatype' match 
williamr@2
    38
pattern. Note, since TEComResolveParams has a default constructor this data 
williamr@2
    39
member may be an invalid descriptor which implies 'default matching'.
williamr@2
    40
williamr@2
    41
@return			The read only 'datatype' match pattern.
williamr@2
    42
@pre 			The object is constructed
williamr@2
    43
*/
williamr@2
    44
williamr@2
    45
const TDesC8& TEComResolverParams::DataType() const
williamr@2
    46
	{
williamr@2
    47
	return iDataType;
williamr@2
    48
	}
williamr@2
    49
williamr@2
    50
williamr@2
    51
/**
williamr@2
    52
Set the Interface Implementation plugin 'datatype' match pattern.
williamr@2
    53
williamr@2
    54
@param			aDataType The 'datatype' match pattern to be stored.
williamr@2
    55
@pre 			The object is constructed
williamr@2
    56
@post			iDataType equals aDataType.
williamr@2
    57
*/
williamr@2
    58
williamr@2
    59
void TEComResolverParams::SetDataType(const TDesC8& aDataType)
williamr@2
    60
	{
williamr@2
    61
	iDataType.Set(aDataType);
williamr@2
    62
	}
williamr@2
    63
williamr@2
    64
/**
williamr@2
    65
Check if 'generic' matching is allowed.
williamr@2
    66
williamr@2
    67
@return			ETrue if generic matching is allowed, EFalse otherwise.
williamr@2
    68
@pre 			The object is constructed
williamr@2
    69
*/
williamr@2
    70
TBool TEComResolverParams::IsGenericMatch() const
williamr@2
    71
	{
williamr@2
    72
	return iGenericMatch;
williamr@2
    73
	}
williamr@2
    74
williamr@2
    75
/**
williamr@2
    76
Indicates that a 'generic' match is required.
williamr@2
    77
williamr@2
    78
Either allow Interface Implementation plugins that are specific (use no wildcards
williamr@2
    79
in their registry file) or generic (use wildcards in their registry file).
williamr@2
    80
williamr@2
    81
In any case the user of a should NOT use wildcards in the datatype string that
williamr@2
    82
is passed into this object.
williamr@2
    83
williamr@2
    84
Rationale:
williamr@2
    85
The client that sets up the resolver is expected to know what type of data
williamr@2
    86
it is handling.
williamr@2
    87
williamr@2
    88
Use Case:
williamr@2
    89
"I have this gif to convert, but I'd prefer only gif-specific plugins" or 
williamr@2
    90
"I have this gif to convert, but I'm happy with some generic image conversion
williamr@2
    91
plugin".
williamr@2
    92
williamr@2
    93
NOT:
williamr@2
    94
"I have this image I want some plugin to convert, but I don't know the type
williamr@2
    95
of the image".
williamr@2
    96
williamr@2
    97
@param			aGenericMatch ETrue if a generic match is required, EFalse if not.
williamr@2
    98
@pre 			The object is constructed
williamr@2
    99
@post			iGenericMatch equals aGenericMatch.
williamr@2
   100
*/
williamr@2
   101
void TEComResolverParams::SetGenericMatch(TBool aGenericMatch)
williamr@2
   102
	{
williamr@2
   103
	iGenericMatch=aGenericMatch;
williamr@2
   104
	}
williamr@2
   105
	
williamr@2
   106
williamr@2
   107
/**
williamr@2
   108
@deprecated
williamr@2
   109
@see			IsGenericMatch
williamr@2
   110
*/
williamr@2
   111
williamr@2
   112
TBool TEComResolverParams::IsWildcardMatch() const
williamr@2
   113
	{
williamr@2
   114
	return iGenericMatch;
williamr@2
   115
	}
williamr@2
   116
williamr@2
   117
williamr@2
   118
/**
williamr@2
   119
@deprecated
williamr@2
   120
@see			SetGenericMatch
williamr@2
   121
*/
williamr@2
   122
williamr@2
   123
void TEComResolverParams::SetWildcardMatch(TBool aWildcardMatch)
williamr@2
   124
	{
williamr@2
   125
	iGenericMatch=aWildcardMatch;
williamr@2
   126
	}