RsGenExchange enum for create status

This commit is contained in:
Gioacchino Mazzurco 2017-02-21 11:43:18 +01:00
parent e246876513
commit fcdb3d6c88
2 changed files with 2 additions and 4 deletions

View File

@ -83,9 +83,6 @@ RsGenExchange::RsGenExchange(RsGeneralDataService *gds, RsNetworkExchangeService
mChecking(false), mChecking(false),
mLastCheck((int)time(NULL) - (int)(RSRandom::random_u32() % INTEGRITY_CHECK_PERIOD) + 120), // this helps unsynchronising the checks for the different services, with 2 min security to avoid checking right away before statistics come up. mLastCheck((int)time(NULL) - (int)(RSRandom::random_u32() % INTEGRITY_CHECK_PERIOD) + 120), // this helps unsynchronising the checks for the different services, with 2 min security to avoid checking right away before statistics come up.
mIntegrityCheck(NULL), mIntegrityCheck(NULL),
CREATE_FAIL(0),
CREATE_SUCCESS(1),
CREATE_FAIL_TRY_LATER(2),
SIGN_MAX_WAITING_TIME(60), SIGN_MAX_WAITING_TIME(60),
SIGN_FAIL(0), SIGN_FAIL(0),
SIGN_SUCCESS(1), SIGN_SUCCESS(1),

View File

@ -878,8 +878,9 @@ private:
RsGxsIntegrityCheck* mIntegrityCheck; RsGxsIntegrityCheck* mIntegrityCheck;
protected: protected:
enum CreateStatus { CREATE_FAIL, CREATE_SUCCESS, CREATE_FAIL_TRY_LATER };
const uint8_t SIGN_MAX_WAITING_TIME;
// TODO: cleanup this should be an enum! // TODO: cleanup this should be an enum!
const uint8_t CREATE_FAIL, CREATE_SUCCESS, CREATE_FAIL_TRY_LATER, SIGN_MAX_WAITING_TIME;
const uint8_t SIGN_FAIL, SIGN_SUCCESS, SIGN_FAIL_TRY_LATER; const uint8_t SIGN_FAIL, SIGN_SUCCESS, SIGN_FAIL_TRY_LATER;
const uint8_t VALIDATE_FAIL, VALIDATE_SUCCESS, VALIDATE_FAIL_TRY_LATER, VALIDATE_MAX_WAITING_TIME; const uint8_t VALIDATE_FAIL, VALIDATE_SUCCESS, VALIDATE_FAIL_TRY_LATER, VALIDATE_MAX_WAITING_TIME;