Fix to the caps security module. I removed the nsPrincipal struct, from now

on you can access principals by their xpcomed interface nsIPrincipal.


git-svn-id: svn://10.0.0.236/trunk@40961 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
arielb%netscape.com
1999-07-24 03:58:23 +00:00
parent 383df455ac
commit 35dc473dd3
43 changed files with 2424 additions and 4401 deletions

View File

@@ -16,48 +16,46 @@
* Reserved.
*/
#ifndef nsCodebasePrincipal_h___
#define nsCodebasePrincipal_h___
#ifndef _NS_CODEBASE_PRINCIPAL_H_
#define _NS_CODEBASE_PRINCIPAL_H_
#include "nsICodebasePrincipal.h"
#include "nsPrincipal.h"
#include "nsIPrincipal.h"
class nsCodebasePrincipal : public nsICodebasePrincipal {
public:
////////////////////////////////////////////////////////////////////////////
// from nsISupports:
NS_DECL_ISUPPORTS
NS_DECL_ISUPPORTS
////////////////////////////////////////////////////////////////////////////
// from nsIPrincipal:
NS_IMETHOD
GetURL(char ** cburl);
NS_IMETHOD
IsTrusted(const char* scope, PRBool *pbIsTrusted);
NS_IMETHOD
IsCodebaseExact(PRBool * result);
///////////////////////////////////////////////////////////////////////////
// from nsICodebasePrincipal:
NS_IMETHOD
IsCodebaseRegex(PRBool * result);
/**
* Returns the codebase URL of the principal.
*
* @param result - the resulting codebase URL
*/
NS_IMETHOD
GetURL(char **ppCodeBaseURL);
NS_IMETHOD
GetType(PRInt16 * type);
////////////////////////////////////////////////////////////////////////////
// from nsCCodebasePrincipal:
NS_IMETHOD
IsSecure(PRBool * result);
nsCodebasePrincipal(const char *codebaseURL, nsresult *result);
nsCodebasePrincipal(nsPrincipal *pNSPrincipal);
NS_IMETHOD
ToString(char ** result);
virtual ~nsCodebasePrincipal(void);
nsPrincipal *GetPeer(void);
NS_IMETHOD
HashCode(PRUint32 * code);
NS_IMETHOD
Equals(nsIPrincipal * other, PRBool * result);
nsCodebasePrincipal(PRInt16 * type, const char *codebaseURL);
virtual ~nsCodebasePrincipal(void);
protected:
nsPrincipal *m_pNSPrincipal;
const char * codeBaseURL;
PRInt16 * itsType;
};
#endif // nsCCodebasePrincipal_h___
#endif // _NS_CODEBASE_PRINCIPAL_H_