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 125782 of NPN_GetValueForURL

  • Revision slug: NPN_GetValueForURL
  • Revision title: NPN_GetValueForURL
  • Revision id: 125782
  • Created:
  • Creator: kbr_google
  • Is current revision? No
  • Comment 1 words added, 1 words removed

Revision Content

{{ Np-browser-api() }}

Summary

Provides information to a plugin which is associated with a given URL, for example the cookies or preferred proxy.

Syntax

#include <npapi.h>

typedef enum {
  NPNURLVCookie = 501,
  NPNURLVProxy
} NPNURLVariable;

NPError NPN_GetValueForURL(NPP instance,
                           NPNURLVariable variable,
                           const char *url,
                           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 retrieved (NPNURLVCookie or NPNURLVProxy)
url
The URL for which to fetch information.
value
Out parameter. The browser passes back the requested information. If the function succeeds, the result buffer will be allocated with NPN_MemAlloc; the plugin is responsible for freeing the buffer. Note: the value may have internal NULL bytes and may not be NULL-terminated.
len
Out parameter. The length of the returned 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 which implement their own HTTP stacks to form requests to the web server in the same way the browser does.

See also

NPN_SetValueForURL, NPN_GetAuthenticationInfo

Revision Source

<p>{{ Np-browser-api() }}</p>
<h3 name="Summary">Summary</h3>
<p>Provides information to a plugin which is associated with a given URL, for example the cookies or preferred proxy.</p>
<h3 name="Syntax">Syntax</h3>
<pre>#include &lt;npapi.h&gt;

typedef enum {
  NPNURLVCookie = 501,
  NPNURLVProxy
} NPNURLVariable;

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

</pre>
<h3 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 retrieved (<code>NPNURLVCookie </code>or <code>NPNURLVProxy</code>)</dd>
</dl>
<dl> <dt>url</dt> <dd>The URL for which to fetch information.</dd>
</dl>
<dl> <dt>value</dt> <dd>Out parameter. The browser passes back the requested information. If the function succeeds, the result buffer will be allocated with NPN_MemAlloc; the plugin is responsible for freeing the buffer. <em>Note: the value may have internal NULL bytes and may not be NULL-terminated.</em></dd>
</dl>
<dl> <dt>len</dt> <dd>Out parameter. The length of the returned value buffer.</dd>
</dl>
<h3 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 name="Description">Description</h3>
<p>This entry point is designed to allow plugins which implement their own HTTP stacks to form requests to the web server in the same way the browser does.</p>
<p>See also</p>
<p><a href="/en/NPN_SetValueForURL" title="en/NPN_SetValueForURL">NPN_SetValueForURL</a>, <a href="/en/NPN_GetAuthenticationInfo" title="en/NPN_GetAuthenticationInfo">NPN_GetAuthenticationInfo</a></p>
Revert to this revision