epoc32/include/ecom/implementationproxy.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.
     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 "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 // This file contains the definition for the TImplementationProxy structure.
    15 // 
    16 //
    17 
    18 /**
    19  @file
    20  @publishedAll
    21  @released
    22 */
    23 
    24 #ifndef __IMPLEMENTATIONPROXY_H__
    25 #define __IMPLEMENTATIONPROXY_H__
    26 
    27 // ____________________________________________________________________________
    28 // INCLUDES
    29 
    30 
    31 #include <e32std.h>
    32 
    33 
    34 // ____________________________________________________________________________
    35 // TYPES - TImplementationProxy
    36 
    37 /**
    38 Pre-defined function pointer type used in TImplementationProxy
    39 @leave		KErrNoMemory
    40 @leave      Or any of the System Wide error codes
    41 @return     TAny* A pointer to the instantiated interface implementation.
    42 */
    43 typedef TAny* (*TFuncPtr)();
    44 
    45 /**
    46 Typedef used to cover the difference between EABI and older handling
    47 of the instantiation method pointer.
    48 */
    49 #if  defined(__EABI__) || defined(__GCCXML__) || defined(__X86GCC__) || defined(__GCCE__)
    50   typedef TFuncPtr TProxyNewLPtr;
    51 #else
    52   typedef TAny* TProxyNewLPtr;
    53 #endif
    54 
    55 
    56 /**
    57 The structure that defines the pairing required by the ECOM framework
    58 to correctly identify the instantiation method pointer to provide
    59 to a client's resolution request.
    60 */
    61 typedef struct
    62 	{
    63 	/** The unique UID for an Interface Implementation */
    64 	TUid	iImplementationUid;
    65 	/** The pointer to the instantiation method for the Interface Implementation identified by the UID.*/
    66 	TProxyNewLPtr iNewLFuncPtr;
    67 	} TImplementationProxy;
    68 	
    69 /**
    70 Macro to initialise an element of a static array of TImplementationProxy objects.
    71 This macro deals with casting the function pointer to the type used in the structure.
    72 */
    73 #define IMPLEMENTATION_PROXY_ENTRY(aUid, aFuncPtr)	{{aUid},(TProxyNewLPtr)(aFuncPtr)}
    74 
    75 #ifndef SYMBIAN_ENABLE_SPLIT_HEADERS
    76 #include <ecom/extendedinterfaceimplementationproxy.h>
    77 #endif
    78 
    79 
    80 #endif	// __IMPLEMENTATIONPROXY_H__