Previous: bpipe_hdrf_string_add, Up: Header Field Manipulations   [Contents]


A.2.10 bpipe_hdrf_type

Return the datatype of a header field.

Synopsis

#include <bpipe/bpipe.h>

BPDataType bpipe_hdrf_type(
  BPipe *bpipe,
  const char *name,
  size_t index
);

Parameters

BPipe *bpipe

binary pipe with which this field is associated

const char *name

the field’s name

size_t index

the field’s index. set to BPHdrfIdx_LAST to select the last one.

Description

Return the datatype of a header field.

Returns

It returns the data type of a header field, if it exists. If it doesn’t exist, it returns BPDType_NOTYPE. Upon error it returns BPDType and sets bpipe_errno.


Possible values for a BPDataType are as follows: BPDType_char, BPDType_double, BPDType_int, BPDType_uint, BPDType_DVector2, BPDType_DVector3, BPDType_IVector2, BPDType_IVector3, BPDType_UIVector2, BPDType_UIVector3, BPDType_DComplex, BPDType_DCVector2, BPDType_DCVector3

Errors

Upon error bpipe_errno is set to one of the following:

BPEBADARG

the index specified was illegal