code reformat

This commit is contained in:
max mustermann 2019-05-08 19:31:49 +02:00
parent 31819abcaf
commit c738a01ce4
9 changed files with 35 additions and 28 deletions

1
.gitignore vendored
View File

@ -20,6 +20,7 @@
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml
.idea/**/*.xml
# Gradle
.idea/**/gradle.xml

View File

@ -9,7 +9,9 @@
class Logger {
public:
void logToLogfile(std::string text);
void safeip(std::string ip);
std::string readip();
};

View File

@ -18,7 +18,8 @@ std::string API::request(std::string myurl) {
return request(std::move(myurl), false, map, str);
}
std::string API::request(std::string myurl, bool post, Hashmap<std::string,std::string> &map, std::vector<std::string> &headers) {
std::string
API::request(std::string myurl, bool post, Hashmap<std::string, std::string> &map, std::vector<std::string> &headers) {
CURL *curl;
CURLcode res;
@ -66,7 +67,6 @@ std::string API::request(std::string myurl, bool post, Hashmap<std::string,std::
}
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_data);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &readString);

View File

@ -12,6 +12,7 @@
class API {
public:
std::string request(std::string myurl);
std::string request(std::string myurl, bool post, Hashmap<std::string, std::string> &map, std::vector<std::string> &headers);
private:

View File

@ -9,10 +9,13 @@
#include <iostream>
#include <vector>
template <class keytype,class valuetype> class Hashmap {
template<class keytype, class valuetype>
class Hashmap {
public:
void add(keytype key, keytype value);
keytype getKey(int position);
valuetype getValue(int position);
int size();