Rudiments
|
00001 // Copyright (c) 2003 David Muse 00002 // See the COPYING file for more information 00003 00004 #ifndef RUDIMENTS_TIMEZONEFILE_H 00005 #define RUDIMENTS_TIMEZONEFILE_H 00006 00007 #include <rudiments/private/timezonefileincludes.h> 00008 00009 #ifdef RUDIMENTS_NAMESPACE 00010 namespace rudiments { 00011 #endif 00012 00013 class timezonefileprivate; 00014 00015 struct ttinfo { 00016 int64_t tt_gmtoff; 00017 int32_t tt_isdst; 00018 uint32_t tt_abbrind; 00019 }; 00020 00023 class RUDIMENTS_DLLSPEC timezonefile { 00024 public: 00025 00027 timezonefile(); 00028 00031 timezonefile(const timezonefile &t); 00032 00035 timezonefile &operator=(const timezonefile &t); 00036 00038 ~timezonefile(); 00039 00042 bool parseFile(const char *filename); 00043 00046 uint64_t getTimeCount(); 00047 00049 uint64_t *getTransitionTimes(); 00050 00052 uint64_t getTransitionTime(int32_t index); 00053 00055 unsigned char *getLocalTimes(); 00056 00058 unsigned char getLocalTimes(int32_t index); 00059 00062 uint64_t getTypeCount(); 00063 00065 ttinfo **getTimeTypeInfos(); 00066 00068 ttinfo *getTimeTypeInfo(int32_t index); 00069 00072 uint64_t getLeapCount(); 00073 00075 uint64_t *getLeapSecondTimes(); 00076 00078 uint64_t getLeapSecondTime(int32_t index); 00079 00081 uint64_t *getTotalLeapSeconds(); 00082 00084 uint64_t getTotalLeapSeconds(int32_t index); 00085 00088 uint64_t getIsSTDCount(); 00089 00091 unsigned char *getStandardOrWallIndicators(); 00092 00094 unsigned char getStandardOrWallIndicator(int32_t index); 00095 00098 uint64_t getIsGMTCount(); 00099 00101 unsigned char *getUTCOrLocalIndicators(); 00102 00104 unsigned char getUTCOrLocalIndicator(int32_t index); 00105 00108 uint64_t getCharacterCount(); 00109 00111 unsigned char *getRawTimeZoneString(); 00112 00114 unsigned char **getTimeZoneStrings(); 00115 00117 unsigned char *getTimeZoneString(int32_t index); 00118 00120 void print(); 00121 00122 #include <rudiments/private/timezonefile.h> 00123 }; 00124 00125 #ifdef RUDIMENTS_NAMESPACE 00126 } 00127 #endif 00128 00129 #endif