Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9656 in orxonox.OLD for trunk/src/lib/network/monitor/network_node.h


Ignore:
Timestamp:
Aug 4, 2006, 11:01:28 PM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: merged the proxy bache back with no conflicts

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/network/monitor/network_node.h

    r9494 r9656  
    1313#include <list>
    1414
    15 
    1615//!< a class representing a node in the network (this can be a MASTER_SERVER, PROXY_SERVER or a CLIENT
    1716class NetworkNode
     
    2221
    2322
    24     void addClient(PeerInfo* node);
    25     void addActiveProxyServer(PeerInfo* node);
    26     void addPassiveProxyServer(PeerInfo* node);
    27     void addMasterServer(PeerInfo* node);
     23    void addClient(NetworkNode* node);
     24    void addActiveProxyServer(NetworkNode* node);
     25    void addPassiveProxyServer(NetworkNode* node);
     26    void addMasterServer(NetworkNode* node);
    2827
    29     void removeClient(PeerInfo* node);
    30     void removeActiveProxyServer(PeerInfo* node);
    31     void removePassiveProxyServer(PeerInfo* node);
    32     void removeMasterServer(PeerInfo* node);
     28    void removeClient(NetworkNode* node);
     29    void removeActiveProxyServer(NetworkNode* node);
     30    void removePassiveProxyServer(NetworkNode* node);
     31    void removeMasterServer(NetworkNode* node);
     32
     33    void removeClient(int userId);
     34    void removeActiveProxyServer(int userId);
     35    void removePassiveProxyServer(int userId);
     36    void removeMasterServer(int userId);
     37
    3338
    3439    PeerInfo* getClient(int index) const;
     
    3843
    3944    /** @returns the master server list */
    40     inline std::list<PeerInfo*> getMasterServer() const { return this->masterServerList; }
     45    inline std::list<NetworkNode*> getMasterServers() const { return this->masterServerList; }
    4146    /** @returns the active proxy server list */
    42     inline std::list<PeerInfo*> getActiveProxyServer() const { return this->activeProxyServerList; }
     47    inline std::list<NetworkNode*> getActiveProxyServers() const { return this->activeProxyServerList; }
    4348    /** @returns the passive proxy server list */
    44     inline std::list<PeerInfo*> getPassiveProxyServer() const { return this->passiveProxyServerList; }
     49    inline std::list<NetworkNode*> getPassiveProxyServers() const { return this->passiveProxyServerList; }
    4550    /** @returns the client list */
    46     inline std::list<PeerInfo*> getClient() const { return this->clientList; }
     51    inline std::list<NetworkNode*> getClients() const { return this->clientList; }
    4752
     53    PeerInfo* getPeerByUserId( int userId);
    4854
    4955    /** @returns the number of players */
     
    5359    /** @returns the peer info of this node */
    5460    inline PeerInfo* getPeerInfo() const { return this->peerInfo; }
     61
     62    NetworkNode* getNodeByUserId( int userId);
    5563
    5664    void debug(int depth) const;
     
    6371
    6472    /* network nodes directly connected to this node */
    65     std::list<PeerInfo*>         clientList;                   //!< list of all clients in the network
    66     std::list<PeerInfo*>         activeProxyServerList;        //!< list of all proxy servers in the network
    67     std::list<PeerInfo*>         passiveProxyServerList;       //!< list of all proxy servers in the network
    68     std::list<PeerInfo*>         masterServerList;             //!< list of all master servers in the network (should be 1!! :D)
     73    std::list<NetworkNode*>         clientList;                   //!< list of all clients in the network
     74    std::list<NetworkNode*>         activeProxyServerList;        //!< list of all proxy servers in the network
     75    std::list<NetworkNode*>         passiveProxyServerList;       //!< list of all proxy servers in the network
     76    std::list<NetworkNode*>         masterServerList;             //!< list of all master servers in the network (should be 1!! :D)
    6977
    7078};
Note: See TracChangeset for help on using the changeset viewer.