Add public method to get state as a human readable string from an AsyncRPCOperation.
This commit is contained in:
@@ -145,3 +145,8 @@ Value AsyncRPCOperation::getStatus() const {
|
|||||||
return Value(obj);
|
return Value(obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
std::string AsyncRPCOperation::getStateAsString() const {
|
||||||
|
OperationStatus status = this->getState();
|
||||||
|
return OperationStatusMap[status];
|
||||||
|
}
|
||||||
|
|||||||
@@ -72,6 +72,8 @@ public:
|
|||||||
|
|
||||||
Value getResult() const;
|
Value getResult() const;
|
||||||
|
|
||||||
|
std::string getStateAsString() const;
|
||||||
|
|
||||||
int getErrorCode() const {
|
int getErrorCode() const {
|
||||||
return errorCode;
|
return errorCode;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user