Browse Source

Add public method to get state as a human readable string from an AsyncRPCOperation.

pull/145/head
Simon 8 years ago
parent
commit
c72a427274
  1. 5
      src/asyncrpcoperation.cpp
  2. 2
      src/asyncrpcoperation.h

5
src/asyncrpcoperation.cpp

@ -145,3 +145,8 @@ Value AsyncRPCOperation::getStatus() const {
return Value(obj);
}
std::string AsyncRPCOperation::getStateAsString() const {
OperationStatus status = this->getState();
return OperationStatusMap[status];
}

2
src/asyncrpcoperation.h

@ -71,6 +71,8 @@ public:
Value getError() const;
Value getResult() const;
std::string getStateAsString() const;
int getErrorCode() const {
return errorCode;

Loading…
Cancel
Save