]>
git.ipfire.org Git - thirdparty/squid.git/blob - src/esi/Include.h
4394db1c074639d0f5bd303d4ad431436c8a5cd2
2 * Copyright (C) 1996-2017 The Squid Software Foundation and contributors
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.
9 /* DEBUG: section 86 ESI processing */
11 #ifndef SQUID_ESIINCLUDE_H
12 #define SQUID_ESIINCLUDE_H
14 #include "esi/Context.h"
15 #include "esi/Element.h"
16 #include "esi/Segment.h"
19 typedef RefCount
<ESIInclude
> ESIIncludePtr
;
21 class ESIStreamContext
: public RefCountable
23 CBDATA_CLASS(ESIStreamContext
);
26 typedef RefCount
<ESIStreamContext
> Pointer
;
31 ESIIncludePtr include
;
32 ESISegment::Pointer localbuffer
;
33 ESISegment::Pointer buffer
;
36 class ESIInclude
: public ESIElement
38 MEMPROXY_CLASS(ESIInclude
);
41 ESIInclude(esiTreeParentPtr
, int attributes
, const char **attr
, ESIContext
*);
43 void render(ESISegment::Pointer
);
44 esiProcessResult_t
process (int dovars
);
45 Pointer
makeCacheable() const;
46 Pointer
makeUsable(esiTreeParentPtr
, ESIVarState
&) const;
47 void subRequestDone (ESIStreamContext::Pointer
, bool);
50 int onerrorcontinue
:1; /* on error return zero data */
51 int failed
:1; /* Failed to process completely */
52 int finished
:1; /* Finished getting subrequest data */
54 ESIStreamContext::Pointer src
;
55 ESIStreamContext::Pointer alt
;
56 ESISegment::Pointer srccontent
;
57 ESISegment::Pointer altcontent
;
58 ESIVarState
*varState
;
59 char *srcurl
, *alturl
;
60 void includeFail(ESIStreamContext::Pointer
);
64 void Start (ESIStreamContext::Pointer
, char const *, ESIVarState
*);
65 esiTreeParentPtr parent
;
69 ESIInclude(ESIInclude
const &);
70 bool dataNeeded() const;
71 void prepareRequestHeaders(HttpHeader
&tempheaders
, ESIVarState
*vars
);
74 #endif /* SQUID_ESIINCLUDE_H */