pandemonium_engine/modules/web/http/web_server_cookie.h

70 lines
1.4 KiB
C++
Raw Normal View History

#ifndef WEB_SERVER_COOKIE_H
#define WEB_SERVER_COOKIE_H
2022-07-21 14:05:55 +02:00
#include "core/os/os.h"
#include "core/ustring.h"
#include "core/reference.h"
class WebServerCookie : public Reference {
GDCLASS(WebServerCookie, Reference);
public:
String get_domain();
void set_domain(const String &val);
String get_path();
void set_path(const String &val);
String get_key();
void set_key(const String &val);
String get_value();
void set_value(const String &val);
bool get_http_only();
void set_http_only(const bool val);
bool get_secure();
void set_secure(const bool val);
2022-07-21 14:05:55 +02:00
bool get_delete();
void set_delete(const bool val);
bool get_should_expire();
void set_should_expire(const bool val);
uint64_t get_expiry_date_unix_time();
void set_expiry_date_unix_time(const uint64_t unix_time);
OS::DateTime get_expiry_date();
void set_expiry_date(OS::DateTime date_time);
void set_expiry_date(OS::Date date, OS::Time time);
Dictionary get_expiry_date_dict();
void set_expiry_date_dict(const Dictionary &date, const Dictionary &time);
void set_expiry_date_dt_dict(const Dictionary &date_time);
void set_data(const String &p_key, const String &p_value);
2022-07-21 14:05:55 +02:00
String get_response_header_string();
WebServerCookie();
~WebServerCookie();
protected:
static void _bind_methods();
2022-07-21 14:05:55 +02:00
bool _should_expire;
OS::DateTime _expiry_date;
String _domain;
String _path;
String _key;
String _value;
bool _http_only;
bool _secure;
bool _delete;
};
2022-06-26 15:00:25 +02:00
#endif