00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef Augmented_Reality_Tractor_Maintenance_JDMaintenanceManager_h
00010 #define Augmented_Reality_Tractor_Maintenance_JDMaintenanceManager_h
00011
00012 #import "JDDatabaseManager.h"
00013
00014 #include "JDDownloadBlock.h"
00015
00016
00017 #define MAXMAINTENANCELIMIT 300
00018
00019 #define MAINTENANCEDEBUGON 0
00020
00021
00022 @interface JDMaintenanceManager : NSObject
00023
00024 -(instancetype) init;
00025 -(NSArray *)getFieldsForTractor:(unsigned long)tractorID;
00026 -(NSArray *)getUnrestrictedFieldsForTractor:(unsigned long)tractorID;
00027 -(NSArray *)getHistoryForTractor:(unsigned long)tractorID;
00028 -(BOOL)setField:(NSString *)field withText:(NSString *)value forTractor:(unsigned long)tractorID;
00029 -(BOOL)setField:(NSString *)field withReal:(NSNumber *)value forTractor:(unsigned long)tractorID;
00030
00031
00032 -(BOOL)isFieldText:(JDFieldArray *)fields;
00033 -(BOOL)isFieldReal:(JDFieldArray *)fields;
00034
00035
00036 -(NSString *)getFieldText:(JDFieldArray *)fields;
00037 -(NSNumber *)getFieldReal:(JDFieldArray *)fields;
00038
00039
00040 -(BOOL) updateWithDownloadBlock:(JDDownloadBlock)dlb forTractor:(unsigned long)tractorID;
00041
00042
00043
00044 -(BOOL)setNumerical:(NSString *)fieldName withParam:(unsigned long)parameter forTractor:(unsigned long)tractorID;
00045 -(BOOL)setFuelLevel:(unsigned long)parameter forTractor:(unsigned long)tractorID;
00046 -(BOOL)setEngineHours:(unsigned long)parameter forTractor:(unsigned long)tractorID;
00047 -(BOOL)setMachineID:(unsigned long)parameter forTractor:(unsigned long)tractorID;
00048 -(BOOL)setEngineTurnOnCount:(unsigned long)parameter forTractor:(unsigned long)tractorID;
00049 -(BOOL)setKeyTurnOnCount:(unsigned long)parameter forTractor:(unsigned long)tractorID;
00050 -(BOOL)setTirePressure:(unsigned long)parameter forTractor:(unsigned long)tractorID;
00051
00052 -(BOOL)setBool:(NSString *)fieldName withParam:(bool)parameter forTractor:(unsigned long)tractorID;
00053 -(BOOL)setIsGPSAvailable:(bool)parameter forTractor:(unsigned long)tractorID;
00054 -(BOOL)setIsRDALicenseAvailable:(bool)parameter forTractor:(unsigned long)tractorID;
00055
00056 -(BOOL)setString:(NSString *)fieldName withParam:(const char*)parameter forTractor:(unsigned long)tractorID;
00057 -(BOOL)setTerminalSerialNumber:(const char*)parameter forTractor:(unsigned long)tractorID;
00058
00059 -(BOOL) check:(unsigned long)itemID;
00060 -(BOOL) unCheck:(unsigned long)itemID;
00061
00062
00063 -(BOOL)parseGeneral:(NSString *)fieldName withResponse:(NSString *)responseString forTractor:(unsigned long)tractorID;
00064 -(BOOL)parseFuelLevel:(NSString *)responseString forTractor:(unsigned long)tractorID;
00065 -(BOOL)parseMachineHours:(NSString *)responseString forTractor:(unsigned long)tractorID;
00066
00067 @end
00068
00069 #endif