00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00058 #ifndef _OSRTPER_H_
00059 #define _OSRTPER_H_
00060
00061 #include "rtsrc/asn1type.h"
00062 #include "rtsrc/asn1CharSet.h"
00063 #include "rtxsrc/rtxBitEncode.h"
00064 #include "rtxsrc/rtxBitDecode.h"
00065 #include "rtxsrc/rtxBuffer.h"
00066
00078
00079
00080
00081
00082
00083 #define ASN_K_EXTENUM 999
00084
00085
00086 #define OSYEAR_BASIC OSUINTCONST(0x8000000)
00087 #define OSYEAR_PROLEPTIC OSUINTCONST(0x4000000)
00088 #define OSYEAR_NEGATIVE OSUINTCONST(0x2000000)
00089 #define OSYEAR_L(n) ((OSUINT32)(n) << 28)
00090
00091 #define OSYEAR_MASK \
00092 (OSYEAR_BASIC|OSYEAR_PROLEPTIC|OSYEAR_NEGATIVE|OSYEAR_L(0xF))
00093
00094 #define OSANY (OSYEAR_NEGATIVE|OSYEAR_L(5))
00095 #define OSANY_MASK (OSYEAR_NEGATIVE|OSYEAR_L(0xF))
00096
00097 #define OSCENTURY 0x4000u
00098 #define OSYEAR 0x2000u
00099 #define OSMONTH 0x1000u
00100 #define OSWEEK 0x0800u
00101 #define OSDAY 0x0400u
00102
00103 #define OSHOURS 0x0200u
00104 #define OSMINUTES 0x0100u
00105 #define OSSECONDS 0x0080u
00106 #define OSUTC 0x0040u
00107 #define OSDIFF 0x0020u
00108
00109 #define OSFRACTION 0x000Fu
00110
00111 #define OSDURATION 0x0010u
00112
00113
00114
00115
00116 typedef struct PERField {
00117 const char* name;
00118 size_t bitOffset;
00119 size_t numbits;
00120 OSRTSList* openTypeFields;
00121 } PERField;
00122
00123
00124
00125
00126 typedef struct {
00127 unsigned char lb, lbm;
00128 char fmtBitBuffer[40], fmtHexBuffer[10], fmtAscBuffer[10];
00129 int fmtBitCharIdx, fmtHexCharIdx, fmtAscCharIdx;
00130 } BinDumpBuffer;
00131
00132
00133
00134 #define PU_SETCHARSET(csetvar, canset, abits, ubits) \
00135 csetvar.charSet.nchars = 0; \
00136 csetvar.canonicalSet = canset; \
00137 csetvar.canonicalSetSize = sizeof(canset)-1; \
00138 csetvar.canonicalSetBits = pu_bitcnt(csetvar.canonicalSetSize); \
00139 csetvar.charSetUnalignedBits = ubits; \
00140 csetvar.charSetAlignedBits = abits;
00141
00142
00143
00144
00145 #ifdef _TRACE
00146 #define PU_INSLENFLD(pctxt) pu_insLenField(pctxt)
00147 #define PU_NEWFIELD(pctxt,suffix) pu_newField(pctxt,suffix)
00148 #define PU_PUSHNAME(pctxt,name) pu_pushName(pctxt,name)
00149 #define PU_PUSHELEMNAME(pctxt,idx) pu_pushElemName(pctxt,idx)
00150 #define PU_POPNAME(pctxt) pu_popName(pctxt)
00151 #define PU_SETBITOFFSET(pctxt) pu_setFldBitOffset(pctxt)
00152 #define PU_SETBITCOUNT(pctxt) pu_setFldBitCount(pctxt)
00153 #define PU_SETOPENTYPEFLDLIST(pctxt,flist) pu_setOpenTypeFldList(pctxt,flist)
00154 #else
00155 #define PU_INSLENFLD(pctxt)
00156 #define PU_NEWFIELD(pctxt,suffix)
00157 #define PU_PUSHNAME(pctxt,name)
00158 #define PU_PUSHELEMNAME(pctxt,idx)
00159 #define PU_POPNAME(pctxt)
00160 #define PU_SETBITOFFSET(pctxt)
00161 #define PU_SETBITCOUNT(pctxt)
00162 #define PU_SETOPENTYPEFLDLIST(pctxt,flist)
00163 #endif
00164
00165 #ifdef __cplusplus
00166 extern "C" {
00167 #endif
00168
00169 #ifdef __SYMBIAN32__
00170 #define EXTPERCLASS
00171
00172 #ifdef BUILDASN1PERDLL
00173 #define EXTERNPER EXPORT_C
00174 #define EXTPERMETHOD EXPORT_C
00175 #elif defined(USEASN1PERDLL)
00176 #define EXTERNPER IMPORT_C
00177 #define EXTPERMETHOD IMPORT_C
00178 #else
00179 #define EXTERNPER
00180 #define EXTPERMETHOD
00181 #endif
00182
00183 #else
00184 #define EXTPERMETHOD
00185
00186 #ifdef BUILDASN1PERDLL
00187 #define EXTERNPER __declspec(dllexport)
00188 #define EXTPERCLASS __declspec(dllexport)
00189 #elif defined (USEASN1PERDLL)
00190 #define EXTERNPER __declspec(dllimport)
00191 #define EXTPERCLASS __declspec(dllimport)
00192 #else
00193 #define EXTERNPER
00194 #define EXTPERCLASS
00195 #endif
00196
00197 #endif
00198
00199
00200
00201
00202
00203 #define PD_BIT(pctxt,pvalue) DEC_BIT(pctxt,pvalue)
00204
00205
00206
00207 #define PU_SETSIZECONSTRAINT(pctxt,rootLower,rootUpper,extLower,extUpper) \
00208 ACINFO(pctxt)->sizeConstraint.root.lower = rootLower; \
00209 ACINFO(pctxt)->sizeConstraint.root.upper = rootUpper; \
00210 ACINFO(pctxt)->sizeConstraint.ext.lower = extLower; \
00211 ACINFO(pctxt)->sizeConstraint.ext.upper = extUpper
00212
00213
00214
00215 #define PU_INITSIZECONSTRAINT(pctxt) PU_SETSIZECONSTRAINT(pctxt,0,0,0,0)
00216
00217
00218
00219 #define PU_GETSIZECONSTRAINT(pctxt,extbit) ((extbit) ? \
00220 &ACINFO(pctxt)->sizeConstraint.ext : &ACINFO(pctxt)->sizeConstraint.root)
00221
00222
00223
00224
00225 #define PU_GETCTXTBITOFFSET(pctxt) \
00226 (((pctxt)->buffer.byteIndex * 8) + (8 - (pctxt)->buffer.bitOffset))
00227
00230 #define PU_GETPADBITS(pctxt) \
00231 (((pctxt)->buffer.bitOffset == 8) ? 0 : (pctxt)->buffer.bitOffset)
00232
00233
00234
00235 #define PU_SETCTXTBITOFFSET(pctxt,_bitOffset) \
00236 do { \
00237 (pctxt)->buffer.byteIndex = (_bitOffset / 8); \
00238 (pctxt)->buffer.bitOffset = (OSUINT16)(8 - (_bitOffset % 8)); \
00239 } while(0)
00240
00241
00242
00243 #define PD_BYTE_ALIGN0(pctxt) \
00244 ((!(pctxt)->buffer.aligned) ? 0 : \
00245 (((pctxt)->buffer.bitOffset != 8) ? ( \
00246 (pctxt)->buffer.byteIndex++, \
00247 (pctxt)->buffer.bitOffset = 8, \
00248 0) : 0 \
00249 ))
00250
00251 #ifdef _TRACE
00252 #define PD_BYTE_ALIGN(pctxt) \
00253 ((!(pctxt)->buffer.aligned) ? 0 : \
00254 (((pctxt)->buffer.bitOffset != 8) ? ( \
00255 (pctxt)->buffer.byteIndex++, \
00256 (pctxt)->buffer.bitOffset = 8, \
00257 pu_setFldBitOffset(pctxt), \
00258 0) : 0 \
00259 ))
00260 #else
00261 #define PD_BYTE_ALIGN PD_BYTE_ALIGN0
00262 #endif
00263
00264 #define PD_CHECKSEQOFLEN(pctxt,numElements,minElemBits) \
00265 ((pctxt->buffer.size > 0) ? \
00266 (((numElements * minElemBits) > (pctxt->buffer.size * 8)) ? \
00267 LOG_RTERR (pctxt,ASN_E_INVLEN) : 0) : 0)
00268
00269 #define PD_OPENTYPE_START(pctxt,pSavedSize,pSavedBitOff) \
00270 pd_OpenTypeStart(pctxt,pSavedSize,pSavedBitOff);
00271
00272 #define PD_OPENTYPE_END(pctxt,savedSize,savedBitOff) \
00273 pd_OpenTypeEnd(pctxt,savedSize,savedBitOff);
00274
00312 EXTERNPER int pd_BigInteger (OSCTXT *pctxt, const char** ppvalue);
00313
00330 EXTERNPER int pd_BigIntegerEx (OSCTXT *pctxt, const char** ppvalue, int radix);
00331
00349 EXTERNPER int pd_BigIntegerValue
00350 (OSCTXT *pctxt, const char** ppvalue, int radix, OSUINT32 nbytes);
00351
00372 EXTERNPER int pd_BitString
00373 (OSCTXT* pctxt, OSUINT32* numbits_p, OSOCTET* buffer,
00374 OSUINT32 bufsiz);
00375
00376 EXTERNPER int pd_BitString32
00377 (OSCTXT* pctxt, ASN1BitStr32* pbitstr, OSUINT32 lower, OSUINT32 upper);
00378
00403 EXTERNPER int pd_BMPString
00404 (OSCTXT* pctxt, ASN1BMPString* pvalue, Asn116BitCharSet* permCharSet);
00405
00429 EXTERNPER int pd_UniversalString
00430 (OSCTXT* pctxt, ASN1UniversalString* pvalue, Asn132BitCharSet* permCharSet);
00431
00443 EXTERNPER int pd_byte_align (OSCTXT* pctxt);
00444
00455 EXTERNPER int pd_ChoiceOpenTypeExt
00456 (OSCTXT* pctxt, const OSOCTET** object_p2, OSUINT32* pnumocts);
00457
00470 EXTERNPER int pd_ConsInteger
00471 (OSCTXT* pctxt, OSINT32* pvalue, OSINT32 lower, OSINT32 upper);
00472
00486 EXTERNPER int pd_ConsInt8
00487 (OSCTXT* pctxt, OSINT8* pvalue, OSINT32 lower, OSINT32 upper);
00488
00502 EXTERNPER int pd_ConsInt16 (OSCTXT* pctxt,
00503 OSINT16* pvalue, OSINT32 lower, OSINT32 upper);
00504
00518 EXTERNPER int pd_ConsInt64 (OSCTXT* pctxt,
00519 OSINT64* pvalue, OSINT64 lower, OSINT64 upper);
00520
00534 EXTERNPER int pd_ConsUnsigned
00535 (OSCTXT* pctxt, OSUINT32* pvalue, OSUINT32 lower, OSUINT32 upper);
00536
00550 EXTERNPER int pd_ConsUInt8 (OSCTXT* pctxt,
00551 OSUINT8* pvalue, OSUINT32 lower, OSUINT32 upper);
00552
00566 EXTERNPER int pd_ConsUInt16
00567 (OSCTXT* pctxt, OSUINT16* pvalue, OSUINT32 lower, OSUINT32 upper);
00568
00582 EXTERNPER int pd_ConsUInt64 (OSCTXT* pctxt, OSUINT64* pvalue,
00583 OSUINT64 lower, OSUINT64 upper);
00584
00602 EXTERNPER int pd_ConsWholeNumber
00603 (OSCTXT* pctxt, OSUINT32* padjusted_value, OSUINT32 range_value);
00604
00622 EXTERNPER int pd_ConsWholeNumber64
00623 (OSCTXT* pctxt, OSUINT64* padjusted_value, OSUINT64 range_value);
00624
00641 EXTERNPER int pd_ConstrainedString
00642 (OSCTXT* pctxt, const char** string, Asn1CharSet* pCharSet);
00643
00663 EXTERNPER int pd_ConstrainedStringEx
00664 (OSCTXT* pctxt, const char** string, const char* charSet,
00665 OSUINT32 abits, OSUINT32 ubits, OSUINT32 canSetBits);
00666
00685 EXTERNPER int pd_ConstrFixedLenStringEx
00686 (OSCTXT* pctxt, char* strbuf, size_t bufsiz, const char* charSet,
00687 OSUINT32 abits, OSUINT32 ubits, OSUINT32 canSetBits);
00688
00711 EXTERNPER int pd_16BitConstrainedString
00712 (OSCTXT* pctxt, Asn116BitCharString* pString, Asn116BitCharSet* pCharSet);
00713
00736 EXTERNPER int pd_32BitConstrainedString
00737 (OSCTXT* pctxt, Asn132BitCharString* pString, Asn132BitCharSet* pCharSet);
00738
00750 EXTERNPER int pd_DateStr (OSCTXT* pctxt, const char** string, OSUINT32 flags);
00751
00765 EXTERNPER int pd_DateTimeStr
00766 (OSCTXT* pctxt, const char** string, OSUINT32 flags);
00767
00779 EXTERNPER int pd_Duration (OSCTXT* pctxt, const char** string, OSBOOL rec);
00780
00803 EXTERNPER int pd_DynBitString
00804 (OSCTXT* pctxt, ASN1DynBitStr* pBitStr);
00805
00822 EXTERNPER int pd_DynOctetString
00823 (OSCTXT* pctxt, ASN1DynOctStr* pOctStr);
00824
00841 EXTERNPER int pd_GetBinStrDataOffset
00842 (OSCTXT* pctxt, OSUINT32* pnumbits, OSBOOL bitStrFlag);
00843
00858 EXTERNPER int pd_GetComponentLength (OSCTXT* pctxt, OSUINT32 itemBits);
00859
00876 EXTERNPER int pd_Interval
00877 (OSCTXT* pctxt, const char** string, OSBOOL rec,
00878 OSUINT32 startFlags, OSUINT32 endFlags);
00879
00893 EXTERNPER int pd_Length (OSCTXT* pctxt, OSUINT32* pvalue);
00894
00902
00903 #define pd_moveBitCursor(pctxt,bitOffset) rtxMoveBitCursor(pctxt,bitOffset)
00904
00917 EXTERNPER int pd_ObjectIdentifier (OSCTXT* pctxt, ASN1OBJID* pvalue);
00918
00932 EXTERNPER int pd_oid64 (OSCTXT* pctxt, ASN1OID64* pvalue);
00933
00946 EXTERNPER int pd_RelativeOID (OSCTXT* pctxt, ASN1OBJID* pvalue);
00947
00966 EXTERNPER int pd_OctetString
00967 (OSCTXT* pctxt, OSUINT32* pnumocts, OSOCTET* buffer,
00968 OSUINT32 bufsiz);
00969
00987 EXTERNPER int pd_OpenType
00988 (OSCTXT* pctxt, const OSOCTET** object_p2, OSUINT32* pnumocts);
00989
01011 EXTERNPER int pd_OpenTypeExt
01012 (OSCTXT* pctxt, const OSOCTET** object_p2, OSUINT32* pnumocts);
01013
01014 #ifndef _NO_ASN1REAL
01015
01028 EXTERNPER int pd_Real (OSCTXT* pctxt, OSREAL* pvalue);
01029 #endif
01030
01046 EXTERNPER int pd_SmallNonNegWholeNumber
01047 (OSCTXT* pctxt, OSUINT32* pvalue);
01048
01060 EXTERNPER int pd_SemiConsInteger
01061 (OSCTXT* pctxt, OSINT32* pvalue, OSINT32 lower);
01062
01075 EXTERNPER int pd_SemiConsUnsigned
01076 (OSCTXT* pctxt, OSUINT32* pvalue, OSUINT32 lower);
01077
01090 EXTERNPER int pd_SemiConsInt64
01091 (OSCTXT* pctxt, OSINT64* pvalue, OSINT64 lower);
01092
01105 EXTERNPER int pd_SemiConsUInt64
01106 (OSCTXT* pctxt, OSUINT64* pvalue, OSUINT64 lower);
01107
01120 EXTERNPER int pd_TimeStr (OSCTXT* pctxt, const char** string, OSUINT32 flags);
01121
01131 EXTERNPER int pd_UnconsInteger (OSCTXT *pctxt, OSINT32* pvalue);
01132
01143 EXTERNPER int pd_UnconsLength (OSCTXT *pctxt, OSUINT32* pvalue);
01144
01157 EXTERNPER int pd_UnconsUnsigned (OSCTXT* pctxt, OSUINT32* pvalue);
01158
01159
01170 EXTERNPER int pd_UnconsInt64 (OSCTXT *pctxt, OSINT64* pvalue);
01171
01185 EXTERNPER int pd_UnconsUInt64 (OSCTXT* pctxt, OSUINT64* pvalue);
01186
01198 EXTERNPER int pd_VarWidthCharString (OSCTXT* pctxt, const char** pvalue);
01199
01209 EXTERNPER int pd_YearInt (OSCTXT* pctxt, OSINT32* pvalue);
01210
01211 #ifndef _NO_ASN1REAL
01212
01225 EXTERNPER int pd_Real10 (OSCTXT *pctxt, const char** ppvalue);
01226 #endif
01227
01233 EXTERNPER OSBOOL pd_isFragmented (OSCTXT* pctxt);
01234
01235 EXTERNPER void pd_OpenTypeStart
01236 (OSCTXT* pctxt, OSUINT32* pSavedSize, OSINT16* pSavedBitOff);
01237
01238 EXTERNPER int pd_OpenTypeEnd
01239 (OSCTXT* pctxt, OSUINT32 savedSize, OSINT16 savedBitOff);
01240
01259 EXTERNPER int uperDecConstrString
01260 (OSCTXT* pctxt, const char** string, const char* charSet,
01261 OSUINT32 nbits, OSUINT32 canSetBits);
01262
01281 EXTERNPER int uperDecConstrFixedLenString
01282 (OSCTXT* pctxt, char* strbuf, size_t bufsiz, const char* charSet,
01283 OSUINT32 nbits, OSUINT32 canSetBits);
01284
01287
01331 EXTERNPER int pe_16BitConstrainedString
01332 (OSCTXT* pctxt, Asn116BitCharString value, Asn116BitCharSet* pCharSet);
01333
01356 EXTERNPER int pe_32BitConstrainedString
01357 (OSCTXT* pctxt, Asn132BitCharString value, Asn132BitCharSet* pCharSet);
01358
01369 EXTERNPER int pe_2sCompBinInt
01370 (OSCTXT* pctxt, OSINT32 value);
01371
01382 EXTERNPER int pe_2sCompBinInt64 (OSCTXT* pctxt, OSINT64 value);
01383
01390 EXTERNPER int pe_aligned_octets
01391 (OSCTXT* pctxt, OSOCTET* pvalue, OSUINT32 nocts);
01392
01412 EXTERNPER int pe_BigInteger
01413 (OSCTXT* pctxt, const char* pvalue);
01414
01424
01425
01426 #define pe_bit(pctxt,value) rtxEncBit(pctxt,value)
01427
01438
01439
01440 #define pe_bits(pctxt,value,nbits) rtxEncBits(pctxt,value,nbits)
01441
01454 EXTERNPER int pe_bits64 (OSCTXT* pctxt, OSUINT64 value, OSUINT32 nbits);
01455
01469 EXTERNPER int pe_BitString
01470 (OSCTXT* pctxt, OSUINT32 numocts, const OSOCTET* data);
01471
01472 EXTERNPER int pe_BitString32
01473 (OSCTXT* pctxt, ASN1BitStr32* pbitstr, OSUINT32 lower, OSUINT32 upper);
01474
01498 EXTERNPER int pe_BMPString
01499 (OSCTXT* pctxt, ASN1BMPString value, Asn116BitCharSet* permCharSet);
01500
01524 EXTERNPER int pe_UniversalString
01525 (OSCTXT* pctxt, ASN1UniversalString value, Asn132BitCharSet* permCharSet);
01526
01538 EXTERNPER int pe_byte_align (OSCTXT* pctxt);
01539
01555
01556 #define pe_CheckBuffer(pctxt,nbytes) rtxCheckOutputBuffer(pctxt,nbytes)
01557
01569 EXTERNPER int pe_ChoiceTypeExt
01570 (OSCTXT* pctxt, OSUINT32 numocts, const OSOCTET* data);
01571
01584 EXTERNPER int pe_ConsInteger
01585 (OSCTXT* pctxt, OSINT32 value, OSINT32 lower, OSINT32 upper);
01586
01599 EXTERNPER int pe_ConsInt64 (OSCTXT* pctxt,
01600 OSINT64 value, OSINT64 lower, OSINT64 upper);
01601
01613 EXTERNPER int pe_ConstrainedString
01614 (OSCTXT* pctxt, const char* string, Asn1CharSet* pCharSet);
01615
01633 EXTERNPER int pe_ConstrainedStringEx
01634 (OSCTXT* pctxt, const char* string, const char* charSet,
01635 OSUINT32 abits, OSUINT32 ubits, OSUINT32 canSetBits);
01636
01652 EXTERNPER int pe_ConsUnsigned
01653 (OSCTXT* pctxt, OSUINT32 value, OSUINT32 lower, OSUINT32 upper);
01654
01674 EXTERNPER int pe_ConsUInt64 (OSCTXT* pctxt, OSUINT64 value,
01675 OSUINT64 lower, OSUINT64 upper);
01676
01692 EXTERNPER int pe_ConsWholeNumber
01693 (OSCTXT* pctxt, OSUINT32 adjusted_value, OSUINT32 range_value);
01694
01710 EXTERNPER int pe_ConsWholeNumber64
01711 (OSCTXT* pctxt, OSUINT64 adjusted_value, OSUINT64 range_value);
01712
01724 EXTERNPER int pe_DateStr (OSCTXT* pctxt, const char* string, OSUINT32 flags);
01725
01739 EXTERNPER int pe_DateTimeStr
01740 (OSCTXT* pctxt, const char* string, OSUINT32 flags);
01741
01753 EXTERNPER int pe_Duration (OSCTXT* pctxt, const char* string, OSBOOL rec);
01754
01758 EXTERNPER OSUINT32 pe_GetIntLen (OSUINT32 value);
01759
01765 EXTERNPER size_t pe_GetMsgBitCnt (OSCTXT* pctxt);
01766
01785 EXTERNPER OSOCTET* pe_GetMsgPtr (OSCTXT* pctxt, OSINT32* pLength);
01786
01797 EXTERNPER OSOCTET* pe_GetMsgPtrU (OSCTXT* pctxt, OSUINT32* pLength);
01798
01816 EXTERNPER int pe_Interval
01817 (OSCTXT* pctxt, const char* string, OSBOOL rec,
01818 OSUINT32 startFlags, OSUINT32 endFlags);
01819
01830 EXTERNPER int pe_Length (OSCTXT* pctxt, OSUINT32 value);
01831
01842 EXTERNPER int pe_NonNegBinInt (OSCTXT* pctxt, OSUINT32 value);
01843
01854 EXTERNPER int pe_NonNegBinInt64 (OSCTXT* pctxt, OSUINT64 value);
01855
01868 EXTERNPER int pe_ObjectIdentifier (OSCTXT* pctxt, ASN1OBJID* pvalue);
01869
01870 #ifndef _NO_INT64_SUPPORT
01871
01884 EXTERNPER int pe_oid64 (OSCTXT* pctxt, ASN1OID64* pvalue);
01885 #endif
01886
01899 EXTERNPER int pe_RelativeOID (OSCTXT* pctxt, ASN1OBJID* pvalue);
01900
01914
01915
01916 #define pe_octets(pctxt,pvalue,nbits) \
01917 rtxEncBitsFromByteArray(pctxt,pvalue,nbits)
01918
01931 EXTERNPER int pe_OctetString
01932 (OSCTXT* pctxt, OSUINT32 numocts, const OSOCTET* data);
01933
01949 EXTERNPER int pe_OpenType
01950 (OSCTXT* pctxt, OSUINT32 numocts, const OSOCTET* data);
01951
01967 EXTERNPER int pe_OpenTypeEnd (OSCTXT* pctxt, OSUINT32 pos, void* pPerField);
01968
01987 EXTERNPER int pe_OpenTypeExt
01988 (OSCTXT* pctxt, OSRTDList* pElemList);
01989
01999 EXTERNPER int pe_OpenTypeExtBits
02000 (OSCTXT* pctxt, OSRTDList* pElemList);
02001
02016 EXTERNPER int pe_OpenTypeStart
02017 (OSCTXT* pctxt, OSUINT32* pPos, void** ppPerField);
02018
02019 #ifndef _NO_ASN1REAL
02020
02037 EXTERNPER int pe_Real (OSCTXT* pctxt, OSREAL value);
02038 #endif
02039
02054 EXTERNPER int pe_SmallNonNegWholeNumber (OSCTXT* pctxt, OSUINT32 value);
02055
02067 EXTERNPER int pe_SemiConsInteger
02068 (OSCTXT* pctxt, OSINT32 value, OSINT32 lower);
02069
02070 #ifndef _NO_INT64_SUPPORT
02071
02082 EXTERNPER int pe_SemiConsInt64
02083 (OSCTXT* pctxt, OSINT64 value, OSINT64 lower);
02084 #endif
02085
02097 EXTERNPER int pe_SemiConsUnsigned
02098 (OSCTXT* pctxt, OSUINT32 value, OSUINT32 lower);
02099
02100 #ifndef _NO_INT64_SUPPORT
02101
02113 EXTERNPER int pe_SemiConsUInt64
02114 (OSCTXT* pctxt, OSUINT64 value, OSUINT64 lower);
02115 #endif
02116
02129 EXTERNPER int pe_TimeStr (OSCTXT* pctxt, const char* string, OSUINT32 flags);
02130
02139 EXTERNPER int pe_UnconsLength (OSCTXT* pctxt, OSUINT32 value);
02140
02150 EXTERNPER int pe_UnconsInteger (OSCTXT* pctxt, OSINT32 value);
02151
02152 #ifndef _NO_INT64_SUPPORT
02153
02162 EXTERNPER int pe_UnconsInt64 (OSCTXT* pctxt, OSINT64 value);
02163 #endif
02164
02174 EXTERNPER int pe_UnconsUnsigned (OSCTXT* pctxt, OSUINT32 value);
02175
02176 #ifndef _NO_INT64_SUPPORT
02177
02187 EXTERNPER int pe_UnconsUInt64 (OSCTXT* pctxt, OSUINT64 value);
02188 #endif
02189
02202 EXTERNPER int pe_VarWidthCharString (OSCTXT* pctxt, const char* value);
02203
02213 EXTERNPER int pe_YearInt (OSCTXT* pctxt, OSINT32 value);
02214
02215 #ifndef _NO_ASN1REAL
02216
02229 EXTERNPER int pe_Real10 (OSCTXT* pctxt, const char* pvalue);
02230 #endif
02231
02248 EXTERNPER int uperEncConstrString
02249 (OSCTXT* pctxt, const char* string, const char* charSet,
02250 OSUINT32 nbits, OSUINT32 canSetBits);
02251
02254
02255
02256
02277 EXTERNPER int pu_addSizeConstraint (OSCTXT* pctxt, const Asn1SizeCnst* pSize);
02278
02279 EXTERNPER OSBOOL pu_alignCharStr
02280 (OSCTXT* pctxt, OSUINT32 len, OSUINT32 nbits, Asn1SizeCnst* pSize);
02281
02282 EXTERNPER OSUINT32 pu_bitcnt (OSUINT32 value);
02283
02284 EXTERNPER Asn1SizeCnst* pu_checkSize
02285 (Asn1SizeCnst* pSizeList, OSUINT32 value, OSBOOL* pExtendable);
02286
02300 EXTERNPER int pu_checkSizeExt
02301 (Asn1SizeCnst* pSizeCnst, OSUINT32 value, OSBOOL* pExtendable,
02302 Asn1SizeValueRange* pSizeRange, OSBOOL* pExtSize);
02303
02317 EXTERNPER void pu_freeContext (OSCTXT* pctxt);
02318
02319 EXTERNPER size_t pu_getMaskAndIndex (size_t bitOffset, unsigned char* pMask);
02320
02335 EXTERNPER size_t pu_getMsgLen (OSCTXT* pctxt);
02336
02351 EXTERNPER size_t pu_getMsgLenBits (OSCTXT* pctxt);
02352
02361 EXTERNPER void pu_hexdump (OSCTXT* pctxt);
02362
02379 EXTERNPER int pu_setBuffer
02380 (OSCTXT* pctxt, OSOCTET* bufaddr, size_t bufsiz, OSBOOL aligned);
02381
02382 #define pd_setp(pctxt, bufaddr, bufsiz, aligned) \
02383 pu_setBuffer(pctxt, bufaddr, bufsiz, aligned)
02384
02385 #define pe_setp(pctxt, bufaddr, bufsiz, aligned) \
02386 pu_setBuffer(pctxt, bufaddr, bufsiz, aligned)
02387
02388 #define pe_resetp(pctxt) rtxResetContext(pctxt)
02389 #define pd_resetp(pctxt) rtxResetContext(pctxt)
02390
02391
02392
02420 EXTERNPER int pu_initContext
02421 (OSCTXT* pctxt, OSOCTET* bufaddr, OSUINT32 bufsiz, OSBOOL aligned);
02422
02439 EXTERNPER int pu_initContextBuffer (OSCTXT* pTarget, OSCTXT* pSource);
02440
02441 EXTERNPER const char* pu_getFullName
02442 (OSCTXT* pctxt, const char* suffix);
02443
02444 EXTERNPER void pu_init16BitCharSet
02445 (Asn116BitCharSet* pCharSet, OSUNICHAR first, OSUNICHAR last,
02446 OSUINT32 abits, OSUINT32 ubits);
02447
02454 EXTERNPER void pu_insLenField (OSCTXT* pctxt);
02455
02463 EXTERNPER OSBOOL pu_isFixedSize (const Asn1SizeCnst* pSizeList);
02464
02489 EXTERNPER OSCTXT* pu_newContext
02490 (OSOCTET* bufaddr, OSUINT32 bufsiz, OSBOOL aligned);
02491
02492 EXTERNPER PERField* pu_newField
02493 (OSCTXT* pctxt, const char* nameSuffix);
02494
02495 EXTERNPER void pu_initFieldList (OSCTXT* pctxt, OSINT16 bitOffset);
02496
02500 EXTERNPER void pu_popName (OSCTXT* pctxt);
02501
02508 EXTERNPER void pu_pushElemName (OSCTXT* pctxt, int idx);
02509
02514 EXTERNPER void pu_pushName (OSCTXT* pctxt, const char* name);
02515
02527 EXTERNPER void pu_setCharSet (Asn1CharSet* pCharSet, const char* permSet);
02528
02543 EXTERNPER void pu_set16BitCharSet
02544 (OSCTXT* pctxt, Asn116BitCharSet* pCharSet, Asn116BitCharSet* pAlphabet);
02545
02546
02555 EXTERNPER void pu_set16BitCharSetFromRange
02556 (Asn116BitCharSet* pCharSet, OSUINT16 firstChar, OSUINT16 lastChar);
02557
02558 EXTERNPER void pu_setFldBitCount (OSCTXT* pctxt);
02559
02560 EXTERNPER void pu_setFldBitOffset (OSCTXT* pctxt);
02561
02562 EXTERNPER void pu_setFldListFromCtxt (OSCTXT* pctxt, OSCTXT* srcctxt);
02563
02564 EXTERNPER void pu_setOpenTypeFldList (OSCTXT* pctxt, OSRTSList* plist);
02565
02566 EXTERNPER OSBOOL pu_setTrace (OSCTXT* pCtxt, OSBOOL value);
02567
02568 EXTERNPER void pu_setAligned (OSCTXT* pctxt, OSBOOL value);
02569
02570 EXTERNPER void pu_deleteFieldList (OSCTXT* pctxt);
02571
02586 EXTERNPER void pu_bindump (OSCTXT* pctxt, const char* varname);
02587
02588 EXTERNPER void pu_dumpField
02589 (OSCTXT* pctxt, PERField* pField, const char* varname,
02590 size_t nextBitOffset, BinDumpBuffer* pbuf);
02591
02592 EXTERNPER void pu_init32BitCharSet
02593 (Asn132BitCharSet* pCharSet, OS32BITCHAR first, OS32BITCHAR last,
02594 OSUINT32 abits, OSUINT32 ubits);
02595
02610 EXTERNPER void pu_set32BitCharSet
02611 (OSCTXT* pctxt, Asn132BitCharSet* pCharSet, Asn132BitCharSet* pAlphabet);
02612
02621 EXTERNPER void pu_set32BitCharSetFromRange
02622 (Asn132BitCharSet* pCharSet, OSUINT32 firstChar, OSUINT32 lastChar);
02623
02633 EXTERNPER int pu_GetLibVersion ();
02634
02642 EXTERNPER const char* pu_GetLibInfo ();
02643
02648 #ifdef __cplusplus
02649 }
02650 #endif
02651
02652
02653
02654 #define pd_bit(pctxt,pvalue) rtxDecBit(pctxt,pvalue)
02655
02656 #define pd_bits(pctxt,pvalue,nbits) rtxDecBits(pctxt,pvalue,nbits)
02657
02658 #define pd_octets(pctxt,pbuffer,bufsiz,nbits) \
02659 rtxDecBitsToByteArray(pctxt,pbuffer,bufsiz,nbits)
02660
02661 #define pe_GeneralString(pctxt,value,permCharSet) \
02662 pe_VarWidthCharString(pctxt, value)
02663
02664 #define pe_GraphicString(pctxt,value,permCharSet) \
02665 pe_VarWidthCharString(pctxt, value)
02666
02667 #define pe_T61String(pctxt,value,permCharSet) \
02668 pe_VarWidthCharString(pctxt, value)
02669
02670 #define pe_TeletexString(pctxt,value,permCharSet) \
02671 pe_VarWidthCharString(pctxt, value)
02672
02673 #define pe_VideotexString(pctxt,value,permCharSet) \
02674 pe_VarWidthCharString(pctxt, value)
02675
02676 #define pe_ObjectDescriptor(pctxt,value,permCharSet) \
02677 pe_VarWidthCharString(pctxt, value)
02678
02679 #define pe_UTF8String(pctxt,value,permCharSet) \
02680 pe_VarWidthCharString(pctxt, value)
02681
02682 #define pe_IA5String(pctxt,value,permCharSet) \
02683 pe_ConstrainedStringEx (pctxt, value, permCharSet, 8, 7, 7)
02684
02685 #define pe_NumericString(pctxt,value,permCharSet) \
02686 pe_ConstrainedStringEx (pctxt, value, \
02687 (permCharSet == 0)?NUM_CANSET:permCharSet, 4, 4, 4)
02688
02689 #define pe_PrintableString(pctxt,value,permCharSet) \
02690 pe_ConstrainedStringEx (pctxt, value, permCharSet, 8, 7, 7)
02691
02692 #define pe_VisibleString(pctxt,value,permCharSet) \
02693 pe_ConstrainedStringEx (pctxt, value, permCharSet, 8, 7, 7)
02694
02695 #define pe_ISO646String pe_IA5String
02696 #define pe_GeneralizedTime pe_IA5String
02697 #define pe_UTCTime pe_GeneralizedTime
02698
02699 #define pd_GeneralString(pctxt,pvalue,permCharSet) \
02700 pd_VarWidthCharString (pctxt, pvalue)
02701
02702 #define pd_GraphicString(pctxt,pvalue,permCharSet) \
02703 pd_VarWidthCharString (pctxt, pvalue)
02704
02705 #define pd_VideotexString(pctxt,pvalue,permCharSet) \
02706 pd_VarWidthCharString (pctxt, pvalue)
02707
02708 #define pd_TeletexString(pctxt,pvalue,permCharSet) \
02709 pd_VarWidthCharString (pctxt, pvalue)
02710
02711 #define pd_T61String(pctxt,pvalue,permCharSet) \
02712 pd_VarWidthCharString (pctxt, pvalue)
02713
02714 #define pd_ObjectDescriptor(pctxt,pvalue,permCharSet) \
02715 pd_VarWidthCharString (pctxt, pvalue)
02716
02717 #define pd_UTF8String(pctxt,pvalue,permCharSet) \
02718 pd_VarWidthCharString (pctxt, pvalue)
02719
02720 #define pd_IA5String(pctxt,pvalue,permCharSet) \
02721 pd_ConstrainedStringEx (pctxt, pvalue, permCharSet, 8, 7, 7)
02722
02723 #define pd_NumericString(pctxt,pvalue,permCharSet) \
02724 pd_ConstrainedStringEx (pctxt, pvalue, \
02725 (permCharSet == 0)?NUM_CANSET:permCharSet, 4, 4, 4)
02726
02727 #define pd_PrintableString(pctxt,pvalue,permCharSet) \
02728 pd_ConstrainedStringEx (pctxt, pvalue, permCharSet, 8, 7, 7)
02729
02730 #define pd_VisibleString(pctxt,pvalue,permCharSet) \
02731 pd_ConstrainedStringEx (pctxt, pvalue, permCharSet, 8, 7, 7)
02732
02733 #define pd_ISO646String pd_IA5String
02734 #define pd_GeneralizedTime pd_IA5String
02735 #define pd_UTCTime pd_GeneralizedTime
02736 #define pe_GetMsgLen pu_getMsgLen
02737
02738 #define pe_ExpandBuffer(pctxt,nbytes) rtxCheckOutputBuffer(pctxt,nbytes)
02739
02740
02741
02742
02743 #define pd_AnyCentury(pctxt,string) \
02744 pd_DateStr (pctxt, string, OSANY|OSCENTURY)
02745
02746
02747 #define pd_AnyCenturyInt(pctxt,pvalue) \
02748 pd_UnconsInteger (pctxt, pvalue)
02749
02750
02751 #define pd_AnyDate(pctxt,string) \
02752 pd_DateStr (pctxt, string, OSANY|OSYEAR|OSMONTH|OSDAY)
02753
02754
02755 #define pd_AnyYear(pctxt,string) \
02756 pd_DateStr (pctxt, string, OSANY|OSYEAR)
02757
02758
02759 #define pd_AnyYearInt(pctxt,pvalue) \
02760 pd_UnconsInteger (pctxt, pvalue)
02761
02762
02763 #define pd_AnyYearDay(pctxt,string) \
02764 pd_DateStr (pctxt, string, OSANY|OSYEAR|OSDAY)
02765
02766
02767 #define pd_AnyYearMonth(pctxt,string) \
02768 pd_DateStr (pctxt, string, OSANY|OSYEAR|OSMONTH)
02769
02770
02771 #define pd_AnyYearMonthDay(pctxt,string) \
02772 pd_DateStr (pctxt, string, OSANY|OSYEAR|OSMONTH|OSDAY)
02773
02774
02775 #define pd_AnyYearWeek(pctxt,string) \
02776 pd_DateStr (pctxt, string, OSANY|OSYEAR|OSWEEK)
02777
02778
02779 #define pd_AnyYearWeekDay(pctxt,string) \
02780 pd_DateStr (pctxt, string, OSANY|OSYEAR|OSWEEK|OSDAY)
02781
02782
02783 #define pd_Century(pctxt,string) \
02784 pd_DateStr (pctxt, string, OSCENTURY)
02785
02786
02787 #define pd_CenturyInt(pctxt,pvalue) \
02788 pd_ConsUInt8 (pctxt, pvalue, 0, 99)
02789
02790
02791 #define pd_Date(pctxt,string) \
02792 pd_DateStr (pctxt, string, OSYEAR_BASIC|OSYEAR|OSMONTH|OSDAY);
02793
02794
02795 #define pd_DateTime(pctxt,string) \
02796 pd_DateTimeStr (pctxt, string, \
02797 OSYEAR_BASIC|OSYEAR|OSMONTH|OSDAY|OSHOURS|OSMINUTES|OSSECONDS);
02798
02799
02800 #define pd_DurationInterval(pctxt,string) \
02801 pd_Duration (pctxt, string, FALSE)
02802
02803
02804
02805 #define pd_DurationEndDateInterval(pctxt,string,flags) \
02806 pd_Interval (pctxt, string, FALSE, OSDURATION, flags)
02807
02808
02809
02810 #define pd_DurationEndTimeInterval(pctxt,string,flags) \
02811 pd_Interval (pctxt, string, FALSE, OSDURATION, flags)
02812
02813
02814
02815 #define pd_DurationEndDateTimeInterval(pctxt,string,flags) \
02816 pd_Interval (pctxt, string, FALSE, OSDURATION, flags)
02817
02818 #ifdef BINARY_HOURS
02819
02820 #define pd_Hours(pctxt,pvalue) \
02821 pd_ConsInt8 (pctxt, pvalue, 0, 24)
02822
02823 #define pd_HoursUtc(pctxt,pvalue) \
02824 pd_ConsInt8 (pctxt, pvalue, 0, 24)
02825
02826 #else
02827
02828
02829 #define pd_Hours(pctxt,string) \
02830 pd_TimeStr (pctxt, string, OSHOURS)
02831
02832
02833 #define pd_HoursUtc(pctxt,string) \
02834 pd_TimeStr (pctxt, string, OSHOURS|OSUTC)
02835
02836 #endif
02837
02838
02839 #define pd_HoursAndDiff(pctxt,string) \
02840 pd_TimeStr (pctxt, string, OSHOURS|OSDIFF)
02841
02842
02843 #define pd_HoursAndFraction(pctxt,string,n) \
02844 pd_TimeStr (pctxt, string, OSHOURS|(n))
02845
02846
02847
02848 #define pd_HoursUtcAndFraction(pctxt,string,n) \
02849 pd_TimeStr (pctxt, string, OSHOURS|OSUTC|(n))
02850
02851
02852
02853 #define pd_HoursAndDiffAndFraction(pctxt,string,n) \
02854 pd_TimeStr (pctxt, string, OSHOURS|OSDIFF|(n))
02855
02856
02857 #define pd_Minutes(pctxt,string) \
02858 pd_TimeStr (pctxt, string, OSHOURS|OSMINUTES)
02859
02860
02861 #define pd_MinutesUtc(pctxt,string) \
02862 pd_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSUTC)
02863
02864
02865 #define pd_MinutesAndDiff(pctxt,string) \
02866 pd_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSDIFF)
02867
02868
02869
02870 #define pd_MinutesAndFraction(pctxt,string,n) \
02871 pd_TimeStr (pctxt, string, OSHOURS|OSMINUTES|(n))
02872
02873
02874
02875 #define pd_MinutesUtcAndFraction(pctxt,string,n) \
02876 pd_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSUTC|(n))
02877
02878
02879
02880 #define pd_MinutesAndDiffAndFraction(pctxt,string,n) \
02881 pd_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSDIFF|(n))
02882
02883
02884
02885 #define pd_RecStartEndDateInterval(pctxt,string,flags) \
02886 pd_Interval (pctxt, string, TRUE, flags, flags)
02887
02888
02889
02890 #define pd_RecStartEndTimeInterval(pctxt,string,flags) \
02891 pd_Interval (pctxt, string, TRUE, flags, flags)
02892
02893
02894
02895 #define pd_RecStartEndDateTimeInterval(pctxt,string,flags) \
02896 pd_Interval (pctxt, string, TRUE, flags, flags)
02897
02898
02899
02900 #define pd_RecDurationInterval(pctxt,string) \
02901 pd_Duration (pctxt, string, TRUE)
02902
02903
02904
02905 #define pd_RecStartDateDurationInterval(pctxt,string,flags) \
02906 pd_Interval (pctxt, string, TRUE, flags, OSDURATION)
02907
02908
02909
02910 #define pd_RecStartTimeDurationInterval(pctxt,string,flags) \
02911 pd_Interval (pctxt, string, TRUE, flags, OSDURATION)
02912
02913
02914
02915 #define pd_RecStartDateTimeDurationInterval(pctxt,string,flags) \
02916 pd_Interval (pctxt, string, TRUE, flags, OSDURATION)
02917
02918
02919
02920 #define pd_RecDurationEndDateInterval(pctxt,string,flags) \
02921 pd_Interval (pctxt, string, TRUE, OSDURATION, flags)
02922
02923
02924
02925 #define pd_RecDurationEndTimeInterval(pctxt,string,flags) \
02926 pd_Interval (pctxt, string, TRUE, OSDURATION, flags)
02927
02928
02929
02930 #define pd_RecDurationEndDateTimeInterval(pctxt,string,flags) \
02931 pd_Interval (pctxt, string, TRUE, OSDURATION, flags)
02932
02933
02934
02935 #define pd_StartEndDateInterval(pctxt,string,flags) \
02936 pd_Interval (pctxt, string, FALSE, flags, flags)
02937
02938
02939
02940 #define pd_StartEndTimeInterval(pctxt,string,flags) \
02941 pd_Interval (pctxt, string, FALSE, flags, flags)
02942
02943
02944
02945 #define pd_StartEndDateTimeInterval(pctxt,string,flags) \
02946 pd_Interval (pctxt, string, FALSE, flags, flags)
02947
02948
02949
02950 #define pd_StartDateDurationInterval(pctxt,string,flags) \
02951 pd_Interval (pctxt, string, FALSE, flags, OSDURATION)
02952
02953
02954
02955 #define pd_StartTimeDurationInterval(pctxt,string,flags) \
02956 pd_Interval (pctxt, string, FALSE, flags, OSDURATION)
02957
02958
02959
02960 #define pd_StartDateTimeDurationInterval(pctxt,string,flags) \
02961 pd_Interval (pctxt, string, FALSE, flags, OSDURATION)
02962
02963
02964 #define pd_TimeOfDay(pctxt,string) \
02965 pd_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSSECONDS)
02966
02967
02968 #define pd_TimeOfDayUtc(pctxt,string) \
02969 pd_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSSECONDS|OSUTC)
02970
02971
02972 #define pd_TimeOfDayAndDiff(pctxt,string) \
02973 pd_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSSECONDS|OSDIFF)
02974
02975
02976
02977 #define pd_TimeOfDayAndFraction(pctxt,string,n) \
02978 pd_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSSECONDS|(n))
02979
02980
02981
02982 #define pd_TimeOfDayUtcAndFraction(pctxt,string,n) \
02983 pd_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSSECONDS|OSUTC|(n))
02984
02985
02986
02987 #define pd_TimeOfDayAndDiffAndFraction(pctxt,string,n) \
02988 pd_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSSECONDS|OSDIFF|(n))
02989
02990
02991 #define pd_Year(pctxt,string) \
02992 pd_DateStr (pctxt, string, OSYEAR)
02993
02994
02995 #define pd_YearDay(pctxt,string) \
02996 pd_DateStr (pctxt, string, OSYEAR|OSDAY)
02997
02998
02999 #define pd_YearMonth(pctxt,string) \
03000 pd_DateStr (pctxt, string, OSYEAR|OSMONTH)
03001
03002
03003 #define pd_YearMonthDay(pctxt,string) \
03004 pd_DateStr (pctxt, string, OSYEAR|OSMONTH|OSDAY);
03005
03006
03007 #define pd_YearWeek(pctxt,string) \
03008 pd_DateStr (pctxt, string, OSYEAR|OSWEEK)
03009
03010
03011 #define pd_YearWeekDay(pctxt,string) \
03012 pd_DateStr (pctxt, string, OSYEAR|OSWEEK|OSDAY)
03013
03014
03015
03016
03017 #define pe_AnyCentury(pctxt,string) \
03018 pe_DateStr (pctxt, string, OSANY|OSCENTURY)
03019
03020
03021 #define pe_AnyCenturyInt(pctxt,value) \
03022 pe_UnconsInteger (pctxt, value)
03023
03024
03025 #define pe_AnyDate(pctxt,string) \
03026 pe_DateStr (pctxt, string, OSANY|OSYEAR|OSMONTH|OSDAY)
03027
03028
03029 #define pe_AnyYear(pctxt,string) \
03030 pe_DateStr (pctxt, string, OSANY|OSYEAR)
03031
03032
03033 #define pe_AnyYearInt(pctxt,value) \
03034 pe_UnconsInteger (pctxt, value)
03035
03036
03037 #define pe_AnyYearDay(pctxt,string) \
03038 pe_DateStr (pctxt, string, OSANY|OSYEAR|OSDAY)
03039
03040
03041 #define pe_AnyYearMonth(pctxt,string) \
03042 pe_DateStr (pctxt, string, OSANY|OSYEAR|OSMONTH)
03043
03044
03045 #define pe_AnyYearMonthDay(pctxt,string) \
03046 pe_DateStr (pctxt, string, OSANY|OSYEAR|OSMONTH|OSDAY)
03047
03048
03049 #define pe_AnyYearWeek(pctxt,string) \
03050 pe_DateStr (pctxt, string, OSANY|OSYEAR|OSWEEK)
03051
03052
03053 #define pe_AnyYearWeekDay(pctxt,string) \
03054 pe_DateStr (pctxt, string, OSANY|OSYEAR|OSWEEK|OSDAY)
03055
03056
03057 #define pe_Century(pctxt,string) \
03058 pe_DateStr (pctxt, string, OSCENTURY)
03059
03060
03061 #define pe_CenturyInt(pctxt,value) \
03062 pe_ConsUnsigned (pctxt, value, 0, 99)
03063
03064
03065 #define pe_Date(pctxt,string) \
03066 pe_DateStr (pctxt, string, OSYEAR_BASIC|OSYEAR|OSMONTH|OSDAY)
03067
03068
03069 #define pe_DateTime(pctxt,string) \
03070 pe_DateTimeStr (pctxt, string, \
03071 OSYEAR_BASIC|OSYEAR|OSMONTH|OSDAY|OSHOURS|OSMINUTES|OSSECONDS)
03072
03073
03074 #define pe_DurationInterval(pctxt,string) \
03075 pe_Duration (pctxt, string, FALSE)
03076
03077
03078
03079 #define pe_DurationEndDateInterval(pctxt,string,flags) \
03080 pe_Interval (pctxt, string, FALSE, OSDURATION, flags)
03081
03082
03083
03084 #define pe_DurationEndTimeInterval(pctxt,string,flags) \
03085 pe_Interval (pctxt, string, FALSE, OSDURATION, flags)
03086
03087
03088
03089 #define pe_DurationEndDateTimeInterval(pctxt,string,flags) \
03090 pe_Interval (pctxt, string, FALSE, OSDURATION, flags)
03091
03092 #ifdef BINARY_HOURS
03093
03094 #define pe_Hours(pctxt,value) \
03095 pe_ConsUnsigned (pctxt, value, 0, 24)
03096
03097 #define pe_HoursUtc(pctxt,value) \
03098 pe_ConsUnsigned (pctxt, value, 0, 24)
03099
03100 #else
03101
03102
03103 #define pe_Hours(pctxt,string) \
03104 pe_TimeStr (pctxt, string, OSHOURS)
03105
03106
03107 #define pe_HoursUtc(pctxt,string) \
03108 pe_TimeStr (pctxt, string, OSHOURS|OSUTC)
03109
03110 #endif
03111
03112
03113 #define pe_Hours(pctxt,string) \
03114 pe_TimeStr (pctxt, string, OSHOURS)
03115
03116
03117 #define pe_HoursUtc(pctxt,string) \
03118 pe_TimeStr (pctxt, string, OSHOURS|OSUTC)
03119
03120
03121 #define pe_HoursAndDiff(pctxt,string) \
03122 pe_TimeStr (pctxt, string, OSHOURS|OSDIFF)
03123
03124
03125 #define pe_HoursAndFraction(pctxt,string,n) \
03126 pe_TimeStr (pctxt, string, OSHOURS|(n))
03127
03128
03129
03130 #define pe_HoursUtcAndFraction(pctxt,string,n) \
03131 pe_TimeStr (pctxt, string, OSHOURS|OSUTC|(n))
03132
03133
03134
03135 #define pe_HoursAndDiffAndFraction(pctxt,string,n) \
03136 pe_TimeStr (pctxt, string, OSHOURS|OSDIFF|(n))
03137
03138
03139 #define pe_Minutes(pctxt,string) \
03140 pe_TimeStr (pctxt, string, OSHOURS|OSMINUTES)
03141
03142
03143 #define pe_MinutesUtc(pctxt,string) \
03144 pe_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSUTC)
03145
03146
03147 #define pe_MinutesAndDiff(pctxt,string) \
03148 pe_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSDIFF)
03149
03150
03151
03152 #define pe_MinutesAndFraction(pctxt,string,n) \
03153 pe_TimeStr (pctxt, string, OSHOURS|OSMINUTES|(n))
03154
03155
03156
03157 #define pe_MinutesUtcAndFraction(pctxt,string,n) \
03158 pe_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSUTC|(n))
03159
03160
03161
03162 #define pe_MinutesAndDiffAndFraction(pctxt,string,n) \
03163 pe_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSDIFF|(n))
03164
03165
03166
03167 #define pe_RecStartEndDateInterval(pctxt,string,flags) \
03168 pe_Interval (pctxt, string, TRUE, flags, flags)
03169
03170
03171
03172 #define pe_RecStartEndTimeInterval(pctxt,string,flags) \
03173 pe_Interval (pctxt, string, TRUE, flags, flags)
03174
03175
03176
03177 #define pe_RecStartEndDateTimeInterval(pctxt,string,flags) \
03178 pe_Interval (pctxt, string, TRUE, flags, flags)
03179
03180
03181
03182 #define pe_RecDurationInterval(pctxt,string) \
03183 pe_Duration (pctxt, string, TRUE)
03184
03185
03186
03187 #define pe_RecStartDateDurationInterval(pctxt,string,flags) \
03188 pe_Interval (pctxt, string, TRUE, flags, OSDURATION)
03189
03190
03191
03192 #define pe_RecStartTimeDurationInterval(pctxt,string,flags) \
03193 pe_Interval (pctxt, string, TRUE, flags, OSDURATION)
03194
03195
03196
03197 #define pe_RecStartDateTimeDurationInterval(pctxt,string,flags) \
03198 pe_Interval (pctxt, string, TRUE, flags, OSDURATION)
03199
03200
03201
03202 #define pe_RecDurationEndDateInterval(pctxt,string,flags) \
03203 pe_Interval (pctxt, string, TRUE, OSDURATION, flags)
03204
03205
03206
03207 #define pe_RecDurationEndTimeInterval(pctxt,string,flags) \
03208 pe_Interval (pctxt, string, TRUE, OSDURATION, flags)
03209
03210
03211
03212 #define pe_RecDurationEndDateTimeInterval(pctxt,string,flags) \
03213 pe_Interval (pctxt, string, TRUE, OSDURATION, flags)
03214
03215
03216
03217 #define pe_StartEndDateInterval(pctxt,string,flags) \
03218 pe_Interval (pctxt, string, FALSE, flags, flags)
03219
03220
03221
03222 #define pe_StartEndTimeInterval(pctxt,string,flags) \
03223 pe_Interval (pctxt, string, FALSE, flags, flags)
03224
03225
03226
03227 #define pe_StartEndDateTimeInterval(pctxt,string,flags) \
03228 pe_Interval (pctxt, string, FALSE, flags, flags)
03229
03230
03231
03232 #define pe_StartDateDurationInterval(pctxt,string,flags) \
03233 pe_Interval (pctxt, string, FALSE, flags, OSDURATION)
03234
03235
03236
03237 #define pe_StartTimeDurationInterval(pctxt,string,flags) \
03238 pe_Interval (pctxt, string, FALSE, flags, OSDURATION)
03239
03240
03241
03242 #define pe_StartDateTimeDurationInterval(pctxt,string,flags) \
03243 pe_Interval (pctxt, string, FALSE, flags, OSDURATION)
03244
03245
03246 #define pe_TimeOfDay(pctxt,string) \
03247 pe_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSSECONDS)
03248
03249
03250 #define pe_TimeOfDayUtc(pctxt,string) \
03251 pe_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSSECONDS|OSUTC)
03252
03253
03254 #define pe_TimeOfDayAndDiff(pctxt,string) \
03255 pe_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSSECONDS|OSDIFF)
03256
03257
03258
03259 #define pe_TimeOfDayAndFraction(pctxt,string,n) \
03260 pe_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSSECONDS|(n))
03261
03262
03263
03264 #define pe_TimeOfDayUtcAndFraction(pctxt,string,n) \
03265 pe_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSSECONDS|OSUTC|(n))
03266
03267
03268
03269 #define pe_TimeOfDayAndDiffAndFraction(pctxt,string,n) \
03270 pe_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSSECONDS|OSDIFF|(n))
03271
03272
03273 #define pe_Year(pctxt,string) \
03274 pe_DateStr (pctxt, string, OSYEAR)
03275
03276
03277 #define pe_YearDay(pctxt,string) \
03278 pe_DateStr (pctxt, string, OSYEAR|OSDAY)
03279
03280
03281 #define pe_YearMonth(pctxt,string) \
03282 pe_DateStr (pctxt, string, OSYEAR|OSMONTH)
03283
03284
03285 #define pe_YearMonthDay(pctxt,string) \
03286 pe_DateStr (pctxt, string, OSYEAR|OSMONTH|OSDAY)
03287
03288
03289 #define pe_YearWeek(pctxt,string) \
03290 pe_DateStr (pctxt, string, OSYEAR|OSWEEK)
03291
03292
03293 #define pe_YearWeekDay(pctxt,string) \
03294 pe_DateStr (pctxt, string, OSYEAR|OSWEEK|OSDAY)
03295
03296
03297
03298
03299 EXTERNPER int pu_checkSizeConstraint (OSCTXT* pctxt, int size);
03300 EXTERNPER Asn1SizeCnst* pu_getSizeConstraint (OSCTXT* pctxt, OSBOOL extbit);
03301 EXTERNPER int pu_getBitOffset (OSCTXT* pctxt);
03302 EXTERNPER void pu_setBitOffset (OSCTXT* pctxt, int bitOffset);
03303
03306 #endif