NPN_SetValueForURL

« Gecko Plugin API Reference « Browser Side Plug-in 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