RsTokenService use enum for request status

This commit is contained in:
Gioacchino Mazzurco 2018-06-24 18:56:48 +02:00
parent ec95b6d054
commit b4d2ce82c1
No known key found for this signature in database
GPG key ID: A1FBCA3872E87051
20 changed files with 146 additions and 153 deletions

View file

@ -42,7 +42,7 @@ void GenExchangeTest::pollForToken(uint32_t token, const RsTokReqOptions &opts,
Sleep((int) (timeDelta * 1000));
#endif
if((RsTokenService::GXS_REQUEST_V2_STATUS_COMPLETE == mTokenService->requestStatus(token)))
if((RsTokenService::COMPLETE == mTokenService->requestStatus(token)))
{
switch(opts.mReqType)
{
@ -81,7 +81,7 @@ void GenExchangeTest::pollForToken(uint32_t token, const RsTokReqOptions &opts,
}
break;
}
else if(RsTokenService::GXS_REQUEST_V2_STATUS_FAILED == mTokenService->requestStatus(token))
else if(RsTokenService::FAILED == mTokenService->requestStatus(token))
{
mTokenService->cancelRequest(token);
break;
@ -108,12 +108,12 @@ bool GenExchangeTest::pollForMsgAcknowledgement(uint32_t token,
Sleep((int) (timeDelta * 1000));
#endif
if((RsTokenService::GXS_REQUEST_V2_STATUS_COMPLETE == mTokenService->requestStatus(token)))
if((RsTokenService::COMPLETE == mTokenService->requestStatus(token)))
{
mTestService->acknowledgeTokenMsg(token, msgId);
return true;
}
else if(RsTokenService::GXS_REQUEST_V2_STATUS_FAILED == mTokenService->requestStatus(token))
else if(RsTokenService::FAILED == mTokenService->requestStatus(token))
{
mTokenService->cancelRequest(token);
return false;
@ -146,12 +146,12 @@ bool GenExchangeTest::pollForGrpAcknowledgement(uint32_t token,
Sleep((int) (timeDelta * 1000));
#endif
if((RsTokenService::GXS_REQUEST_V2_STATUS_COMPLETE == mTokenService->requestStatus(token)))
if((RsTokenService::COMPLETE == mTokenService->requestStatus(token)))
{
mTestService->acknowledgeTokenGrp(token, grpId);
return true;
}
else if(RsTokenService::GXS_REQUEST_V2_STATUS_FAILED == mTokenService->requestStatus(token))
else if(RsTokenService::FAILED == mTokenService->requestStatus(token))
{
mTokenService->cancelRequest(token);
return false;