* This class allows to specify every single field of an http-style cookie. */
| 36 | * This class allows to specify every single field of an http-style cookie. |
| 37 | */ |
| 38 | class cookie { |
| 39 | public: |
| 40 | /** |
| 41 | * Default constructor. |
| 42 | */ |
| 43 | cookie() = default; |
| 44 | /** |
| 45 | * The overloaded constructor allow a fast way to build a cookie. |
| 46 | */ |
| 47 | cookie(const std::string&, const std::string&, const cookie_datetime &, |
| 48 | const std::string& = "", const std::string& = "", bool = false); |
| 49 | /** |
| 50 | * This constructor overloades the previous one. |
| 51 | */ |
| 52 | cookie(const char *, const char *, const cookie_datetime &, const char * = "", |
| 53 | const char * = "", bool = false); |
| 54 | /** |
| 55 | * This method allows to specify the cookie name. |
| 56 | */ |
| 57 | cookie *set_name(const std::string&); |
| 58 | /** |
| 59 | * This method overloads the previous one allowing to specify a const char * |
| 60 | * instead of a string. |
| 61 | */ |
| 62 | cookie *set_name(const char *); |
| 63 | /** |
| 64 | * This method allows to specify the cookie value. |
| 65 | */ |
| 66 | cookie *set_value(const std::string&); |
| 67 | /** |
| 68 | * This method allows to specify the cookie value, |
| 69 | */ |
| 70 | cookie *set_value(const char *); |
| 71 | /** |
| 72 | * This method allows to specify the cookie path. |
| 73 | */ |
| 74 | cookie *set_path(const std::string&) NOEXCEPT; |
| 75 | /** |
| 76 | * This method overloads the previous one allowing to specify a const char * |
| 77 | * instead of a string. |
| 78 | */ |
| 79 | cookie *set_path(const char *) NOEXCEPT; |
| 80 | /** |
| 81 | * This method allows to specify the cookie domain. |
| 82 | */ |
| 83 | cookie *set_domain(const std::string&) NOEXCEPT; |
| 84 | /** |
| 85 | * This method overloads the previous one allowing to specify a const char * |
| 86 | * instead of a string. |
| 87 | */ |
| 88 | cookie *set_domain(const char *) NOEXCEPT; |
| 89 | /** |
| 90 | * This method allows to specify the cookie security. |
| 91 | */ |
| 92 | cookie *set_secure(bool) NOEXCEPT; |
| 93 | /** |
| 94 | * This method overloads the previous one allowing to specify an integer instead |
| 95 | * of a bool. |
nothing calls this directly
no outgoing calls
no test coverage detected