ASN1C C/C++ Common Runtime  ASN1C v7.3.x
rtCopy.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 1997-2019 Objective Systems, Inc.
3  *
4  * This software is furnished under a license and may be used and copied
5  * only in accordance with the terms of such license and with the
6  * inclusion of the above copyright notice. This software or any other
7  * copies thereof may not be provided or otherwise made available to any
8  * other person. No title to and ownership of the software is hereby
9  * transferred.
10  *
11  * The information in this software is subject to change without notice
12  * and should not be construed as a commitment by Objective Systems, Inc.
13  *
14  * PROPRIETARY NOTICE
15  *
16  * This software is an unpublished work subject to a confidentiality agreement
17  * and is protected by copyright and trade secret law. Unauthorized copying,
18  * redistribution or other use of this work is prohibited.
19  *
20  * The above notice of copyright on this source code product does not indicate
21  * any actual or intended publication of such source code.
22  *
23  *****************************************************************************/
24 
29 #ifndef _RTCOPY_H_
30 #define _RTCOPY_H_
31 #include "rtsrc/asn1type.h"
32 
33 #ifdef __cplusplus
34 extern "C" {
35 #endif
36 
67 EXTERNRT OSBOOL rtCopyBitStr64
68 (OSSIZE srcNumbits, const OSOCTET* pSrcData,
69  OSSIZE* pDstNumbits, OSOCTET* pDstData, OSSIZE dstDataSize);
70 
91 EXTERNRT OSBOOL rtCopyBitStr (OSUINT32 srcNumbits,
92  const OSOCTET* pSrcData,
93  OSUINT32* pDstNumbits, OSOCTET* pDstData);
94 
114 EXTERNRT OSBOOL rtCopyDynBitStr64
115  (OSCTXT* pctxt, const ASN1DynBitStr64* pSrcData, ASN1DynBitStr64* pDstData);
116 
134 EXTERNRT OSBOOL rtCopyDynBitStr
135  (OSCTXT* pctxt, const ASN1DynBitStr* pSrcData, ASN1DynBitStr* pDstData);
136 
155 EXTERNRT OSBOOL rtCopyOctStr64
156  (OSSIZE srcNumocts, const OSOCTET* pSrcData,
157  OSSIZE* pDstNumocts, OSOCTET* pDstData, OSSIZE dstDataSize);
158 
179 EXTERNRT OSBOOL rtCopyOctStr
180  (OSUINT32 srcNumocts, const OSOCTET* pSrcData,
181  OSUINT32* pDstNumocts, OSOCTET* pDstData);
182 
203 EXTERNRT OSBOOL rtCopyDynOctStr64
204  (OSCTXT* pctxt, const OSDynOctStr64* pSrcData, OSDynOctStr64* pDstData);
205 
224 EXTERNRT OSBOOL rtCopyDynOctStr
225  (OSCTXT* pctxt, const ASN1DynOctStr* pSrcData, ASN1DynOctStr* pDstData);
226 
245 EXTERNRT OSBOOL rtCopyCharStr
246  (OSCTXT* pctxt, const char* srcStr, char** dstStr);
247 
266 EXTERNRT OSBOOL rtCopy16BitCharStr
267  (OSCTXT* pctxt, const Asn116BitCharString* srcStr, Asn116BitCharString* dstStr);
268 
287 EXTERNRT OSBOOL rtCopy32BitCharStr
288  (OSCTXT* pctxt, const Asn132BitCharString* srcStr, Asn132BitCharString* dstStr);
289 
303 EXTERNRT OSBOOL rtCopyOID
304  (const ASN1OBJID* srcOID, ASN1OBJID* dstOID);
305 
319 EXTERNRT OSBOOL rtCopyOID64
320  (const ASN1OID64* srcOID, ASN1OID64* dstOID);
321 
340 EXTERNRT OSBOOL rtCopyOpenType
341  (OSCTXT* pctxt, const ASN1OpenType* srcOT, ASN1OpenType* dstOT);
342 
364 EXTERNRT OSBOOL rtCopyOpenTypeExt
365  (OSCTXT* pctxt, const OSRTDList* srcList, OSRTDList* dstList);
370 /* Macros */
371 
382 #define RTCOPYCHARSTR(pctxt,src,dst) \
383 do { char* ptr; rtCopyCharStr (pctxt, src, &ptr); *dst = ptr; } while(0)
384 
397 #define RTCHKCOPYCHARSTR(pctxt,src,dst,log) \
398 do { \
399  char* ptr; \
400  if (! rtCopyCharStr (pctxt, src, &ptr)) { \
401  if (log) return LOG_RTERR (pctxt, RTERR_COPYFAIL); \
402  else return RTERR_COPYFAIL; \
403  } \
404  *dst = ptr; \
405 } while(0)
406 
407 #ifdef __cplusplus
408 }
409 #endif
410 
411 #endif /* _RTCOPY_H_ */
Definition: asn1type.h:686
OSBOOL rtCopyDynOctStr64(OSCTXT *pctxt, const OSDynOctStr64 *pSrcData, OSDynOctStr64 *pDstData)
Definition: asn1type.h:648
Definition: rtxDList.h:64
OSBOOL rtCopyBitStr(OSUINT32 srcNumbits, const OSOCTET *pSrcData, OSUINT32 *pDstNumbits, OSOCTET *pDstData)
Definition: asn1type.h:275
Definition: asn1type.h:285
OSBOOL rtCopyDynBitStr64(OSCTXT *pctxt, const ASN1DynBitStr64 *pSrcData, ASN1DynBitStr64 *pDstData)
OSBOOL rtCopyBitStr64(OSSIZE srcNumbits, const OSOCTET *pSrcData, OSSIZE *pDstNumbits, OSOCTET *pDstData, OSSIZE dstDataSize)
OSBOOL rtCopy32BitCharStr(OSCTXT *pctxt, const Asn132BitCharString *srcStr, Asn132BitCharString *dstStr)
OSBOOL rtCopyOID(const ASN1OBJID *srcOID, ASN1OBJID *dstOID)
OSBOOL rtCopyOctStr(OSUINT32 srcNumocts, const OSOCTET *pSrcData, OSUINT32 *pDstNumocts, OSOCTET *pDstData)
Definition: asn1type.h:698
OSBOOL rtCopyCharStr(OSCTXT *pctxt, const char *srcStr, char **dstStr)
OSBOOL rtCopy16BitCharStr(OSCTXT *pctxt, const Asn116BitCharString *srcStr, Asn116BitCharString *dstStr)
Definition: asn1type.h:432
OSBOOL rtCopyDynBitStr(OSCTXT *pctxt, const ASN1DynBitStr *pSrcData, ASN1DynBitStr *pDstData)
Definition: asn1type.h:425
OSBOOL rtCopyOID64(const ASN1OID64 *srcOID, ASN1OID64 *dstOID)
OSBOOL rtCopyOctStr64(OSSIZE srcNumocts, const OSOCTET *pSrcData, OSSIZE *pDstNumocts, OSOCTET *pDstData, OSSIZE dstDataSize)
OSBOOL rtCopyDynOctStr(OSCTXT *pctxt, const ASN1DynOctStr *pSrcData, ASN1DynOctStr *pDstData)
Definition: rtxContext.h:185
#define ASN1DynOctStr
Definition: asn1type.h:418
OSBOOL rtCopyOpenTypeExt(OSCTXT *pctxt, const OSRTDList *srcList, OSRTDList *dstList)
OSBOOL rtCopyOpenType(OSCTXT *pctxt, const ASN1OpenType *srcOT, ASN1OpenType *dstOT)