Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/proxy/src/lib/network/proxy/proxy_settings.h @ 9297

Last change on this file since 9297 was 9297, checked in by patrick, 18 years ago

proxy servers registered correctly

File size: 1.1 KB
Line 
1/*!
2 * @file proxy_settings.h
3 *  some shared data from the proxy settings
4 */
5
6#ifndef _PROXY_SETTINGS_H
7#define _PROXY_SETTINGS_H
8
9#include "base_object.h"
10#include "netdefs.h"
11
12#include <vector>
13
14
15class NetworkStream;
16class Synchronizeable;
17class TiXmlElement;
18
19
20/* and here is the class itsself*/
21class ProxySettings : public BaseObject
22{
23
24  public:
25    inline static ProxySettings* getInstance() { if (!ProxySettings::singletonRef) ProxySettings::singletonRef = new ProxySettings();
26      return ProxySettings::singletonRef; }
27    virtual ~ProxySettings();
28
29    void loadProxySettings(const TiXmlElement* root);
30
31    inline void setMaxPlayer(int number) { this->maxPlayer = number; }
32    void setProxyAddr(const std::string& proxyAddr);
33
34
35  private:
36    ProxySettings();
37
38
39  private:
40
41    static ProxySettings*       singletonRef;            //!< Pointer to the only instance of this Class
42
43    int                         maxPlayer;               //!< maximal number of players
44
45    std::vector<IPaddress*>      proxies;                 //!< all registered proxies
46
47};
48
49
50
51#endif /* _PROXY_SETTINGS_H */
Note: See TracBrowser for help on using the repository browser.