Quick Links:

bal | bbl | bdl | bsl

Public Types | Static Public Member Functions

balber::BerUtil_LengthImpUtil Struct Reference

#include <balber_berutil.h>

List of all members.

Public Types

typedef BerUtil_Constants Constants
typedef BerUtil_RawIntegerImpUtil RawIntegerUtil

Static Public Member Functions

static int getLength (int *result, int *accumNumBytesConsumed, bsl::streambuf *streamBuf)
static int getEndOfContentOctets (int *accumNumBytesConsumed, bsl::streambuf *streamBuf)
static int putLength (bsl::streambuf *streamBuf, int length)
static int putIndefiniteLengthOctet (bsl::streambuf *streamBuf)
static int putEndOfContentOctets (bsl::streambuf *streamBuf)

Detailed Description

This component-private utility struct provides a namespace for a suite of functions used by BerUtil to implement BER length quantity encoding and decoding.

See Component balber_berutil


Member Typedef Documentation


Member Function Documentation

static int balber::BerUtil_LengthImpUtil::getLength ( int *  result,
int *  accumNumBytesConsumed,
bsl::streambuf *  streamBuf 
) [static]

Decode the length octets from the specified streamBuf and load the result to the specified result. If the length is indefinite (i.e., contents will be terminated by "end-of-content" octets) then result will be set to k_INDEFINITE_LENGTH. Add the number of bytes consumed to the specified accumNumBytesConsumed. Return 0 on success, and a non-zero value otherwise.

static int balber::BerUtil_LengthImpUtil::getEndOfContentOctets ( int *  accumNumBytesConsumed,
bsl::streambuf *  streamBuf 
) [static]

Decode the "end-of-content" octets (two consecutive zero-octets) from the specified streamBuf and add the number of bytes consumed (which is always 2) to the specified accumNumBytesConsumed. Return 0 on success, and a non-zero value otherwise.

static int balber::BerUtil_LengthImpUtil::putLength ( bsl::streambuf *  streamBuf,
int  length 
) [static]

Encode the specified length length octets to the specified streamBuf. Return 0 on success, and a non-zero value otherwise. The behavior is undefined unless 0 <= length.

static int balber::BerUtil_LengthImpUtil::putIndefiniteLengthOctet ( bsl::streambuf *  streamBuf  )  [static]

Encode the "indefinite-length" octet onto the specified streamBuf. This octet signifies that the length of the contents is indefinite (i.e., contents will be terminated by end of content octets). Return 0 on success, and a non-zero value otherwise.

static int balber::BerUtil_LengthImpUtil::putEndOfContentOctets ( bsl::streambuf *  streamBuf  )  [static]

Encode the identifier octets for the specified tagClass, tagType and tagNumber to the specified streamBuf. Return 0 on success, and a non-zero value otherwise.


The documentation for this struct was generated from the following file: