NPP_StreamAsFile

  • Revision slug: NPP_StreamAsFile
  • Revision title: NPP_StreamAsFile
  • Revision id: 190630
  • Created:
  • Creator: Pmash
  • Is current revision? No
  • Comment category

Revision Content

{{template.Npapi()}}

Summary

Provides a local file name for the data from a stream.

Syntax

#include <npapi.h>
 
void NPP_StreamAsFile(NPP         instance,
                      NPStream*   stream,
                      const char* fname);

Parameters

The function has the following parameters:

instance
Pointer to current plug-in instance.
stream
Pointer to current stream.
fname
Pointer to full path to a local file. If an error occurs while retrieving the data or writing the file, fname may be null.

Description

When the 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

Revision Source

<p>
</p><p>
{{template.Npapi()}}
</p>
<h3 name="Summary">Summary</h3>
<p>Provides a local file name for the data from a stream.
</p>
<h3 name="Syntax">Syntax</h3>
<pre>#include &lt;npapi.h&gt;
 
void NPP_StreamAsFile(NPP         instance,
                      NPStream*   stream,
                      const char* fname);
</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.
</dd></dl>
<dl><dt>fname
</dt><dd>Pointer to full path to a local file. If an error occurs while retrieving the data or writing the file, fname may be null.
</dd></dl>
<h3 name="Description">Description</h3>
<p>When the stream is complete, the browser calls <code>NPP_StreamAsFile</code> to provide the instance with a full path name for a local file for the stream. <code>NPP_StreamAsFile</code> is called for streams whose mode is set to <code>NP_ASFILEONLY</code> or <code>NP_ASFILE</code> only in a previous call to <a href="en/NPP_NewStream">NPP_NewStream</a>.
</p><p>If an error occurs while retrieving the data or writing the file, the file name (fname) is null.
</p>
<h3 name="See_Also">See Also</h3>
<p><a href="en/NPP_NewStream">NPP_NewStream</a>, <a href="en/NPP_Write">NPP_Write</a>, <a href="en/NPP_WriteReady">NPP_WriteReady</a>, <a href="en/NPStream">NPStream</a>, <a href="en/NPP">NPP</a>
</p>
Revert to this revision