toolkit/components/diskspacewatcher/DiskSpaceWatcher.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/toolkit/components/diskspacewatcher/DiskSpaceWatcher.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,32 @@
     1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.6 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.7 +
     1.8 +#ifndef __DISKSPACEWATCHER_H__
     1.9 +
    1.10 +#include "nsIDiskSpaceWatcher.h"
    1.11 +#include "nsIObserver.h"
    1.12 +#include "nsCOMPtr.h"
    1.13 +
    1.14 +class DiskSpaceWatcher MOZ_FINAL : public nsIDiskSpaceWatcher,
    1.15 +                                   public nsIObserver
    1.16 +{
    1.17 +public:
    1.18 +  NS_DECL_ISUPPORTS
    1.19 +  NS_DECL_NSIDISKSPACEWATCHER
    1.20 +  NS_DECL_NSIOBSERVER
    1.21 +
    1.22 +  static already_AddRefed<DiskSpaceWatcher>
    1.23 +  FactoryCreate();
    1.24 +
    1.25 +  static void UpdateState(bool aIsDiskFull, uint64_t aFreeSpace);
    1.26 +
    1.27 +private:
    1.28 +  DiskSpaceWatcher();
    1.29 +  ~DiskSpaceWatcher();
    1.30 +
    1.31 +  static uint64_t sFreeSpace;
    1.32 +  static bool     sIsDiskFull;
    1.33 +};
    1.34 +
    1.35 +#endif // __DISKSPACEWATCHER_H__

mercurial