]> git.ipfire.org Git - thirdparty/squid.git/blame - src/helper/Request.h
SourceLayout: shuffle helper protocol primitives to helper/libhelper.la
[thirdparty/squid.git] / src / helper / Request.h
CommitLineData
24438ec5
AJ
1/*
2 * Copyright (C) 1996-2014 The Squid Software Foundation and contributors
3 *
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.
7 */
8
9#ifndef _SQUID_SRC_HELPER_REQUEST_H
10#define _SQUID_SRC_HELPER_REQUEST_H
11
12#include "helper/forward.h"
13
14namespace Helper
15{
16
17class Request
18{
19public:
20 Request(HLPCB *c, void *d, const char *b) :
21 buf(b ? xstrdup(b) : NULL),
22 callback(c),
23 data(cbdataReference(d)),
24 placeholder(b == NULL)
25 {}
26 ~Request() {
27 cbdataReferenceDone(data);
28 xfree(buf);
29 }
30
31 MEMPROXY_CLASS(Helper::Request);
32 char *buf;
33 HLPCB *callback;
34 void *data;
35
36 int placeholder; /* if 1, this is a dummy request waiting for a stateful helper to become available */
37 struct timeval dispatch_time;
38};
39
40} // namespace Helper
41
42MEMPROXY_CLASS_INLINE(Helper::Request);
43
44#endif /* _SQUID_SRC_HELPER_REQUEST_H */