Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
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/. */
5 #ifndef mozilla_ipc_InputStreamUtils_h
6 #define mozilla_ipc_InputStreamUtils_h
8 #include "mozilla/ipc/InputStreamParams.h"
9 #include "nsCOMPtr.h"
10 #include "nsIInputStream.h"
11 #include "nsTArray.h"
13 namespace mozilla {
14 namespace ipc {
16 class FileDescriptor;
18 void
19 SerializeInputStream(nsIInputStream* aInputStream,
20 InputStreamParams& aParams,
21 nsTArray<FileDescriptor>& aFileDescriptors);
23 void
24 SerializeInputStream(nsIInputStream* aInputStream,
25 OptionalInputStreamParams& aParams,
26 nsTArray<FileDescriptor>& aFileDescriptors);
28 already_AddRefed<nsIInputStream>
29 DeserializeInputStream(const InputStreamParams& aParams,
30 const nsTArray<FileDescriptor>& aFileDescriptors);
32 already_AddRefed<nsIInputStream>
33 DeserializeInputStream(const OptionalInputStreamParams& aParams,
34 const nsTArray<FileDescriptor>& aFileDescriptors);
36 } // namespace ipc
37 } // namespace mozilla
39 #endif // mozilla_ipc_InputStreamUtils_h