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/. */ 6 7 #ifndef mozilla_dom_quota_QuotaResults_h 8 #define mozilla_dom_quota_QuotaResults_h 9 10 #include "nsIQuotaResults.h" 11 12 namespace mozilla { 13 namespace dom { 14 namespace quota { 15 16 class UsageResult : public nsIQuotaUsageResult { 17 nsCString mOrigin; 18 uint64_t mUsage; 19 bool mPersisted; 20 uint64_t mLastAccessed; 21 22 public: 23 UsageResult(const nsACString& aOrigin, bool aPersisted, uint64_t aUsage, 24 uint64_t aLastAccessed); 25 26 private: 27 virtual ~UsageResult() = default; 28 29 NS_DECL_ISUPPORTS 30 NS_DECL_NSIQUOTAUSAGERESULT 31 }; 32 33 class OriginUsageResult : public nsIQuotaOriginUsageResult { 34 uint64_t mUsage; 35 uint64_t mFileUsage; 36 37 public: 38 OriginUsageResult(uint64_t aUsage, uint64_t aFileUsage); 39 40 private: 41 virtual ~OriginUsageResult() = default; 42 43 NS_DECL_ISUPPORTS 44 NS_DECL_NSIQUOTAORIGINUSAGERESULT 45 }; 46 47 class EstimateResult : public nsIQuotaEstimateResult { 48 uint64_t mUsage; 49 uint64_t mLimit; 50 51 public: 52 EstimateResult(uint64_t aUsage, uint64_t aLimit); 53 54 private: 55 virtual ~EstimateResult() = default; 56 57 NS_DECL_ISUPPORTS 58 NS_DECL_NSIQUOTAESTIMATERESULT 59 }; 60 61 } // namespace quota 62 } // namespace dom 63 } // namespace mozilla 64 65 #endif // mozilla_dom_quota_QuotaResults_h 66