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