Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
seleniumhq
GitHub Repository: seleniumhq/selenium
Path: blob/trunk/cpp/iedriver/BrowserCookie.h
2867 views
1
// Licensed to the Software Freedom Conservancy (SFC) under one
2
// or more contributor license agreements. See the NOTICE file
3
// distributed with this work for additional information
4
// regarding copyright ownership. The SFC licenses this file
5
// to you under the Apache License, Version 2.0 (the "License");
6
// you may not use this file except in compliance with the License.
7
// You may obtain a copy of the License at
8
//
9
// http://www.apache.org/licenses/LICENSE-2.0
10
//
11
// Unless required by applicable law or agreed to in writing, software
12
// distributed under the License is distributed on an "AS IS" BASIS,
13
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
// See the License for the specific language governing permissions and
15
// limitations under the License.
16
17
#ifndef WEBDRIVER_IE_BROWSERCOOKIE_H_
18
#define WEBDRIVER_IE_BROWSERCOOKIE_H_
19
20
#include <string>
21
22
namespace Json {
23
class Value;
24
} // namespace Json
25
26
namespace webdriver {
27
28
class BrowserCookie {
29
public:
30
BrowserCookie(void);
31
virtual ~BrowserCookie(void);
32
33
static BrowserCookie FromJson(const Json::Value& json_cookie);
34
35
Json::Value ToJson(void);
36
std::string ToString(void) const;
37
BrowserCookie Copy(void) const;
38
39
std::string name(void) const { return this->name_; }
40
void set_name(const std::string& name) { this->name_ = name; }
41
42
std::string value(void) const { return this->value_; }
43
void set_value(const std::string& value) { this->value_ = value; }
44
45
std::string domain(void) const { return this->domain_; }
46
void set_domain(const std::string& domain) { this->domain_ = domain; }
47
48
std::string path(void) const { return this->path_; }
49
void set_path(const std::string& path) { this->path_ = path; }
50
51
bool is_secure(void) const { return this->is_secure_; }
52
void set_is_secure(const bool is_secure) { this->is_secure_ = is_secure; }
53
54
bool is_httponly(void) const { return this->is_httponly_; }
55
void set_is_httponly(const bool is_httponly) {
56
this->is_httponly_ = is_httponly;
57
}
58
59
unsigned long long expiration_time(void) const {
60
return this->expiration_time_;
61
}
62
void set_expiration_time(const unsigned long long expiration_time) {
63
this->expiration_time_ = expiration_time;
64
}
65
66
private:
67
std::string name_;
68
std::string value_;
69
std::string domain_;
70
std::string path_;
71
unsigned long long expiration_time_;
72
bool is_secure_;
73
bool is_httponly_;
74
};
75
76
} // namespace webdriver
77
78
#endif // WEBDRIVER_IE_BROWSERCOOKIE_H_
79
80