PBackgroundIDBCursor.ipdl 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  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 PBackgroundIDBTransaction;
  5. include protocol PBackgroundIDBVersionChangeTransaction;
  6. include protocol PBackgroundMutableFile;
  7. include protocol PBlob;
  8. include PBackgroundIDBSharedTypes;
  9. include "mozilla/dom/indexedDB/SerializationHelpers.h";
  10. using struct mozilla::void_t
  11. from "ipc/IPCMessageUtils.h";
  12. using class mozilla::dom::indexedDB::Key
  13. from "mozilla/dom/indexedDB/Key.h";
  14. namespace mozilla {
  15. namespace dom {
  16. namespace indexedDB {
  17. struct ContinueParams
  18. {
  19. Key key;
  20. };
  21. struct ContinuePrimaryKeyParams
  22. {
  23. Key key;
  24. Key primaryKey;
  25. };
  26. struct AdvanceParams
  27. {
  28. uint32_t count;
  29. };
  30. union CursorRequestParams
  31. {
  32. ContinueParams;
  33. ContinuePrimaryKeyParams;
  34. AdvanceParams;
  35. };
  36. struct ObjectStoreCursorResponse
  37. {
  38. Key key;
  39. SerializedStructuredCloneReadInfo cloneInfo;
  40. };
  41. struct ObjectStoreKeyCursorResponse
  42. {
  43. Key key;
  44. };
  45. struct IndexCursorResponse
  46. {
  47. Key key;
  48. Key sortKey;
  49. Key objectKey;
  50. SerializedStructuredCloneReadInfo cloneInfo;
  51. };
  52. struct IndexKeyCursorResponse
  53. {
  54. Key key;
  55. Key sortKey;
  56. Key objectKey;
  57. };
  58. union CursorResponse
  59. {
  60. void_t;
  61. nsresult;
  62. ObjectStoreCursorResponse[];
  63. ObjectStoreKeyCursorResponse;
  64. IndexCursorResponse;
  65. IndexKeyCursorResponse;
  66. };
  67. protocol PBackgroundIDBCursor
  68. {
  69. manager PBackgroundIDBTransaction or PBackgroundIDBVersionChangeTransaction;
  70. parent:
  71. async DeleteMe();
  72. async Continue(CursorRequestParams params);
  73. child:
  74. async __delete__();
  75. async Response(CursorResponse response);
  76. };
  77. } // namespace indexedDB
  78. } // namespace dom
  79. } // namespace mozilla