XFuNetwork.h Source File

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

# XFuNetwork.h

Go to the documentation of this file.

    00001 /*!
    00002  * \file
    00003  * X-Forge Engine <br>
    00004  * Copyright 2000-2003 Fathammer Ltd
    00005  *
    00006  * \brief Base class for all communication managers for game graphs.
    00007  *
    00008  * $Id: XFuNetwork.h,v 1.3 2003/10/02 11:43:01 slehti Exp $
    00009  * $Date: 2003/10/02 11:43:01 $
    00010  * $Revision: 1.3 $
    00011  */
    00012
    00013 #ifndef XFUNETWORK_H_INCLUDED
    00014 #define XFUNETWORK_H_INCLUDED
    00015
    00016 class XFuNetworkEventHandler;
    00017 class XFcDataReceiver;
    00018 class XFcAddress;
    00019
    00020 #include <xfcore/net/XFcCommunicationConstants.h>
    00021
    00022
    00023 //! Base class for all network handlers.
    00024 class XFuNetwork
    00025 {
    00026
    00027 public:
    00028
    00029     //! Virtual destructor.
    00030     virtual ~XFuNetwork() {}
    00031
    00032     //! Closes the currently active service (communication handler).
    00033     virtual void closeService() = 0;
    00034
    00035     //! Returns the specified client.
    00036     virtual XFcClientCommWin * getClient(INT32 aClientId) = 0;
    00037
    00038     //! Adds a client with the specific address.
    00039     /*! \return The client id or XFCNET_CLIENTADD_ERROR if failed.
    00040      */
    00041     virtual INT32 addClient(XFcAddress *aAddress, INT32 aTimeoutTime = 15000) = 0;
    00042
    00043     //! Removes the specified client.
    00044     virtual void removeClient(INT32 aClientId) = 0;
    00045
    00046     //! Removes all clients.
    00047     virtual void removeAllClients() = 0;
    00048
    00049     //! Returns a pointer to the default data receiver.
    00050     virtual XFcDataReceiver * getDefaultDataReceiver() = 0;
    00051
    00052     //! Sets the default data receiver.
    00053     virtual void setDefaultDataReceiver(XFcDataReceiver *aReceiver) = 0;
    00054
    00055     //! Returns the specified data receiver.
    00056     virtual XFcDataReceiver * getDataReceiver(UINT32 aId) = 0;
    00057
    00058     //! Adds a new data receiver.
    00059     virtual INT addDataReceiver(UINT32 aId, XFcDataReceiver *aReceiver) = 0;
    00060
    00061     //! Removes a data receiver.
    00062     virtual XFcDataReceiver * removeDataReceiver(UINT32 aId) = 0;
    00063
    00064     //! Get packet frame.
    00065     virtual XFcObjectDataFrame * getPacketFrame(INT32 aClientId, XFCNET_MESSAGE_SLOT aSlot) = 0;
    00066
    00067     //! Get recent state frame.
    00068     virtual XFcObjectDataFrame * getRecentStateFrame(INT32 aClientId, INT32 aRecentId) = 0;
    00069
    00070     //! Remove recent state frame.
    00071     virtual void removeRecentStateFrame(INT32 aClientId, INT32 aRecentId) = 0;
    00072
    00073     //! Adds a communication event handler.
    00074     virtual void addEventHandler(XFuNetworkEventHandler *aHandler) = 0;
    00075
    00076     //! Removes a communication event handler.
    00077     virtual void removeEventHandler(XFuNetworkEventHandler *aHandler) = 0;
    00078
    00079     //! Removes all communication event handlers.
    00080     virtual void removeAllEventHandlers() = 0;
    00081
    00082     //! Runs the communication scheduler.
    00083     virtual void runCommunicationScheduler() = 0;
    00084
    00085 };
    00086
    00087
    00088 #endif // !XFUNETWORK_H_INCLUDED
    00089

|  | X-Forge Documentation Confidential Copyright © 2002-2003 Fathammer |  | Documentation generated with doxygen by Dimitri van Heesch