/usr/include/libecap/common/header.h is in libecap3-dev 1.0.1-3ubuntu3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | /* (C) 2008 The Measurement Factory */
#ifndef LIBECAP__COMMON__HEADER_H
#define LIBECAP__COMMON__HEADER_H
#include <libecap/common/forward.h>
namespace libecap {
class Header {
public:
typedef Area Value;
public:
virtual ~Header() {}
virtual bool hasAny(const Name &name) const = 0;
//virtual bool hasOne(const Name &name, const Value &value) const = 0;
virtual Value value(const Name &name) const = 0; // empty if none
virtual void add(const Name &name, const Value &value) = 0;
//virtual void removeOne(const Name &name, const Value &value) = 0;
virtual void removeAny(const Name &name) = 0;
// visit all header fields, one by one
virtual void visitEach(NamedValueVisitor &visitor) const = 0;
virtual Area image() const = 0;
virtual void parse(const Area &buf) = 0; // throws on failures
};
class FirstLine {
public:
virtual ~FirstLine() {}
virtual Version version() const = 0;
virtual void version(const Version &aVersion) = 0;
virtual Name protocol() const = 0;
virtual void protocol(const Name &aProtocol) = 0;
};
class RequestLine: public FirstLine {
public:
virtual ~RequestLine() {}
virtual void uri(const Area &aUri) = 0;
virtual Area uri() const = 0;
virtual void method(const Name &aMethod) = 0;
virtual Name method() const = 0;
};
class StatusLine: public FirstLine {
public:
virtual ~StatusLine() {}
virtual void statusCode(int code) = 0;
virtual int statusCode() const = 0;
virtual void reasonPhrase(const Area &phrase) = 0;
virtual Area reasonPhrase() const = 0;
};
} // namespace libecap
#endif
|