author | William Roberts <williamr@symbian.org> |
Wed, 31 Mar 2010 12:33:34 +0100 | |
branch | Symbian3 |
changeset 4 | 837f303aceeb |
parent 2 | 2fe1408b6811 |
permissions | -rw-r--r-- |
williamr@2 | 1 |
/* |
williamr@2 | 2 |
* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). |
williamr@2 | 3 |
* All rights reserved. |
williamr@2 | 4 |
* This component and the accompanying materials are made available |
williamr@2 | 5 |
* under the terms of the License "Eclipse Public License v1.0" |
williamr@2 | 6 |
* which accompanies this distribution, and is available |
williamr@2 | 7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html". |
williamr@2 | 8 |
* |
williamr@2 | 9 |
* Initial Contributors: |
williamr@2 | 10 |
* Nokia Corporation - initial contribution. |
williamr@2 | 11 |
* |
williamr@2 | 12 |
* Contributors: |
williamr@2 | 13 |
* |
williamr@2 | 14 |
* Description: |
williamr@2 | 15 |
* |
williamr@2 | 16 |
*/ |
williamr@2 | 17 |
|
williamr@2 | 18 |
#ifndef CECOMBROWSERPLUGININTERFACE_H |
williamr@2 | 19 |
#define CECOMBROWSERPLUGININTERFACE_H |
williamr@2 | 20 |
|
williamr@2 | 21 |
// System includes |
williamr@2 | 22 |
#include <e32base.h> |
williamr@2 | 23 |
#include <ecom/ecom.h> |
williamr@2 | 24 |
|
williamr@2 | 25 |
// User includes |
williamr@4 | 26 |
#include <npupp.h> |
williamr@4 | 27 |
#include <browserplugininterface.h> |
williamr@2 | 28 |
|
williamr@2 | 29 |
typedef struct |
williamr@2 | 30 |
{ |
williamr@2 | 31 |
NPNetscapeFuncs* iNetscapeFuncs; |
williamr@2 | 32 |
NPPluginFuncs* iPluginFuncs; |
williamr@2 | 33 |
}TFuncs; |
williamr@2 | 34 |
|
williamr@2 | 35 |
// |
williamr@2 | 36 |
// The ECOM interface definition for a Netscape plugin interface class. |
williamr@2 | 37 |
// |
williamr@2 | 38 |
class CEcomBrowserPluginInterface: public CBase |
williamr@2 | 39 |
{ |
williamr@2 | 40 |
public: |
williamr@2 | 41 |
|
williamr@2 | 42 |
inline static CEcomBrowserPluginInterface* CreatePluginL( |
williamr@2 | 43 |
TUid aImplementationUid, |
williamr@2 | 44 |
NPNetscapeFuncs* aNetscapeFuncs, |
williamr@2 | 45 |
NPPluginFuncs* aPluginFuncs); |
williamr@2 | 46 |
|
williamr@2 | 47 |
inline virtual ~CEcomBrowserPluginInterface(); |
williamr@2 | 48 |
|
williamr@2 | 49 |
public: |
williamr@2 | 50 |
|
williamr@2 | 51 |
private: |
williamr@2 | 52 |
// The ECom destructor key identifier |
williamr@2 | 53 |
TUid iEcomDtorID; |
williamr@2 | 54 |
|
williamr@2 | 55 |
// A refedrence count |
williamr@2 | 56 |
TInt iCount; |
williamr@2 | 57 |
|
williamr@2 | 58 |
}; |
williamr@2 | 59 |
|
williamr@2 | 60 |
// |
williamr@2 | 61 |
// |
williamr@2 | 62 |
inline CEcomBrowserPluginInterface* CEcomBrowserPluginInterface::CreatePluginL( |
williamr@2 | 63 |
TUid aImplementationUid, |
williamr@2 | 64 |
NPNetscapeFuncs* aNetscapeFuncs, |
williamr@2 | 65 |
NPPluginFuncs* aPluginFuncs) |
williamr@2 | 66 |
{ |
williamr@2 | 67 |
|
williamr@2 | 68 |
TFuncs initParams; |
williamr@2 | 69 |
initParams.iNetscapeFuncs = aNetscapeFuncs; |
williamr@2 | 70 |
initParams.iPluginFuncs = aPluginFuncs; |
williamr@2 | 71 |
|
williamr@2 | 72 |
TAny* ptr = REComSession::CreateImplementationL(aImplementationUid, |
williamr@2 | 73 |
_FOFF(CEcomBrowserPluginInterface, iEcomDtorID), |
williamr@2 | 74 |
&initParams); |
williamr@2 | 75 |
|
williamr@2 | 76 |
return REINTERPRET_CAST(CEcomBrowserPluginInterface*, ptr); |
williamr@2 | 77 |
} |
williamr@2 | 78 |
|
williamr@2 | 79 |
inline CEcomBrowserPluginInterface::~CEcomBrowserPluginInterface() |
williamr@2 | 80 |
{ |
williamr@2 | 81 |
REComSession::DestroyedImplementation(iEcomDtorID); |
williamr@2 | 82 |
} |
williamr@2 | 83 |
|
williamr@2 | 84 |
|
williamr@2 | 85 |
#endif // CECOMBROWSERPLUGININTERFACE_H |
williamr@2 | 86 |
|
williamr@2 | 87 |
|
williamr@2 | 88 |
|
williamr@2 | 89 |