]>
git.ipfire.org Git - thirdparty/squid.git/blob - src/HttpBody.h
2 * Copyright (C) 1996-2015 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.
14 /** Representation of a short predetermined message
16 * This class is useful to represent short HTTP messages, whose
17 * contents are known in advance, e.g. error messages
24 /** absorb the MemBuf, discarding anything currently stored
26 * After this call the lifetime of the passed MemBuf is managed
31 /** output the HttpBody contents into the supplied container
33 * \note content is not cleared by the output operation
35 void packInto(Packable
*) const;
37 /// clear the HttpBody content
40 /// \return true if there is any content in the HttpBody
41 bool hasContent() const { return (mb
->contentSize()>0); }
43 /// \return size of the HttpBody's message content
44 mb_size_t
contentSize() const { return mb
->contentSize(); }
46 /// \return pointer to the storage of the HttpBody
47 char *content() const { return mb
->content(); }
49 HttpBody
& operator=(const HttpBody
&); //not implemented
50 HttpBody(const HttpBody
&); // not implemented
54 #endif /* HTTPBODY_H_ */