nsIIOService2.idl 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
  2. /* vim:expandtab:shiftwidth=4:tabstop=4:
  3. */
  4. /* This Source Code Form is subject to the terms of the Mozilla Public
  5. * License, v. 2.0. If a copy of the MPL was not distributed with this
  6. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  7. #include "nsIIOService.idl"
  8. interface nsIDOMNode;
  9. interface nsIPrincipal;
  10. /**
  11. * nsIIOService2 extends nsIIOService
  12. */
  13. [scriptable, uuid(52c5804b-0d3c-4d4f-8654-1c36fd310e69)]
  14. interface nsIIOService2 : nsIIOService
  15. {
  16. /**
  17. * While this is set, IOService will monitor an nsINetworkLinkService
  18. * (if available) and set its offline status to "true" whenever
  19. * isLinkUp is false.
  20. *
  21. * Applications that want to control changes to the IOService's offline
  22. * status should set this to false, watch for network:link-status-changed
  23. * broadcasts, and change nsIIOService::offline as they see fit. Note
  24. * that this means during application startup, IOService may be offline
  25. * if there is no link, until application code runs and can turn off
  26. * this management.
  27. */
  28. attribute boolean manageOfflineStatus;
  29. /**
  30. * Creates a channel for a given URI.
  31. *
  32. * @param aURI
  33. * nsIURI from which to make a channel
  34. * @param aProxyURI
  35. * nsIURI to use for proxy resolution. Can be null in which
  36. * case aURI is used
  37. * @param aProxyFlags flags from nsIProtocolProxyService to use
  38. * when resolving proxies for this new channel
  39. * @param aLoadingNode
  40. * @param aLoadingPrincipal
  41. * @param aTriggeringPrincipal
  42. * @param aSecurityFlags
  43. * @param aContentPolicyType
  44. * These will be used as values for the nsILoadInfo object on the
  45. * created channel. For details, see nsILoadInfo in nsILoadInfo.idl
  46. * @return reference to the new nsIChannel object
  47. *
  48. * Please note, if you provide both a loadingNode and a loadingPrincipal,
  49. * then loadingPrincipal must be equal to loadingNode->NodePrincipal().
  50. * But less error prone is to just supply a loadingNode.
  51. */
  52. nsIChannel newChannelFromURIWithProxyFlags2(in nsIURI aURI,
  53. in nsIURI aProxyURI,
  54. in unsigned long aProxyFlags,
  55. in nsIDOMNode aLoadingNode,
  56. in nsIPrincipal aLoadingPrincipal,
  57. in nsIPrincipal aTriggeringPrincipal,
  58. in unsigned long aSecurityFlags,
  59. in unsigned long aContentPolicyType);
  60. /**
  61. * ***** DEPRECATED *****
  62. * Please use newChannelFromURIWithProxyFlags2()
  63. *
  64. * Creates a channel for a given URI.
  65. *
  66. * @param aURI nsIURI from which to make a channel
  67. * @param aProxyURI nsIURI to use for proxy resolution. Can be null in which
  68. * case aURI is used
  69. * @param aProxyFlags flags from nsIProtocolProxyService to use
  70. * when resolving proxies for this new channel
  71. * @return reference to the new nsIChannel object
  72. */
  73. nsIChannel newChannelFromURIWithProxyFlags(in nsIURI aURI,
  74. in nsIURI aProxyURI,
  75. in unsigned long aProxyFlags);
  76. };