mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-06-24 02:00:24 +07:00
feat: add mtproxy(#2370)
* Feat: Add MtProxy (Telegram) * add path files * refactor: move logic from ui to core --------- Co-authored-by: vkamn <vk@amnezia.org>
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
#ifndef NETWORKREACHABILITYCONTROLLER_H
|
||||
#define NETWORKREACHABILITYCONTROLLER_H
|
||||
|
||||
#include <QObject>
|
||||
|
||||
// Exposes QNetworkInformation to QML for UI that must not run remote operations offline.
|
||||
// Note: mozilla/networkwatcher.h has NetworkWatcher::getReachability() using the same API,
|
||||
// but networkwatcher.cpp is not linked into the desktop client (only the service process).
|
||||
|
||||
class NetworkReachabilityController final : public QObject {
|
||||
Q_OBJECT
|
||||
|
||||
Q_PROPERTY(bool hasInternetAccess READ hasInternetAccess NOTIFY hasInternetAccessChanged)
|
||||
|
||||
public:
|
||||
explicit NetworkReachabilityController(QObject *parent = nullptr);
|
||||
|
||||
bool hasInternetAccess() const;
|
||||
|
||||
signals:
|
||||
|
||||
void hasInternetAccessChanged();
|
||||
|
||||
private:
|
||||
void attachToNetworkInformation();
|
||||
|
||||
bool m_hasInternetAccess = true;
|
||||
};
|
||||
|
||||
#endif // NETWORKREACHABILITYCONTROLLER_H
|
||||
Reference in New Issue
Block a user