]> git.ipfire.org Git - thirdparty/squid.git/blob - src/ipc/Request.h
Merged from trunk
[thirdparty/squid.git] / src / ipc / Request.h
1 /*
2 * DEBUG: section 54 Interprocess Communication
3 *
4 */
5
6 #ifndef SQUID_IPC_REQUEST_H
7 #define SQUID_IPC_REQUEST_H
8
9 #include "base/RefCount.h"
10 #include "ipc/forward.h"
11
12 namespace Ipc
13 {
14
15 /// IPC request
16 class Request: public RefCountable
17 {
18 public:
19 typedef RefCount<Request> Pointer;
20
21 public:
22 Request(int aRequestorId, unsigned int aRequestId):
23 requestorId(aRequestorId), requestId(aRequestId) {}
24
25 virtual void pack(TypedMsgHdr& msg) const = 0; ///< prepare for sendmsg()
26 virtual Pointer clone() const = 0; ///< returns a copy of this
27
28 private:
29 Request(const Request&); // not implemented
30 Request& operator= (const Request&); // not implemented
31
32 public:
33 int requestorId; ///< kidId of the requestor; used for response destination
34 unsigned int requestId; ///< unique for sender; matches request w/ response
35 };
36
37 } // namespace Ipc
38
39 #endif /* SQUID_IPC_REQUEST_H */