Public Member Functions

nsICookieService Interface Reference

nsICookieService More...

import "nsICookieService.idl";

List of all members.

Public Member Functions

string getCookieString (in nsIURI aURI, in nsIChannel aChannel)
string getCookieStringFromHttp (in nsIURI aURI, in nsIURI aFirstURI, in nsIChannel aChannel)
void setCookieString (in nsIURI aURI, in nsIPrompt aPrompt, in string aCookie, in nsIChannel aChannel)
void setCookieStringFromHttp (in nsIURI aURI, in nsIURI aFirstURI, in nsIPrompt aPrompt, in string aCookie, in string aServerTime, in nsIChannel aChannel)

Detailed Description

nsICookieService

Provides methods for setting and getting cookies in the context of a page load. See nsICookieManager for methods to manipulate the cookie database directly. This separation of interface is mainly historical.

This service broadcasts the following notifications when the cookie list is changed, or a cookie is rejected:

topic : "cookie-changed" broadcast whenever the cookie list changes in some way. see explanation of data strings below. subject: see below. data : "deleted" a cookie was deleted. the subject is an nsICookie2 representing the deleted cookie. "added" a cookie was added. the subject is an nsICookie2 representing the added cookie. "changed" a cookie was changed. the subject is an nsICookie2 representing the new cookie. (note that host, path, and name are invariant for a given cookie; other parameters may change.) "batch-deleted" a batch of cookies was deleted (for instance, as part of a purging operation). the subject is an nsIArray of nsICookie2's representing the deleted cookies. "cleared" the entire cookie list was cleared. the subject is null. "reload" the entire cookie list should be reloaded. the subject is null.

topic : "cookie-rejected" broadcast whenever a cookie was rejected from being set as a result of user prefs. subject: an nsIURI interface pointer representing the URI that attempted to set the cookie. data : none.


Member Function Documentation

string nsICookieService::getCookieString ( in nsIURI  aURI,
in nsIChannel  aChannel 
)
string nsICookieService::getCookieStringFromHttp ( in nsIURI  aURI,
in nsIURI  aFirstURI,
in nsIChannel  aChannel 
)
void nsICookieService::setCookieString ( in nsIURI  aURI,
in nsIPrompt  aPrompt,
in string  aCookie,
in nsIChannel  aChannel 
)
void nsICookieService::setCookieStringFromHttp ( in nsIURI  aURI,
in nsIURI  aFirstURI,
in nsIPrompt  aPrompt,
in string  aCookie,
in string  aServerTime,
in nsIChannel  aChannel 
)

The documentation for this interface was generated from the following file: