25 #ifndef __ASN1CTIME_H__ 26 #define __ASN1CTIME_H__ 57 #ifndef _NO_UTILS_CLASSES 70 #define LOG_TMERR(pctxt,stat) ((pctxt != 0) ? LOG_RTERR (pctxt, stat) : stat) 92 EXTRTMETHOD
void checkCapacity();
97 EXTRTMETHOD
char*& getTimeStringPtr ();
100 virtual const ASN1TTime& getTimeObj ()
const = 0;
102 EXTRTMETHOD
ASN1CTime(
char*& buf, OSSIZE bufSize, OSBOOL useDerRules);
103 EXTRTMETHOD ASN1CTime(ASN1VisibleString& buf, OSBOOL useDerRules);
108 EXTRTMETHOD
void privateInit ();
112 January = 1, Jan = 1,
113 February = 2, Feb = 2,
120 September = 9, Sep = 9,
121 October = 10, Oct = 10,
122 November = 11, Nov = 11,
123 December = 12, Dec = 12
140 EXTRTMETHOD ASN1CTime
141 (OSRTMessageBufferIF& msgBuf,
char*& buf, OSSIZE bufSize,
159 EXTRTMETHOD ASN1CTime
160 (OSRTMessageBufferIF& msgBuf, ASN1VisibleString& buf, OSBOOL useDerRules);
175 EXTRTMETHOD ASN1CTime
176 (
OSRTContext& ctxt,
char*& buf, OSSIZE bufSize, OSBOOL useDerRules);
190 EXTRTMETHOD ASN1CTime
191 (
OSRTContext& ctxt, ASN1VisibleString& buf, OSBOOL useDerRules);
199 EXTRTMETHOD ASN1CTime (
const ASN1CTime& original);
204 EXTRTMETHOD ~ASN1CTime();
217 virtual EXTRTMETHOD
int getYear();
233 virtual EXTRTMETHOD
int getMonth();
247 virtual EXTRTMETHOD
int getDay();
261 virtual EXTRTMETHOD
int getHour();
274 virtual EXTRTMETHOD
int getMinute();
287 virtual EXTRTMETHOD
int getSecond();
301 virtual EXTRTMETHOD
int getFraction();
314 virtual EXTRTMETHOD
double getFractionAsDouble();
325 virtual EXTRTMETHOD
int getFractionStr(
char*
const pBuf,
size_t bufSize);
335 virtual EXTRTMETHOD
int getFractionLen();
352 virtual EXTRTMETHOD
int getDiffHour();
369 virtual EXTRTMETHOD
int getDiffMinute();
386 virtual EXTRTMETHOD
int getDiff();
397 virtual EXTRTMETHOD OSBOOL getUTC();
415 virtual EXTRTMETHOD time_t getTime();
421 void setDER (OSBOOL bvalue) { derRules = bvalue; }
434 virtual EXTRTMETHOD
int setUTC(OSBOOL utc);
447 virtual EXTRTMETHOD
int setYear(
short year_);
463 virtual EXTRTMETHOD
int setMonth(
short month_);
477 virtual EXTRTMETHOD
int setDay(
short day_);
491 virtual EXTRTMETHOD
int setHour(
short hour_);
504 virtual EXTRTMETHOD
int setMinute(
short minute_);
517 virtual EXTRTMETHOD
int setSecond(
short second_);
534 virtual EXTRTMETHOD
int setFraction(
int fraction,
int fracLen = -1);
547 virtual EXTRTMETHOD
int setFraction (
double frac,
int fracLen);
558 virtual EXTRTMETHOD
int setFraction (
char const* frac);
576 virtual int setTime(time_t time, OSBOOL diffTime) = 0;
595 virtual EXTRTMETHOD
int setDiffHour(
short dhour);
615 virtual EXTRTMETHOD
int setDiff(
short dhour,
short dminute);
633 virtual EXTRTMETHOD
int setDiff(
short inMinutes);
647 virtual EXTRTMETHOD
int parseString(
const char*
string);
658 virtual EXTRTMETHOD
void clear();
664 virtual EXTRTMETHOD
int equals (ASN1CTime&);
671 EXTRTMETHOD OSSIZE getTimeStringLen ();
681 EXTRTMETHOD
const char* getTimeString (
char* pbuf, OSSIZE bufsize);
689 EXTRTMETHOD
const ASN1CTime& operator = (
const ASN1CTime& );
696 virtual EXTRTMETHOD OSBOOL
operator == (ASN1CTime&);
703 virtual EXTRTMETHOD OSBOOL
operator != (ASN1CTime&);
710 virtual EXTRTMETHOD OSBOOL
operator > (ASN1CTime&);
717 virtual EXTRTMETHOD OSBOOL
operator < (ASN1CTime&);
724 virtual EXTRTMETHOD OSBOOL
operator >= (ASN1CTime&);
731 virtual EXTRTMETHOD OSBOOL
operator <= (ASN1CTime&);
739 virtual int compileString() = 0;
744 typedef class _ASN1CTime :
public ASN1CType {
746 _ASN1CTime(
char*& buf,
int bufSize, OSBOOL useDerRules) {}
747 _ASN1CTime(ASN1VisibleString& buf, OSBOOL useDerRules) {}
749 _ASN1CTime (OSRTMessageBufferIF& msgBuf,
char*& , OSSIZE, OSBOOL) :
751 _ASN1CTime (OSRTMessageBufferIF& msgBuf, ASN1VisibleString&, OSBOOL) :
753 _ASN1CTime(
OSRTContext& ctxt,
char*& buf, OSSIZE bufSize,
754 OSBOOL useDerRules) :
ASN1CType (ctxt) {}
755 _ASN1CTime(
OSRTContext& ctxt, ASN1VisibleString& buf,
756 OSBOOL useDerRules) :
ASN1CType (ctxt) {}
759 #endif // _NO_UTILS_CLASSES 768 #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:84
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:313
void setDER(OSBOOL bvalue)
Definition: ASN1CTime.h:421
Definition: OSRTContext.h:65
int operator!=(const ASN1TObjId &lhs, const ASN1TObjId &rhs)
int operator>(const ASN1TObjId &lhs, const ASN1TObjId &rhs)