summaryrefslogtreecommitdiff
path: root/rockworkd/libpebble/healthparams.h
blob: 03dbfc1acdc2f29b9b80b73b391ae67448d0bc02 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
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