]> git.tdb.fi Git - libs/net.git/blobdiff - source/http/header.h
Adjust copyability of classes
[libs/net.git] / source / http / header.h
index 202b844110b1044d360eec00baaa30d6db8f94ad..0c6324bc6e5d59c838a44d9bdda8b3aa19e3ecc8 100644 (file)
@@ -12,6 +12,16 @@ class Message;
 
 struct Header
 {
+       enum Style
+       {
+               DEFAULT,
+               SINGLE_VALUE,
+               LIST,
+               KEY_VALUE_LIST,
+               VALUE_WITH_ATTRIBUTES,
+               LIST_WITH_ATTRIBUTES
+       };
+
        struct Value
        {
                std::string value;
@@ -19,12 +29,15 @@ struct Header
        };
 
        std::string name;
+       Style style;
        std::string raw_value;
        std::vector<Value> values;
 
-       Header() { }
-       Header(const Message &, const std::string &);
-       Header(const std::string &, const std::string &);
+       Header() = default;
+       Header(const Message &, const std::string &, Style = DEFAULT);
+       Header(const std::string &, const std::string &, Style = DEFAULT);
+
+       static Style get_default_style(const std::string &);
 
        void parse();
 };