]>
Commit | Line | Data |
---|---|---|
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 | ||
14 | namespace Helper | |
15 | { | |
16 | ||
17 | class Request | |
18 | { | |
741c2986 AJ |
19 | MEMPROXY_CLASS(Helper::Request); |
20 | ||
24438ec5 AJ |
21 | public: |
22 | Request(HLPCB *c, void *d, const char *b) : | |
23 | buf(b ? xstrdup(b) : NULL), | |
24 | callback(c), | |
25 | data(cbdataReference(d)), | |
26 | placeholder(b == NULL) | |
4579a6d0 AJ |
27 | { |
28 | memset(&dispatch_time, 0, sizeof(dispatch_time)); | |
29 | } | |
30 | ||
24438ec5 AJ |
31 | ~Request() { |
32 | cbdataReferenceDone(data); | |
33 | xfree(buf); | |
34 | } | |
35 | ||
24438ec5 AJ |
36 | char *buf; |
37 | HLPCB *callback; | |
38 | void *data; | |
39 | ||
40 | int placeholder; /* if 1, this is a dummy request waiting for a stateful helper to become available */ | |
41 | struct timeval dispatch_time; | |
42 | }; | |
43 | ||
44 | } // namespace Helper | |
45 | ||
24438ec5 | 46 | #endif /* _SQUID_SRC_HELPER_REQUEST_H */ |