2017-03-22 11:13:38 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
|
|
|
/* 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/. */
|
|
|
|
|
|
|
|
#ifndef mozilla_dom_quota_QuotaResults_h
|
|
|
|
#define mozilla_dom_quota_QuotaResults_h
|
|
|
|
|
2020-10-21 13:16:19 +00:00
|
|
|
#include <cstdint>
|
2017-03-22 11:13:38 +00:00
|
|
|
#include "nsIQuotaResults.h"
|
2020-10-21 13:16:19 +00:00
|
|
|
#include "nsISupports.h"
|
|
|
|
#include "nsString.h"
|
2017-03-22 11:13:38 +00:00
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace dom {
|
|
|
|
namespace quota {
|
|
|
|
|
2017-03-22 11:14:04 +00:00
|
|
|
class UsageResult : public nsIQuotaUsageResult {
|
|
|
|
nsCString mOrigin;
|
|
|
|
uint64_t mUsage;
|
|
|
|
bool mPersisted;
|
2018-02-20 13:54:17 +00:00
|
|
|
uint64_t mLastAccessed;
|
2017-03-22 11:14:04 +00:00
|
|
|
|
|
|
|
public:
|
|
|
|
UsageResult(const nsACString& aOrigin, bool aPersisted, uint64_t aUsage,
|
2018-02-20 13:54:17 +00:00
|
|
|
uint64_t aLastAccessed);
|
2017-03-22 11:14:04 +00:00
|
|
|
|
|
|
|
private:
|
2020-02-12 10:25:22 +00:00
|
|
|
virtual ~UsageResult() = default;
|
2017-03-22 11:14:04 +00:00
|
|
|
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
NS_DECL_NSIQUOTAUSAGERESULT
|
|
|
|
};
|
|
|
|
|
2017-03-22 11:13:48 +00:00
|
|
|
class OriginUsageResult : public nsIQuotaOriginUsageResult {
|
2017-03-22 11:13:38 +00:00
|
|
|
uint64_t mUsage;
|
|
|
|
uint64_t mFileUsage;
|
|
|
|
|
|
|
|
public:
|
2019-08-22 20:51:09 +00:00
|
|
|
OriginUsageResult(uint64_t aUsage, uint64_t aFileUsage);
|
2017-03-22 11:13:38 +00:00
|
|
|
|
|
|
|
private:
|
2020-02-12 10:25:22 +00:00
|
|
|
virtual ~OriginUsageResult() = default;
|
2017-03-22 11:13:38 +00:00
|
|
|
|
|
|
|
NS_DECL_ISUPPORTS
|
2017-03-22 11:13:48 +00:00
|
|
|
NS_DECL_NSIQUOTAORIGINUSAGERESULT
|
2017-03-22 11:13:38 +00:00
|
|
|
};
|
|
|
|
|
2019-08-22 20:51:09 +00:00
|
|
|
class EstimateResult : public nsIQuotaEstimateResult {
|
|
|
|
uint64_t mUsage;
|
|
|
|
uint64_t mLimit;
|
|
|
|
|
|
|
|
public:
|
|
|
|
EstimateResult(uint64_t aUsage, uint64_t aLimit);
|
|
|
|
|
|
|
|
private:
|
2020-02-12 10:25:22 +00:00
|
|
|
virtual ~EstimateResult() = default;
|
2019-08-22 20:51:09 +00:00
|
|
|
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
NS_DECL_NSIQUOTAESTIMATERESULT
|
|
|
|
};
|
|
|
|
|
2017-03-22 11:13:38 +00:00
|
|
|
} // namespace quota
|
|
|
|
} // namespace dom
|
|
|
|
} // namespace mozilla
|
|
|
|
|
|
|
|
#endif // mozilla_dom_quota_QuotaResults_h
|