This interface is implemented by the following components:
|Predefined return values for the testPermission method and for the permission param of the add method|
readonly nsISimpleEnumerator enumerator
Allows enumeration of all stored permissions
void add ( nsIURI uri , char* type , PRUint32 permission )
Add permission information for a given URI and permission type. This operation will cause the type string to be registered if it does not currently exist.
- uri: the uri to add the permission for
- type: a case-sensitive ASCII string, identifying the consumer. Consumers should choose this string to be unique, with respect to other consumers. The number of unique type indentifiers may be limited.
- permission: an integer from 1 to 15, representing the desired action (e.g. allow or deny). The interpretation of this number is up to the consumer, and may represent different actions for different types. Consumers may use one of the enumerated permission actions defined above. 0 is reserved for UNKNOWN_ACTION, and shouldn't be used.
Remove permission information for a given URI and permission type. Note that this method takes a host string, not an nsIURI.
- host: the host to remove the permission for
- type: a case-sensitive ASCII string, identifying the consumer. The type must have been previously registered using the add() method.
PRUint32 testPermission ( nsIURI uri , char* type )
Test whether a website has permission to perform the given action.
- uri: the uri to be tested
- type: a case-sensitive ASCII string, identifying the consumer
Reference documentation is generated from Mozilla's source.