2020-10-08 16:44:14 +08:00
|
|
|
#ifndef BOSS_MSG_COMMANDFAIL_HPP
|
|
|
|
|
#define BOSS_MSG_COMMANDFAIL_HPP
|
|
|
|
|
|
|
|
|
|
#include"Json/Out.hpp"
|
2022-11-23 00:36:43 +08:00
|
|
|
#include"Ln/CommandId.hpp"
|
2020-10-08 16:44:14 +08:00
|
|
|
#include<string>
|
|
|
|
|
|
|
|
|
|
namespace Boss { namespace Msg {
|
|
|
|
|
|
|
|
|
|
/** struct Boss::Msg::CommandFail
|
|
|
|
|
*
|
|
|
|
|
* @brief Emit in response to a `Boss::Msg::CommandRequest`,
|
|
|
|
|
* to indicate that the command failed.
|
|
|
|
|
* If multiple responses for the same ID are emitted, or
|
|
|
|
|
* for a nonexistent ID, the extras/nonexistent are
|
|
|
|
|
* silently ignored.
|
|
|
|
|
*/
|
|
|
|
|
struct CommandFail {
|
2022-11-23 00:36:43 +08:00
|
|
|
Ln::CommandId id;
|
2020-10-08 16:44:14 +08:00
|
|
|
int code;
|
|
|
|
|
std::string message;
|
|
|
|
|
Json::Out data;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
}}
|
|
|
|
|
|
|
|
|
|
#endif /* !defined(BOSS_MSG_COMMANDFAIL_HPP) */
|