diff --git a/assignment-client/src/Agent.cpp b/assignment-client/src/Agent.cpp index 2906233d78..133a72859e 100644 --- a/assignment-client/src/Agent.cpp +++ b/assignment-client/src/Agent.cpp @@ -12,6 +12,7 @@ #include #include +#include #include #include "Agent.h" @@ -50,7 +51,7 @@ void Agent::run() { // figure out the URL for the script for this agent assignment QString scriptURLString("http://%1:8080/assignment/%2"); scriptURLString = scriptURLString.arg(NodeList::getInstance()->getDomainIP().toString(), - this->getUUIDStringWithoutCurlyBraces()); + uuidStringWithoutCurlyBraces(_uuid)); // setup curl for script download CURLcode curlResult; diff --git a/domain-server/src/DomainServer.cpp b/domain-server/src/DomainServer.cpp index a062c22ad3..62dfea3857 100644 --- a/domain-server/src/DomainServer.cpp +++ b/domain-server/src/DomainServer.cpp @@ -12,6 +12,7 @@ #include #include +#include #include "DomainServer.h" @@ -62,7 +63,7 @@ void DomainServer::civetwebUploadHandler(struct mg_connection *connection, const QString newPath(ASSIGNMENT_SCRIPT_HOST_LOCATION); newPath += "/"; // append the UUID for this script as the new filename, remove the curly braces - newPath += scriptAssignment->getUUIDStringWithoutCurlyBraces(); + newPath += uuidStringWithoutCurlyBraces(scriptAssignment->getUUID()); // rename the saved script to the GUID of the assignment and move it to the script host locaiton rename(path, newPath.toLocal8Bit().constData()); diff --git a/interface/src/DataServerClient.cpp b/interface/src/DataServerClient.cpp index 8afe5f0291..00bc4d4077 100644 --- a/interface/src/DataServerClient.cpp +++ b/interface/src/DataServerClient.cpp @@ -12,6 +12,9 @@ #include "DataServerClient.h" +QUuid DataServerClient::_clientUUID; +std::vector DataServerClient::_unconfirmedPackets; + const char DATA_SERVER_HOSTNAME[] = "data.highfidelity.io"; const unsigned short DATA_SERVER_PORT = 3282; const sockaddr_in DATA_SERVER_SOCKET = socketForHostnameAndHostOrderPort(DATA_SERVER_HOSTNAME, DATA_SERVER_PORT); diff --git a/libraries/shared/src/Assignment.cpp b/libraries/shared/src/Assignment.cpp index f9cf727894..6829a8b266 100644 --- a/libraries/shared/src/Assignment.cpp +++ b/libraries/shared/src/Assignment.cpp @@ -139,10 +139,6 @@ void Assignment::setPayload(const uchar* payload, int numBytes) { memcpy(_payload, payload, _numPayloadBytes); } -QString Assignment::getUUIDStringWithoutCurlyBraces() const { - return _uuid.toString().mid(1, _uuid.toString().length() - 2); -} - int Assignment::packToBuffer(unsigned char* buffer) { int numPackedBytes = 0; diff --git a/libraries/shared/src/Assignment.h b/libraries/shared/src/Assignment.h index 55e9f2816b..694be61e0e 100644 --- a/libraries/shared/src/Assignment.h +++ b/libraries/shared/src/Assignment.h @@ -60,7 +60,6 @@ public: void setUUID(const QUuid& uuid) { _uuid = uuid; } const QUuid& getUUID() const { return _uuid; } - QString getUUIDStringWithoutCurlyBraces() const; void resetUUID() { _uuid = QUuid::createUuid(); } Assignment::Command getCommand() const { return _command; } diff --git a/libraries/shared/src/UUID.cpp b/libraries/shared/src/UUID.cpp new file mode 100644 index 0000000000..e24c81ebe3 --- /dev/null +++ b/libraries/shared/src/UUID.cpp @@ -0,0 +1,14 @@ +// +// UUID.cpp +// hifi +// +// Created by Stephen Birarda on 10/7/13. +// Copyright (c) 2013 HighFidelity, Inc. All rights reserved. +// + +#include "UUID.h" + +QString uuidStringWithoutCurlyBraces(const QUuid& uuid) { + QString uuidStringNoBraces = uuid.toString().mid(1, uuid.toString().length() - 2); + return uuidStringNoBraces; +} \ No newline at end of file diff --git a/libraries/shared/src/UUID.h b/libraries/shared/src/UUID.h new file mode 100644 index 0000000000..985f44ae7b --- /dev/null +++ b/libraries/shared/src/UUID.h @@ -0,0 +1,16 @@ +// +// UUID.h +// hifi +// +// Created by Stephen Birarda on 10/7/13. +// Copyright (c) 2013 HighFidelity, Inc. All rights reserved. +// + +#ifndef __hifi__UUID__ +#define __hifi__UUID__ + +#include + +QString uuidStringWithoutCurlyBraces(const QUuid& uuid); + +#endif /* defined(__hifi__UUID__) */