|
libmoost
|
A remote command shell used for interacting with the user. More...
#include <remote_shell.h>


Public Member Functions | |
| remote_shell (HandlerType &hdl) | |
| remote_shell (HandlerType &hdl, boost::shared_ptr< boost::asio::io_service > ios) | |
| virtual std::string | get_prompt () const |
| Return application prompt. | |
| virtual std::string | show_help () const |
| Return command help. | |
| virtual bool | handle_command (std::string &_return, const std::string &cmd, const std::string &args) |
| Application-specific command handler. | |
| void | run () |
| void | set_appender_factory (appender_factory_ptr app_factory) |
| void | set_default_stdout_state (bool enabled) |
| void | set_default_stderr_state (bool enabled) |
| void | set_listen_port (unsigned short port) |
| void | set_pre_shutdown_function (boost::function0< void > func) |
| void | enable_local_shell (bool enabled=true) |
| void | stop (const std::string &msg) |
Private Attributes | |
| HandlerType & | m_hdl |
| remote_shell_server | m_srv |
A remote command shell used for interacting with the user.
| HandlerType | Class handling application-specific commands. This class must implement the handle_command(), get_prompt() and show_help() methods as defined by remote_shell_iface. |
Definition at line 179 of file remote_shell.h.
| moost::service::remote_shell< HandlerType >::remote_shell | ( | HandlerType & | hdl | ) | [inline] |
Definition at line 186 of file remote_shell.h.
| moost::service::remote_shell< HandlerType >::remote_shell | ( | HandlerType & | hdl, |
| boost::shared_ptr< boost::asio::io_service > | ios | ||
| ) | [inline] |
Definition at line 191 of file remote_shell.h.
| void moost::service::remote_shell< HandlerType >::enable_local_shell | ( | bool | enabled = true | ) | [inline] |
Definition at line 241 of file remote_shell.h.


| virtual std::string moost::service::remote_shell< HandlerType >::get_prompt | ( | ) | const [inline, virtual] |
Return application prompt.
Implements moost::service::remote_shell_iface.
Definition at line 196 of file remote_shell.h.
| virtual bool moost::service::remote_shell< HandlerType >::handle_command | ( | std::string & | _return, |
| const std::string & | cmd, | ||
| const std::string & | args | ||
| ) | [inline, virtual] |
Application-specific command handler.
| _return | Write any message to be sent back to the user to this variable. |
| cmd | The command entered by the user |
| args | Any arguments entered after the command |
false if you don't implement any commands. Implements moost::service::remote_shell_iface.
Definition at line 206 of file remote_shell.h.
| void moost::service::remote_shell< HandlerType >::run | ( | ) | [inline] |
Definition at line 211 of file remote_shell.h.


| void moost::service::remote_shell< HandlerType >::set_appender_factory | ( | appender_factory_ptr | app_factory | ) | [inline] |
Definition at line 216 of file remote_shell.h.


| void moost::service::remote_shell< HandlerType >::set_default_stderr_state | ( | bool | enabled | ) | [inline] |
| void moost::service::remote_shell< HandlerType >::set_default_stdout_state | ( | bool | enabled | ) | [inline] |
| void moost::service::remote_shell< HandlerType >::set_listen_port | ( | unsigned short | port | ) | [inline] |
| void moost::service::remote_shell< HandlerType >::set_pre_shutdown_function | ( | boost::function0< void > | func | ) | [inline] |
| virtual std::string moost::service::remote_shell< HandlerType >::show_help | ( | ) | const [inline, virtual] |
Return command help.
Implements moost::service::remote_shell_iface.
Definition at line 201 of file remote_shell.h.
| void moost::service::remote_shell< HandlerType >::stop | ( | const std::string & | msg | ) | [inline] |
HandlerType& moost::service::remote_shell< HandlerType >::m_hdl [private] |
Definition at line 182 of file remote_shell.h.
remote_shell_server moost::service::remote_shell< HandlerType >::m_srv [private] |
Definition at line 183 of file remote_shell.h.