Search completed in 1.54 seconds.
15 results for "npp_writeready":
NPP_WriteReady - Archive of obsolete content
Archive › Plugins › Reference › NPP WriteReady
<< Gecko Plugin API Reference << Plug-in Side Plug-in API Summary Determines maximum number of bytes that the plug-in can consume. Syntax #include <npapi.h> int32 NPP_WriteReady(NPP instance, NPStream* stream); Parameters The function has the following parameters: instance Pointer to the current plug-in instance. stream Pointer to the current stream. Returns Returns the maximum number of bytes that an instance is prepared to accept from the stream. Description The browser calls NPP_WriteReady before each call to NPP_Write to determine whether a plug-in can receive data and how many bytes it can receive. This function allows the browser to send only as much data to the instance as it can handle at one time, making resource use more efficient for both the browser and plug-in. The NPP_Writ...
... call to NPP_Write to determine whether a plug-in can receive data and how many bytes it can receive. This function allows the browser to send only as much data to the instance as it can handle at one time, making resource use more efficient for both the browser and plug-in. The NPP_Write function may pass a larger buffer, but the plug-in is required to consume only the amount of data returned by NPP_WriteReady. The browser can write a smaller amount of data if desired or necessary; for example, if only 8K of data is available in a network buffer. If the plug-in is allocating memory for the entire stream at once (an AS_FILE stream), it can return a very large number. Because it is not processing streaming data, the browser can pass as much data to the instance as necessary in a single NPP_Write. If the ...
Streams - Plugins
Plugins › Guide › Streams
ream object per instance. Streams can be produced by the browser and consumed by a plug-in instance, or produced by an instance and consumed by the browser. Each stream has an associated MIME type identifying the format of the data in the stream. Streams produced by the browser can be automatically sent to or requested by the plug-in instance. The browser calls the plug-in methods NPP_NewStream, NPP_WriteReady, NPP_Write, and NPP_DestroyStream to, respectively, create a stream, find out how much data the plug-in can handle, push data into the stream, and delete it. The plug-in instance selects a transmission mode for streams produced by the browser. Stream data can be pushed by the browser, pulled by the plug-in, or saved to a local file and passed to the plug-in. Normal mode: The browser uses the ...
...whether the stream is seekable (true) or not (false). Seekable streams support random access (for example, local files or HTTP servers that support byte-range requests). The plug-in can set the output parameter type to one of these transmission modes: NP_NORMAL: (Default): The plug-in can process the data progressively as it arrives from the network or file system through a series of calls to NPP_WriteReady and NPP_Write. NP_ASFILEONLY: This plug-in gets full random access to the data using platform-specific file operations. The browser saves stream data to a local file, and, when the stream is complete, delivers the path of the file through a call to NPP_StreamAsFile. NP_ASFILE: This mode is like NP_ASFILEONLY except that data is delivered to the plug-in as it is saved to the file, through a seri...
...the Stop button or indirectly by some action, such as by deleting the instance or initiating higher-priority network operations. NPRES_NETWORK_ERR: The stream failed because of problems with the network, disk I/O error, lack of memory, or some other problem. Finding Out How Much Data the Plug-in Can Accept After a call to NPP_NewStream and before writing data to the plug-in, the browser calls NPP_WriteReady to determine the maximum number of bytes that the plug-in can consume. This function allows the browser to send only as much data to the instance as it can handle at one time, and it helps both the browser and the plug-in to use their resources efficiently. After a call to NPP_NewStream, in which the plug-in requested a normal-mode stream, the browser delivers the data in the stream progressivel...
...And 7 more matches
NPP_NewStream - Archive of obsolete content
Archive › Plugins › Reference › NPP NewStream
t seekable. The browser must copy data in the stream to the local cache to satisfy random access requests made through NPN_RequestRead. stype Out parameter. The plugin should set this value to request a mode for the stream. For more information about each of these values, see Directions in this section. NP_NORMAL (Default): Delivers stream data to the instance in a series of calls to NPP_WriteReady and NPP_Write. NP_ASFILEONLY: Saves stream data to a file in the local cache. NP_ASFILE: File download. Like NP_ASFILEONLY except that data is delivered to the plug-in as it is saved to the file (as in mode NP_NORMAL). NP_SEEK: Stream data randomly accessible by the plug-in as needed, through calls to NPN_RequestRead. Implementation note: some plugins, notably Silverlight, do not set th...
...page instance. A plug-in can also request a stream with the function NPN_GetURL. The browser calls NPP_DestroyStream when the stream completes (either successfully or abnormally). The plug-in can terminate the stream itself by calling NPN_DestroyStream. The parameter stype defines the mode of the stream. Values: NP_NORMAL (Default): Delivers stream data to the instance in a series of calls to NPP_WriteReady and NPP_Write. The plug-in can process the data progressively as it arrives from the network or file system. NP_ASFILEONLY: The browser saves stream data to a file in the local cache. When the stream is complete, the browser calls NPP_StreamAsFile to deliver the path of the file to the plug-in. If the stream comes from a local file, the NPP_Write and NPP_WriteReady functions are not called. NPP_...
...When the stream is complete, the browser calls NPP_StreamAsFile to deliver the path of the file to the plug-in. ...
...equentially out of the stream (as in mode NP_NORMAL) until the first NPN_RequestRead call is made. ...
NPP_Write - Archive of obsolete content
Archive › Plugins › Reference › NPP Write
of the stream. The buffer is allocated by the browser and is deleted after returning from the function, so the plug-in should make a copy of the data it needs to keep. Returns The plug-in should return the number of bytes written (consumed by the instance). If the return value is smaller than the size of the buffer, the browser sends the remaining data to the plug-in through subsequent calls to NPP_WriteReady and NPP_Write. If unsuccessful, the function signals an error by returning a negative value. The browser will destroy the stream by calling NPP_DestroyStream. Description The browser calls the NPP_Write function to deliver the data specified in a previous NPP_WriteReady call to the plug-in. A plug-in must consume at least as many bytes as indicated in the NPP_WriteReady call. After a stream is cr...
... The plug-in can use the offset parameter to track the bytes that are written. This gives you different information depending in the type of stream. ...
... The plug-in can use the offset parameter to track the bytes that are written. This gives you different information depending in the type of stream. ...
...tion depending in the type of stream. ...
NPN_RequestRead - Archive of obsolete content
Archive › Plugins › Reference › NPN RequestRead
Syntax #include <npapi.h> NPError NPN_RequestRead(NPStream* stream, NPByteRange* rangeList); Parameters The function has the following parameters: stream Stream of type NP_SEEK from which to read bytes. ...
...If unsuccessful, the function returns an error code. For possible values, see Error Codes. Description For a seekable stream, the browser sends data only in response to requests by the plug-in. The plug-in calls NPN_RequestRead() to request data from a seekable stream. The plug-in can use this function to make one or more requests for ranges of bytes. These requests result in subsequent calls to NPP_WriteReady() and NPP_Write(). For multiple requests, the function creates a linked list of NPByteRange structures, each of which represents a separate request. If the plug-in requests multiple ranges (either through a list of NPByteRange objects in a single call to NPN_RequestRead(), or multiple calls to NPN_RequestRead()), the browser can write individual ranges in any order, and with any number of NPP_Wri...
...stream data on disk in order to access it randomly). ...
Index - Archive of obsolete content
Archive › Index
o, NPAPI, Plugins, Reference Reloads all of the installed plugins. 3663 NPN_RemoveProperty NPAPI, Plugins Removes a property from the specified NPObject. 3664 NPN_RequestRead API, Gecko, NPAPI, Plugins, Reference Requests a range of bytes from a seekable stream. This initiates a read operation; the actual data is received through subsequent calls to NPP_WriteReady() and NPP_Write(). 3665 NPN_RetainObject NPAPI, Plugins Increments the reference count of the given NPObject. 3666 NPN_SetException NPAPI, Plugins A plugin can call this function to indicate that a call to one of the plugin's NPObjects generated an error. 3667 NPN_SetProperty NPAPI, Plugins Sets the value of a property on the specifie...
...StreamAsFile NPAPI, Plugins Provides a local file name for the data from a stream. 3688 NPP_URLNotify NPAPI, Plugins Notifies the plug-in instance of the completion of a URL request. 3689 NPP_Write NPAPI, Plugins Delivers data to a plug-in instance. (Remark: Hence the name "NPP_Write" is misleading - just think of:"Data_Arrived") 3690 NPP_WriteReady NPAPI, Plugins Determines maximum number of bytes that the plug-in can consume. 3691 NPPrint NPAPI, Plugins Contains information the plug-in needs to print itself in full-page or embedded mode. 3692 NPPrintCallbackStruct NPAPI, Plugins Contains information required by the platformPrint field of the NPEmbedPrint structure during embedded mode pri...
NPAPI plugin reference - Archive of obsolete content
Archive › Plugins › Reference
, free() is used. NPN_ReleaseVariantValue NPN_ReleaseVariantValue() releases the value in the given variant. NPN_ReloadPlugins Reloads all of the installed plugins. NPN_RemoveProperty Removes a property from the specified NPObject. NPN_RequestRead Requests a range of bytes from a seekable stream. This initiates a read operation; the actual data is received through subsequent calls to NPP_WriteReady() and NPP_Write(). NPN_RetainObject Increments the reference count of the given NPObject. NPN_SetException A plugin can call this function to indicate that a call to one of the plugin's NPObjects generated an error. NPN_SetProperty Sets the value of a property on the specified NPObject. NPN_SetValue Implemented by browsers. This call is used to inform the browser of variable information c...
...trolled by the browser. NPP_SetWindow Tells the plug-in when a window is created, moved, sized, or destroyed. NPP_StreamAsFile Provides a local file name for the data from a stream. NPP_URLNotify Notifies the plug-in instance of the completion of a URL request. NPP_Write Delivers data to a plug-in instance. (Remark: Hence the name "NPP_Write" is misleading - just think of:"Data_Arrived") NPP_WriteReady Determines maximum number of bytes that the plug-in can consume. NPPrint Contains information the plug-in needs to print itself in full-page or embedded mode. NPPrintCallbackStruct Contains information required by the platformPrint field of the NPEmbedPrint structure during embedded mode printing on Unix systems. NPPVariable See NPN_SetValue. NPRect Represents a rectangular area of a plu...
Index of archived content - Archive of obsolete content
Archive › Index of archived content
n NPN_Write NPObject NPP NPPVariable NPP_Destroy NPP_DestroyStream NPP_GetValue NPP_HandleEvent NPP_New NPP_NewStream NPP_Print NPP_SetValue NPP_SetWindow NPP_StreamAsFile NPP_URLNotify NPP_Write NPP_WriteReady NPPrint NPPrintCallbackStruct NPRect NPRegion NPSavedData NPSetWindowCallbackStruct NPStream NPString NPUTF8 NPVariant NPVariantType NPWindow NP_GetMIMEDescription NP_GetValue NP_Initialize NP_Port ...
NPN_GetURL - Archive of obsolete content
Archive › Plugins › Reference › NPN GetURL
mailto). The following recommendations about target choice apply to other methods that handle URLs as well. If the target parameter refers to the window or frame containing the current plug-in instance, the instance is destroyed and the plug-in may be unloaded. If target is null, the application creates a new stream and delivers the data to the plug-in instance, through calls to NPP_NewStream(), NPP_WriteReady() and NPP_Write(), and NPP_DestroyStream(). This means that if you want the plug-in to handle a new stream, no matter what the MIME type is, use null. If the application cannot locate the URL and retrieve the data, it does not create a stream for the instance. When the plug-in instance is part of a regular browser window, and it uses a _blank target with a mailto or news URL, another blank window...
NPP_StreamAsFile - Archive of obsolete content
Archive › Plugins › Reference › NPP StreamAsFile
e stream is complete, the browser calls NPP_StreamAsFile to provide the instance with a full path name for a local file for the stream. NPP_StreamAsFile is called for streams whose mode is set to NP_ASFILEONLY or NP_ASFILE only in a previous call to NPP_NewStream. If an error occurs while retrieving the data or writing the file, the file name (fname) is null. See Also NPP_NewStream, NPP_Write, NPP_WriteReady, NPStream, NPP ...
NPStream - Archive of obsolete content
Archive › Plugins › Reference › NPStream
object and passes it to the plug-in in as a parameter to NPP_NewStream or NPN_NewStream. The browser cannot delete the object until after it calls NPP_DestroyStream or the plug-in calls NPN_DestroyStream. Streams produced by the browser: the browser creates the NPStream object and passes it to the plug-in initially as a parameter to NPP_NewStream. All API calls that operate on the stream (such as NPP_WriteReady and NPP_Write) use a pointer to this stream. The browser informs the plug-in when the stream is about to be deleted through NPP_DestroyStream, after which the NPStream object is no longer valid. Streams produced by the plug-in: the browser creates the NPStream object and returns it as an output parameter when the plug-in calls NPP_NewStream. The plug-in must pass a pointer to the NPStream to all ...
NPAPI plug-in side API - Archive of obsolete content
Archive › Plugins › Reference › Plug-in side
and called by the browser. ...
Plug-in Side Plug-in API - Plugins
Plugins › Guide › Plug-in Side Plug-in API
NPP_SetValue Sets information about the plug-in. NPP_SetWindow Tells the plug-in when a window is created, moved, sized, or destroyed. NP_Shutdown Provides global deinitialization for a plug-in. NPP_StreamAsFile Provides a local file name for the data from a stream. NPP_URLNotify Notifies the instance of the completion of a URL request. NPP_Write Delivers data to a plug-in instance. NPP_WriteReady Determines maximum number of bytes that the plug-in can consume. << PreviousNext >> ...
URLs - Plugins
Plugins › Guide › URLs
TP, news, or mailto. The target parameter represents the destination where the URL will be displayed, a window or frame. If target refers to the window or frame containing the plug-in instance, it is destroyed and the plug-in may be unloaded. If the target parameter is set to null, the application creates a new stream and delivers the data to the plug-in instance, through calls to NPP_NewStream, NPP_WriteReady and NPP_Write, and NPP_DestroyStream. In general, if a URL works in the location box of the Navigator, it works as a target for NPN_GetURL, except for the _self target. Make sure that the target matches the URL type sent to it. For example, a null target does not make sense for some URL types (such as mailto). For some recommendations to help you with target parameter choice, see the reference ...
Gecko Plugin API Reference - Plugins
Plugins › Guide
and called by the browser. For an overview of how these two sides of the plug-in API interact, see the How Plug-ins Work and Overview of Plug-in Structure sections in the introduction. NPP_Destroy NPP_DestroyStream NPP_GetValue NP_GetValue NPP_HandleEvent NP_Initialize NPP_New NPP_NewStream NPP_Print NPP_SetValue NPP_SetWindow NP_Shutdown NPP_StreamAsFile NPP_URLNotify NPP_Write NPP_WriteReady Browser Side Plug-in API This chapter describes methods in the plug-in API that are available from the browser. The names of all of these methods begin with NPN_ to indicate that they are implemented by the browser and called by the plug-in. For an overview of how these two sides of the plug-in API interact, see the How Plug-ins Work and Overview of Plug-in Structure sections in the introduc...