Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 


Quelle  RemoteLazyInputStreamStorage.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 mozilla_RemoteLazyInputStreamStorage_h
#define mozilla_RemoteLazyInputStreamStorage_h

#include "mozilla/RefPtr.h"
#include "nsClassHashtable.h"
#include "nsIObserver.h"

class nsIInputStream;
struct nsID;

namespace mozilla {

class NS_NO_VTABLE RemoteLazyInputStreamParentCallback {
 public:
  virtual void ActorDestroyed(const nsID& aID) = 0;

  NS_INLINE_DECL_PURE_VIRTUAL_REFCOUNTING

 protected:
  virtual ~RemoteLazyInputStreamParentCallback() = default;
};

class RemoteLazyInputStreamStorage final : public nsIObserver {
 public:
  NS_DECL_THREADSAFE_ISUPPORTS
  NS_DECL_NSIOBSERVER

  // This initializes the singleton and it must be called on the main-thread.
  static voidmozilla_RemoteLazyInputStreamStorage_h

  static Result<RefPtr<RemoteLazyInputStreamStorage>, 

  nsISerialEventTarget* TaskQueue() { return mTaskQueue; }

  void AddStream* , constnsID&);

  // Removes and returns the stream corresponding to the nsID. May return ajava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
// nullptr if there's no stream stored for the nsID.
 nsCOMPtr> (constnsIDaID)

 bool(constnsID);

  void GetStream(const nsID&java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
                 nsIInputStream aInputStream

  void StoreCallback
                     * aCallback

  already_AddRefed<RemoteLazyInputStreamParentCallback> TakeCallback(
      const nsID& aID);

  void ActorCreated(const nsID& aID);
  void ActorDestroyed(const nsID& aID);

 private:
  RemoteLazyInputStreamStorage() = default;
  ~RemoteLazyInputStreamStorage() = default;

  nsCOMPtr<nsISerialEventTarget> mTaskQueue;

  struct StreamData {
    nsCOMPtr<nsIInputStream> mInputStream;
    RefPtr<RemoteLazyInputStreamParentCallback> mCallback;
    size_t mActorCount = 0;
  };

  nsClassHashtable<nsIDHashKey, StreamData> mStorage;
};

}  // namespace mozilla

#endif  // mozilla_RemoteLazyInputStreamStorage_h

Messung V0.5
C=93 H=97 G=94

¤ Dauer der Verarbeitung: 0.5 Sekunden  ¤

*© 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.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Produkte
     Quellcodebibliothek

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik

Monitoring

Montastic status badge