Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/trunk/src/libraries/network/WANDiscoverable.h @ 10320

Last change on this file since 10320 was 9667, checked in by landauf, 11 years ago

merged core6 back to trunk

  • Property svn:eol-style set to native
File size: 2.1 KB
Line 
1/*
2 *   ORXONOX - the hottest 3D action shooter ever to exist > www.orxonox.net <
3 *
4 *
5 *   License notice:
6 *
7 *   This program is free software; you can redistribute it and/or modify it
8 *   under the terms of the GNU General Public License as published by the Free
9 *   Software Foundation; either version 2 of the License, or (at your option)
10 *   any later version.
11 *
12 *   This program is distributed in the hope that it will be useful, but
13 *   WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14 *   or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
15 *   for more details.
16 *
17 *   You should have received a copy of the GNU General Public License along
18 *   with this program; if not, write to the Free Software Foundation, Inc., 51
19 *   Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
20 *
21 *   Author:
22 *      Sandro 'smerkli' Merkli
23 *   Co-authors:
24 *      Oliver Scheuss (original)
25 *
26 */
27
28#ifndef _WANDiscoverable_H__
29#define _WANDiscoverable_H__
30
31#include "NetworkPrereqs.h"
32#include "core/config/Configurable.h"
33#include "MasterServerComm.h"
34
35namespace orxonox
36{
37
38  class _NetworkExport WANDiscoverable: public Configurable
39  {
40    public:
41      /** constructor */
42      WANDiscoverable();
43
44      /** destructor */
45      ~WANDiscoverable();
46
47      /** \return Address of the master server
48       *
49       * Get the master server address
50       */
51      std::string getMSAddress()
52      { return this->msaddress; }
53
54      /** Function used for the configuration file parameter update */
55      void setConfigValues();
56     
57      /** Function used to set the activity/discoverability */
58      void setActivity( bool bActive );
59
60      /** Master server communications object */
61      MasterServerComm msc;
62     
63    private:
64      /** Function used to connect to the master server */
65      bool connect();
66     
67      /** Function used to disconnect from the master server */
68      void disconnect();
69     
70      /** master server address */
71      std::string msaddress;
72      bool        bActive_;
73
74  };
75
76}
77
78#endif // _WANDiscoverable_H__
Note: See TracBrowser for help on using the repository browser.