|
1 /* |
|
2 * Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of the License "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Thin wrapper around plugin's function table. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef NPNIMPLEMENTATION_H |
|
20 #define NPNIMPLEMENTATION_H |
|
21 |
|
22 // INCLUDE FILES |
|
23 #include <e32std.h> |
|
24 #include <e32base.h> |
|
25 //#include <eikenv.h> |
|
26 #include <npupp.h> |
|
27 //#include <sysutil.h> |
|
28 |
|
29 |
|
30 |
|
31 //#define PLUGIN_DEBUG |
|
32 //#ifdef PLUGIN_DEBUG |
|
33 //#include <flogger.h> |
|
34 //#endif |
|
35 |
|
36 |
|
37 |
|
38 NPError NpnUrlLoader(NPP aInstance, const TDesC& aUrl, |
|
39 TUint8 aMethod, const TDesC* aWindowType, const TDesC& aBuf, |
|
40 TBool aFromFile, TBool aNotify, void* aNotifyData); |
|
41 |
|
42 |
|
43 NPError NpnGetUrl(NPP aInstance, const TDesC& aUrl, |
|
44 const TDesC* aWindowType); |
|
45 |
|
46 |
|
47 NPError NpnPostUrl(NPP aInstance, const TDesC& aUrl, |
|
48 const TDesC* aWindowType, const TDesC& aBuf, NPBool aFile); |
|
49 |
|
50 |
|
51 NPError NpnRequestRead(NPStream* /*aStream*/, |
|
52 NPByteRange* /*aRangeList*/); |
|
53 |
|
54 |
|
55 NPError NpnNewStream(NPP /*aInstance*/, NPMIMEType /*aType*/, |
|
56 const TDesC* /*aWindowType*/, NPStream** /*aStream*/); |
|
57 |
|
58 |
|
59 TInt32 NpnWrite(NPP /*aInstance*/, NPStream* /*aStream*/, |
|
60 TInt32 /*aLen*/, void* /*aBuffer*/); |
|
61 |
|
62 |
|
63 NPError NpnDestroyStream(NPP /*aInstance*/, |
|
64 NPStream* /*aStream*/, NPReason /*aReason*/); |
|
65 |
|
66 |
|
67 void NpnStatus(NPP /*aInstance*/, const TDesC& aMessage); |
|
68 |
|
69 |
|
70 const TDesC* NpnUAgent(NPP /*aInstance*/); |
|
71 |
|
72 |
|
73 void* NpnMemAlloc(uint32 aSize); |
|
74 |
|
75 |
|
76 void NpnMemFree(void* aPtr); |
|
77 |
|
78 |
|
79 uint32 NpnMemFlush(uint32 /*aSize*/); |
|
80 |
|
81 |
|
82 void NpnReloadPlugins(NPBool aReloadPages); |
|
83 |
|
84 |
|
85 JRIEnv* NpnGetJavaEnv(); |
|
86 |
|
87 |
|
88 jref NpnGetJavaPeer(NPP /*aInstance*/); |
|
89 |
|
90 |
|
91 NPError NpnGetUrlNotify(NPP aInstance, const TDesC& aUrl, |
|
92 const TDesC* aWindowType, void* aNotifyData); |
|
93 |
|
94 |
|
95 NPError NpnPostUrlNotify(NPP aInstance, const TDesC& aUrl, |
|
96 const TDesC* aWindowType, const TDesC& aBuf, NPBool aFile, void* aNotifyData); |
|
97 |
|
98 |
|
99 NPError NpnGetValue(NPP aInstance, NPNVariable aVariable, void *aRetValue); |
|
100 |
|
101 |
|
102 NPError NpnSetValue(NPP aInstance, NPPVariable aVariable, void *aSetValue); |
|
103 |
|
104 |
|
105 void NpnInvalidateRect(NPP /*aInstance*/, NPRect * /*aRect*/); |
|
106 |
|
107 |
|
108 void NpnInvalidateRegion(NPP /*aInstance*/, NPRegion /*aRegion*/); |
|
109 |
|
110 |
|
111 void NpnForceRedraw(NPP /*aInstance*/); |
|
112 |
|
113 |
|
114 |
|
115 // ----------------------------------------------------------------------------- |
|
116 // PluginNpnFuncs |
|
117 // |
|
118 // A const global variable used to hold the browser callback functions. |
|
119 // ----------------------------------------------------------------------------- |
|
120 // |
|
121 const NPNetscapeFuncs NpnImplementationFuncs = |
|
122 { |
|
123 sizeof(NPNetscapeFuncs), |
|
124 2, // NPAPI Version |
|
125 NpnGetUrl, |
|
126 NpnPostUrl, |
|
127 NpnRequestRead, |
|
128 NpnNewStream, |
|
129 NpnWrite, |
|
130 NpnDestroyStream, |
|
131 NpnStatus, |
|
132 NpnUAgent, |
|
133 NpnMemAlloc, |
|
134 NpnMemFree, |
|
135 NpnMemFlush, |
|
136 NpnReloadPlugins, |
|
137 NpnGetJavaEnv, |
|
138 NpnGetJavaPeer, |
|
139 NpnGetUrlNotify, |
|
140 NpnPostUrlNotify, |
|
141 NpnGetValue, |
|
142 NpnSetValue, |
|
143 NpnInvalidateRect, |
|
144 NpnInvalidateRegion, |
|
145 NpnForceRedraw |
|
146 }; |
|
147 |
|
148 |
|
149 |
|
150 #endif |