Objective Systems, Inc.  
Home
About ASN.1
Products
Free Software
Documents
Services
Resources
Resellers
Customers
Careers
About Us
Contact Us
 

Google


Objective Systems, Inc.

Stream structure definitions.
[C Runtime Common Functions]


Classes

struct  OSRTStream

Defines

#define OSRTSTRMF_INPUT   0x0001
#define OSRTSTRMF_OUTPUT   0x0002
#define OSRTSTRMF_REQBUFFER   0x4000
#define OSRTSTRMF_BUFFERED   0x8000
#define OSRTSTRMF_BUF_INPUT   (OSRTSTRMF_INPUT|OSRTSTRMF_BUFFERED)
#define OSRTSTRMF_BUF_OUTPUT   (OSRTSTRMF_OUTPUT|OSRTSTRMF_BUFFERED)
#define OSRTSTRMID_FILE   1
#define OSRTSTRMID_SOCKET   2
#define OSRTSTRMID_MEMORY   3
#define OSRTSTRMID_BUFFERED   4
#define OSRTSTRMID_DIRECTBUF   5
#define OSRTSTRMID_USER   1000
#define OSRTSTRM_K_BUFSIZE   1024
#define OSRTSTRM_K_INVALIDMARK   ((ASN1UINT)-1)
#define OSRTSTREAM_BYTEINDEX(pctxt)   ((pctxt)->pStream->bytesProcessed + (pctxt)->buffer.byteIndex)

Typedefs

typedef long(* OSRTStreamReadProc )(struct OSRTStream *pStream, ASN1OCTET *pbuffer, size_t bufsize)
typedef long(* OSRTStreamBlockingReadProc )(struct OSRTStream *pStream, ASN1OCTET *pbuffer, size_t toReadBytes)
typedef int(* OSRTStreamFlushProc )(struct OSRTStream *pStream)
typedef int(* OSRTStreamCloseProc )(struct OSRTStream *pStream)
typedef long(* OSRTStreamWriteProc )(struct OSRTStream *pStream, const ASN1OCTET *data, size_t numocts)
typedef int(* OSRTStreamSkipProc )(struct OSRTStream *pStream, size_t skipBytes)
typedef int(* OSRTStreamMarkProc )(struct OSRTStream *pStream, size_t readAheadLimit)
typedef int(* OSRTStreamResetProc )(struct OSRTStream *pStream)
typedef OSRTStream OSRTStream


Typedef Documentation

typedef struct OSRTStream OSRTStream
 

This structure is used to define a stream control block for keeping track of stream operations. A user may implement his own specific stream operations by defining read, skip, and close functions for input streams and write, flush, and close for output streams.

typedef long(* OSRTStreamBlockingReadProc)(struct OSRTStream *pStream, ASN1OCTET *pbuffer, size_t toReadBytes)
 

Stream blockingRead function pointer type. A user may implement a customized read function for specific input streams. The blockingRead function is defined in the OSRTStream control structure.

typedef int(* OSRTStreamCloseProc)(struct OSRTStream *pStream)
 

Pointer to stream close function. User may implement his own read function for any specific streams.

typedef int(* OSRTStreamFlushProc)(struct OSRTStream *pStream)
 

Pointer to stream flush function. User may implement his own read function for any specific output streams.

typedef int(* OSRTStreamMarkProc)(struct OSRTStream *pStream, size_t readAheadLimit)
 

Stream mark function pointer type. A user may implement a customized function for a specific input stream type. The mark function is defined in the OSRTStream control structure.

typedef long(* OSRTStreamReadProc)(struct OSRTStream *pStream, ASN1OCTET *pbuffer, size_t bufsize)
 

Pointer to stream read function. User may implement his own read function for any specific input streams.

typedef int(* OSRTStreamResetProc)(struct OSRTStream *pStream)
 

Stream reset function pointer type. A user may implement a customized function for a specific input stream type. The reset function is defined in the OSRTStream control structure.

typedef int(* OSRTStreamSkipProc)(struct OSRTStream *pStream, size_t skipBytes)
 

Stream skip function pointer type. A user may implement a customized function for a specific input stream type. The skip function is defined in the OSRTStream control structure.

typedef long(* OSRTStreamWriteProc)(struct OSRTStream *pStream, const ASN1OCTET *data, size_t numocts)
 

Pointer to stream write function. User may implement his own read function for any specific output streams.


Copyright © 1997-2004 Objective Systems,Inc.
All Rights Reserved.
This document may be distributed in any form, electronic
or otherwise, provided that it is distributed in its entirety
and that the copyright and this notice are included.

This file was last modified on 1 Oct 2004.
ASN1C C/C++ Common Runtime, ASN1C v5.7x