Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Revision 842059 of NPN_SetValueForURL

  • Revision slug: Mozilla/Add-ons/Plugins/Reference/NPN_SetValueForURL
  • Revision title: NPN_SetValueForURL
  • Revision id: 842059
  • Created:
  • Creator: teoli
  • Is current revision? No
  • Comment 61 words added, 5 words removedNPN_SetValueForURL Mozilla/Add-ons/Plugins/Reference/NPN_SetValueForURL

Revision Content

{{ Np-browser-api() }}

Summary

Allows a plugin to change the stored information associated with a URL, in particular its cookies. (While the API theoretically allows the preferred proxy for a given URL to be changed, doing so does not have much meaning given how proxies are configured, and is not supported.)

Syntax

#include <npapi.h>

typedef enum {
  NPNURLVCookie = 501,
  NPNURLVProxy
} NPNURLVariable;

NPError NPN_SetValueForURL(NPP instance,
                           NPNURLVariable variable,
                           const char *url,
                           const char *value,
                           uint32_t len);

Parameters

This function has the following parameters:

instance
Pointer to the current plug-in instance.
variable
Selects the type of information to be changed. The only supported type is NPNURLVCookie.
url
The URL for which to change information.
value
The new associated information for the URL. Note: the value may have internal NULL bytes and may not be NULL-terminated.
len
The length of the value buffer.

Returns

  • If successful, the function returns NPERR_NO_ERROR.
  • If unsuccessful, the function returns an error code. For possible values, see Error Codes.

Description

This entry point is designed to allow plugins to affect the cookies sent by the browser back to the server.

See also

NPN_GetValueForURL, NPN_GetAuthenticationInfo

Revision Source

<p>{{ Np-browser-api() }}</p>
<h3 id="Summary" name="Summary">Summary</h3>
<p>Allows a plugin to change the stored information associated with a URL, in particular its cookies. (While the API theoretically allows the preferred proxy for a given URL to be changed, doing so does not have much meaning given how proxies are configured, and is not supported.)</p>
<h3 id="Syntax" name="Syntax">Syntax</h3>
<pre>#include &lt;npapi.h&gt;

typedef enum {
  NPNURLVCookie = 501,
  NPNURLVProxy
} NPNURLVariable;

NPError NPN_SetValueForURL(NPP instance,
                           NPNURLVariable variable,
                           const char *url,
                           const char *value,
                           uint32_t len);

</pre>
<h3 id="Parameters" name="Parameters">Parameters</h3>
<p>This function has the following parameters:</p>
<dl> <dt>instance</dt> <dd>Pointer to the current plug-in instance.</dd>
</dl>
<dl> <dt>variable</dt> <dd>Selects the type of information to be changed. The only supported type is <strong><span style="font-family: 'Courier New'; ">NPNURLVCookie</span></strong>.</dd>
</dl>
<dl> <dt>url</dt> <dd>The URL for which to change information.</dd>
</dl>
<dl> <dt>value</dt> <dd>The new associated information for the URL. <em>Note: the value may have internal NULL bytes and may not be NULL-terminated.</em></dd>
</dl>
<dl> <dt>len</dt> <dd>The length of the value buffer.</dd>
</dl>
<h3 id="Returns" name="Returns">Returns</h3>
<ul> <li>If successful, the function returns NPERR_NO_ERROR.</li> <li>If unsuccessful, the function returns an error code. For possible values, see <a href="/en/NPAPI/Constants#Error_Codes" title="en/NPAPI/Constants#Error_Codes">Error Codes</a>.</li>
</ul>
<h3 id="Description" name="Description">Description</h3>
<p>This entry point is designed to allow plugins to affect the cookies sent by the browser back to the server.</p>
<p>See also</p>
<p><a href="/en/NPN_GetValueForURL" title="en/NPN_GetValueForURL">NPN_GetValueForURL</a>, <a href="/en/NPN_GetAuthenticationInfo" title="en/NPN_GetAuthenticationInfo">NPN_GetAuthenticationInfo</a></p>
Revert to this revision