]> git.mxchange.org Git - flightgear.git/blob - src/Network/jsclient.hxx
Update VS2008 projects : use Boost 1.44.0 available in last 3rd Party archive
[flightgear.git] / src / Network / jsclient.hxx
1 // jsclient.hxx -- simple UDP networked joystick client
2 //
3 // Copyright (C) 2003 by Manuel Bessler and Stephen Lowry
4 //
5 // based on joyclient.hxx by Curtis Olson
6 // Copyright (C) 2000  Curtis L. Olson - http://www.flightgear.org/~curt
7 //
8 // This program is free software; you can redistribute it and/or
9 // modify it under the terms of the GNU General Public License as
10 // published by the Free Software Foundation; either version 2 of the
11 // License, or (at your option) any later version.
12 //
13 // This program is distributed in the hope that it will be useful, but
14 // WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16 // General Public License for more details.
17 //
18 // You should have received a copy of the GNU General Public License
19 // along with this program; if not, write to the Free Software
20 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
21 //
22 // $Id$
23
24
25 #ifndef _FG_JSCLIENT_HXX
26 #define _FG_JSCLIENT_HXX
27
28
29 #include <simgear/compiler.h>
30
31 #include <string>
32
33 #include <FDM/flight.hxx>
34
35 #include "protocol.hxx"
36
37 using std::string;
38
39
40 class FGJsClient : public FGProtocol {
41
42     char buf[256];
43     int length;
44     double axis[4];
45     SGPropertyNode_ptr axisdef[4];
46     string axisdefstr[4];
47     bool active;
48                                 
49 public:
50
51     FGJsClient();
52     ~FGJsClient();
53
54     // open hailing frequencies
55     bool open();
56
57     // process work for this port
58     bool process();
59
60     // close the channel
61     bool close();
62 };
63
64
65 #endif // _FG_JSCLIENT_HXX