netwerk/base/public/nsIThreadRetargetableStreamListener.idl

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/netwerk/base/public/nsIThreadRetargetableStreamListener.idl	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,33 @@
     1.4 +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     1.5 +/* vim: set ts=8 sts=2 et sw=2 tw=80: */
     1.6 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.7 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.8 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.9 +
    1.10 +#include "nsISupports.idl"
    1.11 +
    1.12 +/**
    1.13 + * nsIThreadRetargetableStreamListener
    1.14 + *
    1.15 + * To be used by classes which implement nsIStreamListener and whose
    1.16 + * OnDataAvailable callback may be retargeted for delivery off the main thread.
    1.17 + */
    1.18 +[uuid(fb2304b8-f82f-4433-af68-d874a2ebbdc1)]
    1.19 +interface nsIThreadRetargetableStreamListener : nsISupports
    1.20 +{
    1.21 +  /**
    1.22 +   * Checks this listener and any next listeners it may have to verify that
    1.23 +   * they can receive OnDataAvailable off the main thread. It is the
    1.24 +   * responsibility of the implementing class to decide on the criteria to
    1.25 +   * determine if retargeted delivery of these methods is possible, but it must
    1.26 +   * check any and all nsIStreamListener objects that might be called in the
    1.27 +   * listener chain.
    1.28 +   *
    1.29 +   * An exception should be thrown if a listener in the chain does not
    1.30 +   * support retargeted delivery, i.e. if the next listener does not implement
    1.31 +   * nsIThreadRetargetableStreamListener, or a call to its checkListenerChain()
    1.32 +   * fails.
    1.33 +   */
    1.34 +  void checkListenerChain();
    1.35 +};
    1.36 +

mercurial