qBittorrent
|
#include <dnsupdater.h>
Public Slots | |
void | updateCredentials () |
Public Member Functions | |
DNSUpdater (QObject *parent=nullptr) | |
~DNSUpdater () | |
Static Public Member Functions | |
static QUrl | getRegistrationUrl (DNS::Service service) |
Private Types | |
enum | State { OK , INVALID_CREDS , FATAL } |
Private Slots | |
void | checkPublicIP () |
void | ipRequestFinished (const DownloadResult &result) |
void | updateDNSService () |
void | ipUpdateFinished (const DownloadResult &result) |
Private Member Functions | |
QString | getUpdateUrl () const |
void | processIPUpdateReply (const QString &reply) |
Private Attributes | |
QHostAddress | m_lastIP |
QDateTime | m_lastIPCheckTime |
QTimer | m_ipCheckTimer |
int | m_state |
DNS::Service | m_service |
QString | m_domain |
QString | m_username |
QString | m_password |
Static Private Attributes | |
static const int | IP_CHECK_INTERVAL_MS = 1800000 |
Definition at line 43 of file dnsupdater.h.
|
private |
|
explicit |
Definition at line 41 of file dnsupdater.cpp.
References checkPublicIP(), Preferences::getDNSLastIP(), Preferences::getDNSLastUpd(), Preferences::instance(), IP_CHECK_INTERVAL_MS, m_ipCheckTimer, m_lastIP, m_lastIPCheckTime, and updateCredentials().
DNSUpdater::~DNSUpdater | ( | ) |
Definition at line 66 of file dnsupdater.cpp.
References Preferences::instance(), m_lastIP, m_lastIPCheckTime, Preferences::setDNSLastIP(), and Preferences::setDNSLastUpd().
|
privateslot |
Definition at line 74 of file dnsupdater.cpp.
References Net::DownloadManager::download(), Net::DownloadManager::instance(), ipRequestFinished(), m_lastIPCheckTime, m_state, and OK.
Referenced by DNSUpdater(), and updateCredentials().
|
static |
Definition at line 299 of file dnsupdater.cpp.
References DNS::DynDNS, and DNS::NoIP.
Referenced by OptionsDialog::on_registerDNSBtn_clicked().
|
private |
Definition at line 131 of file dnsupdater.cpp.
References DNS::DynDNS, m_domain, m_lastIP, m_password, m_service, m_username, and DNS::NoIP.
Referenced by updateDNSService().
|
privateslot |
Definition at line 85 of file dnsupdater.cpp.
References Net::DownloadResult::data, Net::DownloadResult::errorString, m_lastIP, Net::DownloadResult::status, Net::Success, and updateDNSService().
Referenced by checkPublicIP().
|
privateslot |
Definition at line 169 of file dnsupdater.cpp.
References Net::DownloadResult::data, Net::DownloadResult::errorString, processIPUpdateReply(), Net::DownloadResult::status, and Net::Success.
Referenced by updateDNSService().
|
private |
Definition at line 177 of file dnsupdater.cpp.
References Logger::addMessage(), Log::CRITICAL, FATAL, Log::INFO, Logger::instance(), INVALID_CREDS, m_ipCheckTimer, m_lastIP, and m_state.
Referenced by ipUpdateFinished().
|
slot |
Definition at line 238 of file dnsupdater.cpp.
References Logger::addMessage(), checkPublicIP(), Log::CRITICAL, FATAL, Preferences::getDynDNSPassword(), Preferences::getDynDNSService(), Preferences::getDynDNSUsername(), Preferences::getDynDomainName(), Logger::instance(), Preferences::instance(), INVALID_CREDS, m_domain, m_ipCheckTimer, m_lastIP, m_password, m_service, m_state, m_username, and OK.
Referenced by DNSUpdater().
|
privateslot |
Definition at line 121 of file dnsupdater.cpp.
References Net::DownloadManager::download(), getUpdateUrl(), Net::DownloadManager::instance(), ipUpdateFinished(), and m_lastIPCheckTime.
Referenced by ipRequestFinished().
|
staticprivate |
Definition at line 70 of file dnsupdater.h.
Referenced by DNSUpdater().
|
private |
Definition at line 81 of file dnsupdater.h.
Referenced by getUpdateUrl(), and updateCredentials().
|
private |
Definition at line 77 of file dnsupdater.h.
Referenced by DNSUpdater(), processIPUpdateReply(), and updateCredentials().
|
private |
Definition at line 75 of file dnsupdater.h.
Referenced by DNSUpdater(), getUpdateUrl(), ipRequestFinished(), processIPUpdateReply(), updateCredentials(), and ~DNSUpdater().
|
private |
Definition at line 76 of file dnsupdater.h.
Referenced by checkPublicIP(), DNSUpdater(), updateDNSService(), and ~DNSUpdater().
|
private |
Definition at line 83 of file dnsupdater.h.
Referenced by getUpdateUrl(), and updateCredentials().
|
private |
Definition at line 80 of file dnsupdater.h.
Referenced by getUpdateUrl(), and updateCredentials().
|
private |
Definition at line 78 of file dnsupdater.h.
Referenced by checkPublicIP(), processIPUpdateReply(), and updateCredentials().
|
private |
Definition at line 82 of file dnsupdater.h.
Referenced by getUpdateUrl(), and updateCredentials().