gecko-dev/caps/idl/nsIPrincipal.idl
arielb%netscape.com 1b252b2e3b includes updates to codbase matching security checks currently turned off
but in place.  redefined the script security manager in caps and it is
now generating codebase principals.
1999-08-20 09:51:02 +00:00

72 lines
2.5 KiB
Plaintext

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1999 Netscape Communications Corporation. All Rights
* Reserved.
*/
/*defines interfaces for codebase and certificate principals*/
#include "nsISupports.idl"
interface nsIURI;
%{C++
struct JSPrincipals;
%}
[ptr] native JSPrincipals(JSPrincipals);
[uuid(ff9313d0-25e1-11d2-8160-006008119d7a)]
interface nsIPrincipal : nsISupports {
const short PrincipalType_Unknown=0;
const short PrincipalType_CodebaseExact=1;
const short PrincipalType_CodebaseRegex=2;
const short PrincipalType_Certificate=3;
const short PrincipalType_CertificateFingerPrint=4;
const short PrincipalType_CertificateKey=5;
const short PrincipalType_CertificateChain=6;
void ToJSPrincipal(out JSPrincipals jsprin);
void GetType(out short type);
void IsSecure(out boolean result);
void ToString(out string result);
void HashCode(out unsigned long code);
void Equals(in nsIPrincipal other, out boolean result);
};
%{C++
#define NS_CODEBASEPRINCIPAL_PROGID "component://netscape/codebaseprincipal"
#define NS_CODEBASEPRINCIPAL_CLASSNAME "codebaseprincipal"
%}
[uuid(829fe440-25e1-11d2-8160-006008119d7a)]
interface nsICodebasePrincipal : nsIPrincipal {
void GetURLString(out string ppCodeBaseURL);
void GetURL(out nsIURI url);
void IsCodebaseExact(out boolean result);
void IsCodebaseRegex(out boolean result);
};
%{C++
#define NS_CERTIFICATEPRINCIPAL_PROGID "component://netscape/codebaseprincipal"
#define NS_CERTIFICATEPRINCIPAL_CLASSNAME "codebaseprincipal"
%}
[uuid(ebfefcd0-25e1-11d2-8160-006008119d7a)]
interface nsICertificatePrincipal : nsIPrincipal {
void GetPublicKey(out string publicKey);
void GetCompanyName(out string ppCompanyName);
void GetCertificateAuthority(out string ppCertAuthority);
void GetSerialNumber(out string ppSerialNumber);
void GetExpirationDate(out string ppExpDate);
void GetFingerPrint(out string ppFingerPrint);
};