epoc32/include/ecom/resolver.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
parent 2 2fe1408b6811
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
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@4
     4
// under the terms of "Eclipse Public License v1.0"
williamr@2
     5
// which accompanies this distribution, and is available
williamr@4
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.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
// This file contains the definition of the CResolver
williamr@2
    15
// class.
williamr@2
    16
// 
williamr@2
    17
//
williamr@2
    18
williamr@2
    19
#if defined (_MSC_VER) && (_MSC_VER >= 1000)
williamr@2
    20
#pragma once
williamr@2
    21
#endif
williamr@2
    22
#ifndef __RESOLVER_H__
williamr@2
    23
#define __RESOLVER_H__
williamr@2
    24
williamr@2
    25
#include <e32base.h>
williamr@2
    26
#include <f32file.h>
williamr@2
    27
williamr@2
    28
#include <ecom/ecom.h>
williamr@2
    29
#include <ecom/publicregistry.h>
williamr@2
    30
williamr@2
    31
class TEComResolverParams;
williamr@2
    32
williamr@2
    33
/**
williamr@2
    34
The UID idnetifying the ECOM Resolver plugin interface.
williamr@2
    35
williamr@2
    36
@publishedAll
williamr@2
    37
@released
williamr@2
    38
*/
williamr@2
    39
const TUid KCustomResolverInterfaceUid = {0x10009D90};
williamr@2
    40
williamr@2
    41
/**
williamr@2
    42
Abstract base class which is used to identify the correct interface implementation
williamr@2
    43
based on criteria supplied by the client.
williamr@2
    44
This base class can be used to write a client specific resolver, however this is not 
williamr@2
    45
required as a default implementation is provided within ECom.
williamr@2
    46
williamr@2
    47
@publishedAll
williamr@2
    48
@released
williamr@2
    49
*/
williamr@2
    50
williamr@2
    51
class CResolver : public CBase
williamr@2
    52
{
williamr@2
    53
public:
williamr@2
    54
	/**
williamr@2
    55
	Intended Usage	:	Request that the resolver identify the most appropriate interface 
williamr@2
    56
						implementation.
williamr@2
    57
	Error Condition	:	Depends on implementation.
williamr@2
    58
	@since			7.0
williamr@2
    59
	@param			aInterfaceUid The interface for which an implementation is requested
williamr@2
    60
	@param			aAdditionalParameters The parameters which must match for an 
williamr@2
    61
					implementation to be suitable
williamr@2
    62
	@return			The unique Id of the implementation which satisfies the specified parameters.
williamr@2
    63
	@pre 			This object is fully constructed.
williamr@2
    64
 	*/
williamr@2
    65
	
williamr@2
    66
	virtual TUid IdentifyImplementationL(TUid aInterfaceUid, 
williamr@2
    67
										 const TEComResolverParams& aAdditionalParameters) const  = 0;
williamr@2
    68
williamr@2
    69
	/**
williamr@2
    70
	Intended Usage	:	List all the implementations which satisfy the specified 
williamr@2
    71
						interface definition and the resolve parameters supplied.
williamr@2
    72
	Error Condition	:	Depends on implementation.
williamr@2
    73
	@since			7.0
williamr@2
    74
	@param			aInterfaceUid The interface for which implementations are requested
williamr@2
    75
	@param			aAdditionalParameters The parameters which must match for an 
williamr@2
    76
					implementation to be suitable
williamr@2
    77
	@return			Pointer to an array of suitable implementations. Ownership of this 
williamr@2
    78
					array is passed to the calling function.
williamr@2
    79
	@pre 			Object is fully constructed and initialized
williamr@2
    80
	@post			Registry contents are not modified but registry keys may be updated
williamr@2
    81
	*/
williamr@2
    82
	
williamr@2
    83
	virtual RImplInfoArray* ListAllL(TUid aInterfaceUid, 
williamr@2
    84
									 const TEComResolverParams& aAdditionalParameters) const = 0;
williamr@2
    85
williamr@2
    86
	
williamr@2
    87
	inline RImplInfoArray& ListAllL(TUid aInterfaceUid)const;
williamr@2
    88
williamr@2
    89
protected:
williamr@2
    90
	
williamr@2
    91
	explicit inline CResolver(MPublicRegistry& aRegistry);
williamr@2
    92
williamr@2
    93
	// Attributes
williamr@2
    94
	/** A reference to the instantiated registry information */
williamr@2
    95
	
williamr@2
    96
	 const MPublicRegistry& iRegistry;
williamr@2
    97
};
williamr@2
    98
williamr@2
    99
/**
williamr@2
   100
@internalAll
williamr@2
   101
Intended Usage	: Standardized default c'tor
williamr@2
   102
Error Condition	: None
williamr@2
   103
@since			7.0
williamr@2
   104
@post			CResolver is fully constructed
williamr@2
   105
*/
williamr@2
   106
CResolver::CResolver(MPublicRegistry& aRegistry) :
williamr@2
   107
CBase(),
williamr@2
   108
iRegistry(aRegistry)
williamr@2
   109
	{
williamr@2
   110
	// Do nothing
williamr@2
   111
	}
williamr@2
   112
williamr@2
   113
/**
williamr@2
   114
Intended Usage	:	List all the implementations which satisfy the specified interface.
williamr@2
   115
Error Condition	:	@see CRegistryData::ListImplementationsL
williamr@2
   116
@since			7.0
williamr@2
   117
@param			aInterfaceUid The interface for which implementations are requested
williamr@2
   118
@return			Array of suitable implementations
williamr@2
   119
@pre 			Object is fully constructed and initialized
williamr@2
   120
@post			Registry contents are not modified but registry keys may be updated
williamr@2
   121
*/
williamr@2
   122
RImplInfoArray& CResolver::ListAllL(TUid aInterfaceUid)const
williamr@2
   123
	{
williamr@2
   124
	return iRegistry.ListImplementationsL(aInterfaceUid);
williamr@2
   125
	}
williamr@2
   126
williamr@2
   127
#endif /* __RESOLVER_H__ */
williamr@4
   128