1 #include "Lobby2Plugin.h" 2 3 using namespace RakNet; 4 Lobby2Plugin()5Lobby2Plugin::Lobby2Plugin() 6 { 7 orderingChannel=0; 8 packetPriority=HIGH_PRIORITY; 9 } ~Lobby2Plugin()10Lobby2Plugin::~Lobby2Plugin() 11 { 12 13 } SetOrderingChannel(char oc)14void Lobby2Plugin::SetOrderingChannel(char oc) 15 { 16 orderingChannel=oc; 17 } SetSendPriority(PacketPriority pp)18void Lobby2Plugin::SetSendPriority(PacketPriority pp) 19 { 20 packetPriority=pp; 21 } SetMessageFactory(Lobby2MessageFactory * f)22void Lobby2Plugin::SetMessageFactory(Lobby2MessageFactory *f) 23 { 24 msgFactory=f; 25 } GetMessageFactory(void) const26Lobby2MessageFactory* Lobby2Plugin::GetMessageFactory(void) const 27 { 28 return msgFactory; 29 } SetCallbackInterface(Lobby2Callbacks * cb)30void Lobby2Plugin::SetCallbackInterface(Lobby2Callbacks *cb) 31 { 32 ClearCallbackInterfaces(); 33 callbacks.Insert(cb, __FILE__, __LINE__ ); 34 } AddCallbackInterface(Lobby2Callbacks * cb)35void Lobby2Plugin::AddCallbackInterface(Lobby2Callbacks *cb) 36 { 37 RemoveCallbackInterface(cb); 38 callbacks.Insert(cb, __FILE__, __LINE__ ); 39 } RemoveCallbackInterface(Lobby2Callbacks * cb)40void Lobby2Plugin::RemoveCallbackInterface(Lobby2Callbacks *cb) 41 { 42 unsigned long index = callbacks.GetIndexOf(cb); 43 if (index!=MAX_UNSIGNED_LONG) 44 callbacks.RemoveAtIndex(index); 45 } ClearCallbackInterfaces()46void Lobby2Plugin::ClearCallbackInterfaces() 47 { 48 callbacks.Clear(false, __FILE__, __LINE__); 49 }