mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 00:01:50 +00:00
Spam caps subtree to replace declarations of IDL-defined interface methods in implementation classes with xpidl-generated NS_DECL_NSIFOO macro.
This commit is contained in:
parent
eda8afb2b6
commit
84982717ce
@ -41,6 +41,7 @@ class nsCCapsManager : public nsICapsManager {
|
||||
public:
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSICAPSMANAGER
|
||||
|
||||
nsPrivilegeManager * thePrivilegeManager;
|
||||
nsPrincipalManager * thePrincipalManager;
|
||||
@ -57,41 +58,12 @@ CreateCodebasePrincipal(const char *codebaseURL, nsIPrincipal** prin);
|
||||
NS_IMETHOD
|
||||
CreateCertificatePrincipal(const unsigned char **certChain, PRUint32 *certChainLengths, PRUint32 noOfCerts, nsIPrincipal** prin);
|
||||
|
||||
NS_IMETHOD
|
||||
GetPermission(nsIPrincipal * prin, nsITarget * target, PRInt16 * privilegeState);
|
||||
|
||||
NS_IMETHOD
|
||||
SetPermission(nsIPrincipal * prin, nsITarget* target, PRInt16 privilegeState);
|
||||
|
||||
NS_IMETHOD
|
||||
AskPermission(nsIPrincipal * prin, nsITarget * target, PRInt16 * privilegeState);
|
||||
|
||||
NS_IMETHOD
|
||||
Initialize(PRBool * result);
|
||||
|
||||
NS_IMETHOD
|
||||
InitializeFrameWalker(nsICapsSecurityCallbacks * aInterface);
|
||||
|
||||
NS_IMETHOD
|
||||
RegisterPrincipal(nsIPrincipal * prin);
|
||||
|
||||
NS_IMETHOD
|
||||
EnablePrivilege(nsIScriptContext * context, const char* targetName, PRInt32 callerDepth, PRBool *result);
|
||||
|
||||
NS_IMETHOD
|
||||
IsPrivilegeEnabled(nsIScriptContext * context, const char* targetName, PRInt32 callerDepth, PRBool *result);
|
||||
|
||||
NS_IMETHOD
|
||||
RevertPrivilege(nsIScriptContext * context, const char* targetName, PRInt32 callerDepth, PRBool *result);
|
||||
|
||||
NS_IMETHOD
|
||||
DisablePrivilege(nsIScriptContext * context, const char* targetName, PRInt32 callerDepth, PRBool *result);
|
||||
|
||||
//NS_IMETHOD
|
||||
//CreateMixedPrincipalArray(void * zig, const char * name, const char* codebase, nsIPrincipalArray * * result);
|
||||
|
||||
NS_IMETHOD
|
||||
IsAllowed(void * annotation, const char * target, PRBool * result);
|
||||
|
||||
static nsCCapsManager *
|
||||
GetSecurityManager();
|
||||
|
@ -29,45 +29,10 @@
|
||||
class nsCertificatePrincipal : public nsICertificatePrincipal {
|
||||
public:
|
||||
|
||||
NS_DEFINE_STATIC_CID_ACCESSOR(NS_CERTIFICATEPRINCIPALMANAGER_CID)
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
NS_IMETHOD
|
||||
GetPublicKey(char ** pk);
|
||||
|
||||
NS_IMETHOD
|
||||
GetCompanyName(char ** cn);
|
||||
|
||||
NS_IMETHOD
|
||||
GetCertificateAuthority(char ** ca);
|
||||
|
||||
NS_IMETHOD
|
||||
GetSerialNumber(char ** sn);
|
||||
|
||||
NS_IMETHOD
|
||||
GetExpirationDate(char ** ed);
|
||||
|
||||
NS_IMETHOD
|
||||
GetFingerPrint(char ** fp);
|
||||
|
||||
NS_IMETHOD
|
||||
ToJSPrincipal(JSPrincipals * * jsprin);
|
||||
|
||||
NS_IMETHOD
|
||||
GetType(PRInt16 * type);
|
||||
|
||||
NS_IMETHOD
|
||||
IsSecure(PRBool * result);
|
||||
|
||||
NS_IMETHOD
|
||||
ToString(char ** result);
|
||||
|
||||
NS_IMETHOD
|
||||
HashCode(PRUint32 * code);
|
||||
|
||||
NS_IMETHOD
|
||||
Equals(nsIPrincipal * other, PRBool * result);
|
||||
NS_DEFINE_STATIC_CID_ACCESSOR(NS_CERTIFICATEPRINCIPALMANAGER_CID)
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIPRINCIPAL
|
||||
NS_DECL_NSICERTIFICATEPRINCIPAL
|
||||
|
||||
nsCertificatePrincipal(PRInt16 type, const char * key);
|
||||
nsCertificatePrincipal(PRInt16 type, const unsigned char ** certChain, PRUint32 * certChainLengths, PRUint32 noOfCerts);
|
||||
|
@ -34,6 +34,8 @@ public:
|
||||
NS_DEFINE_STATIC_CID_ACCESSOR(NS_CODEBASEPRINCIPAL_CID)
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIPRINCIPAL
|
||||
NS_DECL_NSICODEBASEPRINCIPAL
|
||||
|
||||
nsCodebasePrincipal();
|
||||
|
||||
@ -42,36 +44,6 @@ public:
|
||||
|
||||
virtual ~nsCodebasePrincipal(void);
|
||||
|
||||
NS_IMETHOD
|
||||
GetURLString(char ** cburl);
|
||||
|
||||
NS_IMETHOD
|
||||
GetURL(nsIURI * * url);
|
||||
|
||||
NS_IMETHOD
|
||||
IsCodebaseExact(PRBool * result);
|
||||
|
||||
NS_IMETHOD
|
||||
IsCodebaseRegex(PRBool * result);
|
||||
|
||||
NS_IMETHOD
|
||||
ToJSPrincipal(JSPrincipals * * jsprin);
|
||||
|
||||
NS_IMETHOD
|
||||
GetType(PRInt16 * type);
|
||||
|
||||
NS_IMETHOD
|
||||
IsSecure(PRBool * result);
|
||||
|
||||
NS_IMETHOD
|
||||
ToString(char ** result);
|
||||
|
||||
NS_IMETHOD
|
||||
HashCode(PRUint32 * code);
|
||||
|
||||
NS_IMETHOD
|
||||
Equals(nsIPrincipal * other, PRBool * result);
|
||||
|
||||
protected:
|
||||
nsIURI * itsURL;
|
||||
PRInt16 itsType;
|
||||
|
@ -33,6 +33,7 @@ class nsPrincipalArray : public nsIPrincipalArray {
|
||||
public:
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIPRINCIPALARRAY
|
||||
|
||||
nsPrincipalArray(void);
|
||||
nsPrincipalArray(PRUint32 count);
|
||||
@ -42,27 +43,6 @@ Init(PRUint32 count);
|
||||
|
||||
virtual ~nsPrincipalArray();
|
||||
|
||||
NS_IMETHOD
|
||||
ComparePrincipalArray(nsIPrincipalArray * other, PRInt16 * comparisonType);
|
||||
|
||||
NS_IMETHOD
|
||||
IntersectPrincipalArray(nsIPrincipalArray * other , nsIPrincipalArray * * result);
|
||||
|
||||
NS_IMETHOD
|
||||
FreePrincipalArray();
|
||||
|
||||
NS_IMETHOD
|
||||
AddPrincipalArrayElement(nsIPrincipal * principal);
|
||||
|
||||
NS_IMETHOD
|
||||
GetPrincipalArrayElement(PRUint32 index, nsIPrincipal * * result);
|
||||
|
||||
NS_IMETHOD
|
||||
SetPrincipalArrayElement(PRUint32 index, nsIPrincipal * principal);
|
||||
|
||||
NS_IMETHOD
|
||||
GetPrincipalArraySize(PRUint32 * result);
|
||||
|
||||
private:
|
||||
nsVector * itsArray;
|
||||
};
|
||||
|
@ -33,36 +33,19 @@ public:
|
||||
NS_DEFINE_STATIC_CID_ACCESSOR(NS_PRINCIPALMANAGER_CID)
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIPRINCIPALMANAGER
|
||||
|
||||
static nsresult
|
||||
GetPrincipalManager(nsPrincipalManager * * prinMan);
|
||||
|
||||
virtual ~nsPrincipalManager(void);
|
||||
|
||||
NS_IMETHOD
|
||||
CreateCodebasePrincipal(const char *codebaseURL, nsIURI * url, nsIPrincipal * * prin);
|
||||
|
||||
NS_IMETHOD
|
||||
CreateCertificatePrincipal(const unsigned char * * certChain, PRUint32 * certChainLengths, PRUint32 noOfCerts, nsIPrincipal * * prin);
|
||||
|
||||
NS_IMETHOD
|
||||
RegisterPrincipal(nsIPrincipal * prin);
|
||||
|
||||
NS_IMETHOD
|
||||
UnregisterPrincipal(nsIPrincipal * prin, PRBool * result);
|
||||
|
||||
void
|
||||
RegisterSystemPrincipal(nsIPrincipal * principal);
|
||||
|
||||
NS_IMETHOD
|
||||
CanExtendTrust(nsIPrincipalArray * fromPrinArray, nsIPrincipalArray * toPrinArray, PRBool * result);
|
||||
|
||||
NS_IMETHOD
|
||||
NewPrincipalArray(PRUint32 count, nsIPrincipalArray * * result);
|
||||
|
||||
NS_IMETHOD
|
||||
CheckMatchPrincipal(nsIScriptContext * context, nsIPrincipal * principal, PRInt32 callerDepth, PRBool * result);
|
||||
|
||||
static nsIPrincipalArray *
|
||||
GetMyPrincipals(PRInt32 callerDepth);
|
||||
|
||||
|
@ -27,39 +27,7 @@ class nsPrivilege : public nsIPrivilege {
|
||||
public:
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
NS_IMETHOD
|
||||
GetState(PRInt16 * state);
|
||||
|
||||
NS_IMETHOD
|
||||
SetState(PRInt16 state);
|
||||
|
||||
NS_IMETHOD
|
||||
GetDuration(PRInt16 * duration);
|
||||
|
||||
NS_IMETHOD
|
||||
SetDuration(PRInt16 duration);
|
||||
|
||||
NS_IMETHOD
|
||||
SameState(nsIPrivilege * other, PRBool * result);
|
||||
|
||||
NS_IMETHOD
|
||||
SameDuration(nsIPrivilege * other, PRBool * result);
|
||||
|
||||
NS_IMETHOD
|
||||
IsAllowed(PRBool * result);
|
||||
|
||||
NS_IMETHOD
|
||||
IsForbidden(PRBool * result);
|
||||
|
||||
NS_IMETHOD
|
||||
IsBlank(PRBool * result);
|
||||
|
||||
NS_IMETHOD
|
||||
ToString(char * * result);
|
||||
|
||||
NS_IMETHOD
|
||||
Equals(nsIPrivilege * perm, PRBool * res);
|
||||
NS_DECL_NSIPRIVILEGE
|
||||
|
||||
nsPrivilege(PRInt16 state, PRInt16 duration);
|
||||
virtual ~nsPrivilege(void);
|
||||
|
@ -56,6 +56,7 @@ nsHashtable * itsPrinToMacroTargetPrivTable;
|
||||
NS_DEFINE_STATIC_CID_ACCESSOR(NS_PRIVILEGEMANAGER_CID)
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIPRIVILEGEMANAGER
|
||||
|
||||
static nsPrivilegeManager *
|
||||
GetPrivilegeManager();
|
||||
@ -77,9 +78,6 @@ Add(nsIPrivilege * privilege1, nsIPrivilege * privilege2);
|
||||
PRBool
|
||||
IsPrivilegeEnabled(nsITarget *target, PRInt32 callerDepth);
|
||||
|
||||
NS_IMETHOD
|
||||
IsPrivilegeEnabled(nsIScriptContext * context, nsITarget * target, PRInt32 callerDepth, PRBool * result);
|
||||
|
||||
PRBool
|
||||
EnablePrivilege(nsITarget * target, PRInt32 callerDepth);
|
||||
|
||||
@ -89,21 +87,12 @@ EnablePrivilege(nsIScriptContext * context, nsITarget * target, PRInt32 callerDe
|
||||
PRBool
|
||||
EnablePrivilege(nsITarget * target, nsIPrincipal * preferredPrincipal, PRInt32 callerDepth);
|
||||
|
||||
NS_IMETHOD
|
||||
EnablePrivilege(nsIScriptContext * context, nsITarget * target, nsIPrincipal * preferredPrincipal, PRInt32 callerDepth, PRBool * result);
|
||||
|
||||
PRBool
|
||||
RevertPrivilege(nsITarget * target, PRInt32 callerDepth);
|
||||
|
||||
NS_IMETHOD
|
||||
RevertPrivilege(nsIScriptContext * context, nsITarget *target, PRInt32 callerDepth, PRBool * result);
|
||||
|
||||
PRBool
|
||||
DisablePrivilege(nsITarget *target, PRInt32 callerDepth);
|
||||
|
||||
NS_IMETHOD
|
||||
DisablePrivilege(nsIScriptContext * context, nsITarget *target, PRInt32 callerDepth, PRBool * result);
|
||||
|
||||
PRBool
|
||||
EnablePrincipalPrivilegeHelper(nsITarget *target, PRInt32 callerDepth,
|
||||
nsIPrincipal * preferredPrin, void * data,
|
||||
@ -123,12 +112,6 @@ nsPrivilegeTable *
|
||||
EnableScopePrivilegeHelper(nsIScriptContext * context, nsITarget *target, PRInt32 callerDepth, void *data,
|
||||
PRBool helpingSetScopePrivilege, nsIPrincipal * prefPrin);
|
||||
|
||||
NS_IMETHOD
|
||||
AskPermission(nsIPrincipal * useThisPrin, nsITarget* target, void* data, PRBool * result);
|
||||
|
||||
NS_IMETHOD
|
||||
SetPermission(nsIPrincipal * useThisPrin, nsITarget * target, nsIPrivilege * newPrivilege);
|
||||
|
||||
void
|
||||
UpdatePrivilegeTable(nsITarget *target, nsPrivilegeTable * privTable, nsIPrivilege * newPrivilege);
|
||||
|
||||
@ -144,12 +127,6 @@ CheckPrivilegeGranted(nsITarget * target, nsIPrincipal * principal, void *data);
|
||||
PRBool
|
||||
CheckPrivilegeGranted(nsITarget * target, PRInt32 callerDepth, void * data);
|
||||
|
||||
NS_IMETHOD
|
||||
CheckPrivilegeGranted(nsIScriptContext * context, nsITarget * target, PRInt32 callerDepth, void * data, PRBool * result);
|
||||
|
||||
NS_IMETHOD
|
||||
GetPrincipalPrivilege(nsITarget * target, nsIPrincipal * prin, void * data, nsIPrivilege * * result);
|
||||
|
||||
char *
|
||||
CheckPrivilegeEnabled(nsTargetArray * targetArray, PRInt32 callerDepth, void *data);
|
||||
|
||||
@ -165,9 +142,6 @@ GetPrivilegeTableFromStack(PRInt32 callerDepth, PRBool createIfNull);
|
||||
nsPrivilegeTable *
|
||||
GetPrivilegeTableFromStack(nsIScriptContext * context, PRInt32 callerDepth, PRBool createIfNull);
|
||||
|
||||
NS_IMETHODIMP
|
||||
RemovePrincipalsPrivilege(const char * prinName, const char * targetName, PRBool * result);
|
||||
|
||||
void
|
||||
Remove(nsIPrincipal *prin, nsITarget *target);
|
||||
|
||||
|
@ -37,18 +37,11 @@ public:
|
||||
NS_DEFINE_STATIC_CID_ACCESSOR(NS_SCRIPTSECURITYMANAGER_CID)
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSISCRIPTSECURITYMANAGER
|
||||
|
||||
static nsScriptSecurityManager *
|
||||
GetScriptSecurityManager();
|
||||
|
||||
NS_IMETHOD CheckScriptAccess(nsIScriptContext* aContext, void* aObj, const char* aProp, PRBool* aResult);
|
||||
NS_IMETHOD GetSubjectOriginURL(JSContext *aCx, char** aOrigin);
|
||||
NS_IMETHOD GetObjectOriginURL(JSContext *aCx, JSObject *object, char** aOrigin);
|
||||
NS_IMETHOD NewJSPrincipals(nsIURI *aURL, nsString* aName, nsIPrincipal * * aPrin);
|
||||
NS_IMETHOD CheckPermissions(JSContext *aCx, JSObject *aObj, short target, PRBool* aReturn);
|
||||
NS_IMETHOD GetContainerPrincipals(JSContext *aCx, JSObject *aContainer, nsIPrincipal * * result);
|
||||
NS_IMETHOD GetPrincipalsFromStackFrame(JSContext *aCx, JSPrincipals** aPrincipals);
|
||||
NS_IMETHOD CanAccessTarget(JSContext *aCx, PRInt16 target, PRBool* aReturn);
|
||||
private:
|
||||
char * GetCanonicalizedOrigin(JSContext *cx, const char* aUrlString);
|
||||
NS_IMETHOD GetOriginFromSourceURL(nsIURI * origin, char * * result);
|
||||
|
@ -50,6 +50,7 @@ class nsTarget : public nsITarget {
|
||||
public:
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSITARGET
|
||||
|
||||
nsTarget(char *name, nsIPrincipal * prin,
|
||||
PRInt32 risk = JavaSecUI_targetRiskHigh(),
|
||||
@ -84,40 +85,10 @@ public:
|
||||
|
||||
nsIPrivilege * CheckPrivilegeEnabled(nsIPrincipal * p, void * data);
|
||||
|
||||
NS_IMETHOD RegisterTarget(void * context, nsITarget * * target);
|
||||
|
||||
NS_IMETHOD EnablePrivilege(nsIPrincipal * prin, void * data, nsIPrivilege * * priv);
|
||||
|
||||
// virtual nsIPrivilege * EnablePrivilege(nsIPrincipal *prin, void *data);
|
||||
//seems more likely to bleong to nsIPrivilege
|
||||
nsIPrivilege * GetPrincipalPrivilege(nsIPrincipal *prin, void *data);
|
||||
|
||||
NS_IMETHOD GetFlattenedTargetArray(nsTargetArray * * targs);
|
||||
|
||||
NS_IMETHOD GetRisk(char * * risk);
|
||||
|
||||
NS_IMETHOD GetRiskColor(char * * riskColor);
|
||||
|
||||
NS_IMETHOD GetDescription(char * * description);
|
||||
|
||||
NS_IMETHOD GetDetailDescription(char * * detailedDescription);
|
||||
|
||||
NS_IMETHOD GetHelpURL(char * * helpUrl);
|
||||
|
||||
NS_IMETHOD GetDetailedInfo(void *a, char * * dinfo);
|
||||
|
||||
NS_IMETHOD GetPrincipal (nsIPrincipal * * prin);
|
||||
|
||||
NS_IMETHOD GetName(char * * name);
|
||||
|
||||
NS_IMETHOD IsRegistered(PRBool * result);
|
||||
|
||||
NS_IMETHOD Equals(nsITarget * other, PRBool * eq);
|
||||
|
||||
NS_IMETHOD HashCode(PRUint32 * code);
|
||||
|
||||
NS_IMETHOD ToString(char * * result);
|
||||
|
||||
private:
|
||||
|
||||
/* Private Field Accessors */
|
||||
|
Loading…
Reference in New Issue
Block a user