Changes

Jump to: navigation, search

NPAPI:ClearSiteData

471 bytes added, 20:55, 6 January 2011
Specification
= Specification =
 
== Definition of domain ==
 
The return value of NPP_GetSitesWithData and the 'site' argument to NPP_ClearSiteData must be hostnames only (not complete URIs or IRIs). For ASCII domains, they must be lowercase; in the case of internationalized domains, they must be NFKC-encoded (normalized) UTF-8. No other encoding is allowed. IP address literals must be enclosed in square brackets '[]'. This is in accordance with RFC 3987, Internationalized Resource Identifiers (IRIs).
== Discovering Data ==
</pre>
This function returns a <code>NULL</code>-terminated list of sites with data. Each site string is a domain per the as specified above under 'Definition of domain portion of the URI specification but with a requirement for NFKC-normalized UTF-8 encoding. No other encoding is allowed'. Memory for the array and the site strings must be allocated with <code>NPN_MemAlloc</code> and the browser will be responsible for freeing the memory with <code>NPN_MemFree</code>.
== Clearing Data ==
* The <code>site</code> argument is interpreted as follows:
** If <code>NULL</code>, all site-specific data and more generic data on browsing history (for instance, number of sites visited) should be cleared.
** If <code>!NULL</code>, argument is a site string from the discovery API (an exact copy or the original). The browser is responsible for allocating and freeing the memory used for this argument. The plugin must copy the string in order to retain it outside the scope of the call. See above under 'Definition of hostname' for the required form of the domain string.
* The <code>flags</code> argument is a bit mask representing the type(s) of data to clear.
<pre>
148
edits

Navigation menu