dom/indexedDB/ipc/PIndexedDBRequest.ipdl

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/dom/indexedDB/ipc/PIndexedDBRequest.ipdl	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,113 @@
     1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this file,
     1.6 + * You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.7 +
     1.8 +include protocol PBlob;
     1.9 +include protocol PIndexedDBCursor;
    1.10 +include protocol PIndexedDBIndex;
    1.11 +include protocol PIndexedDBObjectStore;
    1.12 +
    1.13 +include "mozilla/dom/indexedDB/SerializationHelpers.h";
    1.14 +
    1.15 +using class mozilla::dom::indexedDB::Key from "mozilla/dom/indexedDB/Key.h";
    1.16 +using struct mozilla::dom::indexedDB::SerializedStructuredCloneReadInfo from "mozilla/dom/indexedDB/IndexedDatabase.h";
    1.17 +
    1.18 +using struct mozilla::void_t from "ipc/IPCMessageUtils.h";
    1.19 +
    1.20 +namespace mozilla {
    1.21 +namespace dom {
    1.22 +namespace indexedDB {
    1.23 +
    1.24 +namespace ipc {
    1.25 +
    1.26 +struct GetResponse
    1.27 +{
    1.28 +  SerializedStructuredCloneReadInfo cloneInfo;
    1.29 +  PBlob[] blobs;
    1.30 +};
    1.31 +
    1.32 +struct GetKeyResponse
    1.33 +{
    1.34 +  Key key;
    1.35 +};
    1.36 +
    1.37 +struct BlobArray
    1.38 +{
    1.39 +  PBlob[] blobs;
    1.40 +};
    1.41 +
    1.42 +struct GetAllResponse
    1.43 +{
    1.44 +  SerializedStructuredCloneReadInfo[] cloneInfos;
    1.45 +  BlobArray[] blobs;
    1.46 +};
    1.47 +
    1.48 +struct GetAllKeysResponse
    1.49 +{
    1.50 +  Key[] keys;
    1.51 +};
    1.52 +
    1.53 +struct AddResponse
    1.54 +{
    1.55 +  Key key;
    1.56 +};
    1.57 +
    1.58 +struct PutResponse
    1.59 +{
    1.60 +  Key key;
    1.61 +};
    1.62 +
    1.63 +struct DeleteResponse
    1.64 +{ };
    1.65 +
    1.66 +struct ClearResponse
    1.67 +{ };
    1.68 +
    1.69 +struct CountResponse
    1.70 +{
    1.71 +  uint64_t count;
    1.72 +};
    1.73 +
    1.74 +union OpenCursorResponse
    1.75 +{
    1.76 +  PIndexedDBCursor;
    1.77 +  void_t;
    1.78 +};
    1.79 +
    1.80 +struct ContinueResponse
    1.81 +{
    1.82 +  Key key;
    1.83 +  Key objectKey;
    1.84 +  SerializedStructuredCloneReadInfo cloneInfo;
    1.85 +  PBlob[] blobs;
    1.86 +};
    1.87 +
    1.88 +union ResponseValue
    1.89 +{
    1.90 +  nsresult;
    1.91 +  GetResponse;
    1.92 +  GetKeyResponse;
    1.93 +  GetAllResponse;
    1.94 +  GetAllKeysResponse;
    1.95 +  AddResponse;
    1.96 +  PutResponse;
    1.97 +  DeleteResponse;
    1.98 +  ClearResponse;
    1.99 +  CountResponse;
   1.100 +  OpenCursorResponse;
   1.101 +  ContinueResponse;
   1.102 +};
   1.103 +
   1.104 +} // namespace ipc
   1.105 +
   1.106 +protocol PIndexedDBRequest
   1.107 +{
   1.108 +  manager PIndexedDBObjectStore or PIndexedDBIndex or PIndexedDBCursor;
   1.109 +
   1.110 +child:
   1.111 +  __delete__(ResponseValue response);
   1.112 +};
   1.113 +
   1.114 +} // namespace indexedDB
   1.115 +} // namespace dom
   1.116 +} // namespace mozilla

mercurial