00001 00002 00003 00004 00005 00006 00007 00008 00009 /* 00010 #ifndef __PLUGIN_INTERFACE_H 00011 #define __PLUGIN_INTERFACE_H 00012 00013 class RakPeerInterface; 00014 struct Packet; 00015 struct InternalPacket; 00016 00017 enum PluginReceiveResult 00018 { 00019 // The plugin used this message and it shouldn't be given to the user. 00020 RR_STOP_PROCESSING_AND_DEALLOCATE=0, 00021 00022 // This message will be processed by other plugins, and at last by the user. 00023 RR_CONTINUE_PROCESSING, 00024 00025 // The plugin is going to hold on to this message. Do not deallocate it but do not pass it to other plugins either. 00026 RR_STOP_PROCESSING, 00027 }; 00028 00029 #include "RakNetTypes.h" 00030 #include "Export.h" 00031 #include "RakMemoryOverride.h" 00032 00034 00044 class RAK_DLL_EXPORT PluginInterface 00045 { 00046 public: 00047 PluginInterface(); 00048 virtual ~PluginInterface(); 00049 00052 virtual void OnAttach(RakPeerInterface *peer); 00053 00056 virtual void OnDetach(RakPeerInterface *peer); 00057 00060 virtual void OnStartup(RakPeerInterface *peer); 00061 00064 virtual void Update(RakPeerInterface *peer); 00065 00070 virtual PluginReceiveResult OnReceive(RakPeerInterface *peer, Packet *packet); 00071 00074 virtual void OnShutdown(RakPeerInterface *peer); 00075 00079 virtual void OnCloseConnection(RakPeerInterface *peer, SystemAddress systemAddress); 00080 00085 virtual void OnDirectSocketSend(const char *data, const BitSize_t bitsUsed, SystemAddress remoteSystemAddress); 00086 00091 virtual void OnDirectSocketReceive(const char *data, const BitSize_t bitsUsed, SystemAddress remoteSystemAddress); 00092 00099 virtual void OnInternalPacket(InternalPacket *internalPacket, unsigned frameNumber, SystemAddress remoteSystemAddress, RakNetTime time, int isSend); 00100 }; 00101 00102 #endif 00103 00104 */