8 #ifndef CPPCMS_HTTP_COOKIE_H 9 #define CPPCMS_HTTP_COOKIE_H 11 #include <cppcms/defs.h> 12 #include <booster/copy_ptr.h> 16 #include <cppcms/cstdint.h> 17 namespace cppcms {
namespace http {
20 std::ostream CPPCMS_API &
operator<<(std::ostream &,cookie
const &);
32 std::string name()
const;
37 std::string value()
const;
41 std::string path()
const;
46 std::string
domain()
const;
50 std::string comment()
const;
60 void name(std::string n);
65 void value(std::string v);
70 void path(std::string p);
79 void comment(std::string);
84 void expires(time_t when);
89 time_t expires()
const;
96 bool expires_defined()
const;
100 void max_age(
unsigned age);
105 unsigned max_age()
const;
111 bool max_age_defined()
const;
135 cookie(std::string name,std::string value);
139 cookie(std::string name,std::string value,
unsigned age);
143 cookie(std::string name,std::string value,
unsigned age,std::string path,std::string domain = std::string(),std::string comment=std::string());
146 cookie(std::string name,std::string value,std::string path,std::string domain=std::string(),std::string comment=std::string());
149 friend std::ostream &operator<<(std::ostream &,
cookie const &);
151 void write(std::ostream &)
const;
161 std::string comment_;
165 uint32_t secure_ : 1;
166 uint32_t has_age_ : 1;
167 uint32_t has_expiration_: 1;
168 CPPCMS_UNUSED_MEMBER uint32_t reserved_ : 29;
details::set_domain domain(std::string const &id)
Definition: message.h:789
std::basic_ostream< CharType > & operator<<(std::basic_ostream< CharType > &out, date_time const &t)
Definition: date_time.h:874
This is the namespace where all CppCMS functionality is placed.
Definition: application.h:19
Class that represents single HTTP Cookie Generally used in context of http::request and http::respons...
Definition: http_cookie.h:27