HttpBody.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 HTTPBODY_H_
10 #define HTTPBODY_H_
11 
12 #include "MemBuf.h"
13 
19 class HttpBody
20 {
21 public:
22  HttpBody();
23  ~HttpBody();
29  void setMb(MemBuf *);
30 
35  void packInto(Packable *) const;
36 
38  void clear();
39 
41  bool hasContent() const { return (mb->contentSize()>0); }
42 
44  mb_size_t contentSize() const { return mb->contentSize(); }
45 
47  char *content() const { return mb->content(); }
48 private:
49  HttpBody& operator=(const HttpBody&); //not implemented
50  HttpBody(const HttpBody&); // not implemented
52 };
53 
54 #endif /* HTTPBODY_H_ */
55 
~HttpBody()
Definition: HttpBody.cc:18
MemBuf * mb
Definition: HttpBody.h:51
void packInto(Packable *) const
Definition: HttpBody.cc:42
mb_size_t contentSize() const
Definition: HttpBody.h:44
HttpBody()
Definition: HttpBody.cc:15
char * content() const
Definition: HttpBody.h:47
bool hasContent() const
Definition: HttpBody.h:41
char * content()
start of the added data
Definition: MemBuf.h:41
void clear()
clear the HttpBody content
Definition: HttpBody.cc:24
mb_size_t contentSize() const
available data size
Definition: MemBuf.h:47
ssize_t mb_size_t
Definition: MemBuf.h:17
void setMb(MemBuf *)
Definition: HttpBody.cc:31
Definition: MemBuf.h:23
HttpBody & operator=(const HttpBody &)

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors