Quellcodebibliothek Statistik Leitseite products/sources/formale Sprachen/C/Firefox/dom/fs/child/   (Browser von der Mozilla Stiftung Version 136.0.1©)  Datei vom 10.2.2025 mit Größe 1 kB image not shown  

Quelle  FileSystemManagerChild.h   Sprache: C

 
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* 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 DOM_FS_CHILD_FILESYSTEMMANAGERCHILD_H_
#define DOM_FS_CHILD_FILESYSTEMMANAGERCHILD_H_

#include "mozilla/dom/FileSystemWritableFileStreamChild.h"
#include "mozilla/dom/PFileSystemManagerChild.h"
#include "mozilla/dom/quota/ForwardDecls.h"

namespace mozilla::dom {

class FileSystemBackgroundRequestHandler;

class FileSystemManagerChild : public PFileSystemManagerChild {
 public:
  using ActorPromise =
      MozPromise<RefPtr<FileSystemManagerChild>, nsresult, false>;

  NS_INLINE_DECL_REFCOUNTING_WITH_DESTROY(FileSystemManagerChild, Destroy(),
                                          override)

  bool CloseAllReceived() const { return mCloseAllReceived; }

  void SetBackgroundRequestHandler(
      FileSystemBackgroundRequestHandler* aBackgroundRequestHandler);

  void CloseAllWritables(std::function<void()>&& aCallback);

#ifdef DEBUG
  virtual bool AllSyncAccessHandlesClosed() const;

  virtual bool AllWritableFileStreamsClosed() const;
#endif

  virtual void Shutdown();

  already_AddRefed<PFileSystemWritableFileStreamChild>
  AllocPFileSystemWritableFileStreamChild();

  ::mozilla::ipc::IPCResult RecvCloseAll(CloseAllResolver&& aResolver);

  void ActorDestroy(ActorDestroyReason aWhy) override;

 protected:
  virtual ~FileSystemManagerChild() = default;

  virtual void Destroy() {
    Shutdown();
    delete this;
  }

  // The weak reference is cleared in ActorDestroy.
  FileSystemBackgroundRequestHandler* MOZ_NON_OWNING_REF
      mBackgroundRequestHandler;

 private:
  template <class T>
  void CloseAllWritablesImpl(T& aPromises);

  bool mCloseAllReceived = false;
};

}  // namespace mozilla::dom

#endif  // DOM_FS_CHILD_FILESYSTEMMANAGERCHILD_H_

Messung V0.5
C=97 H=100 G=98

¤ Dauer der Verarbeitung: 0.0 Sekunden  (vorverarbeitet)  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.