rtCopy.h File Reference

#include "rtsrc/asn1type.h"

Go to the source code of this file.

Defines

#define RTCOPYCHARSTR(pctxt, src, dst)   do { char* ptr; rtCopyCharStr (pctxt, src, &ptr); *dst = ptr; } while(0)
#define RTCHKCOPYCHARSTR(pctxt, src, dst, log)

Functions

OSBOOL rtCopyBitStr (OSUINT32 srcNumbits, const OSOCTET *pSrcData, OSUINT32 *pDstNumbits, OSOCTET *pDstData)
OSBOOL rtCopyDynBitStr (OSCTXT *pctxt, const ASN1DynBitStr *pSrcData, ASN1DynBitStr *pDstData)
OSBOOL rtCopyOctStr (OSUINT32 srcNumocts, const OSOCTET *pSrcData, OSUINT32 *pDstNumocts, OSOCTET *pDstData)
OSBOOL rtCopyDynOctStr (OSCTXT *pctxt, const ASN1DynOctStr *pSrcData, ASN1DynOctStr *pDstData)
OSBOOL rtCopyCharStr (OSCTXT *pctxt, const char *srcStr, char **dstStr)
OSBOOL rtCopy16BitCharStr (OSCTXT *pctxt, const Asn116BitCharString *srcStr, Asn116BitCharString *dstStr)
OSBOOL rtCopy32BitCharStr (OSCTXT *pctxt, const Asn132BitCharString *srcStr, Asn132BitCharString *dstStr)
OSBOOL rtCopyOID (const ASN1OBJID *srcOID, ASN1OBJID *dstOID)
OSBOOL rtCopyOID64 (const ASN1OID64 *srcOID, ASN1OID64 *dstOID)
OSBOOL rtCopyOpenType (OSCTXT *pctxt, const ASN1OpenType *srcOT, ASN1OpenType *dstOT)
OSBOOL rtCopyOpenTypeExt (OSCTXT *pctxt, const OSRTDList *srcList, OSRTDList *dstList)

Detailed Description

Functions for copying values of primitive ASN.1 types.


Define Documentation

#define RTCHKCOPYCHARSTR ( pctxt,
src,
dst,
log   ) 
Value:
do { \
   char* ptr; \
   if (! rtCopyCharStr (pctxt, src, &ptr)) { \
      if (log) return LOG_RTERR (pctxt, RTERR_COPYFAIL); \
      else return RTERR_COPYFAIL; \
   } \
   *dst = ptr; \
} while(0)

This macro copies the source string to the destination string by calling the common runtime function rtCopyCharStr. This function allocates memory on the managed heap to store the string that will be released when rtxMemFree or rtFreeContext are called. This macro contains an error status check and will return a failure if needed.

Parameters:
pctxt A pointer to an OSCTXT data structure.
src The source string.
dst The destination string.
log Whether to log the error or just return the code.
#define RTCOPYCHARSTR ( pctxt,
src,
dst   )     do { char* ptr; rtCopyCharStr (pctxt, src, &ptr); *dst = ptr; } while(0)

This macro copies the source string to the destination string by calling the common runtime function rtCopyCharStr. This function allocates memory on the managed heap to store the string that will be released when rtxMemFree or rtFreeContext are called.

Parameters:
pctxt A pointer to an OSCTXT data structure.
src The source string.
dst The destination string.