Backed out changeset 2450366cf7ca (bug 1891629) for causing win msix mochitest failures
[gecko.git] / dom / quota / QuotaResults.h
blob94e764475d3044a38724e1bea79063d4eaf94d01
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef mozilla_dom_quota_QuotaResults_h
8 #define mozilla_dom_quota_QuotaResults_h
10 #include <cstdint>
11 #include "mozilla/dom/quota/CommonMetadata.h"
12 #include "mozilla/dom/quota/UsageInfo.h"
13 #include "nsIQuotaResults.h"
14 #include "nsISupports.h"
15 #include "nsString.h"
17 namespace mozilla::dom::quota {
19 class FullOriginMetadataResult : public nsIQuotaFullOriginMetadataResult {
20 const FullOriginMetadata mFullOriginMetadata;
22 public:
23 explicit FullOriginMetadataResult(
24 const FullOriginMetadata& aFullOriginMetadata);
26 private:
27 virtual ~FullOriginMetadataResult() = default;
29 NS_DECL_ISUPPORTS
30 NS_DECL_NSIQUOTAFULLORIGINMETADATARESULT
33 class UsageResult : public nsIQuotaUsageResult {
34 nsCString mOrigin;
35 uint64_t mUsage;
36 bool mPersisted;
37 uint64_t mLastAccessed;
39 public:
40 UsageResult(const nsACString& aOrigin, bool aPersisted, uint64_t aUsage,
41 uint64_t aLastAccessed);
43 private:
44 virtual ~UsageResult() = default;
46 NS_DECL_ISUPPORTS
47 NS_DECL_NSIQUOTAUSAGERESULT
50 class OriginUsageResult : public nsIQuotaOriginUsageResult {
51 UsageInfo mUsageInfo;
53 public:
54 explicit OriginUsageResult(UsageInfo aUsageInfo);
56 private:
57 virtual ~OriginUsageResult() = default;
59 NS_DECL_ISUPPORTS
60 NS_DECL_NSIQUOTAORIGINUSAGERESULT
63 class EstimateResult : public nsIQuotaEstimateResult {
64 uint64_t mUsage;
65 uint64_t mLimit;
67 public:
68 EstimateResult(uint64_t aUsage, uint64_t aLimit);
70 private:
71 virtual ~EstimateResult() = default;
73 NS_DECL_ISUPPORTS
74 NS_DECL_NSIQUOTAESTIMATERESULT
77 } // namespace mozilla::dom::quota
79 #endif // mozilla_dom_quota_QuotaResults_h