26 #ifndef CAMTELNETMENUHELPER_H_
27 #define CAMTELNETMENUHELPER_H_
36 #include <sys/socket.h>
42 class CAmTelnetServer;
43 class IAmDatabaseHandler;
44 class CAmCommandSender;
45 class CAmRoutingSender;
46 class CAmControlSender;
47 class CAmCommandReceiver;
48 class CAmRoutingReceiver;
49 class CAmControlReceiver;
52 class CAmSocketHandler;
74 void enterCmdQueue(std::queue<std::string> &CmdQueue,
int &filedescriptor);
78 void createCommandMaps();
79 void sendError(
int & filedescriptor, std::string error_string);
80 void sendTelnetLine(
int & filedescriptor, std::stringstream &line);
81 void sendCurrentCmdPrompt(
int &filedescriptor);
84 static void oneStepBackCommand(std::queue<std::string> & CmdQueue,
int & filedescriptor);
85 void oneStepBackCommandExec(std::queue<std::string> & CmdQueue,
int & filedescriptor);
86 static void exitCommand(std::queue<std::string> & CmdQueue,
int & filedescriptor);
87 void exitCommandExec(std::queue<std::string> & CmdQueue,
int & filedescriptor);
88 static void helpCommand(std::queue<std::string> & CmdQueue,
int & filedescriptor);
89 void helpCommandExec(std::queue<std::string> & CmdQueue,
int & filedescriptor);
92 static void rootGetCommand(std::queue<std::string> & CmdQueue,
int & filedescriptor);
93 void rootGetCommandExec(std::queue<std::string> & CmdQueue,
int & filedescriptor);
94 static void rootSetCommand(std::queue<std::string> & CmdQueue,
int & filedescriptor);
95 void rootSetCommandExec(std::queue<std::string> & CmdQueue,
int & filedescriptor);
96 static void rootListCommand(std::queue<std::string> & CmdQueue,
int & filedescriptor);
97 void rootListCommandExec(std::queue<std::string> & CmdQueue,
int & filedescriptor);
98 static void rootInfoCommand(std::queue<std::string> & CmdQueue,
int & filedescriptor);
99 void rootInfoCommandExec(std::queue<std::string> & CmdQueue,
int & filedescriptor);
102 static void listConnectionsCommand(std::queue<std::string> & CmdQueue,
int & filedescriptor);
103 void listConnectionsCommandExec(std::queue<std::string> & CmdQueue,
int & filedescriptor);
104 static void listSourcesCommand(std::queue<std::string> & CmdQueue,
int & filedescriptor);
105 void listSourcesCommandExec(std::queue<std::string> & CmdQueue,
int & filedescriptor);
106 static void listSinksCommands(std::queue<std::string> & CmdQueue,
int & filedescriptor);
107 void listSinksCommandsExec(std::queue<std::string> & CmdQueue,
int & filedescriptor);
108 static void listCrossfaders(std::queue<std::string> & CmdQueue,
int & filedescriptor);
109 void listCrossfadersExec(std::queue<std::string> & CmdQueue,
int & filedescriptor);
110 static void listDomainsCommand(std::queue<std::string> & CmdQueue,
int & filedescriptor);
111 void listDomainsCommandExec(std::queue<std::string> & CmdQueue,
int & filedescriptor);
112 static void listGatewaysCommand(std::queue<std::string> & CmdQueue,
int & filedescriptor);
113 void listGatewaysCommandExec(std::queue<std::string> & CmdQueue,
int & filedescriptor);
114 static void listPluginsCommand(std::queue<std::string> & CmdQueue,
int & filedescriptor);
115 void listPluginsCommandExec(std::queue<std::string> & CmdQueue,
int & filedescriptor);
116 static void listMainConnectionsCommand(std::queue<std::string> & CmdQueue,
int & filedescriptor);
117 void listMainConnectionsCommandExec(std::queue<std::string> & CmdQueue,
int & filedescriptor);
118 static void listMainSourcesCommand(std::queue<std::string> & CmdQueue,
int & filedescriptor);
119 void listMainSourcesCommandExec(std::queue<std::string> & CmdQueue,
int & filedescriptor);
120 static void listMainSinksCommand(std::queue<std::string> & CmdQueue,
int & filedescriptor);
121 void listMainSinksCommandExec(std::queue<std::string> & CmdQueue,
int & filedescriptor);
124 static void setRoutingCommand(std::queue<std::string> & CmdQueue,
int & filedescriptor);
125 void setRoutingCommandExec(std::queue<std::string> & CmdQueue,
int & filedescriptor);
126 static void setConnection(std::queue<std::string> & CmdQueue,
int & filedescriptor);
127 void setConnectionExec(std::queue<std::string> & CmdQueue,
int & filedescriptor);
128 static void setDisconnectConnId(std::queue<std::string> & CmdQueue,
int & filedescriptor);
129 void setDisconnectConnIdExec(std::queue<std::string> & CmdQueue,
int & filedescriptor);
130 static void setSourceSoundProperties(std::queue<std::string> & CmdQueue,
int & filedescriptor);
131 void setSourceSoundPropertiesExec(std::queue<std::string> & CmdQueue,
int & filedescriptor);
132 static void setSinkSoundProperty(std::queue<std::string> & CmdQueue,
int & filedescriptor);
133 void setSinkSoundPropertyExec(std::queue<std::string> & CmdQueue,
int & filedescriptor);
134 static void setSinkVolume(std::queue<std::string> & CmdQueue,
int & filedescriptor);
135 void setSinkVolumeExec(std::queue<std::string> & CmdQueue,
int & filedescriptor);
136 static void setVolumeStep(std::queue<std::string> & CmdQueue,
int & filedescriptor);
137 void setVolumeStepExec(std::queue<std::string> & CmdQueue,
int & filedescriptor);
138 static void setSinkMuteState(std::queue<std::string> & CmdQueue,
int & filedescriptor);
139 void setSinkMuteStateExec(std::queue<std::string> & CmdQueue,
int & filedescriptor);
140 static void setSourceSoundProperty(std::queue<std::string> & CmdQueue,
int & filedescriptor);
141 void setSourceSoundPropertyExec(std::queue<std::string> & CmdQueue,
int & filedescriptor);
144 static void getRoutingCommand(std::queue<std::string> & CmdQueue,
int & filedescriptor);
145 void getRoutingCommandExec(std::queue<std::string> & CmdQueue,
int & filedescriptor);
146 static void getSenderversionCommand(std::queue<std::string> & CmdQueue,
int & filedescriptor);
147 void getSenderversionCommandExec(std::queue<std::string> & CmdQueue,
int & filedescriptor);
148 static void getReceiverversionCommand(std::queue<std::string> & CmdQueue,
int & filedescriptor);
149 void getReceiverversionCommandExec(std::queue<std::string> & CmdQueue,
int & filedescriptor);
152 static void infoSystempropertiesCommand(std::queue<std::string> & CmdQueue,
int & filedescriptor);
153 void infoSystempropertiesCommandExec(std::queue<std::string> & CmdQueue,
int & filedescriptor);
154 static void infoDumpCommand(std::queue<std::string>& CmdQueue,
int& filedescriptor);
155 void infoDumpCommandExec(std::queue<std::string>& CmdQueue,
int& filedescriptor);
159 typedef void (*pCommandPrototype)(std::queue<std::string>& msg,
int & filedescriptor);
161 struct sCommandPrototypeInfo
164 pCommandPrototype CommandPrototype;
167 sCommandPrototypeInfo() :
168 info(
""), CommandPrototype(NULL)
173 sCommandPrototypeInfo(std::string MyInfo, pCommandPrototype MyCommandPrototype) :
174 info(MyInfo), CommandPrototype(MyCommandPrototype)
179 typedef std::map<std::string, sCommandPrototypeInfo> tCommandMap;
180 std::map<int, EMainState> mCurrentMainStateMap;
183 CAmTelnetServer *mpTelenetServer;
184 CAmSocketHandler *mpSocketHandler;
185 CAmCommandSender *mpCommandSender;
186 CAmCommandReceiver *mpCommandReceiver;
187 CAmRoutingSender *mpRoutingSender;
188 CAmRoutingReceiver *mpRoutingReceiver;
189 CAmControlSender *mpControlSender;
190 CAmControlReceiver *mpControlReceiver;
191 IAmDatabaseHandler *mpDatabasehandler;
194 tCommandMap mRootCommands;
195 tCommandMap mListCommands;
196 tCommandMap mGetCommands;
197 tCommandMap mSetCommands;
198 tCommandMap mInfoCommands;
204 #endif // CAMTELNETMENUHELPER_H_
Implements the RoutingSendInterface.
This class realizes the command Interface.
Implements an autorouting algorithm for connecting sinks and sources via different audio domains...
This class is used to receive all commands from the control interface.
The am::CAmSocketHandler implements a mainloop for the AudioManager.
Implements the Receiving side of the RoutingPlugins.
sends data to the commandInterface, takes the file of the library that needs to be loaded ...
This class handles and abstracts the database.
Implements a telnetserver that can be used to connect to the audiomanager, retrieve some information ...
Copyright (C) 2012 - 2014, BMW AG.
This class is used to send data to the CommandInterface.