Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 13, 2006, 11:14:32 AM (18 years ago)
Author:
patrick
Message:

more interface

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/proxy/src/lib/network/network_monitor.cc

    r9265 r9266  
    1717
    1818#include "network_stream.h"
     19#include "debug.h"
    1920
    2021#include "network_monitor.h"
    2122
    22 // SHELL_COMMAND(gui, MappedWater, toggleGui);
     23SHELL_COMMAND(showGUI, NetworkMonitor, showGUI);
     24SHELL_COMMAND(hideGUI, NetworkMonitor, hideGUI);
    2325// SHELL_COMMAND(output, MappedWater, saveParams);
    2426
     
    3840 */
    3941NetworkMonitor::~NetworkMonitor()
     42{}
     43
     44
     45/**
     46 * adds a client
     47 */
     48void NetworkMonitor::addClient(PeerInfo* node)
     49{
     50  this->clientList.push_back(node);
     51}
     52
     53/**
     54 * adds a proxy server
     55 */
     56void NetworkMonitor::addProxyServer(PeerInfo* node)
     57{
     58  this->proxyServerList.push_back(node);
     59}
     60
     61/**
     62 * adds a master server
     63 */
     64void NetworkMonitor::addMasterServer(PeerInfo* node)
     65{
     66  this->masterServerList.push_back(node);
     67}
     68
     69/**
     70 * removes a client
     71 */
     72void NetworkMonitor::removeClient(PeerInfo* node)
     73{
     74  std::list<PeerInfo*>::iterator it = this->clientList.begin();
     75  for(; it != this->clientList.end(); it++)
     76  {
     77    if( *it == node)
     78    {
     79      this->clientList.erase(it);
     80      return;
     81    }
     82  }
     83
     84  PRINTF(2)("Could not remove client from the list, very strange...");
     85}
     86
     87/**
     88 * removes a proxy server
     89 */
     90void NetworkMonitor::removeProxyServer(PeerInfo* node)
     91{}
     92
     93/**
     94 * removes a master server
     95 */
     96void NetworkMonitor::removeMasterServer(PeerInfo* node)
    4097{}
    4198
     
    63120    this->box->setAbsCoor2D(300, 40);
    64121    OrxGui::GLGuiHandler::getInstance()->activate();
    65     OrxGui::GLGuiHandler::getInstance()->activateCursor();
     122//     OrxGui::GLGuiHandler::getInstance()->activateCursor();
    66123  }
    67   else
    68   {
    69     OrxGui::GLGuiHandler::getInstance()->deactivate();
    70     OrxGui::GLGuiHandler::getInstance()->deactivateCursor();
    71     delete this->box;
    72     this->box = NULL;
    73   }
     124}
     125
     126
     127/**
     128 * hides the network monitor gui again
     129 */
     130void NetworkMonitor::hideGUI()
     131{
     132  if( this->box == NULL)
     133    return;
     134
     135  OrxGui::GLGuiHandler::getInstance()->deactivate();
     136//   OrxGui::GLGuiHandler::getInstance()->deactivateCursor();
     137
     138  delete this->box;
     139  this->box = NULL;
    74140}
    75141
Note: See TracChangeset for help on using the changeset viewer.