~clint-fewbar/ubuntu/precise/squid3/ignore-sighup-early

« back to all changes in this revision

Viewing changes to src/HttpStatusLine.h

  • Committer: Bazaar Package Importer
  • Author(s): Luigi Gangitano
  • Date: 2006-11-11 10:32:06 UTC
  • Revision ID: james.westby@ubuntu.com-20061111103206-f3p0r9g0vq44rp3r
Tags: upstream-3.0.PRE5
ImportĀ upstreamĀ versionĀ 3.0.PRE5

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
/*
 
3
 * $Id: HttpStatusLine.h,v 1.2 2005/09/12 23:28:57 wessels Exp $
 
4
 *
 
5
 *
 
6
 * SQUID Web Proxy Cache          http://www.squid-cache.org/
 
7
 * ----------------------------------------------------------
 
8
 *
 
9
 *  Squid is the result of efforts by numerous individuals from
 
10
 *  the Internet community; see the CONTRIBUTORS file for full
 
11
 *  details.   Many organizations have provided support for Squid's
 
12
 *  development; see the SPONSORS file for full details.  Squid is
 
13
 *  Copyrighted (C) 2001 by the Regents of the University of
 
14
 *  California; see the COPYRIGHT file for full details.  Squid
 
15
 *  incorporates software developed and/or copyrighted by other
 
16
 *  sources; see the CREDITS file for full details.
 
17
 *
 
18
 *  This program is free software; you can redistribute it and/or modify
 
19
 *  it under the terms of the GNU General Public License as published by
 
20
 *  the Free Software Foundation; either version 2 of the License, or
 
21
 *  (at your option) any later version.
 
22
 *  
 
23
 *  This program is distributed in the hope that it will be useful,
 
24
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
25
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
26
 *  GNU General Public License for more details.
 
27
 *  
 
28
 *  You should have received a copy of the GNU General Public License
 
29
 *  along with this program; if not, write to the Free Software
 
30
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
 
31
 *
 
32
 * Copyright (c) 2003, Robert Collins <robertc@squid-cache.org>
 
33
 */
 
34
 
 
35
#ifndef SQUID_HTTPSTATUSLINE_H
 
36
#define SQUID_HTTPSTATUSLINE_H
 
37
 
 
38
#include "HttpVersion.h"
 
39
 
 
40
class HttpStatusLine
 
41
{
 
42
 
 
43
public:
 
44
    /* public, read only */
 
45
    HttpVersion version;
 
46
    const char *reason;         /* points to a _constant_ string (default or supplied), never free()d */
 
47
    http_status status;
 
48
};
 
49
 
 
50
/* init/clean */
 
51
SQUIDCEXTERN void httpStatusLineInit(HttpStatusLine * sline);
 
52
SQUIDCEXTERN void httpStatusLineClean(HttpStatusLine * sline);
 
53
/* set/get values */
 
54
SQUIDCEXTERN void httpStatusLineSet(HttpStatusLine * sline, HttpVersion version,
 
55
                                    http_status status, const char *reason);
 
56
SQUIDCEXTERN const char *httpStatusLineReason(const HttpStatusLine * sline);
 
57
/* parse/pack */
 
58
/* parse a 0-terminating buffer and fill internal structires; returns true on success */
 
59
SQUIDCEXTERN int httpStatusLineParse(HttpStatusLine * sline, const String &protoPrefix,
 
60
                                     const char *start, const char *end);
 
61
/* pack fields using Packer */
 
62
SQUIDCEXTERN void httpStatusLinePackInto(const HttpStatusLine * sline, Packer * p);
 
63
 
 
64
#endif /* SQUID_HTTPSTATUSLINE_H */