00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00029 #ifndef _RTCOPY_H_
00030 #define _RTCOPY_H_
00031 #include "rtsrc/asn1type.h"
00032
00033 #ifdef __cplusplus
00034 extern "C" {
00035 #endif
00036
00067 EXTERNRT OSBOOL rtCopyBitStr64
00068 (OSSIZE srcNumbits, const OSOCTET* pSrcData,
00069 OSSIZE* pDstNumbits, OSOCTET* pDstData, OSSIZE dstDataSize);
00070
00091 EXTERNRT OSBOOL rtCopyBitStr (OSUINT32 srcNumbits,
00092 const OSOCTET* pSrcData,
00093 OSUINT32* pDstNumbits, OSOCTET* pDstData);
00094
00114 EXTERNRT OSBOOL rtCopyDynBitStr64
00115 (OSCTXT* pctxt, const ASN1DynBitStr64* pSrcData, ASN1DynBitStr64* pDstData);
00116
00134 EXTERNRT OSBOOL rtCopyDynBitStr
00135 (OSCTXT* pctxt, const ASN1DynBitStr* pSrcData, ASN1DynBitStr* pDstData);
00136
00155 EXTERNRT OSBOOL rtCopyOctStr64
00156 (OSSIZE srcNumocts, const OSOCTET* pSrcData,
00157 OSSIZE* pDstNumocts, OSOCTET* pDstData, OSSIZE dstDataSize);
00158
00179 EXTERNRT OSBOOL rtCopyOctStr
00180 (OSUINT32 srcNumocts, const OSOCTET* pSrcData,
00181 OSUINT32* pDstNumocts, OSOCTET* pDstData);
00182
00203 EXTERNRT OSBOOL rtCopyDynOctStr64
00204 (OSCTXT* pctxt, const OSDynOctStr64* pSrcData, OSDynOctStr64* pDstData);
00205
00224 EXTERNRT OSBOOL rtCopyDynOctStr
00225 (OSCTXT* pctxt, const ASN1DynOctStr* pSrcData, ASN1DynOctStr* pDstData);
00226
00245 EXTERNRT OSBOOL rtCopyCharStr
00246 (OSCTXT* pctxt, const char* srcStr, char** dstStr);
00247
00266 EXTERNRT OSBOOL rtCopy16BitCharStr
00267 (OSCTXT* pctxt, const Asn116BitCharString* srcStr, Asn116BitCharString* dstStr);
00268
00287 EXTERNRT OSBOOL rtCopy32BitCharStr
00288 (OSCTXT* pctxt, const Asn132BitCharString* srcStr, Asn132BitCharString* dstStr);
00289
00303 EXTERNRT OSBOOL rtCopyOID
00304 (const ASN1OBJID* srcOID, ASN1OBJID* dstOID);
00305
00319 EXTERNRT OSBOOL rtCopyOID64
00320 (const ASN1OID64* srcOID, ASN1OID64* dstOID);
00321
00340 EXTERNRT OSBOOL rtCopyOpenType
00341 (OSCTXT* pctxt, const ASN1OpenType* srcOT, ASN1OpenType* dstOT);
00342
00364 EXTERNRT OSBOOL rtCopyOpenTypeExt
00365 (OSCTXT* pctxt, const OSRTDList* srcList, OSRTDList* dstList);
00370
00371
00382 #define RTCOPYCHARSTR(pctxt,src,dst) \
00383 do { char* ptr; rtCopyCharStr (pctxt, src, &ptr); *dst = ptr; } while(0)
00384
00397 #define RTCHKCOPYCHARSTR(pctxt,src,dst,log) \
00398 do { \
00399 char* ptr; \
00400 if (! rtCopyCharStr (pctxt, src, &ptr)) { \
00401 if (log) return LOG_RTERR (pctxt, RTERR_COPYFAIL); \
00402 else return RTERR_COPYFAIL; \
00403 } \
00404 *dst = ptr; \
00405 } while(0)
00406
00407 #ifdef __cplusplus
00408 }
00409 #endif
00410
00411 #endif