Menu

[r712]: / framework2 / trunk / cppcms / http / cookie.h  Maximize  Restore  History

Download this file

57 lines (43 with data), 1.2 kB

 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
#ifndef CPPCMS_HTTP_COOKIE_H
#define CPPCMS_HTTP_COOKIE_H
namespace cppcms { namespace http {
std::ostream &operator<<(std::ostream &,cookie const &);
class cookie_impl;
class cookie {
std::string name_,
std::string value_,
std::string path_,
std::string domain_;
unsigned max_age_;
// for future use
cookie_impl *p;
uint32_t secure_ : 1;
uint32_t has_age_ : 1;
uint32_t reserved_ : 30;
public:
std::string name() const;
std::string value() const;
std::string path() const;
std::string domain() const;
bool secure() const;
void name(std::string n);
void value(std::string v);
void path(std::string p);
void domain(std::string);
void max_age(unsigned a);
void browser_age();
void secure(bool v);
// Mandatory set
cookie();
~cookie();
cookie(cookie const &);
cookie const &operator=(cookie const &);
// Additional
cookie(std::string name,std::string value);
cookie(std::string name,std::string value,unsigned age);
cookie(std::string name,std::string value,unsigned age,std::string path,std::string domain="");
cookie(std::string name,std::string value,std::string path,std::string domain="");
friend std::ostream &operator<<(std::ostream,cookie);
};
} } //::cppcms::http
#endif
MongoDB Logo MongoDB