FTAM/9000 Programmer's Guide
116 Chapter 3
HP FTAM/9000 Data Structures
Ft_contents_type
name Specifies the name of the document type and is of the following type struct
Object_id (from map.h).
struct Object_id
{
Uint16 length;
Sint32 *element; /* List of integers */
};
• Set the length field to 5 for all document types except NBS-9; for
document type NBS-9 set length to 6.
struct Ft_contents_type cont_type;
cont_type.contents_info.document.name.length = 5;
• Specify the document_type name by setting the element array as follows:
1 0 8571 5 1 for FTAM-1 document type
1 0 8571 5 2 for FTAM-2 document type
1 0 8571 5 3 for FTAM-3 document type
1 2 392 10 2 1 for INTAP-1 document type
1 3 14 5 5 9 for NBS-9 document type
EXAMPLE: This example sets the Ft_contents_type structure for an FTAM-3 file.
The document_type name for FTAM-3 is 1 0 8571 5 3
struct Ft_contents_type cont_type;
struct Ft_dt_ftam_3 *ftm_3;
cont_type.contents_form = FT_DOCUMENT_TYPE;
ftm_3 = (struct Ft_dt_ftam_3 *)malloc(sizeof(struct Ft_dt_ftam_3));
cont_type.contents_info.document.name.element =
(Sint32 *)malloc(5*sizeof(Sint32));
ftm_3->string_length = 512;
ftm_3->significance = FT_SS_NO_SIGNIFICANCE;
cont_type.contents_info.document.parameters = (char *)ftm_3;
cont_type.contents_info.document.name.length = 5;
cont_type.contents_info.document.name.element[0]=1;
cont_type.contents_info.document.name.element[1]=0;
cont_type.contents_info.document.name.element[2]=8571;
cont_type.contents_info.document.name.element[3]=5;
cont_type.contents_info.document.name.element[4]=3;
*parameters Generic pointer to one of the following structures: Ft_dt_ftam_1,
Ft_dt_ftam_2, Ft_dt_ftam_3, Ft_dt_intap_1, or Ft_dt_nbs_9.