tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

nsIEventSourceEventService.idl (1475B)


      1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
      2 /* vim: set sw=4 ts=4 et 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
      5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
      6 
      7 #include "domstubs.idl"
      8 #include "nsISupports.idl"
      9 
     10 [scriptable, uuid(d2cc6222-b7f2-490d-adc2-497d89878fa2)]
     11 interface nsIEventSourceEventListener : nsISupports
     12 {
     13  [must_use] void eventSourceConnectionOpened(in uint64_t aHttpChannelId);
     14 
     15  [must_use] void eventSourceConnectionClosed(in uint64_t aHttpChannelId);
     16 
     17  [must_use] void eventReceived(in uint64_t aHttpChannelId,
     18                                in AString aEventName,
     19                                in AString aLastEventID,
     20                                in AString aData,
     21                                in uint32_t aRetry,
     22                                in DOMHighResTimeStamp aTimeStamp);
     23 };
     24 
     25 [scriptable, builtinclass, uuid(c0378840-8a74-4b0a-9225-c3a0ac1fac41)]
     26 interface nsIEventSourceEventService : nsISupports
     27 {
     28  [must_use] void addListener(in unsigned long long aInnerWindowID,
     29                              in nsIEventSourceEventListener aListener);
     30 
     31  [must_use] void removeListener(in unsigned long long aInnerWindowID,
     32                                 in nsIEventSourceEventListener aListener);
     33 
     34  [must_use] boolean hasListenerFor(in unsigned long long aInnerWindowID);
     35 };