RSA Security logo

RSA BSAFE Cert-C
API Reference

iospi.h

Go to the documentation of this file.
00001 /*
00002 * Copyright (c) RSA Security Inc., 1999-2002.  All rights reserved.
00003 * This work contains proprietary, confidential, and trade secret
00004 * information of RSA Security Inc.  Use, disclosure or reproduction
00005 * without the express written authorization of RSA Security Inc. is
00006 * prohibited.
00007 */
00008 
00009 #ifndef _IOSPI_H_
00010 #define _IOSPI_H_ 1
00011 
00018 #include "basetype.h"
00019 
00020 #ifdef __cplusplus
00021 extern "C" {
00022 #endif
00023 
00033 typedef struct io_funcs {
00046   void (*Finalize) (
00047     CERTC_CTX       ctx,                /* Cert-C context */
00048     POINTER         handle);            /* provider handle */
00049 
00124   int (*Open) (
00125     CERTC_CTX       ctx,                /* Cert-C context */
00126     POINTER         handle,             /* provider handle */
00127     POINTER         name,               /* name of stream */
00128     unsigned int    flags,              /* stream flags */
00129     POINTER         *streamID);         /* (out) stream identifier */
00130 
00152   int (*Close) (
00153     CERTC_CTX       ctx,                /* Cert-C context */
00154     POINTER         handle,             /* provider handle */
00155     POINTER         streamID);          /* stream identifier */
00156 
00198   int (*GetLine) (
00199     CERTC_CTX       ctx,                /* Cert-C context */
00200     POINTER         handle,             /* provider handle */
00201     POINTER         streamID,           /* stream identifier */
00202     char            *str,               /* storage for string */
00203     unsigned int    maxLen);            /* max # of characters to read */
00204 
00232   int (*PutLine) (
00233     CERTC_CTX       ctx,                /* Cert-C context */
00234     POINTER         handle,             /* provider handle */
00235     POINTER         streamID,           /* stream identifier */
00236     char            *str);              /* output string */
00237 
00278   int (*Read) (
00279     CERTC_CTX       ctx,                /* Cert-C context */
00280     POINTER         handle,             /* provider handle */
00281     POINTER         streamID,           /* stream identifier */
00282     unsigned char   *buf,               /* storage for data */
00283     unsigned int    len,                /* # of bytes to read */
00284     unsigned int    *actualLen);        /* (out) # of bytes actually read */
00285 
00314   int (*Write) (
00315     CERTC_CTX       ctx,                /* Cert-C context */
00316     POINTER         handle,             /* provider handle */
00317     POINTER         streamID,           /* stream identifier */
00318     unsigned char   *buf,               /* output buffer */
00319     unsigned int    len);               /* # of bytes to write */
00320 
00343   int (*Rewind) (
00344     CERTC_CTX       ctx,                /* Cert-C context */
00345     POINTER         handle,             /* provider handle */
00346     POINTER         streamID);          /* stream identifier */
00347 } IO_FUNCS;
00348 
00349 #ifdef __cplusplus
00350 }
00351 #endif
00352 
00353 #endif /* _IOSPI_H_ */



RSA BSAFE® Cert-C 2.7 API Reference