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 5include protocol PBackground; 6include protocol PBlobStream; 7include protocol PContent; 8include protocol PContentBridge; 9include protocol PFileDescriptorSet; 10include protocol PSendStream; 11 12include BlobTypes; 13include DOMTypes; 14include InputStreamParams; 15 16namespace mozilla { 17namespace dom { 18 19union ResolveMysteryParams 20{ 21 NormalBlobConstructorParams; 22 FileBlobConstructorParams; 23}; 24 25sync protocol PBlob 26{ 27 manager PBackground or PContent or PContentBridge; 28 manages PBlobStream; 29 30both: 31 async __delete__(); 32 33parent: 34 async PBlobStream(uint64_t begin, uint64_t length); 35 36 async ResolveMystery(ResolveMysteryParams params); 37 38 sync BlobStreamSync(uint64_t begin, uint64_t length) 39 returns (InputStreamParams params, OptionalFileDescriptorSet fds); 40 41 sync WaitForSliceCreation(); 42 43 // Use only for testing! 44 sync GetFileId() 45 returns (int64_t fileId); 46 47 sync GetFilePath() 48 returns (nsString filePath); 49 50child: 51 // This method must be called by the parent when the PBlobParent is fully 52 // created in order to release the known blob. 53 async CreatedFromKnownBlob(); 54}; 55 56} // namespace dom 57} // namespace mozilla 58