mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2025-07-03 00:06:09 +00:00
wired up pairing button
This commit is contained in:
parent
004e6913fa
commit
9b663c95b7
@ -1,6 +1,9 @@
|
|||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
#include "ui_mainwindow.h"
|
#include "ui_mainwindow.h"
|
||||||
#include "popupmanager.h"
|
#include "popupmanager.h"
|
||||||
|
#include "identitymanager.h"
|
||||||
|
#include "nvpairingmanager.h"
|
||||||
|
#include "nvhttp.h"
|
||||||
|
|
||||||
MainWindow::MainWindow(QWidget *parent) :
|
MainWindow::MainWindow(QWidget *parent) :
|
||||||
QMainWindow(parent),
|
QMainWindow(parent),
|
||||||
@ -48,7 +51,13 @@ void MainWindow::on_newHostBtn_clicked()
|
|||||||
{
|
{
|
||||||
QString hostname = popupmanager::getHostnameDialog(this);
|
QString hostname = popupmanager::getHostnameDialog(this);
|
||||||
if (!hostname.isEmpty()) {
|
if (!hostname.isEmpty()) {
|
||||||
//TODO: pairTo(hostname)
|
|
||||||
|
IdentityManager im = IdentityManager(QDir(QDir::current()));
|
||||||
|
NvPairingManager pm(hostname, im);
|
||||||
|
|
||||||
|
QString pin = pm.generatePinString();
|
||||||
|
NvHTTP http(hostname, im);
|
||||||
|
pm.pair(http.getServerInfo(), pin);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user