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