Skip to content

Commit 2b08477

Browse files
committed
http interface
1 parent 58c5ed8 commit 2b08477

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#pragma once
2+
3+
#include "GACommon.h"
4+
5+
namespace gameanalytics
6+
{
7+
class GAHttpWrapper
8+
{
9+
public:
10+
11+
struct Response
12+
{
13+
long code = -1;
14+
std::vector<uint8_t> packet;
15+
16+
inline std::string_view toString() const
17+
{
18+
return std::string_view((const char*)packet.data(), packet.size());
19+
}
20+
};
21+
22+
virtual void initialize() = 0;
23+
24+
virtual void cleanup() = 0;
25+
26+
virtual Response sendRequest(
27+
std::string const& url,
28+
std::string const& auth,
29+
std::vector<uint8_t> const& payloadData,
30+
bool useGzip,
31+
void* userData) = 0;
32+
};
33+
34+
} // namespace gameanalytics

0 commit comments

Comments
 (0)