#ifndef IPC_IPC_MESSAGE_UTILS_IMPL_H_
#define IPC_IPC_MESSAGE_UTILS_IMPL_H_
namespace IPC {
template <class ParamType>
void MessageSchema<ParamType>::Write(Message* msg, const RefParam& p) {
WriteParam(msg, p);
}
template <class ParamType>
bool MessageSchema<ParamType>::Read(const Message* msg, Param* p) {
PickleIterator iter(*msg);
if (ReadParam(msg, &iter, p))
return true;
NOTREACHED() << "Error deserializing message " << msg->type();
return false;
}
template <class SendParamType, class ReplyParamType>
void SyncMessageSchema<SendParamType, ReplyParamType>::Write(
Message* msg,
const RefSendParam& send) {
WriteParam(msg, send);
}
template <class SendParamType, class ReplyParamType>
bool SyncMessageSchema<SendParamType, ReplyParamType>::ReadSendParam(
const Message* msg, SendParam* p) {
PickleIterator iter = SyncMessage::GetDataIterator(msg);
return ReadParam(msg, &iter, p);
}
template <class SendParamType, class ReplyParamType>
bool SyncMessageSchema<SendParamType, ReplyParamType>::ReadReplyParam(
const Message* msg, typename TupleTypes<ReplyParam>::ValueTuple* p) {
PickleIterator iter = SyncMessage::GetDataIterator(msg);
return ReadParam(msg, &iter, p);
}
}
#endif