2 // Tizen Web Device API
3 // Copyright (c) 2014 Samsung Electronics Co., Ltd.
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
9 // http://www.apache.org/licenses/LICENSE-2.0
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an AS IS BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
18 #ifndef __TIZEN_PEDOMETER_INFO_H__
19 #define __TIZEN_PEDOMETER_INFO_H__
21 #include <MultiCallbackUserData.h>
22 #include "ContextTypes.h"
24 using namespace DeviceAPI::Common;
27 namespace HumanActivityMonitor {
33 virtual ~PedometerInfo();
35 int getStepStatus() const;
36 char* getStepStatusString() const;
37 void setStepStatus(int stepStatus);
39 double getSpeed() const;
40 void setSpeed(double speed);
42 double getWalkingFrequency() const;
43 void setWalkingFrequency(double walkingFrequency);
45 double getCumulativeDistance() const;
46 void setCumulativeDistance(double cumulativeDistance);
48 double getCumulativeCalorie() const;
49 void setCumulativeCalorie(double cumulativeCalorie);
51 double getCumulativeTotalStepCount() const;
52 void setCumulativeTotalStepCount(double cumulativeTotalStepCount);
54 double getCumulativeWalkStepCount() const;
55 void setCumulativeWalkStepCount(double cumulativeWalkStepCount);
57 double getCumulativeRunStepCount() const;
58 void setCumulativeRunStepCount(double cumulativeRunStepCount);
60 void setStepDifference(int* stepDiff);
61 int* getStepDifference() const;
63 void setTimeStamp(int64_t* timsStamp);
64 int64_t* getTimeStamp() const;
66 void setTimeStampLength(int timsStampLength);
67 int getTimeStampLength() const;
69 void setContext(JSContextRef ctx);
70 JSContextRef getContext();
72 double convertSimpleDouble(double origin);
74 JSValueRef m_jSStepDiffrence;
75 JSContextRef m_JSContext;
80 double m_walkingFrequency;
81 double m_cumulativeDistance;
82 double m_cumulativeCalorie;
83 double m_cumulativeTotalStepCount;
84 double m_cumulativeWalkStepCount;
85 double m_cumulativeRunStepCount;
86 int* m_stepDifference;
87 int m_timeStampLength;
95 HRMInfo(int heartRate, int rrInterval);
98 int getHeartRate() const;
99 void setHeartRate(int heartRate);
101 int getRRInterval() const;
102 void setRRInterval(int rrInterval);
113 GPSInfo(double latitude, double longitude, double altitude, double speed, double errorRange, int64_t timeStamp);
116 double getLatitude() const;
117 void setLatitude(double latitude);
119 double getLongitude() const;
120 void setLongitude(double longitude);
122 double getAltitude() const;
123 void setAltitude(double altitude);
125 double getSpeed() const;
126 void setSpeed(double speed);
128 int64_t getTimeStamp() const;
129 void setTimeStamp(int64_t timeStamp);
131 double getErrorRange() const;
132 void setErrorRange(double errorRange);
135 double convertSimpleDouble(double origin);
146 class StepDifferenceInfo
149 StepDifferenceInfo(int stepDifference, int64_t timeStamp);
150 virtual ~StepDifferenceInfo();
152 void setStepDifference(int stepDifference);
153 int getStepDifference() const;
155 int64_t getTimeStamp() const;
156 void setTimeStamp(int64_t timeStamp);
158 double convertSimpleDouble(double origin);
161 int m_stepDifference;
165 typedef std::shared_ptr<StepDifferenceInfo> StepDifferenceInfoPtr;
170 #endif // __TIZEN_PEDOMETER_INFO_H__