BMA Server Framework
/home/bradarant/barant/ServerCore/ConsoleSession.h
1
#ifndef __ConsoleSession_h__
2
#define __ConsoleSession_h__
3
4
#include "TerminalSession.h"
5
#include "Session.h"
6
#include "Service.h"
7
#include "CommandList.h"
8
9
namespace
core
{
10
18
19
class
ConsoleSession
:
public
TerminalSession
{
20
21
public
:
22
ConsoleSession
(
EPoll
&ePoll,
Service
&service);
23
~
ConsoleSession
();
24
25
void
writeLog(std::string data);
26
27
protected
:
28
void
protocol
(std::string data)
override
;
29
30
private
:
31
enum
Status {WELCOME, LOGIN, WAIT_USER_PROFILE, PASSWORD, WAIT_PASSWORD, PROMPT, INPUT, PROCESS, DONE};
32
Status status = WELCOME;
33
void
doCommand(std::string request);
34
std::string command;
35
36
};
37
38
}
39
40
#endif
core::EPoll
Definition:
EPoll.h:31
core
Definition:
Command.cpp:4
core::ConsoleSession
Definition:
ConsoleSession.h:19
core::Service
Definition:
Service.h:20
core::ConsoleSession::protocol
void protocol(std::string data) override
Definition:
ConsoleSession.cpp:12
core::TerminalSession
Definition:
TerminalSession.h:30
Generated by
1.8.13