/* If you use this, you agree that Star Pilot Technologies is not liable for any damage incurred by */ /* you, or anyone who uses a product created with this library. If you chose to use it in a released */ /* program, you *MUST* inform locmgr@star-pilot.com */ #ifndef __llmgrh__ #define __llmgrh__ #include #include #include #define LDBID 'lldb' #define LDBNAME "Location DB" #define STATICLOCDBID 'LdbS' #define EAST 1 #define WEST -1 #define SOUTH -1 #define NORTH 1 #define ISDST 1 #define NOTDST 0 #define LAUNCH_GETPOS 32768 #define LAUNCH_GETGMT 32769 #define LAUNCH_GETODST 32770 #define LAUNCH_ISDST 32771 #define LAUNCH_VER 32800 typedef struct { Byte tz; SWord year, month, day, hour; } dstdatetype; typedef struct { Char name[25]; Char dstname[25]; float gmtoffset; Byte stmonth, stday, stweek, sthour; Byte dstmonth, dstday, dstweek, dsthour; } timezonetype; typedef struct { Char name[40]; Int latsign; Byte latdeg; Byte latmin; Byte latmintenth; Int lonsign; Byte londeg; Byte lonmin; Byte lonmintenth; Byte tz; } locationtype; /* EVERYTHING BELOW HERE IS FOR BACKWARDS COMPATIBILITY ONLY ... */ /* DO NOT IMPLEMENT SHARED LIBRARY METHOD IN THE FUTURE AS IT IS */ /* GOING AWAY SOON! */ /* Call this first */ UInt llmgrInit (); /* Call this to set the current set position -- Probably not needed in most apps */ UInt llmgrSetPos (locationtype *); /* Call this to get the current location */ UInt llmgrGetPos (locationtype *); /* Call this to see if the user observes DST or not...it is not related to timezone info */ /* To correctly check for DST, call this function. If it returns 1, then check llmgrIsDST */ /* for the timezone you care about. You could ignore this function, but it's not polite. */ UInt llmgrGetODST (UInt *); /* Call this to set whether the user observes DST or not -- Probably not needed in most apps */ UInt llmgrSetODST (UInt *); /* Use this to get the current callback -- Probably not needed in most apps */ UInt llmgrGetCallback (ULong *); /* Call this with your apps DBID so Location Manager will start you when a new location is selected */ UInt llmgrSetCallback (ULong *); /* Gets the name of the timezone you pass */ UInt llmgrTZName (Byte, Char *); /* Gets the GMT offset of the tz passed */ UInt llmgrGetGMT (Byte, float *); /* Calcs auto-dst for the params in this order: timezone #, Year, Month, Day, Hour */ UInt llmgrIsDST (Byte, SWord, SWord, SWord, SWord, UInt *); #endif