InputStreamParams.ipdlh (1963B)
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 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 4 5 include ProtocolTypes; 6 7 using struct mozilla::void_t from "mozilla/ipc/IPCCore.h"; 8 [RefCounted] using mozilla::ipc::DataPipeReceiver from "mozilla/ipc/DataPipe.h"; 9 [RefCounted] using mozilla::RemoteLazyInputStream from "mozilla/RemoteLazyInputStream.h"; 10 11 namespace mozilla { 12 namespace ipc { 13 14 struct HeaderEntry 15 { 16 nsCString name; 17 nsCString value; 18 }; 19 20 struct StringInputStreamParams 21 { 22 nsCString data; 23 }; 24 25 struct FileInputStreamParams 26 { 27 FileDescriptor fileDescriptor; 28 int32_t behaviorFlags; 29 int32_t ioFlags; 30 }; 31 32 struct MultiplexInputStreamParams 33 { 34 InputStreamParams[] streams; 35 uint32_t currentStream; 36 nsresult status; 37 bool startedReadingCurrent; 38 }; 39 40 struct SlicedInputStreamParams 41 { 42 InputStreamParams stream; 43 uint64_t start; 44 uint64_t length; 45 uint64_t curPos; 46 bool closed; 47 }; 48 49 struct RemoteLazyInputStreamParams 50 { 51 RemoteLazyInputStream stream; 52 }; 53 54 struct DataPipeReceiverStreamParams 55 { 56 DataPipeReceiver pipe; 57 }; 58 59 union InputStreamParams 60 { 61 StringInputStreamParams; 62 FileInputStreamParams; 63 BufferedInputStreamParams; 64 MIMEInputStreamParams; 65 MultiplexInputStreamParams; 66 SlicedInputStreamParams; 67 RemoteLazyInputStreamParams; 68 InputStreamLengthWrapperParams; 69 EncryptedFileInputStreamParams; 70 DataPipeReceiverStreamParams; 71 }; 72 73 struct EncryptedFileInputStreamParams 74 { 75 InputStreamParams inputStreamParams; 76 uint8_t[] key; 77 uint32_t blockSize; 78 }; 79 80 struct BufferedInputStreamParams 81 { 82 InputStreamParams? optionalStream; 83 uint32_t bufferSize; 84 }; 85 86 struct MIMEInputStreamParams 87 { 88 InputStreamParams? optionalStream; 89 HeaderEntry[] headers; 90 bool startedReading; 91 }; 92 93 struct InputStreamLengthWrapperParams 94 { 95 InputStreamParams stream; 96 int64_t length; 97 bool consumed; 98 }; 99 100 } // namespace ipc 101 } // namespace mozilla