X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FNetwork%2Fprops.hxx;h=866baefbd19ae75fb2aa4b9c62cea315d5b59d97;hb=0aabc112b4f586f94365ccf1e906d6e4fb78dc10;hp=5c26bd2ca3e597966b9cccdaa2b318663c60efdf;hpb=628e4cc02956d16acb7837bf145d0ce2e809da67;p=flightgear.git diff --git a/src/Network/props.hxx b/src/Network/props.hxx index 5c26bd2ca..866baefbd 100644 --- a/src/Network/props.hxx +++ b/src/Network/props.hxx @@ -1,6 +1,8 @@ -// props.hxx -- FGFS property manager interaction class +// \file props.hxx +// Property server class. // // Written by Curtis Olson, started September 2000. +// Modified by Bernie Bright, May 2002. // // Copyright (C) 2000 Curtis L. Olson - curt@flightgear.org // @@ -24,48 +26,66 @@ #ifndef _FG_PROPS_HXX #define _FG_PROPS_HXX - #include -#include - #include STL_STRING - -#include "protocol.hxx" +#include SG_USING_STD(string); +SG_USING_STD(vector); +#include -const static int max_cmd_len = 256; - -class FGProps : public FGProtocol { - - enum Mode { - PROMPT, - DATA - }; - Mode mode; +#include "protocol.hxx" - // tree view of property list - string path; +/** + * Property server class. + * This class provides a telnet-like server for remote access to + * FlightGear properties. + */ +class FGProps : public FGProtocol, + public netChannel +{ +private: + + /** + * Server port to listen on. + */ + int port; - bool reset(); - bool process_command( const char *cmd ); - public: - - FGProps(); + /** + * Create a new TCP server. + * + * @param tokens Tokenized configuration parameters + */ + FGProps( const vector& tokens ); + + /** + * Destructor. + */ ~FGProps(); - // open hailing frequencies + /** + * Start the telnet server. + */ bool open(); - // process work for this port + /** + * Process network activity. + */ bool process(); - // close the channel + /** + * + */ bool close(); -}; + /** + * Accept a new client connection. + */ + void handleAccept(); +}; #endif // _FG_PROPS_HXX +