25 #ifndef __ASN1CTIME_H__ 26 #define __ASN1CTIME_H__ 59 #ifndef _NO_UTILS_CLASSES 72 #define LOG_TMERR(pctxt,stat) ((pctxt != 0) ? LOG_RTERR (pctxt, stat) : stat) 94 EXTRTMETHOD
void checkCapacity();
99 EXTRTMETHOD
char*& getTimeStringPtr ();
102 virtual const ASN1TTime& getTimeObj ()
const = 0;
104 EXTRTMETHOD
ASN1CTime(
char*& buf,
int bufSize, OSBOOL useDerRules);
105 EXTRTMETHOD ASN1CTime(ASN1VisibleString& buf, OSBOOL useDerRules);
110 EXTRTMETHOD
void privateInit ();
114 January = 1, Jan = 1,
115 February = 2, Feb = 2,
122 September = 9, Sep = 9,
123 October = 10, Oct = 10,
124 November = 11, Nov = 11,
125 December = 12, Dec = 12
142 EXTRTMETHOD ASN1CTime (OSRTMessageBufferIF& msgBuf,
char*& buf,
int bufSize,
160 EXTRTMETHOD ASN1CTime (OSRTMessageBufferIF& msgBuf, ASN1VisibleString& buf,
177 EXTRTMETHOD ASN1CTime (
OSRTContext& ctxt,
char*& buf,
int bufSize,
192 EXTRTMETHOD ASN1CTime (
OSRTContext& ctxt, ASN1VisibleString& buf,
201 EXTRTMETHOD ASN1CTime (
const ASN1CTime& original);
206 EXTRTMETHOD ~ASN1CTime();
219 virtual EXTRTMETHOD
int getYear();
235 virtual EXTRTMETHOD
int getMonth();
249 virtual EXTRTMETHOD
int getDay();
263 virtual EXTRTMETHOD
int getHour();
276 virtual EXTRTMETHOD
int getMinute();
289 virtual EXTRTMETHOD
int getSecond();
303 virtual EXTRTMETHOD
int getFraction();
316 virtual EXTRTMETHOD
double getFractionAsDouble();
327 virtual EXTRTMETHOD
int getFractionStr(
char*
const pBuf,
size_t bufSize);
337 virtual EXTRTMETHOD
int getFractionLen();
354 virtual EXTRTMETHOD
int getDiffHour();
371 virtual EXTRTMETHOD
int getDiffMinute();
388 virtual EXTRTMETHOD
int getDiff();
399 virtual EXTRTMETHOD OSBOOL getUTC();
417 virtual EXTRTMETHOD time_t getTime();
423 void setDER (OSBOOL bvalue) { derRules = bvalue; }
436 virtual EXTRTMETHOD
int setUTC(OSBOOL utc);
449 virtual EXTRTMETHOD
int setYear(
short year_);
465 virtual EXTRTMETHOD
int setMonth(
short month_);
479 virtual EXTRTMETHOD
int setDay(
short day_);
493 virtual EXTRTMETHOD
int setHour(
short hour_);
506 virtual EXTRTMETHOD
int setMinute(
short minute_);
519 virtual EXTRTMETHOD
int setSecond(
short second_);
536 virtual EXTRTMETHOD
int setFraction(
int fraction,
int fracLen = -1);
549 virtual EXTRTMETHOD
int setFraction (
double frac,
int fracLen);
560 virtual EXTRTMETHOD
int setFraction (
char const* frac);
578 virtual int setTime(time_t time, OSBOOL diffTime) = 0;
597 virtual EXTRTMETHOD
int setDiffHour(
short dhour);
617 virtual EXTRTMETHOD
int setDiff(
short dhour,
short dminute);
635 virtual EXTRTMETHOD
int setDiff(
short inMinutes);
649 virtual EXTRTMETHOD
int parseString(
const char*
string);
660 virtual EXTRTMETHOD
void clear();
666 virtual EXTRTMETHOD
int equals (ASN1CTime&);
673 EXTRTMETHOD
size_t getTimeStringLen ();
683 EXTRTMETHOD
const char* getTimeString (
char* pbuf,
size_t bufsize);
691 EXTRTMETHOD
const ASN1CTime& operator = (
const ASN1CTime& );
698 virtual EXTRTMETHOD OSBOOL
operator == (ASN1CTime&);
705 virtual EXTRTMETHOD OSBOOL
operator != (ASN1CTime&);
712 virtual EXTRTMETHOD OSBOOL
operator > (ASN1CTime&);
719 virtual EXTRTMETHOD OSBOOL
operator < (ASN1CTime&);
726 virtual EXTRTMETHOD OSBOOL
operator >= (ASN1CTime&);
733 virtual EXTRTMETHOD OSBOOL
operator <= (ASN1CTime&);
741 virtual int compileString() = 0;
746 typedef class _ASN1CTime :
public ASN1CType {
748 _ASN1CTime(
char*& buf,
int bufSize, OSBOOL useDerRules) {}
749 _ASN1CTime(ASN1VisibleString& buf, OSBOOL useDerRules) {}
751 _ASN1CTime (OSRTMessageBufferIF& msgBuf,
char*& ,
int, OSBOOL) :
753 _ASN1CTime (OSRTMessageBufferIF& msgBuf, ASN1VisibleString&, OSBOOL) :
755 _ASN1CTime(
OSRTContext& ctxt,
char*& buf,
int bufSize,
756 OSBOOL useDerRules) :
ASN1CType (ctxt) {}
757 _ASN1CTime(
OSRTContext& ctxt, ASN1VisibleString& buf,
758 OSBOOL useDerRules) :
ASN1CType (ctxt) {}
761 #endif // _NO_UTILS_CLASSES 770 #endif //__ASN1CTIME_H__ int operator>=(const ASN1TObjId &lhs, const ASN1TObjId &rhs)
Definition: ASN1TTime.h:71
int operator<=(const ASN1TObjId &lhs, const ASN1TObjId &rhs)
Definition: ASN1CTime.h:86
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:314
void setDER(OSBOOL bvalue)
Definition: ASN1CTime.h:423
Definition: OSRTContext.h:65
int operator!=(const ASN1TObjId &lhs, const ASN1TObjId &rhs)
int operator>(const ASN1TObjId &lhs, const ASN1TObjId &rhs)