dom/filesystem/RemoveTask.h

Wed, 31 Dec 2014 06:55:50 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:55:50 +0100
changeset 2
7e26c7da4463
permissions
-rw-r--r--

Added tag UPSTREAM_283F7C6 for changeset ca08bd8f51b2

     1 /* -*- Mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 40 -*- */
     2 /* vim: set ts=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 file,
     5  * You can obtain one at http://mozilla.org/MPL/2.0/. */
     7 #ifndef mozilla_dom_RemoveTask_h
     8 #define mozilla_dom_RemoveTask_h
    10 #include "mozilla/dom/FileSystemTaskBase.h"
    11 #include "nsAutoPtr.h"
    13 namespace mozilla {
    14 namespace dom {
    16 class Promise;
    18 class RemoveTask MOZ_FINAL
    19   : public FileSystemTaskBase
    20 {
    21 public:
    22   RemoveTask(FileSystemBase* aFileSystem,
    23              const nsAString& aDirPath,
    24              nsIDOMFile* aTargetFile,
    25              const nsAString& aTargetPath,
    26              bool aRecursive);
    27   RemoveTask(FileSystemBase* aFileSystem,
    28              const FileSystemRemoveParams& aParam,
    29              FileSystemRequestParent* aParent);
    31   virtual
    32   ~RemoveTask();
    34   already_AddRefed<Promise>
    35   GetPromise();
    37   virtual void
    38   GetPermissionAccessType(nsCString& aAccess) const MOZ_OVERRIDE;
    40 protected:
    41   virtual FileSystemParams
    42   GetRequestParams(const nsString& aFileSystem) const MOZ_OVERRIDE;
    44   virtual FileSystemResponseValue
    45   GetSuccessRequestResult() const MOZ_OVERRIDE;
    47   virtual void
    48   SetSuccessRequestResult(const FileSystemResponseValue& aValue) MOZ_OVERRIDE;
    50   virtual nsresult
    51   Work() MOZ_OVERRIDE;
    53   virtual void
    54   HandlerCallback() MOZ_OVERRIDE;
    56 private:
    57   nsRefPtr<Promise> mPromise;
    58   nsString mDirRealPath;
    59   nsCOMPtr<nsIDOMFile> mTargetFile;
    60   nsString mTargetRealPath;
    61   bool mRecursive;
    62   bool mReturnValue;
    63 };
    65 } // namespace dom
    66 } // namespace mozilla
    68 #endif // mozilla_dom_RemoveTask_h

mercurial