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@4: // under the terms of "Eclipse Public License v1.0" williamr@2: // which accompanies this distribution, and is available williamr@4: // at the URL "http://www.eclipse.org/legal/epl-v10.html". williamr@2: // williamr@2: // Initial Contributors: williamr@2: // Nokia Corporation - initial contribution. williamr@2: // williamr@2: // Contributors: williamr@2: // williamr@2: // Description: williamr@4: // This file contains the definition for the TImplementationProxy structure. williamr@2: // williamr@2: // williamr@2: williamr@4: /** williamr@4: @file williamr@4: @publishedAll williamr@4: @released williamr@4: */ williamr@2: williamr@2: #ifndef __IMPLEMENTATIONPROXY_H__ williamr@2: #define __IMPLEMENTATIONPROXY_H__ williamr@2: williamr@4: // ____________________________________________________________________________ williamr@4: // INCLUDES williamr@4: williamr@4: williamr@2: #include williamr@2: williamr@4: williamr@4: // ____________________________________________________________________________ williamr@4: // TYPES - TImplementationProxy williamr@4: williamr@2: /** williamr@2: Pre-defined function pointer type used in TImplementationProxy williamr@4: @leave KErrNoMemory williamr@4: @leave Or any of the System Wide error codes williamr@4: @return TAny* A pointer to the instantiated interface implementation. 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@4: */ williamr@4: #if defined(__EABI__) || defined(__GCCXML__) || defined(__X86GCC__) || defined(__GCCE__) williamr@4: typedef TFuncPtr TProxyNewLPtr; williamr@4: #else williamr@4: typedef TAny* TProxyNewLPtr; williamr@4: #endif williamr@2: 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: 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@4: 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: #define IMPLEMENTATION_PROXY_ENTRY(aUid, aFuncPtr) {{aUid},(TProxyNewLPtr)(aFuncPtr)} williamr@2: williamr@4: #ifndef SYMBIAN_ENABLE_SPLIT_HEADERS williamr@4: #include williamr@4: #endif williamr@4: williamr@4: williamr@2: #endif // __IMPLEMENTATIONPROXY_H__