|
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: Loads the plugin content |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef __PLUGINSTREAM_H__ |
|
19 #define __PLUGINSTREAM_H__ |
|
20 |
|
21 #include <e32base.h> |
|
22 #include <npupp.h> |
|
23 |
|
24 class PluginSkin; |
|
25 |
|
26 namespace WebCore { |
|
27 class Frame; |
|
28 class NetscapePlugInStreamLoaderClient; |
|
29 struct ResourceRequest; |
|
30 } |
|
31 |
|
32 class PluginStream |
|
33 { |
|
34 public: |
|
35 PluginStream(PluginSkin* pluginskin, WebCore::NetscapePlugInStreamLoaderClient* loaderclient, |
|
36 void* notifydata = 0); |
|
37 virtual ~PluginStream(); |
|
38 |
|
39 public: |
|
40 void createNPStreamL(TPtrC8 url, TPtrC16 mimetype, long long length); |
|
41 void writeStreamL(const char* data, int length); |
|
42 void destroyStream(int reason); |
|
43 void close(); |
|
44 |
|
45 private: |
|
46 void generateTempFileL(); |
|
47 void writeStreamToPluginL(const char* data, int length); |
|
48 void writeStreamToFileL(const char* data, int length); |
|
49 |
|
50 private: |
|
51 void* m_notifydata; //not owned; |
|
52 PluginSkin* m_pluginskin; //not owned |
|
53 WebCore::NetscapePlugInStreamLoaderClient* m_loaderclient; //not owned |
|
54 |
|
55 NPStream* m_stream; //owned |
|
56 TUint16 m_type; //owned |
|
57 HBufC* m_fileName; //owned |
|
58 |
|
59 bool m_streamDestroyed; |
|
60 }; |
|
61 |
|
62 #endif |