2020-05-08 14:45:27 +00:00
|
|
|
/**
|
|
|
|
* IPrefresher library
|
|
|
|
* - start checking ip once
|
|
|
|
* - or in loop mode
|
|
|
|
*
|
|
|
|
* @author Lukas Heiligenbrunner
|
|
|
|
* @date 06.04.2019
|
|
|
|
*/
|
2019-08-02 20:44:42 +00:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2020-05-15 11:57:09 +00:00
|
|
|
namespace IPRefresher {
|
2019-08-02 20:44:42 +00:00
|
|
|
/**
|
2020-05-15 11:57:09 +00:00
|
|
|
* Status return-codes for startUpService
|
2019-08-02 20:44:42 +00:00
|
|
|
*/
|
2020-05-15 11:57:09 +00:00
|
|
|
namespace Status_Code {
|
|
|
|
const int SUCCESS = 1;
|
|
|
|
const int ERROR = -1;
|
|
|
|
const int ERROR_NO_INTERNET = -2;
|
|
|
|
const int NOREFRESH = 0;
|
|
|
|
}
|
2019-10-23 07:24:35 +00:00
|
|
|
|
2020-04-30 17:37:11 +00:00
|
|
|
/**
|
2020-05-15 11:57:09 +00:00
|
|
|
* refresh ip address on Dynu server
|
2020-04-30 17:37:11 +00:00
|
|
|
*/
|
2020-05-15 11:57:09 +00:00
|
|
|
bool checkIPAdress(bool force);
|
2020-04-30 10:16:29 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* start the service in loop mode
|
|
|
|
* every 5 minutes the ip is checked an refreshed (needed for .service)
|
|
|
|
*/
|
2020-05-15 11:57:09 +00:00
|
|
|
void startUpService(int interval = 300);
|
|
|
|
}
|