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