mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 11:45:36 +02:00
remove pairing logic from interface
This commit is contained in:
parent
f72a87a47e
commit
4a4001a049
4 changed files with 0 additions and 84 deletions
|
@ -56,7 +56,6 @@
|
|||
#include <Logging.h>
|
||||
#include <OctalCode.h>
|
||||
#include <PacketHeaders.h>
|
||||
#include <PairingHandler.h>
|
||||
#include <ParticlesScriptingInterface.h>
|
||||
#include <PerfStat.h>
|
||||
#include <UUID.h>
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
#include <UUID.h>
|
||||
|
||||
#include "Application.h"
|
||||
#include "PairingHandler.h"
|
||||
#include "Menu.h"
|
||||
#include "Util.h"
|
||||
#include "InfoView.h"
|
||||
|
@ -137,7 +136,6 @@ Menu::Menu() :
|
|||
addActionToQMenuAndActionHash(fileMenu, MenuOption::SettingsExport, 0, this, SLOT(exportSettings()));
|
||||
|
||||
addDisabledActionAndSeparator(fileMenu, "Devices");
|
||||
addActionToQMenuAndActionHash(fileMenu, MenuOption::Pair, 0, PairingHandler::getInstance(), SLOT(sendPairRequest()));
|
||||
addCheckableActionToQMenuAndActionHash(fileMenu, MenuOption::TransmitterDrive, 0, true);
|
||||
|
||||
addActionToQMenuAndActionHash(fileMenu,
|
||||
|
|
|
@ -1,59 +0,0 @@
|
|||
//
|
||||
// PairingHandler.cpp
|
||||
// hifi
|
||||
//
|
||||
// Created by Stephen Birarda on 5/13/13.
|
||||
// Copyright (c) 2013 High Fidelity, Inc. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef _WIN32
|
||||
#include <arpa/inet.h> // not available on windows
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include <QtNetwork/QHostInfo>
|
||||
|
||||
#include <HifiSockAddr.h>
|
||||
#include <NodeList.h>
|
||||
|
||||
#include "PairingHandler.h"
|
||||
|
||||
const char PAIRING_SERVER_HOSTNAME[] = "pairing.highfidelity.io";
|
||||
const int PAIRING_SERVER_PORT = 7247;
|
||||
|
||||
PairingHandler* PairingHandler::getInstance() {
|
||||
static PairingHandler* instance = NULL;
|
||||
|
||||
if (!instance) {
|
||||
instance = new PairingHandler();
|
||||
}
|
||||
|
||||
return instance;
|
||||
}
|
||||
|
||||
void PairingHandler::sendPairRequest() {
|
||||
|
||||
// prepare the pairing request packet
|
||||
|
||||
NodeList* nodeList = NodeList::getInstance();
|
||||
|
||||
// use the getLocalAddress helper to get this client's listening address
|
||||
quint32 localAddress = htonl(getHostOrderLocalAddress());
|
||||
|
||||
char pairPacket[24] = {};
|
||||
sprintf(pairPacket, "Find %d.%d.%d.%d:%hu",
|
||||
localAddress & 0xFF,
|
||||
(localAddress >> 8) & 0xFF,
|
||||
(localAddress >> 16) & 0xFF,
|
||||
(localAddress >> 24) & 0xFF,
|
||||
NodeList::getInstance()->getNodeSocket().localPort());
|
||||
qDebug("Sending pair packet: %s", pairPacket);
|
||||
|
||||
HifiSockAddr pairingServerSocket(PAIRING_SERVER_HOSTNAME, PAIRING_SERVER_PORT);
|
||||
|
||||
// send the pair request to the pairing server
|
||||
nodeList->getNodeSocket().writeDatagram((char*) pairPacket, strlen(pairPacket),
|
||||
pairingServerSocket.getAddress(), pairingServerSocket.getPort());
|
||||
}
|
|
@ -1,22 +0,0 @@
|
|||
//
|
||||
// PairingHandler.h
|
||||
// hifi
|
||||
//
|
||||
// Created by Stephen Birarda on 5/13/13.
|
||||
// Copyright (c) 2013 High Fidelity, Inc. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef __hifi__PairingHandler__
|
||||
#define __hifi__PairingHandler__
|
||||
|
||||
#include <QtCore/QObject>
|
||||
|
||||
class PairingHandler : public QObject {
|
||||
Q_OBJECT
|
||||
public:
|
||||
static PairingHandler* getInstance();
|
||||
public slots:
|
||||
void sendPairRequest();
|
||||
};
|
||||
|
||||
#endif /* defined(__hifi__PairingHandler__) */
|
Loading…
Reference in a new issue