Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
michael@0 | 1 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 4 | |
michael@0 | 5 | #ifndef nsTransportUtils_h__ |
michael@0 | 6 | #define nsTransportUtils_h__ |
michael@0 | 7 | |
michael@0 | 8 | #include "nsITransport.h" |
michael@0 | 9 | |
michael@0 | 10 | /** |
michael@0 | 11 | * This function returns a proxy object for a transport event sink instance. |
michael@0 | 12 | * The transport event sink will be called on the thread indicated by the |
michael@0 | 13 | * given event target. Like events are automatically coalesced. This means |
michael@0 | 14 | * that for example if the status value is the same from event to event, and |
michael@0 | 15 | * the previous event has not yet been delivered, then only one event will |
michael@0 | 16 | * be delivered. The progress reported will be that from the second event. |
michael@0 | 17 | * If aCoalesceAllEvents is true, then any undelivered event will be replaced |
michael@0 | 18 | * with the next event if it arrives early enough. This option should be used |
michael@0 | 19 | * cautiously since it can cause states to be effectively skipped. Coalescing |
michael@0 | 20 | * events can help prevent a backlog of unprocessed transport events in the |
michael@0 | 21 | * case that the target thread is overworked. |
michael@0 | 22 | */ |
michael@0 | 23 | NS_HIDDEN_(nsresult) |
michael@0 | 24 | net_NewTransportEventSinkProxy(nsITransportEventSink **aResult, |
michael@0 | 25 | nsITransportEventSink *aSink, |
michael@0 | 26 | nsIEventTarget *aTarget, |
michael@0 | 27 | bool aCoalesceAllEvents = false); |
michael@0 | 28 | |
michael@0 | 29 | #endif // nsTransportUtils_h__ |