* new class for IP utils

* method to check telegram support out of config
* getters in Config.cpp
* lots of reformatings and cdoc
This commit is contained in:
2020-05-07 14:54:40 +02:00
parent b133ab6961
commit ba4af36df0
16 changed files with 175 additions and 58 deletions

View File

@ -25,7 +25,10 @@ public:
* @param headers header fields
* @return return string of server
*/
std::string request(std::string myurl, bool post, Hashmap<std::string, std::string> &map, std::vector<std::string> &headers);
std::string request(std::string myurl,
bool post,
Hashmap<std::string, std::string> &map,
std::vector<std::string> &headers);
private:
static size_t write_data(void *buffer, size_t size, size_t buffersize, FILE *stream);

View File

@ -6,14 +6,14 @@
#include "API.h"
class DynuAPI : API{
class DynuAPI : API {
public:
/**
* refresh the ip of domain on Dynu server
* @param ip new ip
* @return request status
*/
int refreshIp(std::string ip);
bool refreshIp(std::string ip);
/**
* init Telegram api with apikey and chatid
@ -21,7 +21,8 @@ public:
* @param domainId ID of domain received by Dynu
* @param domainName domainname to refresh
*/
void init(const std::string& dynuApiKey, const std::string& domainId, const std::string& domainName);
void init(const std::string &dynuApiKey, const std::string &domainId, const std::string &domainName);
private:
std::string dynuapikey; // Dynu API key

View File

@ -8,7 +8,7 @@
#include <string>
class IPAPI : API{
class IPAPI : API {
public:
/**
* get global ip of current internet connection

View File

@ -14,7 +14,7 @@ public:
* send telegram Message to predefined destination
* @param text message
*/
int sendMessage(const std::string& text);
int sendMessage(const std::string &text);
/**
* init Telegram api with apikey and chatid