2001-09-20 00:02:59 +00:00
|
|
|
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
1999-06-04 05:46:48 +00:00
|
|
|
*
|
2012-05-21 11:12:37 +00:00
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
1999-06-04 05:46:48 +00:00
|
|
|
|
|
|
|
#include "nsISupports.idl"
|
|
|
|
|
2008-01-15 15:50:57 +00:00
|
|
|
[ptr] native nsAXPCNativeCallContextPtr(nsAXPCNativeCallContext);
|
|
|
|
|
2001-07-16 02:40:48 +00:00
|
|
|
%{ C++
|
|
|
|
#include "jspubtd.h"
|
2008-01-15 15:50:57 +00:00
|
|
|
|
|
|
|
class nsAXPCNativeCallContext;
|
2001-07-16 02:40:48 +00:00
|
|
|
%}
|
|
|
|
|
|
|
|
interface nsIClassInfo;
|
|
|
|
|
|
|
|
[ptr] native JSContextPtr(JSContext);
|
|
|
|
[ptr] native JSObjectPtr(JSObject);
|
2008-10-22 20:15:22 +00:00
|
|
|
[ptr] native JSStackFramePtr(JSStackFrame);
|
1999-06-04 05:46:48 +00:00
|
|
|
|
|
|
|
[uuid(31431440-f1ce-11d2-985a-006008962422)]
|
|
|
|
interface nsIXPCSecurityManager : nsISupports
|
|
|
|
{
|
1999-08-22 23:56:42 +00:00
|
|
|
/**
|
1999-06-04 05:46:48 +00:00
|
|
|
* These flags are used when calling nsIXPConnect::SetSecurityManager
|
|
|
|
*/
|
1999-08-22 23:56:42 +00:00
|
|
|
|
2012-08-22 15:56:38 +00:00
|
|
|
const uint32_t HOOK_CREATE_WRAPPER = 1 << 0;
|
|
|
|
const uint32_t HOOK_CREATE_INSTANCE = 1 << 1;
|
|
|
|
const uint32_t HOOK_GET_SERVICE = 1 << 2;
|
|
|
|
const uint32_t HOOK_CALL_METHOD = 1 << 3;
|
|
|
|
const uint32_t HOOK_GET_PROPERTY = 1 << 4;
|
|
|
|
const uint32_t HOOK_SET_PROPERTY = 1 << 5;
|
1999-06-04 05:46:48 +00:00
|
|
|
|
2012-08-22 15:56:38 +00:00
|
|
|
const uint32_t HOOK_ALL = HOOK_CREATE_WRAPPER |
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 17:42:36 +00:00
|
|
|
HOOK_CREATE_INSTANCE |
|
|
|
|
HOOK_GET_SERVICE |
|
|
|
|
HOOK_CALL_METHOD |
|
|
|
|
HOOK_GET_PROPERTY |
|
|
|
|
HOOK_SET_PROPERTY ;
|
1999-06-04 05:46:48 +00:00
|
|
|
|
1999-08-22 23:56:42 +00:00
|
|
|
/**
|
1999-06-04 05:46:48 +00:00
|
|
|
* For each of these hooks returning NS_OK means 'let the action continue'.
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 17:42:36 +00:00
|
|
|
* 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
|
1999-08-22 23:56:42 +00:00
|
|
|
* interface is responsible for setting a JS exception into the JSContext
|
1999-06-04 05:46:48 +00:00
|
|
|
* if that is appropriate.
|
|
|
|
*/
|
1999-08-22 23:56:42 +00:00
|
|
|
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 17:42:36 +00:00
|
|
|
void CanCreateWrapper(in JSContextPtr aJSContext,
|
1999-08-22 23:56:42 +00:00
|
|
|
in nsIIDRef aIID,
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 17:42:36 +00:00
|
|
|
in nsISupports aObj,
|
|
|
|
in nsIClassInfo aClassInfo,
|
|
|
|
inout voidPtr aPolicy);
|
1999-06-04 05:46:48 +00:00
|
|
|
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 17:42:36 +00:00
|
|
|
void CanCreateInstance(in JSContextPtr aJSContext,
|
1999-06-04 05:46:48 +00:00
|
|
|
in nsCIDRef aCID);
|
|
|
|
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 17:42:36 +00:00
|
|
|
void CanGetService(in JSContextPtr aJSContext,
|
1999-06-04 05:46:48 +00:00
|
|
|
in nsCIDRef aCID);
|
|
|
|
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 17:42:36 +00:00
|
|
|
/*
|
|
|
|
* Used for aAction below
|
|
|
|
*/
|
2012-08-22 15:56:38 +00:00
|
|
|
const uint32_t ACCESS_CALL_METHOD = 0;
|
|
|
|
const uint32_t ACCESS_GET_PROPERTY = 1;
|
|
|
|
const uint32_t ACCESS_SET_PROPERTY = 2;
|
1999-06-04 05:46:48 +00:00
|
|
|
|
2012-08-22 15:56:38 +00:00
|
|
|
void CanAccess(in uint32_t aAction,
|
2008-01-15 15:50:57 +00:00
|
|
|
in nsAXPCNativeCallContextPtr aCallContext,
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 17:42:36 +00:00
|
|
|
in JSContextPtr aJSContext,
|
|
|
|
in JSObjectPtr aJSObject,
|
|
|
|
in nsISupports aObj,
|
|
|
|
in nsIClassInfo aClassInfo,
|
2010-07-15 06:19:36 +00:00
|
|
|
in jsid aName,
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 17:42:36 +00:00
|
|
|
inout voidPtr aPolicy);
|
1999-06-04 05:46:48 +00:00
|
|
|
};
|