mozilla

Revision 90516 of NPN_DestroyStream

  • Revision slug: NPN_DestroyStream
  • Revision title: NPN_DestroyStream
  • Revision id: 90516
  • Created:
  • Creator: Mook
  • Is current revision? No
  • Comment this is NPN_DestroyStream, not NPP_DestroyStream

Revision Content

{{ Np-plugin-api() }}

Summary

Closes and deletes a stream.

Syntax

#include <npapi.h>
 
NPError NPN_DestroyStream(NPP     instance, 
                          NPStream* stream, 
                          NPError   reason);

Parameters

The function has the following parameters:

instance
Pointer to current plug-in instance.
stream
Pointer to current stream, initiated by either the browser or the plug-in.
reason
Reason the stream was stopped so the application can give the user appropriate feedback. Values:
  • NPRES_DONE (most common): Stream completed normally; all data was sent by the plug-in to the browser.
  • NPRES_USER_BREAK: Plug-in is terminating the stream due to a user request.
  • NPRES_NETWORK_ERR: Stream failed due to network problems.

Returns

  • If successful, the function returns NPERR_NO_ERROR.
  • If unsuccessful, the plug-in is not loaded and the function returns an error code. For possible values, see Error Codes.

Description

The plug-in calls the NPN_DestroyStream function to close and delete a stream. This stream can be either a stream that the browser created and passed to the plug-in in NPP_NewStream, or a stream created by the plug-in through a call to NPN_NewStream.

See Also

NPP_DestroyStream, NPN_NewStream, NPStream, NPP

Revision Source

<p>
{{ Np-plugin-api() }}
</p>
<h3 name="Summary">Summary</h3>
<p>Closes and deletes a stream.
</p>
<h3 name="Syntax">Syntax</h3>
<pre>#include &lt;npapi.h&gt;
 
NPError NPN_DestroyStream(NPP     instance, 
                          NPStream* stream, 
                          NPError   reason);
</pre>
<h3 name="Parameters">Parameters</h3>
<p>The function has the following parameters:
</p>
<dl><dt>instance
</dt><dd>Pointer to current plug-in instance.
</dd></dl>
<dl><dt>stream
</dt><dd>Pointer to current stream, initiated by either the browser or the plug-in.
</dd></dl>
<dl><dt>reason
</dt><dd>Reason the stream was stopped so the application can give the user appropriate feedback. Values:
<ul><li> <code>NPRES_DONE</code> (most common): Stream completed normally; all data was sent by the plug-in to the browser.
</li><li> <code>NPRES_USER_BREAK</code>: Plug-in is terminating the stream due to a user request.
</li><li> <code>NPRES_NETWORK_ERR</code>: Stream failed due to network problems. </li></ul>
</dd></dl>
<h3 name="Returns">Returns</h3>
<ul><li> If successful, the function returns <code>NPERR_NO_ERROR</code>.
</li><li> If unsuccessful, the plug-in is not loaded and the function returns an error code. For possible values, see <a href="en/NPAPI/Constants#Error_Codes">Error Codes</a>.
</li></ul>
<h3 name="Description">Description</h3>
<p>The plug-in calls the <code>NPN_DestroyStream</code> function to close and delete a stream. This stream can be either a stream that the browser created and passed to the plug-in in <a href="en/NPP_NewStream">NPP_NewStream</a>, or a stream created by the plug-in through a call to <a href="en/NPN_NewStream">NPN_NewStream</a>.
</p>
<h3 name="See_Also">See Also</h3>
<p><a href="en/NPP_DestroyStream">NPP_DestroyStream</a>, <a href="en/NPN_NewStream">NPN_NewStream</a>, <a href="en/NPStream">NPStream</a>, <a href="en/NPP">NPP</a>
</p>
Revert to this revision