Include.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2018 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 /* DEBUG: section 86 ESI processing */
10 
11 #ifndef SQUID_ESIINCLUDE_H
12 #define SQUID_ESIINCLUDE_H
13 
14 #include "esi/Context.h"
15 #include "esi/Element.h"
16 #include "esi/Segment.h"
17 
18 class ESIInclude;
20 
22 {
24 
25 public:
29  void freeResources();
30  int finished;
34 };
35 
36 class ESIInclude : public ESIElement
37 {
39 
40 public:
41  ESIInclude(esiTreeParentPtr, int attributes, const char **attr, ESIContext *);
42  ~ESIInclude();
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);
48 
49  struct {
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 */
53  } flags;
59  char *srcurl, *alturl;
60  void includeFail(ESIStreamContext::Pointer);
61  void finish();
62 
63 private:
64  void Start (ESIStreamContext::Pointer, char const *, ESIVarState *);
66  void start();
67  bool started;
68  bool sent;
69  ESIInclude(ESIInclude const &);
70  bool dataNeeded() const;
71  void prepareRequestHeaders(HttpHeader &tempheaders, ESIVarState *vars);
72 };
73 
74 #endif /* SQUID_ESIINCLUDE_H */
75 
ESISegment::Pointer srccontent
Definition: Include.h:56
#define MEMPROXY_CLASS(CLASS)
ESIVarState * varState
Definition: Include.h:58
esiProcessResult_t
Definition: Element.h:18
bool started
Definition: Include.h:67
esiTreeParentPtr parent
Definition: Include.h:65
bool sent
Definition: Include.h:68
CBDATA_CLASS(ESIStreamContext)
int finished
Definition: Include.h:52
ESISegment::Pointer buffer
Definition: Include.h:33
RefCount< ESIInclude > ESIIncludePtr
Definition: Include.h:18
ESIStreamContext::Pointer src
Definition: Include.h:54
ESISegment::Pointer altcontent
Definition: Include.h:57
RefCount< ESIStreamContext > Pointer
Definition: Include.h:26
ESISegment::Pointer localbuffer
Definition: Include.h:32
ESIStreamContext()
Definition: Esi.cc:236
ESIStreamContext::Pointer alt
Definition: Include.h:55
int onerrorcontinue
Definition: Include.h:50
char * srcurl
Definition: Include.h:59
ESIIncludePtr include
Definition: Include.h:31
void freeResources()
Definition: Include.cc:204
int failed
Definition: Include.h:51
void Start(const Comm::ConnectionPointer &conn, IDCB *callback, void *cbdata)
Definition: Ident.cc:237

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors