PBackgroundFileRequest.ipdl 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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 file,
  3. * You can obtain one at http://mozilla.org/MPL/2.0/. */
  4. include protocol PBackgroundFileHandle;
  5. include protocol PBlob;
  6. using struct mozilla::void_t
  7. from "ipc/IPCMessageUtils.h";
  8. namespace mozilla {
  9. namespace dom {
  10. union FileRequestSize
  11. {
  12. void_t;
  13. uint64_t;
  14. };
  15. union FileRequestLastModified
  16. {
  17. void_t;
  18. int64_t;
  19. };
  20. struct FileRequestMetadata
  21. {
  22. FileRequestSize size;
  23. FileRequestLastModified lastModified;
  24. };
  25. struct FileRequestGetMetadataResponse
  26. {
  27. FileRequestMetadata metadata;
  28. };
  29. struct FileRequestReadResponse
  30. {
  31. nsCString data;
  32. };
  33. struct FileRequestWriteResponse
  34. {
  35. };
  36. struct FileRequestTruncateResponse
  37. {
  38. };
  39. struct FileRequestFlushResponse
  40. {
  41. };
  42. struct FileRequestGetFileResponse
  43. {
  44. PBlob file;
  45. FileRequestMetadata metadata;
  46. };
  47. union FileRequestResponse
  48. {
  49. nsresult;
  50. FileRequestGetMetadataResponse;
  51. FileRequestReadResponse;
  52. FileRequestWriteResponse;
  53. FileRequestTruncateResponse;
  54. FileRequestFlushResponse;
  55. FileRequestGetFileResponse;
  56. };
  57. protocol PBackgroundFileRequest
  58. {
  59. manager PBackgroundFileHandle;
  60. child:
  61. async __delete__(FileRequestResponse response);
  62. async Progress(uint64_t progress,
  63. uint64_t progressMax);
  64. };
  65. } // namespace dom
  66. } // namespace mozilla