Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

ltservershell.h

Go to the documentation of this file.
00001 // ----------------------------------------------------------------------- //
00002 //
00003 // MODULE  : LTServerShell.h
00004 //
00005 // PURPOSE : LT Server Shell - Definition
00006 //
00007 // CREATED : 12/20/00
00008 //
00009 // (c) 2000 LithTech, Inc.  All Rights Reserved
00010 //
00011 // ----------------------------------------------------------------------- //
00012 
00013 #ifndef __LT_SERVER_SHELL_H__
00014 #define __LT_SERVER_SHELL_H__
00015 
00016 
00017 // Definitions of members classes
00018 #include "worldpropsrvr.h"
00019 #include "Simulation.h"
00020 
00021 // Engine includes
00022 #include <iservershell.h>
00023 
00024 
00026 #define MAX_CLIENTS                 32
00027 
00028 
00030 class CLTServerShell;
00031 extern CLTServerShell *g_pSShell;
00032 
00033 
00035 class CLTServerShell : public IServerShellStub
00036 {
00037   public:
00038     // Construction / destruction
00039     CLTServerShell();
00040     ~CLTServerShell();
00041 
00042     declare_interface(CLTServerShell);
00043       
00044     // Overridden functions
00045     LTRESULT        OnServerInitialized(LTGUID *pAppGuid);
00046     void            OnServerTerm();
00047     
00048     void            SRand(unsigned int uiRand);
00049 
00050     void            PreStartWorld(bool bSwitchingWorlds);
00051     void            CacheFiles();
00052     void            PostStartWorld();
00053 
00054     void            OnAddClient(HCLIENT hClient);
00055     void            OnRemoveClient(HCLIENT hClient);
00056 
00057     void            Update(LTFLOAT timeElapsed);
00058 
00059     LPBASECLASS     OnClientEnterWorld(HCLIENT hClient, void *pClientData, 
00060                         uint32 nClientDataLen);
00061     void            OnClientExitWorld(HCLIENT hClient);
00062 
00063     LTRESULT        FileLoadNotify(const char *pFilename, LTRESULT status);
00064 
00065     void            OnMessage(HCLIENT hSender, uint8 messageID, 
00066                         HMESSAGEREAD hMessage);
00067     void            OnObjectMessage(LPBASECLASS pSender, uint32 messageID, 
00068                         ILTMessage* pMessage);
00069 
00070     void            OnPlaybackFinish();
00071 
00072     LTRESULT        ProcessPacket(char *pData, uint32 dataLen, uint8 senderAddr[4], 
00073                         uint16 senderPort);
00074 
00075     LTRESULT        ServerAppMessageFn(const char *pMsg);
00076 
00077 
00078     // New functions
00079 
00080     void            RegisterObject(CWorldPropSrvr* pWorldProp);
00081     void            UnRegisterObject(CWorldPropSrvr* pWorldProp);
00082 
00083     //BaseClass*        AddPlayerForClient(HCLIENT hClient, ILTMessage *pMessage);
00084     //void          RemovePlayerForClient(HCLIENT hClient, ILTMessage *pMessage);
00085     
00086 
00087   protected:
00088     uint32              m_nNumClients;              // current number of clients connected
00089     HCLIENT             m_aClients[MAX_CLIENTS];    // array of connected client handles
00090 
00091     CWorldPropSrvr*     m_pWorldProp;
00092 
00093     Simulation*         m_pSimulation;
00094 };
00095 
00096 
00097 #endif  //__LT_SERVER_SHELL_H__

Generated on Mon Mar 4 08:42:23 2002 for Aria by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002