VDS_PROTOCOL_TYPE(3)
NAME
vds_protocol_type
SYNOPSIS
#include <soi_vds.h>
int vds_protocol_type (VDS *vds, int which);
DESCRIPTION
vds_protocol_type determines the external storage protocol
type of either the per record information or the data of the
given vds, depending on the integer argument "which". The
argument vds is a pointer to a vds data structure which was
returned by a call to either vds_open or vds_new. The
integer argument "which" should be either VDS_INFO or
VDS_DATA.
The external storage protocol types are determined by the
global attribute "PROTOCOL" of the vds. If there is no
"PROTOCOL" attribute vds_protocol_type has the *SIDE EFFECT*
of setting the "PROTOCOL" attribute to DEFAULT_PROTOCOL.
RETURN VALUES
The value returned is one of the protocol_types enumerated
in soi_vds.h. The value VDS_NO_PROTOCOL is returned on an
unrecoverable error.
EXAMPLES
Suppose the "PROTOCOL" global attribute value is "RDB.FITS".
Then a call to vds_protocol_type where "which" is VDS_INFO
returns VDS_RDB. If "which" is VDS_DATA, the return value
is VDS_FITS.
There are examples of the use of vds_protocol_type in
~soi/CM/src/modules/image_cat.c and
~soi/CM/src/libvds.d/vds_open.c
SEE ALSO
~soi/CM/man/man3/vds.3
~soi/CM/include/soi_error.h
FILES
~soi/CM/include/soi_vds.h
~soi/CM/src/libvds.d/vds_attrs.c
BUGS
RESTRICTIONS
PLANNED IMPROVEMENTS