input/tidal: parse subStatus in error responses

This commit is contained in:
Max Kellermann
2018-01-24 12:26:12 +01:00
parent 2e1481f49d
commit 4398101706
3 changed files with 37 additions and 4 deletions

View File

@@ -39,8 +39,11 @@ class TidalErrorParser final : public YajlResponseParser {
enum class State {
NONE,
USER_MESSAGE,
SUB_STATUS,
} state = State::NONE;
unsigned sub_status = 0;
std::string message;
public:
@@ -57,6 +60,7 @@ protected:
public:
/* yajl callbacks */
bool Integer(long long value) noexcept;
bool String(StringView value) noexcept;
bool MapKey(StringView value) noexcept;
bool EndMap() noexcept;