* 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:
@ -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);
|
||||
|
@ -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
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
class IPAPI : API{
|
||||
class IPAPI : API {
|
||||
public:
|
||||
/**
|
||||
* get global ip of current internet connection
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user