BEHealthKit 1.18
A HealthKit plugin for Unity
Loading...
Searching...
No Matches
BEHealthKit+read.h
1//
2// BEHealthKit+read.h
3// Unity-iPhone
4//
5// Created by greay on 10/10/19.
6//
7
8#import <Foundation/Foundation.h>
9
10
11#import "BEHealthKit.h"
12
16@interface BEHealthKit (read)
17
25- (void)readSamples:(HKSampleType *)sampleType fromDate:(NSDate *)startDate toDate:(NSDate *)endDate resultsHandler:(void (^)(NSArray *results, NSError *error))resultsHandler;
26
27
33- (void)readCharacteristic:(HKCharacteristicType *)characteristic resultsHandler:(void (^)(id result, NSError *error))resultsHandler;
34
35
43- (void)readSamplesForWorkoutActivity:(HKWorkoutActivityType)activity fromDate:(NSDate *)startDate toDate:(NSDate *)endDate resultsHandler:(void (^)(NSArray *results, NSError *error))resultsHandler;
44
45
46
54- (void)readStatisticsForQuantityType:(HKQuantityType *)quantityType predicate:(NSPredicate *)predicate options:(HKStatisticsOptions)options resultsHandler:(void (^)(id result, NSError *error))resultsHandler;
55
56
66- (void)readStatisticsCollectionForQuantityType:(HKQuantityType *)quantityType predicate:(NSPredicate *)predicate options:(HKStatisticsOptions)options anchorDate:(NSDate *)anchorDate intervalComponents:(NSDateComponents *)interval resultsHandler:(void (^)(id result, NSError *error))resultsHandler;
67
68
78- (void)readDocumentOfType:(HKDocumentType *)documentType predicate:(NSPredicate *)predicate limit:(NSUInteger)limit sortDescriptors:(NSArray<NSSortDescriptor *> *)sortDescriptors includeDocumentData:(BOOL)includeDocumentData resultsHandler:(void (^)(id result, BOOL done, NSError *error))resultsHandler;
79
85- (void)beginBackgroundObserverQuery:(HKQuantityTypeIdentifier)identifierString guid:(NSString *)guid;
86
87@end
88
89
90// hooks for external interface
91// ----------------------------
92void _ReadQuantity(char *identifier, char *startDateString, char *endDateString, bool combineSamples, char *guid);
93void _ReadCategory(char *identifier, char *startDateString, char *endDateString, char *guid);
94void _ReadCharacteristic(char *identifier, char *guid);
95void _ReadCorrelation(char *identifier, char *startDateString, char *endDateString, bool combineSamples, char *guid);
96void _ReadWorkout(int activityID, char *startDateString, char *endDateString, bool combineSamples, char *guid);
97void _ReadStateOfMind(char *startDateString, char *endDateString, char *guid);
98
99void _BeginObserverQuery(char *identifier, char *guid);
100void _StopObserverQuery(char *identifier);
101
102void _ReadCombinedQuantityStatistics(char *identifier, char *startDateString, char *endDateString, char *guid);
103void _ReadStatistics(char *identifier, char *startDateString, char *endDateString, char *predicateString, char *optionsString, char *guid);
104void _ReadStatisticsCollection(char *identifier, char *predicateString, char *optionsString, char *startStamp, char *endStamp, char *intervalString, char *guid);
105
106void _ReadLocationDataForWorkouts(int activityID, char *startDateString, char *endDateString, char *guid);
107void _ReadWorkoutRoutes(int activityID, char *startDateString, char *endDateString, bool combineSamples, char *guid);
108
109void _ReadDocument(/* char *documentTypeString, */ char *predicateString, int limit, char *sort, bool includeData, char *guid);
110
111void _EnableBackgroundDelivery(char *identifier, int frequency);
112
113// ---
114
115void _ReadPedometer(char *startDateString, char *endDateString);
116void _StartReadingPedometerFromDate(char *startDateString);
117void _StopReadingPedometer();