mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-06-22 02:01:08 +07:00
Import config from filesystem on iOS
This commit is contained in:
@@ -4,6 +4,5 @@
|
||||
#include "ui/controllers/importController.h"
|
||||
|
||||
void QtAppDelegateInitialize();
|
||||
void setImportController(ImportController*);
|
||||
|
||||
#endif // QTAPPDELEGATECINTERFACE_H
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "QtAppDelegate-C-Interface.h"
|
||||
|
||||
#include "ui/controllers/importController.h"
|
||||
|
||||
@interface QtAppDelegate : UIResponder <UIApplicationDelegate>
|
||||
+(QtAppDelegate *)sharedQtAppDelegate;
|
||||
@property (nonatomic) ImportController* ImportController;
|
||||
@end
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#import "QtAppDelegate.h"
|
||||
#import "ios_controller.h"
|
||||
|
||||
#include <QFile>
|
||||
|
||||
@@ -79,7 +80,7 @@
|
||||
bool isOpenFile = file.open(QIODevice::ReadOnly);
|
||||
QByteArray data = file.readAll();
|
||||
|
||||
[QtAppDelegate sharedQtAppDelegate].ImportController->extractConfigFromData(QString(data));
|
||||
IosController::Instance()->importConfigFromOutside(QString(data));
|
||||
return YES;
|
||||
}
|
||||
return NO;
|
||||
@@ -92,8 +93,4 @@ void QtAppDelegateInitialize()
|
||||
NSLog(@"Created a new AppDelegate");
|
||||
}
|
||||
|
||||
void setImportController(ImportController* controller) {
|
||||
[QtAppDelegate sharedQtAppDelegate].ImportController = controller;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@@ -49,6 +49,7 @@ public:
|
||||
signals:
|
||||
void connectionStateChanged(Vpn::ConnectionState state);
|
||||
void bytesChanged(quint64 receivedBytes, quint64 sentBytes);
|
||||
void importConfigFromOutside(const QString);
|
||||
|
||||
protected slots:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user