ipc/glue/InputStreamUtils.h

branch
TOR_BUG_9701
changeset 15
b8a032363ba2
equal deleted inserted replaced
-1:000000000000 0:6855b82973f2
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 #ifndef mozilla_ipc_InputStreamUtils_h
6 #define mozilla_ipc_InputStreamUtils_h
7
8 #include "mozilla/ipc/InputStreamParams.h"
9 #include "nsCOMPtr.h"
10 #include "nsIInputStream.h"
11 #include "nsTArray.h"
12
13 namespace mozilla {
14 namespace ipc {
15
16 class FileDescriptor;
17
18 void
19 SerializeInputStream(nsIInputStream* aInputStream,
20 InputStreamParams& aParams,
21 nsTArray<FileDescriptor>& aFileDescriptors);
22
23 void
24 SerializeInputStream(nsIInputStream* aInputStream,
25 OptionalInputStreamParams& aParams,
26 nsTArray<FileDescriptor>& aFileDescriptors);
27
28 already_AddRefed<nsIInputStream>
29 DeserializeInputStream(const InputStreamParams& aParams,
30 const nsTArray<FileDescriptor>& aFileDescriptors);
31
32 already_AddRefed<nsIInputStream>
33 DeserializeInputStream(const OptionalInputStreamParams& aParams,
34 const nsTArray<FileDescriptor>& aFileDescriptors);
35
36 } // namespace ipc
37 } // namespace mozilla
38
39 #endif // mozilla_ipc_InputStreamUtils_h

mercurial