nsIXPCSecurityManager

IID:31431440-f1ce-11d2-985a-006008962422
Inherits From:nsISupports

Constants

These flags are used when calling nsIXPConnect::SetSecurityManager
PRUint32 HOOK_CREATE_WRAPPER = 1
PRUint32 HOOK_CREATE_INSTANCE = 2
PRUint32 HOOK_GET_SERVICE = 4
PRUint32 HOOK_CALL_METHOD = 8
PRUint32 HOOK_GET_PROPERTY = 16
PRUint32 HOOK_SET_PROPERTY = 32
PRUint32 HOOK_ALL = 63
PRUint32 ACCESS_CALL_METHOD = 0
PRUint32 ACCESS_GET_PROPERTY = 1
PRUint32 ACCESS_SET_PROPERTY = 2

Methods

void CanAccess ( PRUint32 action , nsIXPCNativeCallContext callContext , JSContextPtr* JSContext , JSObjectPtr* JSObject , nsISupports obj , nsIClassInfo classInfo , JSVal name , inout voidPtr* policy ) void CanCreateInstance ( JSContextPtr* JSContext , nsCIDRef CID ) void CanCreateWrapper ( JSContextPtr* JSContext , nsIIDRef IID , nsISupports obj , nsIClassInfo classInfo , inout voidPtr* policy ) void CanGetService ( JSContextPtr* JSContext , nsCIDRef CID )

void CanAccess ( PRUint32 action , nsIXPCNativeCallContext callContext , JSContextPtr* JSContext , JSObjectPtr* JSObject , nsISupports obj , nsIClassInfo classInfo , JSVal name , inout voidPtr* policy )

Arguments:
action
callContext
JSContext
JSObject
obj
classInfo
name
policy

void CanCreateInstance ( JSContextPtr* JSContext , nsCIDRef CID )

Arguments:
JSContext
CID

void CanCreateWrapper ( JSContextPtr* JSContext , nsIIDRef IID , nsISupports obj , nsIClassInfo classInfo , inout voidPtr* policy )

For each of these hooks returning NS_OK means 'let the action continue'. Returning an error code means 'veto the action'. XPConnect will return JS_FALSE to the js engine if the action is vetoed. The implementor of this interface is responsible for setting a JS exception into the JSContext if that is appropriate.

Arguments:
JSContext
IID
obj
classInfo
policy

void CanGetService ( JSContextPtr* JSContext , nsCIDRef CID )

Arguments:
JSContext
CID

References

This interface is passed as an argument to the following methods:

nsIXPConnect.getDefaultSecurityManager, nsIXPConnect.getSecurityManagerForJSContext, nsIXPConnect.setDefaultSecurityManager, nsIXPConnect.setSecurityManagerForJSContext

Reference documentation is generated from Mozilla's source.

Add a note User Contributed Notes
No comments available

Copyright © 1999 - 2005 XULPlanet.com