25 #ifndef __ASN1CTIME_H__ 26 #define __ASN1CTIME_H__ 58 #ifndef _NO_UTILS_CLASSES 71 #define LOG_TMERR(pctxt,stat) ((pctxt != 0) ? LOG_RTERR (pctxt, stat) : stat) 93 EXTRTMETHOD
void checkCapacity();
98 EXTRTMETHOD
char*& getTimeStringPtr ();
101 virtual const ASN1TTime& getTimeObj ()
const = 0;
103 EXTRTMETHOD
ASN1CTime(
char*& buf, OSSIZE bufSize, OSBOOL useDerRules);
104 EXTRTMETHOD ASN1CTime(ASN1VisibleString& buf, OSBOOL useDerRules);
109 EXTRTMETHOD
void privateInit ();
113 January = 1, Jan = 1,
114 February = 2, Feb = 2,
121 September = 9, Sep = 9,
122 October = 10, Oct = 10,
123 November = 11, Nov = 11,
124 December = 12, Dec = 12
141 EXTRTMETHOD ASN1CTime
142 (OSRTMessageBufferIF& msgBuf,
char*& buf, OSSIZE bufSize,
160 EXTRTMETHOD ASN1CTime
161 (OSRTMessageBufferIF& msgBuf, ASN1VisibleString& buf, OSBOOL useDerRules);
176 EXTRTMETHOD ASN1CTime
177 (
OSRTContext& ctxt,
char*& buf, OSSIZE bufSize, OSBOOL useDerRules);
191 EXTRTMETHOD ASN1CTime
192 (
OSRTContext& ctxt, ASN1VisibleString& buf, OSBOOL useDerRules);
200 EXTRTMETHOD ASN1CTime (
const ASN1CTime& original);
205 EXTRTMETHOD ~ASN1CTime();
218 virtual EXTRTMETHOD
int getYear();
234 virtual EXTRTMETHOD
int getMonth();
248 virtual EXTRTMETHOD
int getDay();
262 virtual EXTRTMETHOD
int getHour();
275 virtual EXTRTMETHOD
int getMinute();
288 virtual EXTRTMETHOD
int getSecond();
302 virtual EXTRTMETHOD
int getFraction();
315 virtual EXTRTMETHOD
double getFractionAsDouble();
326 virtual EXTRTMETHOD
int getFractionStr(
char*
const pBuf,
size_t bufSize);
336 virtual EXTRTMETHOD
int getFractionLen();
353 virtual EXTRTMETHOD
int getDiffHour();
370 virtual EXTRTMETHOD
int getDiffMinute();
387 virtual EXTRTMETHOD
int getDiff();
398 virtual EXTRTMETHOD OSBOOL getUTC();
416 virtual EXTRTMETHOD time_t getTime();
422 void setDER (OSBOOL bvalue) { derRules = bvalue; }
435 virtual EXTRTMETHOD
int setUTC(OSBOOL utc);
448 virtual EXTRTMETHOD
int setYear(
short year_);
464 virtual EXTRTMETHOD
int setMonth(
short month_);
478 virtual EXTRTMETHOD
int setDay(
short day_);
492 virtual EXTRTMETHOD
int setHour(
short hour_);
505 virtual EXTRTMETHOD
int setMinute(
short minute_);
518 virtual EXTRTMETHOD
int setSecond(
short second_);
535 virtual EXTRTMETHOD
int setFraction(
int fraction,
int fracLen = -1);
548 virtual EXTRTMETHOD
int setFraction (
double frac,
int fracLen);
559 virtual EXTRTMETHOD
int setFraction (
char const* frac);
577 virtual int setTime(time_t time, OSBOOL diffTime) = 0;
596 virtual EXTRTMETHOD
int setDiffHour(
short dhour);
616 virtual EXTRTMETHOD
int setDiff(
short dhour,
short dminute);
634 virtual EXTRTMETHOD
int setDiff(
short inMinutes);
648 virtual EXTRTMETHOD
int parseString(
const char*
string);
659 virtual EXTRTMETHOD
void clear();
665 virtual EXTRTMETHOD
int equals (ASN1CTime&);
672 EXTRTMETHOD OSSIZE getTimeStringLen ();
682 EXTRTMETHOD
const char* getTimeString (
char* pbuf, OSSIZE bufsize);
690 EXTRTMETHOD
const ASN1CTime& operator = (
const ASN1CTime& );
697 virtual EXTRTMETHOD OSBOOL
operator == (ASN1CTime&);
704 virtual EXTRTMETHOD OSBOOL
operator != (ASN1CTime&);
711 virtual EXTRTMETHOD OSBOOL
operator > (ASN1CTime&);
718 virtual EXTRTMETHOD OSBOOL
operator < (ASN1CTime&);
725 virtual EXTRTMETHOD OSBOOL
operator >= (ASN1CTime&);
732 virtual EXTRTMETHOD OSBOOL
operator <= (ASN1CTime&);
740 virtual int compileString() = 0;
745 typedef class _ASN1CTime :
public ASN1CType {
747 _ASN1CTime(
char*& buf,
int bufSize, OSBOOL useDerRules) {}
748 _ASN1CTime(ASN1VisibleString& buf, OSBOOL useDerRules) {}
750 _ASN1CTime (OSRTMessageBufferIF& msgBuf,
char*& , OSSIZE, OSBOOL) :
752 _ASN1CTime (OSRTMessageBufferIF& msgBuf, ASN1VisibleString&, OSBOOL) :
754 _ASN1CTime(
OSRTContext& ctxt,
char*& buf, OSSIZE bufSize,
755 OSBOOL useDerRules) :
ASN1CType (ctxt) {}
756 _ASN1CTime(
OSRTContext& ctxt, ASN1VisibleString& buf,
757 OSBOOL useDerRules) :
ASN1CType (ctxt) {}
760 #endif // _NO_UTILS_CLASSES 766 #endif //__ASN1CTIME_H__ int operator>=(const ASN1TObjId &lhs, const ASN1TObjId &rhs)
Definition: ASN1TTime.h:66
int operator<=(const ASN1TObjId &lhs, const ASN1TObjId &rhs)
Definition: ASN1CTime.h:85
int operator<(const ASN1TObjId &lhs, const ASN1TObjId &rhs)
#define MAX_TIMESTR_SIZE
Definition: ASN1TTime.h:34
int operator==(const ASN1OBJID &lhs, const ASN1OBJID &rhs)
Definition: asn1CppTypes.h:308
void setDER(OSBOOL bvalue)
Definition: ASN1CTime.h:422
Definition: OSRTContext.h:64
int operator!=(const ASN1TObjId &lhs, const ASN1TObjId &rhs)
int operator>(const ASN1TObjId &lhs, const ASN1TObjId &rhs)