Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9458 in orxonox.OLD for branches/proxy/src/lib/network


Ignore:
Timestamp:
Jul 25, 2006, 4:28:08 PM (18 years ago)
Author:
patrick
Message:

switching to new permission system, first step

Location:
branches/proxy/src/lib/network
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/proxy/src/lib/network/netdefs.h

    r9450 r9458  
    5656} NodeType;
    5757
     58
    5859//!< enum indicating the type of the network connection (2 protocols supported)
    5960typedef enum ConnectionType {
     
    6162  NET_TCP
    6263};
     64
    6365
    6466//!< the type of the unique id (special number never used elsewhere)
     
    132134
    133135  NET_ID_CLIENT_MAX        = 40
    134 
    135136};
    136137#endif /* _NETDEFS_H */
  • branches/proxy/src/lib/network/nettypes.h

    r9406 r9458  
    55typedef unsigned char byte;
    66
     7
     8//!< this are the network write variable permissions
     9typedef enum netPermissions {
     10  PERMISSION_MASTER_SERVER = 1,
     11  PERMISSION_PROXY_SERVER  = 2,
     12  PERMISSION_OWNER         = 4,
     13  PERMISSION_ALL           = 8
     14};
     15
     16
    717#endif /* __NET_TYPES_H */
  • branches/proxy/src/lib/network/network_manager.cc

    r9452 r9458  
    136136  this->networkStream->startHandshake(NET_ID_MASTER_SERVER);
    137137  // then start the server
    138   this->networkStream->createServer( port);
     138  //this->networkStream->createServer( port);
    139139  // and to the other proxy servers also, this would be very nice if its works
    140140
  • branches/proxy/src/lib/network/network_manager.h

    r9406 r9458  
    1717
    1818
    19 /* forward declarations for the header file (include the header via #include "bla.h" in the source file) */
     19
    2020class NetworkStream;
    2121class Synchronizeable;
    22 template<typename>
    23 class tList;
     22
    2423
    2524/* and here is the class itsself*/
  • branches/proxy/src/lib/network/synchronizeable.cc

    r9453 r9458  
    213213      hasPermission = true;
    214214    // now check PROXY_SERVER permissions
    215     else if( SharedNetworkData::getInstance()->isProxyServerActive() && (*it)->checkPermission( PERMISSION_MASTER_SERVER ))
     215    else if( SharedNetworkData::getInstance()->isProxyServerActive() && (*it)->checkPermission( PERMISSION_PROXY_SERVER ))
    216216      hasPermission = true;
    217217    // now check OWNER permissions
     
    354354      hasPermission = true;
    355355    // now check PROXY_SERVER permissions
    356     else if( this->networkStream->isUserProxyServerActive( userId )  && (*it)->checkPermission( PERMISSION_MASTER_SERVER ))
     356    else if( this->networkStream->isUserProxyServerActive( userId )  && (*it)->checkPermission( PERMISSION_PROXY_SERVER ))
    357357      hasPermission = true;
    358358    // now check OWNER permissions
  • branches/proxy/src/lib/network/synchronizeable_var/synchronizeable_var.h

    r9406 r9458  
    1010#include <string>
    1111
    12 enum {
    13   PERMISSION_MASTER_SERVER = 1,
    14   PERMISSION_PROXY_SERVER  = 2,
    15   PERMISSION_OWNER         = 4,
    16   PERMISSION_ALL           = 8
    17 };
     12
    1813
    1914class SynchronizeableVar {
Note: See TracChangeset for help on using the changeset viewer.