PFTPChannel.ipdl 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2. /* This Source Code Form is subject to the terms of the Mozilla Public
  3. * License, v. 2.0. If a copy of the MPL was not distributed with this
  4. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  5. include protocol PNecko;
  6. include InputStreamParams;
  7. include URIParams;
  8. //FIXME: bug #792908 (NeckoChannelParams already included by PNecko)
  9. include NeckoChannelParams;
  10. include protocol PBlob; //FIXME: bug #792908
  11. using PRTime from "prtime.h";
  12. namespace mozilla {
  13. namespace net {
  14. async protocol PFTPChannel
  15. {
  16. manager PNecko;
  17. parent:
  18. // Note: channels are opened during construction, so no open method here:
  19. // see PNecko.ipdl
  20. async __delete__();
  21. async Cancel(nsresult status);
  22. async Suspend();
  23. async Resume();
  24. // Divert OnDataAvailable to the parent.
  25. async DivertOnDataAvailable(nsCString data,
  26. uint64_t offset,
  27. uint32_t count);
  28. // Divert OnStopRequest to the parent.
  29. async DivertOnStopRequest(nsresult statusCode);
  30. // Child has no more events/messages to divert to the parent.
  31. async DivertComplete();
  32. child:
  33. async OnStartRequest(nsresult aChannelStatus,
  34. int64_t aContentLength,
  35. nsCString aContentType,
  36. PRTime aLastModified,
  37. nsCString aEntityID,
  38. URIParams aURI);
  39. async OnDataAvailable(nsresult channelStatus,
  40. nsCString data,
  41. uint64_t offset,
  42. uint32_t count);
  43. async OnStopRequest(nsresult channelStatus,
  44. nsCString aErrorMsg,
  45. bool aUseUTF8);
  46. async FailedAsyncOpen(nsresult statusCode);
  47. // Parent has been suspended for diversion; no more events to be enqueued.
  48. async FlushedForDiversion();
  49. // Child should resume processing the ChannelEventQueue, i.e. diverting any
  50. // OnDataAvailable and OnStopRequest messages in the queue back to the parent.
  51. async DivertMessages();
  52. async DeleteSelf();
  53. };
  54. } // namespace net
  55. } // namespace mozilla