Overte C++ Documentation
OctreePacketProcessor.h
1 //
2 // OctreePacketProcessor.h
3 // interface/src/octree
4 //
5 // Created by Brad Hefta-Gaub on 8/12/13.
6 // Copyright 2013 High Fidelity, Inc.
7 //
8 // Distributed under the Apache License, Version 2.0.
9 // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
10 //
11 
12 #ifndef hifi_OctreePacketProcessor_h
13 #define hifi_OctreePacketProcessor_h
14 
15 #include <QtCore/QSharedPointer>
16 
17 #include <ReceivedPacketProcessor.h>
18 #include <ReceivedMessage.h>
19 
20 #include "SafeLanding.h"
21 
25  Q_OBJECT
26 public:
29 
30  void startSafeLanding();
31  void updateSafeLanding();
32  void stopSafeLanding();
33  void resetSafeLanding();
34  bool safeLandingIsActive() const;
35  bool safeLandingIsComplete() const;
36 
37  float domainLoadingProgress() const { return _safeLanding->loadingProgressPercentage(); }
38 
39 signals:
40  void packetVersionMismatch();
41 
42 protected:
43  virtual void processPacket(QSharedPointer<ReceivedMessage> message, SharedNodePointer sendingNode) override;
44 
45 private slots:
46  void handleOctreePacket(QSharedPointer<ReceivedMessage> message, SharedNodePointer senderNode);
47 
48 private:
49  OCTREE_PACKET_SEQUENCE _safeLandingSequenceStart { SafeLanding::INVALID_SEQUENCE };
50  std::unique_ptr<SafeLanding> _safeLanding;
51 };
52 #endif // hifi_OctreePacketProcessor_h
Definition: OctreePacketProcessor.h:24
virtual void processPacket(QSharedPointer< ReceivedMessage > message, SharedNodePointer sendingNode) override
Definition: OctreePacketProcessor.cpp:38
Generalized threaded processor for handling received inbound packets.
Definition: ReceivedPacketProcessor.h:25