Set client SDK version to Service APIs

This commit is contained in:
mailwl 2016-11-20 08:50:48 +03:00
parent cf5b8483fc
commit 5b136aa211
8 changed files with 88 additions and 16 deletions

View file

@ -29,6 +29,10 @@ public:
return GetPortName();
}
virtual void SetVersion(u32 raw_version) {
version.raw = raw_version;
}
typedef void (*Function)(Interface*);
struct FunctionInfo {
@ -58,6 +62,14 @@ protected:
void Register(const FunctionInfo* functions, size_t n);
union {
u32 raw;
BitField<0, 8, u32> major;
BitField<8, 8, u32> minor;
BitField<16, 8, u32> build;
BitField<24, 8, u32> revision;
} version = {};
private:
boost::container::flat_map<u32, FunctionInfo> m_functions;
};