Changeset 1916 for code/branches/objecthierarchy/src/network/packet
- Timestamp:
- Oct 14, 2008, 12:20:14 AM (16 years ago)
- Location:
- code/branches/objecthierarchy/src/network/packet
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/objecthierarchy/src/network/packet/Acknowledgement.h
r1907 r1916 29 29 #define NETWORKACKNOLEDGEMENT_H 30 30 31 #include "../NetworkPrereqs.h" 31 32 #include "Packet.h" 32 33 … … 35 36 namespace packet { 36 37 /** 37 @author 38 @author 38 39 */ 39 class Acknowledgement : public Packet40 class _NetworkExport Acknowledgement : public Packet 40 41 { 41 42 public: … … 43 44 Acknowledgement( uint8_t* data, unsigned int clientID ); 44 45 ~Acknowledgement(); 45 46 46 47 inline unsigned int getSize() const; 47 48 bool process(); 48 49 49 50 unsigned int getAckID(); 50 51 private: -
code/branches/objecthierarchy/src/network/packet/Chat.h
r1907 r1916 2 2 #ifndef NETWORKCHAT_H 3 3 #define NETWORKCHAT_H 4 5 #include "../NetworkPrereqs.h" 4 6 5 7 #include <string> … … 11 13 namespace packet { 12 14 /** 13 @author 15 @author 14 16 */ 15 class Chat : public Packet17 class _NetworkExport Chat : public Packet 16 18 { 17 19 public: … … 19 21 Chat( uint8_t* data, unsigned int clientID ); 20 22 ~Chat(); 21 23 22 24 inline unsigned int getSize() const; 23 25 bool process(); 24 26 25 27 unsigned int getMessageLength(){ return messageLength_; }; 26 28 unsigned char *getMessage(); -
code/branches/objecthierarchy/src/network/packet/ClassID.h
r1907 r1916 29 29 #define NETWORKCLASSID_H 30 30 31 #include "../NetworkPrereqs.h" 32 31 33 #include <string> 32 34 … … 37 39 38 40 /** 39 @author 41 @author 40 42 */ 41 class ClassID : public Packet43 class _NetworkExport ClassID : public Packet 42 44 { 43 45 public: … … 45 47 ClassID( uint8_t* data, unsigned int clientID ); 46 48 ~ClassID(); 47 49 48 50 inline unsigned int getSize() const; 49 51 bool process(); 50 52 51 53 unsigned int getClassID(); 52 54 unsigned int getClassNameLength(){ return classNameLength_; } -
code/branches/objecthierarchy/src/network/packet/DeleteObjects.h
r1907 r1916 29 29 #define NETWORKPACKETDELETEOBJECTS_H 30 30 31 #include "../NetworkPrereqs.h" 32 31 33 #include "Packet.h" 32 34 … … 35 37 namespace packet { 36 38 /** 37 @author 39 @author 38 40 */ 39 class DeleteObjects : public Packet41 class _NetworkExport DeleteObjects : public Packet 40 42 { 41 43 public: … … 43 45 DeleteObjects( uint8_t* data, unsigned int clientID ); 44 46 ~DeleteObjects(); 45 47 46 48 bool fetchIDs(); 47 49 48 50 inline unsigned int getSize() const; 49 51 bool process(); 50 52 51 53 private: 52 54 }; -
code/branches/objecthierarchy/src/network/packet/Gamestate.h
r1907 r1916 27 27 */ 28 28 29 30 #ifndef NETWORK_PACKETGAMESTATE_H 31 #define NETWORK_PACKETGAMESTATE_H 32 33 #include "../NetworkPrereqs.h" 34 29 35 #include "Packet.h" 30 36 #include "network/Synchronisable.h" … … 34 40 #endif 35 41 36 37 #ifndef NETWORK_PACKETGAMESTATE_H38 #define NETWORK_PACKETGAMESTATE_H39 40 42 namespace network { 41 43 42 44 namespace packet { 43 45 44 struct GamestateHeader{46 struct _NetworkExport GamestateHeader{ 45 47 ENUM::Type packetType; 46 48 int32_t id; // id of the gamestate … … 59 61 @author Oliver Scheuss 60 62 */ 61 class Gamestate: public Packet{63 class _NetworkExport Gamestate: public Packet{ 62 64 public: 63 65 Gamestate(); -
code/branches/objecthierarchy/src/network/packet/Packet.h
r1907 r1916 29 29 #define NETWORKPACKET_H 30 30 31 #include "../NetworkPrereqs.h" 32 31 33 #include <map> 32 34 #include <enet/enet.h> … … 37 39 38 40 namespace packet{ 39 41 40 42 namespace ENUM{ 41 43 enum Direction{ … … 53 55 }; 54 56 } 55 57 56 58 /** 57 59 @author Oliver Scheuss <scheusso [at] ee.ethz.ch> 58 60 */ 59 class Packet{61 class _NetworkExport Packet{ 60 62 public: 61 63 Packet(const Packet &p); … … 63 65 static Packet *createPacket(ENetPacket *packet, ENetPeer *peer); 64 66 static void deletePacket(ENetPacket *packet); 65 67 66 68 virtual unsigned char *getData(){ return data_; }; 67 69 virtual unsigned int getSize() const =0; … … 73 75 void setClientID( int id ) 74 76 { clientID_ = id; } 75 77 76 78 bool send(); 77 79 protected: -
code/branches/objecthierarchy/src/network/packet/Welcome.h
r1907 r1916 29 29 #define NETWORKWELCOME_H 30 30 31 #include "../NetworkPrereqs.h" 32 31 33 #include "Packet.h" 32 34 … … 35 37 36 38 /** 37 @author 39 @author 38 40 */ 39 class Welcome : public Packet41 class _NetworkExport Welcome : public Packet 40 42 { 41 43 public: … … 43 45 Welcome( uint8_t* data, unsigned int clientID ); 44 46 virtual ~Welcome(); 45 47 46 48 uint8_t *getData(); 47 49 inline unsigned int getSize() const; 48 50 bool process(); 49 51 50 52 private: 51 53 };
Note: See TracChangeset
for help on using the changeset viewer.