2001-03-29 06:11:48 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-05-21 15:12:37 +04: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/. */
|
2001-03-29 06:11:48 +04:00
|
|
|
|
|
|
|
#ifndef nsPermission_h__
|
|
|
|
#define nsPermission_h__
|
|
|
|
|
|
|
|
#include "nsIPermission.h"
|
2003-03-22 04:24:51 +03:00
|
|
|
#include "nsString.h"
|
2001-03-29 06:11:48 +04:00
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2003-06-18 04:52:59 +04:00
|
|
|
class nsPermission : public nsIPermission
|
2003-03-22 04:24:51 +03:00
|
|
|
{
|
2001-03-29 06:11:48 +04:00
|
|
|
public:
|
|
|
|
// nsISupports
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
NS_DECL_NSIPERMISSION
|
|
|
|
|
2016-09-20 11:35:21 +03:00
|
|
|
static already_AddRefed<nsPermission> Create(nsIPrincipal* aPrincipal,
|
|
|
|
const nsACString &aType,
|
|
|
|
uint32_t aCapability,
|
|
|
|
uint32_t aExpireType,
|
|
|
|
int64_t aExpireTime);
|
|
|
|
|
|
|
|
protected:
|
2015-06-10 19:48:22 +03:00
|
|
|
nsPermission(nsIPrincipal* aPrincipal,
|
2012-08-23 22:37:31 +04:00
|
|
|
const nsACString &aType,
|
2012-08-22 19:56:38 +04:00
|
|
|
uint32_t aCapability,
|
|
|
|
uint32_t aExpireType,
|
|
|
|
int64_t aExpireTime);
|
2009-10-17 01:01:04 +04:00
|
|
|
|
2012-08-23 22:37:31 +04:00
|
|
|
virtual ~nsPermission() {};
|
|
|
|
|
2015-06-10 19:48:22 +03:00
|
|
|
nsCOMPtr<nsIPrincipal> mPrincipal;
|
2003-07-09 04:20:57 +04:00
|
|
|
nsCString mType;
|
2012-08-22 19:56:38 +04:00
|
|
|
uint32_t mCapability;
|
|
|
|
uint32_t mExpireType;
|
|
|
|
int64_t mExpireTime;
|
2001-03-29 06:11:48 +04:00
|
|
|
};
|
|
|
|
|
2003-06-18 04:52:59 +04:00
|
|
|
#endif // nsPermission_h__
|