fgms 0.11.8
The
FlightGear MultiPlayer Server
project
fg_cli.hxx
Go to the documentation of this file.
1 /**
2  * @file fg_cli.hxx
3  * @author Oliver Schroeder
4  */
5 //
6 // This program is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU General Public License as
8 // published by the Free Software Foundation; either version 2 of the
9 // License, or (at your option) any later version.
10 //
11 // This program is distributed in the hope that it will be useful, but
12 // WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // General Public License for more details.
15 //
16 // You should have received a copy of the GNU General Public License
17 // along with this program; if not, write to the Free Software
18 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, U$
19 //
20 // Copyright (C) 2013 Oliver Schroeder
21 //
22 
23 /**
24  * @class FG_CLI
25  * @brief cisco like command line interface
26  *
27  */
28 
29 //////////////////////////////////////////////////////////////////////
30 //
31 // cisco like command line interface (cli)
32 //
33 //////////////////////////////////////////////////////////////////////
34 
35 #ifndef FG_CLI_HEADER
36 #define FG_CLI_HEADER
37 
38 #include <fg_server.hxx>
39 #include <libcli.hxx>
40 
41 using namespace LIBCLI;
42 using namespace std;
43 
44 class FG_CLI : public CLI
45 {
46 public:
47  FG_CLI ( FG_SERVER* fgms, int fd);
48 private:
49  void setup ();
50  //////////////////////////////////////////////////
51  // general commands
52  //////////////////////////////////////////////////
53  int cmd_show_stats ( UNUSED(char *command), UNUSED(char *argv[]), UNUSED(int argc) );
54  int cmd_show_version ( UNUSED(char *command), UNUSED(char *argv[]), UNUSED(int argc) );
55  int cmd_show_uptime ( UNUSED(char *command), UNUSED(char *argv[]), UNUSED(int argc) );
56  int cmd_fgms_die ( UNUSED(char *command), UNUSED(char *argv[]), UNUSED(int argc) );
57  //////////////////////////////////////////////////
58  // show/modify blacklist
59  //////////////////////////////////////////////////
60  int cmd_blacklist_show ( char *command, char *argv[], int argc );
61  int cmd_blacklist_add ( char *command, char *argv[], int argc );
62  int cmd_blacklist_delete ( char *command, char *argv[], int argc );
63  //////////////////////////////////////////////////
64  // show/modify list of crossfeeds
65  //////////////////////////////////////////////////
66  int cmd_crossfeed_show ( char *command, char *argv[], int argc );
67  int cmd_crossfeed_add ( char *command, char *argv[], int argc );
68  int cmd_crossfeed_delete ( char *command, char *argv[], int argc );
69  //////////////////////////////////////////////////
70  // show/modify list of relays
71  //////////////////////////////////////////////////
72  int cmd_relay_show ( char *command, char *argv[], int argc );
73  int cmd_relay_add ( char *command, char *argv[], int argc );
74  int cmd_relay_delete ( char *command, char *argv[], int argc );
75  //////////////////////////////////////////////////
76  // show list of players
77  //////////////////////////////////////////////////
78  int cmd_user_show ( char *command, char *argv[], int argc );
79  //////////////////////////////////////////////////
80  // show status of tracker
81  //////////////////////////////////////////////////
82  int cmd_tracker_show ( char *command, char *argv[], int argc );
83 private:
85  int cmd_NOT_IMPLEMENTED ( char *command, char *argv[], int argc );
86  //////////////////////////////////////////////////
87  // utility functions
88  //////////////////////////////////////////////////
89  bool need_help (char* argv);
90 };
91 
92 #endif
93 
FG_SERVER * fgms
Definition: fg_cli.hxx:84
#define UNUSED(d)
Definition: clitest.cxx:17
cisco like command line interface
Definition: fg_cli.hxx:44
The Main fgms Class.
Definition: fg_server.hxx:55