summaryrefslogtreecommitdiff
path: root/protocols/Steam/src/http_request.h
diff options
context:
space:
mode:
authoraunsane <aunsane@gmail.com>2018-02-02 23:32:00 +0300
committeraunsane <aunsane@gmail.com>2018-02-02 23:34:06 +0300
commit5c145450b7aa7d4a59a7565d196fe67cec4f8880 (patch)
tree4ebc54062545f6ae00d13a8dfd17e0751a39def5 /protocols/Steam/src/http_request.h
parenta7c14294ccfc26f48b5e4c511b7dc65b7e3020a9 (diff)
Steam:
- switched on c++17 language support - forsed update user summaries when got "personastate" message - added detection of VR (?) clent into MirVer
Diffstat (limited to 'protocols/Steam/src/http_request.h')
-rw-r--r--protocols/Steam/src/http_request.h27
1 files changed, 20 insertions, 7 deletions
diff --git a/protocols/Steam/src/http_request.h b/protocols/Steam/src/http_request.h
index 696b04f2a8..321bad5e7e 100644
--- a/protocols/Steam/src/http_request.h
+++ b/protocols/Steam/src/http_request.h
@@ -128,13 +128,23 @@ public:
: nullptr;
}
- size_t GetSize() const
+ size_t size() const
{
return m_request
? m_request->headersCount
: 0;
}
+ const NETLIBHTTPHEADER* begin() const
+ {
+ return m_request->headers;
+ }
+
+ const NETLIBHTTPHEADER* end() const
+ {
+ return m_request->headers + m_request->headersCount;
+ }
+
HttpHeaders& operator<<(const PARAM &param)
{
Set(param.szName);
@@ -186,18 +196,21 @@ public:
: nullptr;
}
- const char* GetData() const
+ operator const uint8_t*() const
{
return m_request
- ? m_request->pData
+ ? (uint8_t*)m_request->pData
: nullptr;
}
- size_t GetSize() const
+ const uint8_t* data() const
{
- return m_request
- ? m_request->dataLength
- : 0;
+ return this->operator const uint8_t*();
+ }
+
+ size_t size() const
+ {
+ return m_request ? m_request->dataLength : 0;
}
};