/*
- * $Id$
- *
- * DEBUG: section 16 Cache Manager API
+ * Copyright (C) 1996-2017 The Squid Software Foundation and contributors
*
+ * Squid software is distributed under GPLv2+ license and includes
+ * contributions from numerous individuals and organizations.
+ * Please see the COPYING and CONTRIBUTORS files for details.
*/
+/* DEBUG: section 16 Cache Manager API */
+
#ifndef SQUID_MGR_REQUEST_H
#define SQUID_MGR_REQUEST_H
-#include "ipc/TypedMsgHdr.h"
+#include "ipc/forward.h"
+#include "ipc/Request.h"
#include "mgr/ActionParams.h"
-
namespace Mgr
{
/// cache manager request
-class Request
+class Request: public Ipc::Request
{
public:
- Request(int aRequestorId, unsigned int aRequestId, int aFd,
+ Request(int aRequestorId, unsigned int aRequestId, const Comm::ConnectionPointer &aConn,
const ActionParams &aParams);
explicit Request(const Ipc::TypedMsgHdr& msg); ///< from recvmsg()
- void pack(Ipc::TypedMsgHdr& msg) const; ///< prepare for sendmsg()
+ /* Ipc::Request API */
+ virtual void pack(Ipc::TypedMsgHdr& msg) const;
+ virtual Pointer clone() const;
+
+private:
+ Request(const Request& request);
public:
- int requestorId; ///< kidId of the requestor; used for response destination
- unsigned int requestId; ///< unique for sender; matches request w/ response
- int fd; ///< HTTP client connection descriptor
+ Comm::ConnectionPointer conn; ///< HTTP client connection descriptor
ActionParams params; ///< action name and parameters
};
-
} // namespace Mgr
#endif /* SQUID_MGR_REQUEST_H */
+