]>
Commit | Line | Data |
---|---|---|
51ea0904 | 1 | /* |
bbc27441 | 2 | * Copyright (C) 1996-2014 The Squid Software Foundation and contributors |
51ea0904 | 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. | |
51ea0904 CT |
7 | */ |
8 | ||
bbc27441 AJ |
9 | /* DEBUG: section 54 Interprocess Communication */ |
10 | ||
51ea0904 CT |
11 | #ifndef SQUID_IPC_REQUEST_H |
12 | #define SQUID_IPC_REQUEST_H | |
13 | ||
8bf217bd | 14 | #include "base/RefCount.h" |
51ea0904 | 15 | #include "ipc/forward.h" |
51ea0904 | 16 | |
51ea0904 CT |
17 | namespace Ipc |
18 | { | |
19 | ||
20 | /// IPC request | |
21 | class Request: public RefCountable | |
22 | { | |
23 | public: | |
24 | typedef RefCount<Request> Pointer; | |
25 | ||
26 | public: | |
27 | Request(int aRequestorId, unsigned int aRequestId): | |
f53969cc | 28 | requestorId(aRequestorId), requestId(aRequestId) {} |
51ea0904 CT |
29 | |
30 | virtual void pack(TypedMsgHdr& msg) const = 0; ///< prepare for sendmsg() | |
31 | virtual Pointer clone() const = 0; ///< returns a copy of this | |
32 | ||
33 | private: | |
34 | Request(const Request&); // not implemented | |
35 | Request& operator= (const Request&); // not implemented | |
36 | ||
37 | public: | |
38 | int requestorId; ///< kidId of the requestor; used for response destination | |
39 | unsigned int requestId; ///< unique for sender; matches request w/ response | |
40 | }; | |
41 | ||
51ea0904 CT |
42 | } // namespace Ipc |
43 | ||
44 | #endif /* SQUID_IPC_REQUEST_H */ | |
f53969cc | 45 |