mirror of
https://github.com/overte-org/overte.git
synced 2025-08-05 23:39:26 +02:00
fix spaces created by xcode find/replace
This commit is contained in:
parent
f6cd67f75e
commit
ffa6edc904
23 changed files with 36 additions and 36 deletions
|
@ -18,7 +18,7 @@ AvatarAudioStream::AvatarAudioStream(bool isStereo, const InboundAudioStream::Se
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
int AvatarAudioStream::parseStreamProperties (PacketType::Value type, const QByteArray& packetAfterSeqNum, int& numAudioSamples) {
|
int AvatarAudioStream::parseStreamProperties(PacketType::Value type, const QByteArray& packetAfterSeqNum, int& numAudioSamples) {
|
||||||
int readBytes = 0;
|
int readBytes = 0;
|
||||||
|
|
||||||
if (type == PacketTypeSilentAudioFrame) {
|
if (type == PacketTypeSilentAudioFrame) {
|
||||||
|
@ -53,6 +53,6 @@ int AvatarAudioStream::parseStreamProperties (PacketType::Value type, const QByt
|
||||||
int numAudioBytes = packetAfterSeqNum.size() - readBytes;
|
int numAudioBytes = packetAfterSeqNum.size() - readBytes;
|
||||||
numAudioSamples = numAudioBytes / sizeof(int16_t);
|
numAudioSamples = numAudioBytes / sizeof(int16_t);
|
||||||
}
|
}
|
||||||
|
|
||||||
return readBytes;
|
return readBytes;
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,13 +19,13 @@
|
||||||
class AvatarAudioStream : public PositionalAudioStream {
|
class AvatarAudioStream : public PositionalAudioStream {
|
||||||
public:
|
public:
|
||||||
AvatarAudioStream(bool isStereo, const InboundAudioStream::Settings& settings);
|
AvatarAudioStream(bool isStereo, const InboundAudioStream::Settings& settings);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// disallow copying of AvatarAudioStream objects
|
// disallow copying of AvatarAudioStream objects
|
||||||
AvatarAudioStream(const AvatarAudioStream&);
|
AvatarAudioStream(const AvatarAudioStream&);
|
||||||
AvatarAudioStream& operator= (const AvatarAudioStream&);
|
AvatarAudioStream& operator= (const AvatarAudioStream&);
|
||||||
|
|
||||||
int parseStreamProperties (PacketType::Value type, const QByteArray& packetAfterSeqNum, int& numAudioSamples);
|
int parseStreamProperties(PacketType::Value type, const QByteArray& packetAfterSeqNum, int& numAudioSamples);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // hifi_AvatarAudioStream_h
|
#endif // hifi_AvatarAudioStream_h
|
||||||
|
|
|
@ -168,7 +168,7 @@ int InboundAudioStream::parseData(const QByteArray& packet) {
|
||||||
return readBytes;
|
return readBytes;
|
||||||
}
|
}
|
||||||
|
|
||||||
int InboundAudioStream::parseStreamProperties (PacketType::Value type, const QByteArray& packetAfterSeqNum, int& numAudioSamples) {
|
int InboundAudioStream::parseStreamProperties(PacketType::Value type, const QByteArray& packetAfterSeqNum, int& numAudioSamples) {
|
||||||
if (type == PacketTypeSilentAudioFrame) {
|
if (type == PacketTypeSilentAudioFrame) {
|
||||||
quint16 numSilentSamples = 0;
|
quint16 numSilentSamples = 0;
|
||||||
memcpy(&numSilentSamples, packetAfterSeqNum.constData(), sizeof(quint16));
|
memcpy(&numSilentSamples, packetAfterSeqNum.constData(), sizeof(quint16));
|
||||||
|
@ -181,7 +181,7 @@ int InboundAudioStream::parseStreamProperties (PacketType::Value type, const QBy
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int InboundAudioStream::parseAudioData (PacketType::Value type, const QByteArray& packetAfterStreamProperties, int numAudioSamples) {
|
int InboundAudioStream::parseAudioData(PacketType::Value type, const QByteArray& packetAfterStreamProperties, int numAudioSamples) {
|
||||||
return _ringBuffer.writeData(packetAfterStreamProperties.data(), numAudioSamples * sizeof(int16_t));
|
return _ringBuffer.writeData(packetAfterStreamProperties.data(), numAudioSamples * sizeof(int16_t));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -194,11 +194,11 @@ protected:
|
||||||
/// parses the info between the seq num and the audio data in the network packet and calculates
|
/// parses the info between the seq num and the audio data in the network packet and calculates
|
||||||
/// how many audio samples this packet contains (used when filling in samples for dropped packets).
|
/// how many audio samples this packet contains (used when filling in samples for dropped packets).
|
||||||
/// default implementation assumes no stream properties and raw audio samples after stream propertiess
|
/// default implementation assumes no stream properties and raw audio samples after stream propertiess
|
||||||
virtual int parseStreamProperties (PacketType::Value type, const QByteArray& packetAfterSeqNum, int& networkSamples);
|
virtual int parseStreamProperties(PacketType::Value type, const QByteArray& packetAfterSeqNum, int& networkSamples);
|
||||||
|
|
||||||
/// parses the audio data in the network packet.
|
/// parses the audio data in the network packet.
|
||||||
/// default implementation assumes packet contains raw audio samples after stream properties
|
/// default implementation assumes packet contains raw audio samples after stream properties
|
||||||
virtual int parseAudioData (PacketType::Value type, const QByteArray& packetAfterStreamProperties, int networkSamples);
|
virtual int parseAudioData(PacketType::Value type, const QByteArray& packetAfterStreamProperties, int networkSamples);
|
||||||
|
|
||||||
/// writes silent samples to the buffer that may be dropped to reduce latency caused by the buffer
|
/// writes silent samples to the buffer that may be dropped to reduce latency caused by the buffer
|
||||||
virtual int writeDroppableSilentSamples(int silentSamples);
|
virtual int writeDroppableSilentSamples(int silentSamples);
|
||||||
|
|
|
@ -30,7 +30,7 @@ InjectedAudioStream::InjectedAudioStream(const QUuid& streamIdentifier, const bo
|
||||||
|
|
||||||
const uchar MAX_INJECTOR_VOLUME = 255;
|
const uchar MAX_INJECTOR_VOLUME = 255;
|
||||||
|
|
||||||
int InjectedAudioStream::parseStreamProperties (PacketType::Value type,
|
int InjectedAudioStream::parseStreamProperties(PacketType::Value type,
|
||||||
const QByteArray& packetAfterSeqNum,
|
const QByteArray& packetAfterSeqNum,
|
||||||
int& numAudioSamples) {
|
int& numAudioSamples) {
|
||||||
// setup a data stream to read from this packet
|
// setup a data stream to read from this packet
|
||||||
|
|
|
@ -31,7 +31,7 @@ private:
|
||||||
InjectedAudioStream& operator= (const InjectedAudioStream&);
|
InjectedAudioStream& operator= (const InjectedAudioStream&);
|
||||||
|
|
||||||
AudioStreamStats getAudioStreamStats() const;
|
AudioStreamStats getAudioStreamStats() const;
|
||||||
int parseStreamProperties (PacketType::Value type, const QByteArray& packetAfterSeqNum, int& numAudioSamples);
|
int parseStreamProperties(PacketType::Value type, const QByteArray& packetAfterSeqNum, int& numAudioSamples);
|
||||||
|
|
||||||
const QUuid _streamIdentifier;
|
const QUuid _streamIdentifier;
|
||||||
float _radius;
|
float _radius;
|
||||||
|
|
|
@ -42,7 +42,7 @@ int MixedProcessedAudioStream::writeLastFrameRepeatedWithFade(int samples) {
|
||||||
return deviceSamplesWritten;
|
return deviceSamplesWritten;
|
||||||
}
|
}
|
||||||
|
|
||||||
int MixedProcessedAudioStream::parseAudioData (PacketType::Value type, const QByteArray& packetAfterStreamProperties, int networkSamples) {
|
int MixedProcessedAudioStream::parseAudioData(PacketType::Value type, const QByteArray& packetAfterStreamProperties, int networkSamples) {
|
||||||
|
|
||||||
emit addedStereoSamples(packetAfterStreamProperties);
|
emit addedStereoSamples(packetAfterStreamProperties);
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,7 @@ public:
|
||||||
protected:
|
protected:
|
||||||
int writeDroppableSilentSamples(int silentSamples);
|
int writeDroppableSilentSamples(int silentSamples);
|
||||||
int writeLastFrameRepeatedWithFade(int samples);
|
int writeLastFrameRepeatedWithFade(int samples);
|
||||||
int parseAudioData (PacketType::Value type, const QByteArray& packetAfterStreamProperties, int networkSamples);
|
int parseAudioData(PacketType::Value type, const QByteArray& packetAfterStreamProperties, int networkSamples);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int networkToDeviceSamples(int networkSamples);
|
int networkToDeviceSamples(int networkSamples);
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
#include "EntityItem.h"
|
#include "EntityItem.h"
|
||||||
|
|
||||||
|
|
||||||
void EntityEditPacketSender::adjustEditPacketForClockSkew (PacketType::Value type,
|
void EntityEditPacketSender::adjustEditPacketForClockSkew(PacketType::Value type,
|
||||||
unsigned char* editBuffer, size_t length, int clockSkew) {
|
unsigned char* editBuffer, size_t length, int clockSkew) {
|
||||||
|
|
||||||
if (type == PacketTypeEntityAdd || type == PacketTypeEntityEdit) {
|
if (type == PacketTypeEntityAdd || type == PacketTypeEntityEdit) {
|
||||||
|
@ -26,7 +26,7 @@ void EntityEditPacketSender::adjustEditPacketForClockSkew (PacketType::Value typ
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void EntityEditPacketSender::queueEditEntityMessage (PacketType::Value type, EntityItemID modelID,
|
void EntityEditPacketSender::queueEditEntityMessage(PacketType::Value type, EntityItemID modelID,
|
||||||
const EntityItemProperties& properties) {
|
const EntityItemProperties& properties) {
|
||||||
if (!_shouldSend) {
|
if (!_shouldSend) {
|
||||||
return; // bail early
|
return; // bail early
|
||||||
|
|
|
@ -24,12 +24,12 @@ public:
|
||||||
/// which voxel-server node or nodes the packet should be sent to. Can be called even before voxel servers are known, in
|
/// which voxel-server node or nodes the packet should be sent to. Can be called even before voxel servers are known, in
|
||||||
/// which case up to MaxPendingMessages will be buffered and processed when voxel servers are known.
|
/// which case up to MaxPendingMessages will be buffered and processed when voxel servers are known.
|
||||||
/// NOTE: EntityItemProperties assumes that all distances are in meter units
|
/// NOTE: EntityItemProperties assumes that all distances are in meter units
|
||||||
void queueEditEntityMessage (PacketType::Value type, EntityItemID modelID, const EntityItemProperties& properties);
|
void queueEditEntityMessage(PacketType::Value type, EntityItemID modelID, const EntityItemProperties& properties);
|
||||||
|
|
||||||
void queueEraseEntityMessage(const EntityItemID& entityItemID);
|
void queueEraseEntityMessage(const EntityItemID& entityItemID);
|
||||||
|
|
||||||
// My server type is the model server
|
// My server type is the model server
|
||||||
virtual char getMyNodeType() const { return NodeType::EntityServer; }
|
virtual char getMyNodeType() const { return NodeType::EntityServer; }
|
||||||
virtual void adjustEditPacketForClockSkew (PacketType::Value type, unsigned char* editBuffer, size_t length, int clockSkew);
|
virtual void adjustEditPacketForClockSkew(PacketType::Value type, unsigned char* editBuffer, size_t length, int clockSkew);
|
||||||
};
|
};
|
||||||
#endif // hifi_EntityEditPacketSender_h
|
#endif // hifi_EntityEditPacketSender_h
|
||||||
|
|
|
@ -614,7 +614,7 @@ void EntityItemPropertiesFromScriptValueHonorReadOnly(const QScriptValue &object
|
||||||
//
|
//
|
||||||
// TODO: Implement support for script and visible properties.
|
// TODO: Implement support for script and visible properties.
|
||||||
//
|
//
|
||||||
bool EntityItemProperties::encodeEntityEditPacket (PacketType::Value command, EntityItemID id, const EntityItemProperties& properties,
|
bool EntityItemProperties::encodeEntityEditPacket(PacketType::Value command, EntityItemID id, const EntityItemProperties& properties,
|
||||||
unsigned char* bufferOut, int sizeIn, int& sizeOut) {
|
unsigned char* bufferOut, int sizeIn, int& sizeOut) {
|
||||||
OctreePacketData ourDataPacket(false, sizeIn); // create a packetData object to add out packet details too.
|
OctreePacketData ourDataPacket(false, sizeIn); // create a packetData object to add out packet details too.
|
||||||
OctreePacketData* packetData = &ourDataPacket; // we want a pointer to this so we can use our APPEND_ENTITY_PROPERTY macro
|
OctreePacketData* packetData = &ourDataPacket; // we want a pointer to this so we can use our APPEND_ENTITY_PROPERTY macro
|
||||||
|
|
|
@ -174,7 +174,7 @@ public:
|
||||||
void setGlowLevel(float value) { _glowLevel = value; _glowLevelChanged = true; }
|
void setGlowLevel(float value) { _glowLevel = value; _glowLevelChanged = true; }
|
||||||
void setLocalRenderAlpha(float value) { _localRenderAlpha = value; _localRenderAlphaChanged = true; }
|
void setLocalRenderAlpha(float value) { _localRenderAlpha = value; _localRenderAlphaChanged = true; }
|
||||||
|
|
||||||
static bool encodeEntityEditPacket (PacketType::Value command, EntityItemID id, const EntityItemProperties& properties,
|
static bool encodeEntityEditPacket(PacketType::Value command, EntityItemID id, const EntityItemProperties& properties,
|
||||||
unsigned char* bufferOut, int sizeIn, int& sizeOut);
|
unsigned char* bufferOut, int sizeIn, int& sizeOut);
|
||||||
|
|
||||||
static bool encodeEraseEntityMessage(const EntityItemID& entityItemID,
|
static bool encodeEraseEntityMessage(const EntityItemID& entityItemID,
|
||||||
|
|
|
@ -32,7 +32,7 @@ EntityScriptingInterface::EntityScriptingInterface() :
|
||||||
connect(nodeList.data(), &NodeList::canRezChanged, this, &EntityScriptingInterface::canRezChanged);
|
connect(nodeList.data(), &NodeList::canRezChanged, this, &EntityScriptingInterface::canRezChanged);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EntityScriptingInterface::queueEntityMessage (PacketType::Value packetType,
|
void EntityScriptingInterface::queueEntityMessage(PacketType::Value packetType,
|
||||||
EntityItemID entityID, const EntityItemProperties& properties) {
|
EntityItemID entityID, const EntityItemProperties& properties) {
|
||||||
getEntityPacketSender()->queueEditEntityMessage(packetType, entityID, properties);
|
getEntityPacketSender()->queueEditEntityMessage(packetType, entityID, properties);
|
||||||
}
|
}
|
||||||
|
|
|
@ -164,7 +164,7 @@ private:
|
||||||
bool actionWorker(const QUuid& entityID, std::function<bool(EntitySimulation*, EntityItemPointer)> actor);
|
bool actionWorker(const QUuid& entityID, std::function<bool(EntitySimulation*, EntityItemPointer)> actor);
|
||||||
bool setVoxels(QUuid entityID, std::function<void(PolyVoxEntityItem&)> actor);
|
bool setVoxels(QUuid entityID, std::function<void(PolyVoxEntityItem&)> actor);
|
||||||
bool setPoints(QUuid entityID, std::function<bool(LineEntityItem&)> actor);
|
bool setPoints(QUuid entityID, std::function<bool(LineEntityItem&)> actor);
|
||||||
void queueEntityMessage (PacketType::Value packetType, EntityItemID entityID, const EntityItemProperties& properties);
|
void queueEntityMessage(PacketType::Value packetType, EntityItemID entityID, const EntityItemProperties& properties);
|
||||||
|
|
||||||
/// actually does the work of finding the ray intersection, can be called in locking mode or tryLock mode
|
/// actually does the work of finding the ray intersection, can be called in locking mode or tryLock mode
|
||||||
RayToEntityIntersectionResult findRayIntersectionWorker(const PickRay& ray, Octree::lockType lockType,
|
RayToEntityIntersectionResult findRayIntersectionWorker(const PickRay& ray, Octree::lockType lockType,
|
||||||
|
|
|
@ -63,7 +63,7 @@ void EntityTree::eraseAllOctreeElements(bool createNewRoot) {
|
||||||
Octree::eraseAllOctreeElements(createNewRoot);
|
Octree::eraseAllOctreeElements(createNewRoot);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool EntityTree::handlesEditPacketType (PacketType::Value packetType) const {
|
bool EntityTree::handlesEditPacketType(PacketType::Value packetType) const {
|
||||||
// we handle these types of "edit" packets
|
// we handle these types of "edit" packets
|
||||||
switch (packetType) {
|
switch (packetType) {
|
||||||
case PacketTypeEntityAdd:
|
case PacketTypeEntityAdd:
|
||||||
|
@ -572,7 +572,7 @@ EntityItemPointer EntityTree::findEntityByEntityItemID(const EntityItemID& entit
|
||||||
return foundEntity;
|
return foundEntity;
|
||||||
}
|
}
|
||||||
|
|
||||||
int EntityTree::processEditPacketData (PacketType::Value packetType, const unsigned char* packetData, int packetLength,
|
int EntityTree::processEditPacketData(PacketType::Value packetType, const unsigned char* packetData, int packetLength,
|
||||||
const unsigned char* editData, int maxLength, const SharedNodePointer& senderNode) {
|
const unsigned char* editData, int maxLength, const SharedNodePointer& senderNode) {
|
||||||
|
|
||||||
if (!getIsServer()) {
|
if (!getIsServer()) {
|
||||||
|
|
|
@ -65,8 +65,8 @@ public:
|
||||||
virtual PacketType::Value expectedDataPacketType() const { return PacketTypeEntityData; }
|
virtual PacketType::Value expectedDataPacketType() const { return PacketTypeEntityData; }
|
||||||
virtual bool canProcessVersion(PacketVersion thisVersion) const
|
virtual bool canProcessVersion(PacketVersion thisVersion) const
|
||||||
{ return thisVersion >= VERSION_ENTITIES_USE_METERS_AND_RADIANS; }
|
{ return thisVersion >= VERSION_ENTITIES_USE_METERS_AND_RADIANS; }
|
||||||
virtual bool handlesEditPacketType (PacketType::Value packetType) const;
|
virtual bool handlesEditPacketType(PacketType::Value packetType) const;
|
||||||
virtual int processEditPacketData (PacketType::Value packetType, const unsigned char* packetData, int packetLength,
|
virtual int processEditPacketData(PacketType::Value packetType, const unsigned char* packetData, int packetLength,
|
||||||
const unsigned char* editData, int maxLength, const SharedNodePointer& senderNode);
|
const unsigned char* editData, int maxLength, const SharedNodePointer& senderNode);
|
||||||
|
|
||||||
virtual bool rootElementHasData() const { return true; }
|
virtual bool rootElementHasData() const { return true; }
|
||||||
|
|
|
@ -119,7 +119,7 @@ public:
|
||||||
|
|
||||||
bool packetVersionAndHashMatch(const QByteArray& packet);
|
bool packetVersionAndHashMatch(const QByteArray& packet);
|
||||||
|
|
||||||
// QByteArray byteArrayWithPopulatedHeader (PacketType::Value packetType)
|
// QByteArray byteArrayWithPopulatedHeader(PacketType::Value packetType)
|
||||||
// { return byteArrayWithUUIDPopulatedHeader(packetType, _sessionUUID); }
|
// { return byteArrayWithUUIDPopulatedHeader(packetType, _sessionUUID); }
|
||||||
// int populatePacketHeader(QByteArray& packet, PacketType::Value packetType)
|
// int populatePacketHeader(QByteArray& packet, PacketType::Value packetType)
|
||||||
// { return populatePacketHeaderWithUUID(packet, packetType, _sessionUUID); }
|
// { return populatePacketHeaderWithUUID(packet, packetType, _sessionUUID); }
|
||||||
|
@ -285,7 +285,7 @@ protected:
|
||||||
|
|
||||||
void stopInitialSTUNUpdate(bool success);
|
void stopInitialSTUNUpdate(bool success);
|
||||||
|
|
||||||
void sendPacketToIceServer (PacketType::Value packetType, const HifiSockAddr& iceServerSockAddr, const QUuid& headerID,
|
void sendPacketToIceServer(PacketType::Value packetType, const HifiSockAddr& iceServerSockAddr, const QUuid& headerID,
|
||||||
const QUuid& peerRequestID = QUuid());
|
const QUuid& peerRequestID = QUuid());
|
||||||
|
|
||||||
QUuid _sessionUUID;
|
QUuid _sessionUUID;
|
||||||
|
|
|
@ -67,7 +67,7 @@ void Node::updateClockSkewUsec(int clockSkewSample) {
|
||||||
_clockSkewUsec = (int)_clockSkewMovingPercentile.getValueAtPercentile();
|
_clockSkewUsec = (int)_clockSkewMovingPercentile.getValueAtPercentile();
|
||||||
}
|
}
|
||||||
|
|
||||||
PacketSequenceNumber Node::getLastSequenceNumberForPacketType (PacketType::Value packetType) const {
|
PacketSequenceNumber Node::getLastSequenceNumberForPacketType(PacketType::Value packetType) const {
|
||||||
auto typeMatch = _lastSequenceNumbers.find(packetType);
|
auto typeMatch = _lastSequenceNumbers.find(packetType);
|
||||||
if (typeMatch != _lastSequenceNumbers.end()) {
|
if (typeMatch != _lastSequenceNumbers.end()) {
|
||||||
return typeMatch->second;
|
return typeMatch->second;
|
||||||
|
|
|
@ -20,7 +20,7 @@ EditPacketBuffer::EditPacketBuffer() :
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
EditPacketBuffer::EditPacketBuffer (PacketType::Value type, unsigned char* buffer, size_t length, qint64 satoshiCost, QUuid nodeUUID) :
|
EditPacketBuffer::EditPacketBuffer(PacketType::Value type, unsigned char* buffer, size_t length, qint64 satoshiCost, QUuid nodeUUID) :
|
||||||
_nodeUUID(nodeUUID),
|
_nodeUUID(nodeUUID),
|
||||||
_currentType(type),
|
_currentType(type),
|
||||||
_currentSize(length),
|
_currentSize(length),
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
class EditPacketBuffer {
|
class EditPacketBuffer {
|
||||||
public:
|
public:
|
||||||
EditPacketBuffer();
|
EditPacketBuffer();
|
||||||
EditPacketBuffer (PacketType::Value type, unsigned char* codeColorBuffer, size_t length,
|
EditPacketBuffer(PacketType::Value type, unsigned char* codeColorBuffer, size_t length,
|
||||||
qint64 satoshiCost = 0, const QUuid nodeUUID = QUuid());
|
qint64 satoshiCost = 0, const QUuid nodeUUID = QUuid());
|
||||||
|
|
||||||
QUuid _nodeUUID;
|
QUuid _nodeUUID;
|
||||||
|
|
|
@ -230,8 +230,8 @@ public:
|
||||||
virtual bool canProcessVersion(PacketVersion thisVersion) const {
|
virtual bool canProcessVersion(PacketVersion thisVersion) const {
|
||||||
return thisVersion == versionForPacketType(expectedDataPacketType()); }
|
return thisVersion == versionForPacketType(expectedDataPacketType()); }
|
||||||
virtual PacketVersion expectedVersion() const { return versionForPacketType(expectedDataPacketType()); }
|
virtual PacketVersion expectedVersion() const { return versionForPacketType(expectedDataPacketType()); }
|
||||||
virtual bool handlesEditPacketType (PacketType::Value packetType) const { return false; }
|
virtual bool handlesEditPacketType(PacketType::Value packetType) const { return false; }
|
||||||
virtual int processEditPacketData (PacketType::Value packetType, const unsigned char* packetData, int packetLength,
|
virtual int processEditPacketData(PacketType::Value packetType, const unsigned char* packetData, int packetLength,
|
||||||
const unsigned char* editData, int maxLength, const SharedNodePointer& sourceNode) { return 0; }
|
const unsigned char* editData, int maxLength, const SharedNodePointer& sourceNode) { return 0; }
|
||||||
|
|
||||||
virtual bool recurseChildrenWithData() const { return true; }
|
virtual bool recurseChildrenWithData() const { return true; }
|
||||||
|
|
|
@ -159,7 +159,7 @@ void OctreeEditPacketSender::processPreServerExistsPackets() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void OctreeEditPacketSender::queuePendingPacketToNodes (PacketType::Value type, unsigned char* buffer,
|
void OctreeEditPacketSender::queuePendingPacketToNodes(PacketType::Value type, unsigned char* buffer,
|
||||||
size_t length, qint64 satoshiCost) {
|
size_t length, qint64 satoshiCost) {
|
||||||
// If we're asked to save messages while waiting for voxel servers to arrive, then do so...
|
// If we're asked to save messages while waiting for voxel servers to arrive, then do so...
|
||||||
|
|
||||||
|
@ -213,7 +213,7 @@ void OctreeEditPacketSender::queuePacketToNodes(unsigned char* buffer, size_t le
|
||||||
|
|
||||||
|
|
||||||
// NOTE: editPacketBuffer - is JUST the octcode/color and does not contain the packet header!
|
// NOTE: editPacketBuffer - is JUST the octcode/color and does not contain the packet header!
|
||||||
void OctreeEditPacketSender::queueOctreeEditMessage (PacketType::Value type, unsigned char* editPacketBuffer,
|
void OctreeEditPacketSender::queueOctreeEditMessage(PacketType::Value type, unsigned char* editPacketBuffer,
|
||||||
size_t length, qint64 satoshiCost) {
|
size_t length, qint64 satoshiCost) {
|
||||||
|
|
||||||
if (!_shouldSend) {
|
if (!_shouldSend) {
|
||||||
|
|
|
@ -30,7 +30,7 @@ public:
|
||||||
/// Queues a single edit message. Will potentially send a pending multi-command packet. Determines which server
|
/// Queues a single edit message. Will potentially send a pending multi-command packet. Determines which server
|
||||||
/// node or nodes the packet should be sent to. Can be called even before servers are known, in which case up to
|
/// node or nodes the packet should be sent to. Can be called even before servers are known, in which case up to
|
||||||
/// MaxPendingMessages will be buffered and processed when servers are known.
|
/// MaxPendingMessages will be buffered and processed when servers are known.
|
||||||
void queueOctreeEditMessage (PacketType::Value type, unsigned char* buffer, size_t length, qint64 satoshiCost = 0);
|
void queueOctreeEditMessage(PacketType::Value type, unsigned char* buffer, size_t length, qint64 satoshiCost = 0);
|
||||||
|
|
||||||
/// Releases all queued messages even if those messages haven't filled an MTU packet. This will move the packed message
|
/// Releases all queued messages even if those messages haven't filled an MTU packet. This will move the packed message
|
||||||
/// packets onto the send queue. If running in threaded mode, the caller does not need to do any further processing to
|
/// packets onto the send queue. If running in threaded mode, the caller does not need to do any further processing to
|
||||||
|
@ -81,7 +81,7 @@ public:
|
||||||
|
|
||||||
// you must override these...
|
// you must override these...
|
||||||
virtual char getMyNodeType() const = 0;
|
virtual char getMyNodeType() const = 0;
|
||||||
virtual void adjustEditPacketForClockSkew (PacketType::Value type,
|
virtual void adjustEditPacketForClockSkew(PacketType::Value type,
|
||||||
unsigned char* editPacketBuffer, size_t length, int clockSkew) { }
|
unsigned char* editPacketBuffer, size_t length, int clockSkew) { }
|
||||||
|
|
||||||
bool hasDestinationWalletUUID() const { return !_destinationWalletUUID.isNull(); }
|
bool hasDestinationWalletUUID() const { return !_destinationWalletUUID.isNull(); }
|
||||||
|
@ -99,7 +99,7 @@ signals:
|
||||||
protected:
|
protected:
|
||||||
bool _shouldSend;
|
bool _shouldSend;
|
||||||
void queuePacketToNode(const QUuid& nodeID, unsigned char* buffer, size_t length, qint64 satoshiCost = 0);
|
void queuePacketToNode(const QUuid& nodeID, unsigned char* buffer, size_t length, qint64 satoshiCost = 0);
|
||||||
void queuePendingPacketToNodes (PacketType::Value type, unsigned char* buffer, size_t length, qint64 satoshiCost = 0);
|
void queuePendingPacketToNodes(PacketType::Value type, unsigned char* buffer, size_t length, qint64 satoshiCost = 0);
|
||||||
void queuePacketToNodes(unsigned char* buffer, size_t length, qint64 satoshiCost = 0);
|
void queuePacketToNodes(unsigned char* buffer, size_t length, qint64 satoshiCost = 0);
|
||||||
void initializePacket(EditPacketBuffer& packetBuffer, PacketType::Value type, int nodeClockSkew);
|
void initializePacket(EditPacketBuffer& packetBuffer, PacketType::Value type, int nodeClockSkew);
|
||||||
void releaseQueuedPacket(EditPacketBuffer& packetBuffer); // releases specific queued packet
|
void releaseQueuedPacket(EditPacketBuffer& packetBuffer); // releases specific queued packet
|
||||||
|
|
Loading…
Reference in a new issue