Export/import of configuration filed on Android
This commit is contained in:
parent
a9217810e7
commit
cad0dabe42
15 changed files with 568 additions and 147 deletions
|
|
@ -4,11 +4,13 @@
|
|||
#include <QAndroidBinder>
|
||||
#include <QAndroidServiceConnection>
|
||||
|
||||
#include "ui/uilogic.h"
|
||||
#include "ui/pages_logic/StartPageLogic.h"
|
||||
|
||||
#include "protocols/vpnprotocol.h"
|
||||
using namespace amnezia;
|
||||
|
||||
|
||||
|
||||
class AndroidController : public QObject, public QAndroidServiceConnection
|
||||
{
|
||||
Q_OBJECT
|
||||
|
|
@ -19,7 +21,7 @@ public:
|
|||
|
||||
virtual ~AndroidController() override = default;
|
||||
|
||||
bool initialize();
|
||||
bool initialize(StartPageLogic *startPageLogic);
|
||||
|
||||
ErrorCode start();
|
||||
void stop();
|
||||
|
|
@ -27,9 +29,11 @@ public:
|
|||
|
||||
void checkStatus();
|
||||
void setNotificationText(const QString& title, const QString& message, int timerSec);
|
||||
void shareConfig(const QString& data, const QString& suggestedName);
|
||||
void setFallbackConnectedNotification();
|
||||
void getBackendLogs(std::function<void(const QString&)>&& callback);
|
||||
void cleanupBackendLogs();
|
||||
void importConfig(const QString& data);
|
||||
|
||||
// from QAndroidServiceConnection
|
||||
void onServiceConnected(const QString& name, const QAndroidBinder& serviceBinder) override;
|
||||
|
|
@ -58,6 +62,8 @@ private:
|
|||
//Protocol m_protocol;
|
||||
QJsonObject m_vpnConfig;
|
||||
|
||||
StartPageLogic *m_startPageLogic;
|
||||
|
||||
bool m_serviceConnected = false;
|
||||
std::function<void(const QString&)> m_logCallback;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue