michael@0: /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- michael@0: * michael@0: * This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "nsISupports.idl" michael@0: michael@0: [ptr] native nsAXPCNativeCallContextPtr(nsAXPCNativeCallContext); michael@0: michael@0: %{ C++ michael@0: #include "jspubtd.h" michael@0: michael@0: class nsAXPCNativeCallContext; michael@0: %} michael@0: michael@0: interface nsIClassInfo; michael@0: michael@0: [ptr] native JSContextPtr(JSContext); michael@0: [ptr] native JSObjectPtr(JSObject); michael@0: [ptr] native JSStackFramePtr(JSStackFrame); michael@0: michael@0: [uuid(d4d21714-116b-4851-a785-098c5dfea523)] michael@0: interface nsIXPCSecurityManager : nsISupports michael@0: { michael@0: /** michael@0: * For each of these hooks returning NS_OK means 'let the action continue'. michael@0: * Returning an error code means 'veto the action'. XPConnect will return michael@0: * false to the js engine if the action is vetoed. The implementor of this michael@0: * interface is responsible for setting a JS exception into the JSContext michael@0: * if that is appropriate. michael@0: */ michael@0: michael@0: void CanCreateWrapper(in JSContextPtr aJSContext, michael@0: in nsIIDRef aIID, michael@0: in nsISupports aObj, michael@0: in nsIClassInfo aClassInfo); michael@0: michael@0: void CanCreateInstance(in JSContextPtr aJSContext, michael@0: in nsCIDRef aCID); michael@0: michael@0: void CanGetService(in JSContextPtr aJSContext, michael@0: in nsCIDRef aCID); michael@0: };