williamr@2: // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). williamr@2: // All rights reserved. williamr@2: // This component and the accompanying materials are made available williamr@2: // 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: // which accompanies this distribution, and is available williamr@2: // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". williamr@2: // williamr@2: // Initial Contributors: williamr@2: // Nokia Corporation - initial contribution. williamr@2: // williamr@2: // Contributors: williamr@2: // williamr@2: // Description: williamr@2: // This file contains the definition for the williamr@2: // TImplementationProxy structure. williamr@2: // williamr@2: // williamr@2: williamr@2: williamr@2: williamr@2: #ifndef __IMPLEMENTATIONPROXY_H__ williamr@2: #define __IMPLEMENTATIONPROXY_H__ williamr@2: williamr@2: #include williamr@2: williamr@2: /** williamr@2: Pre-defined function pointer type used in TImplementationProxy williamr@2: williamr@2: @publishedAll williamr@2: @released williamr@2: */ williamr@2: typedef TAny* (*TFuncPtr)(); williamr@2: williamr@2: /** williamr@2: Typedef used to cover the difference between EABI and older handling williamr@2: of the instantiation method pointer. williamr@2: williamr@2: @publishedAll williamr@2: @released williamr@2: */ williamr@2: #if defined(__EABI__) || defined(__GCCXML__) williamr@2: typedef TFuncPtr TProxyNewLPtr; williamr@2: #else williamr@2: typedef TAny* TProxyNewLPtr; williamr@2: #endif williamr@2: williamr@2: /** williamr@2: The structure that defines the pairing required by the ECOM framework williamr@2: to correctly identify the instantiation method pointer to provide williamr@2: to a client's resolution request. williamr@2: williamr@2: @publishedAll williamr@2: @released williamr@2: */ williamr@2: typedef struct williamr@2: { williamr@2: /** The unique UID for an Interface Implementation */ williamr@2: TUid iImplementationUid; williamr@2: /** The pointer to the instantiation method for the Interface Implementation identified by the UID.*/ williamr@2: TProxyNewLPtr iNewLFuncPtr; williamr@2: } TImplementationProxy; williamr@2: williamr@2: /** williamr@2: Macro to initialise an element of a static array of TImplementationProxy objects. williamr@2: This macro deals with casting the function pointer to the type used in the structure. williamr@2: williamr@2: @publishedAll williamr@2: @released williamr@2: */ williamr@2: #define IMPLEMENTATION_PROXY_ENTRY(aUid, aFuncPtr) {{aUid},(TProxyNewLPtr)(aFuncPtr)} williamr@2: williamr@2: #endif // __IMPLEMENTATIONPROXY_H__