From 29aaea2d80a9eb1715b6cddfac2d2aacf76358bd Mon Sep 17 00:00:00 2001 From: Andrew Branson Date: Thu, 11 Feb 2016 23:55:16 +0100 Subject: launchpad ~mzanetti/rockwork/trunk r87 --- rockworkd/libpebble/healthparams.h | 52 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 rockworkd/libpebble/healthparams.h (limited to 'rockworkd/libpebble/healthparams.h') diff --git a/rockworkd/libpebble/healthparams.h b/rockworkd/libpebble/healthparams.h new file mode 100644 index 0000000..03dbfc1 --- /dev/null +++ b/rockworkd/libpebble/healthparams.h @@ -0,0 +1,52 @@ +#ifndef HEALTHPARAMS_H +#define HEALTHPARAMS_H + +#include "watchconnection.h" + +class HealthParams: public PebblePacket +{ +public: + enum Gender { + GenderFemale = 0x00, + GenderMale = 0x01 + }; + + HealthParams(); + + bool enabled() const; + void setEnabled(bool enabled); + + // In cm + int height() const; + void setHeight(int height); + + // In kg + int weight() const; + void setWeight(int weight); + + bool moreActive() const; + void setMoreActive(bool moreActive); + + bool sleepMore() const; + void setSleepMore(bool sleepMore); + + int age() const; + void setAge(int age); + + Gender gender() const; + void setGender(Gender gender); + + QByteArray serialize() const; + +private: + bool m_enabled = false; + int m_height = 0; + int m_weight = 0; + bool m_moreActive = false; + bool m_sleepMore = false; + int m_age = 0; + Gender m_gender = Gender::GenderFemale; + +}; + +#endif // HEALTHPARAMS_H -- cgit v1.2.3