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