NPAPI:ClearSiteData: Difference between revisions

No edit summary
Line 101: Line 101:
= Current Proposal =
= Current Proposal =


* Last modified: May 27, 2010
* Last modified: Nov 19, 2010
* Author: Julian Reschke (greenbytes), Dan Witte <dwitte@mozilla.com>
* Author: Julian Reschke (greenbytes), Dan Witte <dwitte@mozilla.com>, Bernhard Bauer <bauerb@chromium.org>


The current proposal is to add a new method, providing the new functionality:
The current proposal is to add a new method, providing the new functionality:


<pre>
<pre>
NPError NPN_ClearSiteData(
NPError NPP_ClearSiteData(
  NPP instance,
  PRUint64 flags,        // what type of data to clear
  PRUint64 flags,        // what type of data to clear
  const char* origin,    // limit to origin
  const char* domain,    // limit to domain
  PRUInt64 maxAge        // max. age of information in seconds
  PRUInt64 maxAge        // max. age of information in seconds
);</pre>
);
</pre>


New [https://developer.mozilla.org/en/NPAPI/Constants#Error_Codes NPError codes]:
New [https://developer.mozilla.org/en/NPAPI/Constants#Error_Codes NPError codes]:
<pre>
<pre>
// can't clear by time range
// can't clear by time range
#define NPERR_TIMERANGE_NOT_SUPPORTED (NPERR_BASE + mm)
#define NPERR_TIMERANGE_NOT_SUPPORTED (NPERR_BASE + 14)
// can't clear by domain/site
// can't clear by domain/site
#define NPERR_LIMITBYSITE_NOT_SUPPORTED (NPERR_BASE + nn)
#define NPERR_LIMITBYSITE_NOT_SUPPORTED (NPERR_BASE + 15)
// malformed 'domain' string
// malformed 'domain' string
#define NPERR_MALFORMED_DOMAIN (NPERR_BASE + ll)
#define NPERR_MALFORMED_DOMAIN (NPERR_BASE + 16)
</pre>
</pre>


1

edit