MDN may have intermittent access issues April 18 13:00 - April 19 01:00 UTC. See whistlepig.mozilla.org for all notifications.

mozilla

Revision 125791 of NPN_SetValueForURL

  • Revision slug: NPN_SetValueForURL
  • Revision title: NPN_SetValueForURL
  • Revision id: 125791
  • Created:
  • Creator: kbr_google
  • Is current revision? Yes
  • Comment 61 words added, 5 words removed

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