michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this file, michael@0: * You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: include protocol PBlob; michael@0: include protocol PIndexedDBCursor; michael@0: include protocol PIndexedDBIndex; michael@0: include protocol PIndexedDBObjectStore; michael@0: michael@0: include "mozilla/dom/indexedDB/SerializationHelpers.h"; michael@0: michael@0: using class mozilla::dom::indexedDB::Key from "mozilla/dom/indexedDB/Key.h"; michael@0: using struct mozilla::dom::indexedDB::SerializedStructuredCloneReadInfo from "mozilla/dom/indexedDB/IndexedDatabase.h"; michael@0: michael@0: using struct mozilla::void_t from "ipc/IPCMessageUtils.h"; michael@0: michael@0: namespace mozilla { michael@0: namespace dom { michael@0: namespace indexedDB { michael@0: michael@0: namespace ipc { michael@0: michael@0: struct GetResponse michael@0: { michael@0: SerializedStructuredCloneReadInfo cloneInfo; michael@0: PBlob[] blobs; michael@0: }; michael@0: michael@0: struct GetKeyResponse michael@0: { michael@0: Key key; michael@0: }; michael@0: michael@0: struct BlobArray michael@0: { michael@0: PBlob[] blobs; michael@0: }; michael@0: michael@0: struct GetAllResponse michael@0: { michael@0: SerializedStructuredCloneReadInfo[] cloneInfos; michael@0: BlobArray[] blobs; michael@0: }; michael@0: michael@0: struct GetAllKeysResponse michael@0: { michael@0: Key[] keys; michael@0: }; michael@0: michael@0: struct AddResponse michael@0: { michael@0: Key key; michael@0: }; michael@0: michael@0: struct PutResponse michael@0: { michael@0: Key key; michael@0: }; michael@0: michael@0: struct DeleteResponse michael@0: { }; michael@0: michael@0: struct ClearResponse michael@0: { }; michael@0: michael@0: struct CountResponse michael@0: { michael@0: uint64_t count; michael@0: }; michael@0: michael@0: union OpenCursorResponse michael@0: { michael@0: PIndexedDBCursor; michael@0: void_t; michael@0: }; michael@0: michael@0: struct ContinueResponse michael@0: { michael@0: Key key; michael@0: Key objectKey; michael@0: SerializedStructuredCloneReadInfo cloneInfo; michael@0: PBlob[] blobs; michael@0: }; michael@0: michael@0: union ResponseValue michael@0: { michael@0: nsresult; michael@0: GetResponse; michael@0: GetKeyResponse; michael@0: GetAllResponse; michael@0: GetAllKeysResponse; michael@0: AddResponse; michael@0: PutResponse; michael@0: DeleteResponse; michael@0: ClearResponse; michael@0: CountResponse; michael@0: OpenCursorResponse; michael@0: ContinueResponse; michael@0: }; michael@0: michael@0: } // namespace ipc michael@0: michael@0: protocol PIndexedDBRequest michael@0: { michael@0: manager PIndexedDBObjectStore or PIndexedDBIndex or PIndexedDBCursor; michael@0: michael@0: child: michael@0: __delete__(ResponseValue response); michael@0: }; michael@0: michael@0: } // namespace indexedDB michael@0: } // namespace dom michael@0: } // namespace mozilla