fome-fw/firmware/util/LocalVersionHolder.h

35 lines
650 B
C
Raw Normal View History

2015-07-10 06:01:56 -07:00
/**
* @file LocalVersionHolder.h
*
* @date Mar 19, 2014
2017-01-03 03:05:22 -08:00
* @author Andrey Belomutskiy, (c) 2012-2017
2015-07-10 06:01:56 -07:00
*/
#ifndef LOCALVERSIONHOLDER_H_
#define LOCALVERSIONHOLDER_H_
#include "stdbool.h"
2018-02-03 09:40:17 -08:00
/**
* this
*/
2015-07-10 06:01:56 -07:00
class LocalVersionHolder {
public:
LocalVersionHolder();
2018-02-03 09:40:17 -08:00
/**
* Calling this method changes the internal state of the class - each consumer interested in tracking
* changes should have it's own instance of this class
*
* @return true if 'globalVersion' has changed since last time we've invoked this method
2018-02-03 09:40:17 -08:00
*/
bool isOld(int globalVersion);
2015-07-10 06:01:56 -07:00
int getVersion();
private:
int localVersion;
};
#endif /* LOCALVERSIONHOLDER_H_ */