nsPIPluginHost
| IID: | 42338435-a38f-4901-97b9-d7cba643d28d |
| Inherits From: | nsISupports |
Methods
void createTmpFileToPost ( char* postDataURL , out char* tmpFileName )
void deletePluginNativeWindow ( nsPluginNativeWindowPtr* pluginNativeWindow )
[noscript] void instantiateDummyJavaPlugin ( nsIPluginInstanceOwner owner )
void newPluginNativeWindow ( out nsPluginNativeWindowPtr* pluginNativeWindow )
void parsePostBufferToFixHeaders ( char* inPostData , PRUint32 inPostDataLen , out char* outPostData , out PRUint32 outPostDataLen )
void setIsScriptableInstance ( nsIPluginInstance instance , PRBool scriptable )
void createTmpFileToPost ( char* postDataURL , out char* tmpFileName )
To create tmp file with Content len header in, it will use by http POST
- Arguments:
- postDataURL
- tmpFileName
void deletePluginNativeWindow ( nsPluginNativeWindowPtr* pluginNativeWindow )
Deletes plugin native window object created by NewPluginNativeWindow
- Arguments:
- pluginNativeWindow
void instantiateDummyJavaPlugin ( nsIPluginInstanceOwner owner )
Instantiate a "dummy" java plugin if a java plugin that supports NPRuntime is installed. This plugin is used for exposing window.java and window.Packages. If the java plugin supports NPRuntime and instantiation was successful, owners instance will be non-null, if not, it will be null.
- Arguments:
- owner
void newPluginNativeWindow ( out nsPluginNativeWindowPtr* pluginNativeWindow )
Creates a new plugin native window object
- Arguments:
- pluginNativeWindow
void parsePostBufferToFixHeaders ( char* inPostData , PRUint32 inPostDataLen , out char* outPostData , out PRUint32 outPostDataLen )
This method parses post buffer to find out case insensitive "Content-length" string and CR or LF some where after that, then it assumes there is http headers in the input buffer and continue to search for end of headers (CRLFCRLF or LFLF). It will *always malloc()* output buffer (caller is responsible to free it) if input buffer starts with LF, which comes from 4.x spec http://developer.netscape.com/docs/manuals/communicator/plugin/pgfn2.htm#1007754 "If no custom headers are required, simply add a blank line ('\n') to the beginning of the file or buffer.", it skips that '\n' and considers rest of the input buffer as data. If "Content-length" string and end of headers is found it substitutes single LF with CRLF in the headers, so the end of headers always will be CRLFCRLF (single CR in headers, if any, remain untouched) else it puts "Content-length: "+size_of_data+CRLFCRLF at the beginning of the output buffer and memcpy data to the output buffer
On failure outPostData and outPostDataLen will be set in 0.
- Arguments:
- inPostData: - the post data
- inPostDataLen: - the length inPostData
- outPostData: - the buffer
- outPostDataLen: - the length of outPostData
void setIsScriptableInstance ( nsIPluginInstance instance , PRBool scriptable )
To notify the plugin manager that the plugin created a script object
- Arguments:
- instance
- scriptable
Reference documentation is generated from Mozilla's source.
