NPP URLNotify

  • Revision slug: NPP_URLNotify
  • Revision title: NPP URLNotify
  • Revision id: 90398
  • Created:
  • Creator: Mgjbot
  • Is current revision? No
  • Comment robot Adding: [[ja:NPP URLNotify]]

Revision Content

{{ Np-plugin-api() }}

Summary

Notifies the instance of the completion of a URL request.

Syntax

#include <npapi.h>
 
void NPP_URLNotify(NPP         instance, 
                   const char* url,
                   NPReason    reason, 
                   void*       notifyData);

Parameters

The function has the following parameters:

instance
Pointer to the current plug-in instance.
url
URL of the NPN_GetURLNotify or NPN_PostURLNotify request.
reason
Reason code for completion of request. Values:
  • NPRES_DONE (most common): Completed normally.
  • NPRES_USER_BREAK: User canceled stream directly by clicking the Stop button or indirectly by some action such as deleting the instance or initiating higher-priority network operations.
  • NPRES_NETWORK_ERR: Stream failed due to problems with network, disk I/O, lack of memory, or other problems.
notifyData
Plug-in-private value for associating a previous NPN_GetURLNotify or NPN_PostURLNotify request with a subsequent NPP_URLNotify call.

Description

The browser calls NPP_URLNotify after the completion of a NPN_GetURLNotify or NPN_PostURLNotify request to inform the plug-in that the request was completed and supply a reason code for the completion.

The most common reason code is NPRES_DONE, indicating simply that the request completed normally. Other possible reason codes are NPRES_USER_BREAK, indicating that the request was halted due to a user action (for example, clicking the Stop button), and NPRES_NETWORK_ERR, indicating that the request could not be completed, perhaps because the URL could not be found.

The parameter notifyData is the plug-in-private value passed as an argument by a previous NPN_GetURLNotify or NPN_PostURLNotify call, and can be used as an identifier for the request.

See Also

NPN_GetURLNotify, NPN_GetURL, NPN_PostURLNotify, NPN_PostURL

{{ languages( { "ja": "ja/NPP_URLNotify" } ) }}

Revision Source

<p>
{{ Np-plugin-api() }}
</p>
<h3 name="Summary">Summary</h3>
<p>Notifies the instance of the completion of a URL request.
</p>
<h3 name="Syntax">Syntax</h3>
<pre>#include &lt;npapi.h&gt;
 
void NPP_URLNotify(NPP         instance, 
                   const char* url,
                   NPReason    reason, 
                   void*       notifyData);
</pre>
<h3 name="Parameters">Parameters</h3>
<p>The function has the following parameters:
</p>
<dl><dt>instance
</dt><dd>Pointer to the current plug-in instance.
</dd></dl>
<dl><dt>url
</dt><dd>URL of the <a href="en/NPN_GetURLNotify">NPN_GetURLNotify</a> or <a href="en/NPN_PostURLNotify">NPN_PostURLNotify</a> request.
</dd></dl>
<dl><dt>reason
</dt><dd>Reason code for completion of request. Values:
<ul><li> NPRES_DONE (most common): Completed normally.
</li><li> NPRES_USER_BREAK: User canceled stream directly by clicking the Stop button or indirectly by some action such as deleting the instance or initiating higher-priority network operations.
</li><li> NPRES_NETWORK_ERR: Stream failed due to problems with network, disk I/O, lack of memory, or other problems. </li></ul>
</dd></dl>
<dl><dt>notifyData
</dt><dd>Plug-in-private value for associating a previous <a href="en/NPN_GetURLNotify">NPN_GetURLNotify</a> or <a href="en/NPN_PostURLNotify">NPN_PostURLNotify</a> request with a subsequent <code>NPP_URLNotify</code> call.
</dd></dl>
<h3 name="Description">Description</h3>
<p>The browser calls <code>NPP_URLNotify</code> after the completion of a <a href="en/NPN_GetURLNotify">NPN_GetURLNotify</a> or <a href="en/NPN_PostURLNotify">NPN_PostURLNotify</a> request to inform the plug-in that the request was completed and supply a reason code for the completion.
</p><p>The most common reason code is NPRES_DONE, indicating simply that the request completed normally. Other possible reason codes are NPRES_USER_BREAK, indicating that the request was halted due to a user action (for example, clicking the Stop button), and NPRES_NETWORK_ERR, indicating that the request could not be completed, perhaps because the URL could not be found.
</p><p>The parameter notifyData is the plug-in-private value passed as an argument by a previous <a href="en/NPN_GetURLNotify">NPN_GetURLNotify</a> or <a href="en/NPN_PostURLNotify">NPN_PostURLNotify</a> call, and can be used as an identifier for the request.
</p>
<h3 name="See_Also">See Also</h3>
<p><a href="en/NPN_GetURLNotify">NPN_GetURLNotify</a>, <a href="en/NPN_GetURL">NPN_GetURL</a>, <a href="en/NPN_PostURLNotify">NPN_PostURLNotify</a>, <a href="en/NPN_PostURL">NPN_PostURL</a>
</p>{{ languages( { "ja": "ja/NPP_URLNotify" } ) }}
Revert to this revision