
{ PURPOSE:
{   This deck contains the type declarations for the IDB directory
{   sequence.  The fields for the major components are documented here:
{
{   The RAT$DIRECTORY_HEADER record contains the following fields:
{
{     DEFERRED_COUNT  - Number of deferred subproducts.
{
{     DIRECTORY_SIZE  - Number of records registered in the IDB directory.
{
{     DIRECTORY_REL_P  - A relative pointer to the directory records.
{
{
{   The RAT$DIRECTORY is an adaptable array of directory records
{   (RAT$DIRECTORY_RECORD).  Each RAT$DIRECTORY_RECORD record contains the
{   following fields:
{
{     PRIMARY_SUBPRODUCT  - Boolean value defining the subproduct as the
{                  spokesperson for the licensed product.  (Used for
{                  displaying licensed product information.)
{
{     DESCRIPTION  - A string value description of the subproduct.
{                  If the subproduct is defined as the primary subproduct
{                  of a licensed product this description applies for the
{                  licensed product as well.
{
{     HIDDEN  - Boolean value describing wheather or not this is a hidden
{                  subproduct.
{
{     SUBPRODUCT_CORRUPTED  - A Boolean to flag the active level of
{                  the subproduct as being corrupted.  This arises when a
{                  later installation of another level fails to activate.
{
{     BASE_LEVEL_INSTALLATION_CATALOG  - The path to the installation catalog
{                  that contains the corrective base level path.
{
{     SYSTEM_CATALOG_PATH_INDEX  - The index for the system catalog part of
{                  the base level installation catalog.
{
{     ACTIVE_INFORMATION  - An information record for the subproduct
{                  level that is currently active.
{
{     DEFERRED_INFORMATION  - An information record for the subproduct
{                  level that is currently deferred.
{
{     CORRECTIVE_BASE_INFORMATION  - An information record for the
{                  subproduct that is the corrective base for the
{                  currently active.
{
{     The following two fields taken together become the SORT_KEY,
{     or the field on which the directory is sorted.
{
{     LICENSED_PRODUCT  - Name of the licensed product that this subproduct
{                  belongs to.
{
{     SUBPRODUCT  - Name of the subproduct.
{
{
{   The RAT$INFORMATION_RECORD record contains the following fields:
{
{     DATE_INSTALLED  - Date and time the subproduct was installed.
{                  This is stored in compact date and time format.
{
{     INSTALLATION_IDENTIFIER  - Name field specifying the identifier
{                  associated with the installation of this subproduct.
{                  RAC$NOT_INSTALLED will be used as the installation
{                  identifier when the RAT$INFORMATION_RECORD is not
{                  being used.
{
{     SUBPRODUCT_LEVEL  -  The subproduct level in the notation given by
{                  the developing group.  This is a 31 character name.
{
{     INTERNAL_LEVEL  - An NOS/VE level representation used internally
{                  by NOS/VE development.  This is hidden from
{                  displays unless asked for directly.
{
{     SIF_IDENTIFIER  - A unique name that identifies the SIF used to
{                  define the subproduct referenced by this record.
{
{     PACKING_LIST  - Contains the name of the packing list file that
{                  defines the subproduct referenced by this record.
{
{     PACKING_LIST_INDEX  - Contains the index into the subproduct
{                  indexer for the subproduct referenced by this record.
{                  The subproduct indexer is found in the packing list
{                  named in the last field.
{
{

  TYPE
    rat$directory_header = record
      deferred_count: rat$directory_size,
      directory_size: rat$directory_size,
      directory_rel_p: REL (rat$idb_directory_sequence) ^rat$directory,
    recend;

  TYPE
    rat$directory = array [ * ] of rat$directory_record;

  TYPE
    rat$directory_record = record
      primary_subproduct: rat$primary_subproduct,
      description: rat$subproduct_description,
      hidden: boolean,
      subproduct_corrupted: boolean,
      base_level_installation_catalog: rat$path,
      system_catalog_path_index: 0 .. fsc$max_path_size,
      active_information: rat$information_record,
      deferred_information: rat$information_record,
      corrective_base_information: rat$information_record,
      case 1 .. 2 of
      = 1 =
        licensed_product: rat$licensed_product,
        subproduct: rat$subproduct_name,
      = 2 =
        sort_key: rat$directory_sort_key,
      casend,
    recend;

  TYPE
    rat$directory_size = rat$subproduct_count;

  TYPE
    rat$directory_sort_key = string (osc$max_name_size * 2);

  TYPE
    rat$idb_directory_sequence = SEQ ( * );

  TYPE
    rat$information_record = record
      date_installed: ost$date_time,
      installation_identifier: rat$installation_identifier,
      subproduct_level:  rat$subproduct_level,
      internal_level: rat$subproduct_internal_level,
      sif_identifier: rat$sif_identifier,
      packing_list: ost$name,
      packing_list_index: rat$subproduct_count,
    recend;

*copyc fsc$max_path_size
*copyc ost$date_time
*copyc ost$name
*copyc rat$installation_identifier
*copyc rat$licensed_product
*copyc rat$path
*copyc rat$primary_subproduct
*copyc rat$sif_identifier
*copyc rat$subproduct_count
*copyc rat$subproduct_description
*copyc rat$subproduct_internal_level
*copyc rat$subproduct_level
*copyc rat$subproduct_name

