gecko-dev/caps/idl/nsIPrivilege.idl

46 строки
1.8 KiB
Plaintext

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/*
* 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.
*/
/*describes the state and duration of privileges*/
#include "nsISupports.idl"
[uuid(0bbbb636-3e11-11d3-ba10-0060b0f199a2)]
interface nsIPrivilege : nsISupports
{
const short PrivilegeState_Blank = 0;
const short PrivilegeState_Forbidden = 1;
const short PrivilegeState_Allowed = 2;
const short PrivilegeState_NumberOfPrivileges = 3;
const short PrivilegeDuration_Blank = 0;
const short PrivilegeDuration_Scope = 1;
const short PrivilegeDuration_Session = 2;
const short PrivilegeDuration_Forever = 3;
const short PrivilegeDuration_NumberOfDurations = 4;
void GetState(out short state);
void SetState(in short state);
void GetDuration(out short duration);
void SetDuration(in short duration);
void SameState(in nsIPrivilege other, out boolean res);
void SameDuration(in nsIPrivilege other, out boolean res);
void IsAllowed(out boolean result);
void IsForbidden(out boolean result);
void IsBlank(out boolean result);
void ToString(out string result);
void Equals(in nsIPrivilege priv, out boolean res);
};