Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP 9000 Networking: HP FTAM/9000 Programmer's Guide > Chapter 3 HP FTAM/9000 Data Structures

Ft_contents_type

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Glossary

 » Index

struct  Ft_contents_type {
enum Ft_contents_form contents_form;
union Ft_contents_info contents_info;
};

Ft_contents_type specifies the allowable document type for a particular file.

Ft_contents_type is the type for the contents_type field in struct Ft_contents_type_element (a linked list of allowable document types per connection). This structure is also nested within the values field, which is of type struct Ft_attributes.

contents_form

Specifies the contents_type form as a known or unknown document type.

contents_info

Specifies the exact document type.

Ft_contents_form

enum        Ft_contents_form {
FT_DOCUMENT_TYPE = 0,
FT_ABS_CON_SET_PAIR_FORM = 1,
FT_CONTENTS_UNKNOWN = 2
};

Ft_contents_form specifies whether contents_type is a known or unknown document type.

  • For all functions that use the Ft_contents_type, (except ft_fopen() and ft_open()), you must specify FT_DOCUMENT_TYPE.

  • HP-UX FTAM does not permit you to use the value FT_ABS_CON_SET_PAIR_FORM.

  • Specify FT_CONTENTS_UNKNOWN on ft_open() and ft_fopen() if you do not know the document type; the document type is returned in the inout_dcb.

Ft_contents_info

union   Ft_contents_info {
struct Ft_document_type document;
struct Ft_abs_con_set_pair abs_con_set_pair;
};

Ft_contents_info specifies the document type.

  • If you specified FT_DOCUMENT_TYPE in Ft_contents_form, specify the document.

  • If you specified FT_CONTENTS_UNKNOWN in Ft_contents_form, Ft_contents_info is ignored.

  • As noted under Ft_contents_form, HP-UX responders do not permit use of the abs_con_set_pair structure.

Ft_document_type

struct  Ft_document_type {
struct Object_id name;
char *parameters;
};

Ft_document_type defines the document type structure of the file. For detailed information (e.g., restrictions imposed) on document types, refer to the "Document Types and Constraint Sets" chapter.

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.

Ft_dt_ftam_1

struct Ft_dt_ftam_1
{
enum Ft_class class;
Uint16 string_length;
enum Ft_string_significance significance;
};

  • The class must be FT_CL_IA5_STRING or FT_CL_GENERAL_STRING.

  • The string_length supported by responders must be at least 0 to 134; for HP-UX responders, string_length is unlimited.

  • The significance must be FT_SS_NO_SIGNIFICANCE.

Ft_dt_ftam_2

struct Ft_dt_ftam_2
{
enum Ft_class class;
Uint16 string_length;
enum Ft_string_significance significance;
};

  • The class must be FT_CL_GRAPHIC_STRING.

  • The string_length supported by responders must be at least 0 to 134; for HP-UX responders, string_length is unlimited.

  • The significance must be FT_SS_NO_SIGNIFICANCE.

Ft_dt_ftam_3

struct Ft_dt_ftam_3
{
Uint16 string_length;
enum Ft_string_significance significance;
};

  • Ft_dt_ftam_3 defaults to FT_CL_OCTET_STRING.

  • The string_length supported by responders must be at least 0 to 512; for HP-UX responders, string_length is unlimited.

  • The significance must be FT_SS_NO_SIGNIFICANCE.

Ft_dt_intap_1

struct Ft_dt_intap_1
{
Uint16 record_length;
enum Ft_string_significance significance;
};

  • Ft_dt_intap_1 defaults to FT_CL_OCTET_STRING.

  • The record_length is unlimited.

  • The significance must be FT_SS_VARIABLE or FT_SS_FIXED.

Ft_dt_nbs_9

struct Ft_dt_nbs_9
{
Ft_attribute_names mask;
};

  • mask is a 32-bit unsigned integer. Use any of the FT_AN_xxx defined constants to set bits in the mask. See Ft_attribute_names for details.

  • This parameter is used only on a call to ft_open(). An NBS-9 document (a directory) can only be opened for reading. Therefore, any attribute names you supply on the ft_open() call specify the attributes you will receive for the files in the directory.

  • If you omit this parameter, the responder will supply default attributes. HP-UX FTAM responders will return all attributes by default.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1997 Hewlett-Packard Development Company, L.P.