2016-05-15 17:32:09 +00:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
|
|
|
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
2017-03-14 11:28:58 +00:00
|
|
|
include protocol PChildToParentStream;
|
2017-03-14 11:29:43 +00:00
|
|
|
include protocol PParentToChildStream;
|
2017-04-24 10:09:39 +00:00
|
|
|
|
2016-05-17 22:01:25 +00:00
|
|
|
include BlobTypes;
|
2016-05-15 17:32:09 +00:00
|
|
|
include InputStreamParams;
|
2017-04-24 10:09:39 +00:00
|
|
|
include ProtocolTypes;
|
2016-05-15 17:32:09 +00:00
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace ipc {
|
|
|
|
|
|
|
|
// Do not use this directly. See IPCStream below.
|
|
|
|
struct InputStreamParamsWithFds
|
|
|
|
{
|
|
|
|
InputStreamParams stream;
|
|
|
|
OptionalFileDescriptorSet optionalFds;
|
|
|
|
};
|
|
|
|
|
2017-04-24 10:09:39 +00:00
|
|
|
union IPCRemoteStreamType
|
|
|
|
{
|
|
|
|
PChildToParentStream;
|
|
|
|
PParentToChildStream;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct IPCRemoteStream
|
|
|
|
{
|
2017-04-24 10:09:39 +00:00
|
|
|
// If this is true, the stream will send data only when the first operation
|
|
|
|
// is done on the destination side. The benefit of this is that we do not
|
|
|
|
// send data if not needed. On the other hand, it could have a performance
|
|
|
|
// issue.
|
|
|
|
bool delayedStart;
|
|
|
|
|
2017-04-24 10:09:39 +00:00
|
|
|
IPCRemoteStreamType stream;
|
2018-05-31 16:12:25 +00:00
|
|
|
|
|
|
|
int64_t length;
|
2017-04-24 10:09:39 +00:00
|
|
|
};
|
|
|
|
|
2016-05-15 17:32:09 +00:00
|
|
|
// Use IPCStream or OptionalIPCStream in your ipdl to represent serialized
|
|
|
|
// nsIInputStreams. Then use AutoIPCStream from IPCStreamUtils.h to perform
|
|
|
|
// the serialization.
|
|
|
|
union IPCStream
|
|
|
|
{
|
|
|
|
InputStreamParamsWithFds;
|
2017-04-24 10:09:39 +00:00
|
|
|
IPCRemoteStream;
|
2016-05-15 17:32:09 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
union OptionalIPCStream
|
|
|
|
{
|
|
|
|
IPCStream;
|
|
|
|
void_t;
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace ipc
|
|
|
|
} // namespace mozilla
|