]> git.ipfire.org Git - thirdparty/squid.git/blame - src/ipc/StrandSearch.cc
Source Format Enforcement (#532)
[thirdparty/squid.git] / src / ipc / StrandSearch.cc
CommitLineData
33727f0b 1/*
77b1029d 2 * Copyright (C) 1996-2020 The Squid Software Foundation and contributors
33727f0b 3 *
bbc27441
AJ
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
33727f0b
AR
7 */
8
bbc27441
AJ
9/* DEBUG: section 54 Interprocess Communication */
10
f7f3304a 11#include "squid.h"
33727f0b
AR
12#include "ipc/Messages.h"
13#include "ipc/StrandSearch.h"
14#include "ipc/TypedMsgHdr.h"
15
b2aa0934 16Ipc::StrandSearchRequest::StrandSearchRequest(): requestorId(-1)
33727f0b
AR
17{
18}
19
20Ipc::StrandSearchRequest::StrandSearchRequest(const TypedMsgHdr &hdrMsg):
f53969cc 21 requestorId(-1)
33727f0b
AR
22{
23 hdrMsg.checkType(mtStrandSearchRequest);
24 hdrMsg.getPod(requestorId);
33727f0b
AR
25 hdrMsg.getString(tag);
26}
27
28void Ipc::StrandSearchRequest::pack(TypedMsgHdr &hdrMsg) const
29{
30 hdrMsg.setType(mtStrandSearchRequest);
31 hdrMsg.putPod(requestorId);
33727f0b
AR
32 hdrMsg.putString(tag);
33}
34
33727f0b
AR
35/* StrandSearchResponse */
36
b2aa0934 37Ipc::StrandSearchResponse::StrandSearchResponse(const Ipc::StrandCoord &aStrand):
f53969cc 38 strand(aStrand)
33727f0b
AR
39{
40}
41
b2aa0934 42Ipc::StrandSearchResponse::StrandSearchResponse(const TypedMsgHdr &hdrMsg)
33727f0b
AR
43{
44 hdrMsg.checkType(mtStrandSearchResponse);
33727f0b
AR
45 strand.unpack(hdrMsg);
46}
47
48void Ipc::StrandSearchResponse::pack(TypedMsgHdr &hdrMsg) const
49{
50 hdrMsg.setType(mtStrandSearchResponse);
33727f0b
AR
51 strand.pack(hdrMsg);
52}
f53969cc 53