nsIClassOfService.idl 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /* This Source Code Form is subject to the terms of the Mozilla Public
  2. * License, v. 2.0. If a copy of the MPL was not distributed with this
  3. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  4. #include "nsISupports.idl"
  5. /**
  6. * nsIClassOfService.idl
  7. *
  8. * Used to express class dependencies and characteristics - complimentary to
  9. * nsISupportsPriority which is used to express weight
  10. *
  11. * Channels that implement this interface may make use of this
  12. * information in different ways.
  13. *
  14. * The default gecko HTTP/1 stack makes Followers wait for Leaders to
  15. * complete before dispatching followers. Other classes run in
  16. * parallel - neither being blocked nor blocking. All grouping is done
  17. * based on the Load Group - separate load groups proceed
  18. * independently.
  19. *
  20. * HTTP/2 does not use the load group, but prioritization is done per
  21. * HTTP/2 session. HTTP/2 dispatches all the requests as soon as
  22. * possible.
  23. * The various classes are assigned logical priority
  24. * dependency groups and then transactions of that class depend on the
  25. * group. In this model Followers block on Leaders and Speculative
  26. * depends on Background. See Http2Stream.cpp for weighting details.
  27. *
  28. */
  29. [scriptable, uuid(1ccb58ec-5e07-4cf9-a30d-ac5490d23b41)]
  30. interface nsIClassOfService : nsISupports
  31. {
  32. attribute unsigned long classFlags;
  33. void clearClassFlags(in unsigned long flags);
  34. void addClassFlags(in unsigned long flags);
  35. const unsigned long Leader = 1 << 0;
  36. const unsigned long Follower = 1 << 1;
  37. const unsigned long Speculative = 1 << 2;
  38. const unsigned long Background = 1 << 3;
  39. const unsigned long Unblocked = 1 << 4;
  40. const unsigned long Throttleable = 1 << 5;
  41. const unsigned long UrgentStart = 1 << 6;
  42. };