xs/CookieJar.xsi

filter: Statementstmt 0.0% 0 / 21 Branchbran 0.0% 0 / 94 Conditioncond n/a MC/DCmcdc n/a Subroutinesub n/a Podpod n/a totaltotal 0.0% 0 / 115 CC 0 SCAR 0
CC
0
Cov
0%
CRAP 0
« xs/Compression.xsi ↑ Summary xs/Error.xsi »
1 MODULE = Protocol::HTTP PACKAGE = Protocol::HTTP::CookieJar
2 PROTOTYPES: DISABLE
3  
4 CookieJar* CookieJar::new (string data = {}) {
5 0 RETVAL = new CookieJar(data);
6 0 ▶}
Branch: 1 branch
BranchTrueFalseTotal
} 0 0 0
7 0 ▶ 
Branch: 4 branches
BranchTrueFalseTotal
0 0 0
0 0 0
0 0 0
0 0 0
8 void parse_cookies(const string& data) {
9 0 CookieJar::DomainCookies dc;
10 0 auto ret = CookieJar::parse_cookies(data, dc);
11 0 ▶ EXTEND(SP, 2);
Branch: 2 branches
BranchTrueFalseTotal
EXTEND(SP, 2); 0 0 0
EXTEND(SP, 2); 0 0 0
12 0 ▶ mXPUSHs(xs::out(ret).detach());
Branch: 4 branches
BranchTrueFalseTotal
mXPUSHs(xs::out(ret).detach()); 0 0 0
mXPUSHs(xs::out(ret).detach()); 0 0 0
mXPUSHs(xs::out(ret).detach()); 0 0 0
mXPUSHs(xs::out(ret).detach()); 0 0 0
13 0 ▶ mXPUSHs(xs::out(dc).detach());
Branch: 4 branches
BranchTrueFalseTotal
mXPUSHs(xs::out(dc).detach()); 0 0 0
mXPUSHs(xs::out(dc).detach()); 0 0 0
mXPUSHs(xs::out(dc).detach()); 0 0 0
mXPUSHs(xs::out(dc).detach()); 0 0 0
14 0 XSRETURN(2);
15 }
16  
17 string CookieJar::to_string(bool include_session = false, Date* now = nullptr) {
18 0 ▶ RETVAL = THIS->to_string(include_session, (now ? *now : Date::now()));
Branch: 6 branches
BranchTrueFalseTotal
RETVAL = THIS->to_string(include_session, (now ? *now : Date::now())); 0 0 0
RETVAL = THIS->to_string(include_session, (now ? *now : Date::now())); 0 0 0
RETVAL = THIS->to_string(include_session, (now ? *now : Date::now())); 0 0 0
RETVAL = THIS->to_string(include_session, (now ? *now : Date::now())); 0 0 0
RETVAL = THIS->to_string(include_session, (now ? *now : Date::now())); 0 0 0
RETVAL = THIS->to_string(include_session, (now ? *now : Date::now())); 0 0 0
19 }
20  
21 0 void CookieJar::clear()
22  
23 void CookieJar::add(const string& name, const Response::Cookie& cookies, URISP origin, const Date* now = nullptr) {
24 0 ▶ THIS->add(name, cookies, origin, (now ? *now : Date::now()));
Branch: 5 branches
BranchTrueFalseTotal
THIS->add(name, cookies, origin, (now ? *now : Date::now())); 0 0 0
THIS->add(name, cookies, origin, (now ? *now : Date::now())); 0 0 0
THIS->add(name, cookies, origin, (now ? *now : Date::now())); 0 0 0
THIS->add(name, cookies, origin, (now ? *now : Date::now())); 0 0 0
THIS->add(name, cookies, origin, (now ? *now : Date::now())); 0 0 0
25 }
26  
27 0 CookieJar::Cookies CookieJar::remove(string domain = "", string name = "", string path = "/")
28 0 ▶ 
Branch: 2 branches
BranchTrueFalseTotal
0 0 0
0 0 0
29 Sv CookieJar::all_cookies() {
30 0 ▶ RETVAL = xs::out(THIS->domain_cookies);
Branch: 1 branch
BranchTrueFalseTotal
RETVAL = xs::out(THIS->domain_cookies); 0 0 0
31 }
32  
33 Sv CookieJar::find(URISP request_uri, URISP context_uri = request_uri, Date* now = nullptr, bool top_level = true) {
34 0 ▶ RETVAL = xs::out(THIS->find(request_uri, context_uri, (now ? *now : Date::now()), top_level));
Branch: 6 branches
BranchTrueFalseTotal
RETVAL = xs::out(THIS->find(request_uri, context_uri, (now ? *now : Date::now()), top_level)); 0 0 0
RETVAL = xs::out(THIS->find(request_uri, context_uri, (now ? *now : Date::now()), top_level)); 0 0 0
RETVAL = xs::out(THIS->find(request_uri, context_uri, (now ? *now : Date::now()), top_level)); 0 0 0
RETVAL = xs::out(THIS->find(request_uri, context_uri, (now ? *now : Date::now()), top_level)); 0 0 0
RETVAL = xs::out(THIS->find(request_uri, context_uri, (now ? *now : Date::now()), top_level)); 0 0 0
RETVAL = xs::out(THIS->find(request_uri, context_uri, (now ? *now : Date::now()), top_level)); 0 0 0
35 }
36  
37 void CookieJar::collect(const Response& res, URISP request_uri, Date* now = nullptr) {
38 0 ▶ THIS->collect(res, request_uri, (now ? *now : Date::now()));
Branch: 6 branches
BranchTrueFalseTotal
THIS->collect(res, request_uri, (now ? *now : Date::now())); 0 0 0
THIS->collect(res, request_uri, (now ? *now : Date::now())); 0 0 0
THIS->collect(res, request_uri, (now ? *now : Date::now())); 0 0 0
THIS->collect(res, request_uri, (now ? *now : Date::now())); 0 0 0
THIS->collect(res, request_uri, (now ? *now : Date::now())); 0 0 0
THIS->collect(res, request_uri, (now ? *now : Date::now())); 0 0 0
39 }
40  
41 void CookieJar::populate(Request& request, URISP context_uri = request.uri, bool top_level = true, Date* now = nullptr) {
42 0 ▶ THIS->populate(request, context_uri, top_level, (now ? *now : Date::now()));
Branch: 5 branches
BranchTrueFalseTotal
THIS->populate(request, context_uri, top_level, (now ? *now : Date::now())); 0 0 0
THIS->populate(request, context_uri, top_level, (now ? *now : Date::now())); 0 0 0
THIS->populate(request, context_uri, top_level, (now ? *now : Date::now())); 0 0 0
THIS->populate(request, context_uri, top_level, (now ? *now : Date::now())); 0 0 0
THIS->populate(request, context_uri, top_level, (now ? *now : Date::now())); 0 0 0
43 }
44  
45 void CookieJar::set_ignore(Sub sub) {
46 0 ▶ auto fn = xs::sub2function<CookieJar::ignore_fn>(sub);
Branch: 1 branch
BranchTrueFalseTotal
auto fn = xs::sub2function<CookieJar::ignore_fn>(sub); 0 0 0
47 0 THIS->set_ignore(fn);
48 }
49  
50 SV* CLONE_SKIP (...) {
51 0 XSRETURN_YES;
52 PERL_UNUSED_VAR(items);
53 }
« xs/Compression.xsi ↑ Summary xs/Error.xsi »