Message.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2017 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__ADAPTATION__MESSAGE_H
10 #define SQUID__ADAPTATION__MESSAGE_H
11 
12 #include "base/RefCount.h"
13 #include "http/forward.h"
14 
15 class BodyPipe;
17 
18 namespace Adaptation
19 {
20 
21 // Manages the header and the body of an HTTP message being worked on.
22 // Adaptation transactions use this class for virgin and adapted HTTP messages.
23 // TODO: remove this class after adding refcounted message pointers and
24 // after making sure nobody abruptly clears the Http::Message::body_pipe pointer.
25 class Message
26 {
27 
28 public:
30 
31  Message();
32  Message(Header *aHeader);
33  ~Message();
34 
35  void clear();
36  void set(Header *aHeader);
37 
38  static void ShortCircuit(Message &src, Message &dest);
39 
40 public:
41  // virgin or adapted message being worked on
42  Header *header; // parsed HTTP status/request line and headers
43 
47 
48 private:
49  Message(const Message &); // not implemented
50  Message &operator =(const Message &); // not implemented
51 };
52 
53 } // namespace Adaptation;
54 
55 // TODO: replace ICAPInOut with Adaptation::Message (adding one for "cause")
56 
57 #endif /* SQUID__ADAPTATION__MESSAGE_H */
58 
static void ShortCircuit(Message &src, Message &dest)
Definition: Message.cc:50
void set(Header *aHeader)
Definition: Message.cc:39
common parts of HttpRequest and HttpReply
Definition: Message.h:24
Message & operator=(const Message &)
BodyPipePointer body_pipe
Definition: Message.h:46
Http::Message Header
Definition: Message.h:29
RefCount< BodyPipe > BodyPipePointer
Definition: Message.h:15
Header * header
Definition: Message.h:42

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors