]> git.mxchange.org Git - flightgear.git/blob - src/Network/props.hxx
Typo in project file
[flightgear.git] / src / Network / props.hxx
1 // \file props.hxx
2 // Property server class.
3 //
4 // Written by Curtis Olson, started September 2000.
5 // Modified by Bernie Bright, May 2002.
6 //
7 // Copyright (C) 2000  Curtis L. Olson - http://www.flightgear.org/~curt
8 //
9 // This program is free software; you can redistribute it and/or
10 // modify it under the terms of the GNU General Public License as
11 // published by the Free Software Foundation; either version 2 of the
12 // License, or (at your option) any later version.
13 //
14 // This program is distributed in the hope that it will be useful, but
15 // WITHOUT ANY WARRANTY; without even the implied warranty of
16 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17 // General Public License for more details.
18 //
19 // You should have received a copy of the GNU General Public License
20 // along with this program; if not, write to the Free Software
21 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
22 //
23 // $Id$
24
25
26 #ifndef _FG_PROPS_HXX
27 #define _FG_PROPS_HXX
28
29 #include <simgear/compiler.h>
30 #include <string>
31 #include <vector>
32
33 #include <simgear/io/sg_netChannel.hxx>
34
35 #include "protocol.hxx"
36
37 /**
38  * Property server class.
39  * This class provides a telnet-like server for remote access to
40  * FlightGear properties.
41  */
42 class FGProps : public FGProtocol,
43                 public simgear::NetChannel
44 {
45 private:
46
47     /**
48      * Server port to listen on.
49      */
50     int port;
51
52 public:
53     /**
54      * Create a new TCP server.
55      * 
56      * @param tokens Tokenized configuration parameters
57      */
58     FGProps( const std::vector<std::string>& tokens );
59
60     /**
61      * Destructor.
62      */
63     ~FGProps();
64
65     /**
66      * Start the telnet server.
67      */
68     bool open();
69
70     /**
71      * Process network activity.
72      */
73     bool process();
74
75     /**
76      * 
77      */
78     bool close();
79
80     /**
81      * Accept a new client connection.
82      */
83     void handleAccept();
84
85 };
86
87 #endif // _FG_PROPS_HXX
88