FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
easyhttpcpp/src/HttpCacheInfo.cpp at master · sony/easyhttpcpp · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
sony
/
easyhttpcpp
Public
Notifications
You must be signed in to change notification settings
Fork
31
Star
176
Code
Issues
11
Pull requests
1
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
easyhttpcpp
/
src
/
HttpCacheInfo.cpp
Copy path
More file actions
More file actions
Latest commit
History
History
History
77 lines (61 loc) · 1.7 KB
Breadcrumbs
easyhttpcpp
/
src
/
HttpCacheInfo.cpp
Copy path
File metadata and controls
77 lines (61 loc) · 1.7 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
/*
* Copyright 2017 Sony Corporation
*/
#
include
"
easyhttpcpp/common/CoreLogger.h
"
#
include
"
HttpCacheInfo.h
"
namespace
easyhttpcpp
{
static
const
std::string Tag =
"
HttpCacheInfo
"
;
HttpCacheInfo::HttpCacheInfo
(
const
std::string& key,
size_t
dataSize) :
CacheInfoWithDataSize
(key, dataSize), m_reservedRemove(
false
), m_dataRefCount(
0
)
{
}
HttpCacheInfo::HttpCacheInfo
(
const
HttpCacheInfo& original) : CacheInfoWithDataSize(original)
{
m_reservedRemove = original.
m_reservedRemove
;
m_dataRefCount = original.
m_dataRefCount
;
}
HttpCacheInfo::~HttpCacheInfo
()
{
}
HttpCacheInfo& HttpCacheInfo::HttpCacheInfo::
operator
= (
const
HttpCacheInfo& original)
{
if
(&original !=
this
) {
CacheInfoWithDataSize::copyFrom
(original);
m_reservedRemove = original.
m_reservedRemove
;
m_dataRefCount = original.
m_dataRefCount
;
}
return
*
this
;
}
bool
HttpCacheInfo::
operator
== (
const
HttpCacheInfo& target)
const
{
if
(
getKey
() == target.
getKey
() &&
getDataSize
() == target.
getDataSize
() &&
m_reservedRemove == target.
m_reservedRemove
&& m_dataRefCount == target.
m_dataRefCount
) {
return
true
;
}
return
false
;
}
void
HttpCacheInfo::setReservedRemove
(
bool
reservedRemove)
{
m_reservedRemove = reservedRemove;
}
bool
HttpCacheInfo::isReservedRemove
()
const
{
return
m_reservedRemove;
}
void
HttpCacheInfo::addDataRef
()
{
m_dataRefCount++;
}
void
HttpCacheInfo::releaseDataRef
()
{
if
(m_dataRefCount ==
0
) {
EASYHTTPCPP_LOG_D
(Tag,
"
releaseDataRefCount: dataRefCount is already 0.
"
);
return
;
}
m_dataRefCount--;
}
unsigned
int
HttpCacheInfo::getDataRefCount
()
const
{
return
m_dataRefCount;
}
}
/*
namespace easyhttpcpp
*/
Back
|
FazBrowse Home
|
New Git URL