Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/spacerace/src/libraries/network/WANDiscoverable.h @ 8740

Last change on this file since 8740 was 7801, checked in by dafrick, 14 years ago

Merging presentation2 branch back to trunk.

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: Fabian 'x3n' Landau (original) Co-authors: Sandro 'smerkli' Merkli
22 *   (copied and adapted to WAN)
23 *
24 */
25
26#ifndef _WANDiscoverable_H__
27#define _WANDiscoverable_H__
28
29#include "NetworkPrereqs.h"
30// #include "core/OrxonoxClass.h"
31#include "core/CoreIncludes.h"
32#include "MasterServerComm.h"
33
34namespace orxonox
35{
36
37  class _NetworkExport WANDiscoverable: public OrxonoxClass
38  {
39    public:
40      /** constructor */
41      WANDiscoverable();
42
43      /** destructor */
44      ~WANDiscoverable();
45
46      /** \return Address of the master server
47       *
48       * Get the master server address
49       */
50      std::string getMSAddress()
51      { return this->msaddress; }
52
53      /** Function used for the configuration file parameter update */
54      void setConfigValues();
55     
56      /** Function used to set the activity/discoverability */
57      void setActivity( bool bActive );
58
59      /** Master server communications object */
60      MasterServerComm msc;
61     
62    private:
63      /** Function used to connect to the master server */
64      bool connect();
65     
66      /** Function used to disconnect from the master server */
67      void disconnect();
68     
69      /** master server address */
70      std::string msaddress;
71      bool        bActive_;
72
73  };
74
75}
76
77#endif // _WANDiscoverable_H__
Note: See TracBrowser for help on using the repository browser.