toolkit/components/diskspacewatcher/DiskSpaceWatcher.h
author Phil Ringnalda <philringnalda@gmail.com>
Sat, 13 Sep 2014 09:59:06 -0700
changeset 205205 d070787de8f7b56e32bf5800b30f143c4d02d474
parent 131516 1683f7d9f105bb0a5e922294b3951b4df9c3017b
child 234863 ac4464790ec4896a5188fa50cfc69ae0ffeddc08
permissions -rw-r--r--
Merge b-i to m-c

/* 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 __DISKSPACEWATCHER_H__

#include "nsIDiskSpaceWatcher.h"
#include "nsIObserver.h"
#include "nsCOMPtr.h"

class DiskSpaceWatcher MOZ_FINAL : public nsIDiskSpaceWatcher,
                                   public nsIObserver
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIDISKSPACEWATCHER
  NS_DECL_NSIOBSERVER

  static already_AddRefed<DiskSpaceWatcher>
  FactoryCreate();

  static void UpdateState(bool aIsDiskFull, uint64_t aFreeSpace);

private:
  DiskSpaceWatcher();
  ~DiskSpaceWatcher();

  static uint64_t sFreeSpace;
  static bool     sIsDiskFull;
};

#endif // __DISKSPACEWATCHER_H__