/*                                          W3C Sample Code Library libwww DIRECTORY BROWSING
                                    DIRECTORY BROWSING
                                             
 */
/*
**      (c) COPYRIGHT MIT 1995.
**      Please first read the full copyright statement in the file COPYRIGH.
*/
/*

   FTP or the File module is included.
   
   This module is implemented by HTDir.c, and it is a part of the W3C Sample Code Library.
   
 */
#ifndef HTDIR_H
#define HTDIR_H
#include "HTReq.h"
#include "HTIcons.h"
/*

WHAT SHOULD THE LISTINGS LOOK LIKE?

   HT_DS_DES is set then the Description field is added as the last column in the listing.
   File descriptions are queried from the HTDescript module. Make a full mask by
   adding/oring the following flags:
   
 */
typedef enum _HTDirShow {
    HT_DS_SIZE  = 0x1,                  /* Show file size using K, M and G? */
    HT_DS_DATE  = 0x2,                  /* Show last modified date? */
    HT_DS_HID   = 0x4,                  /* Show hidden files? */
    HT_DS_DES   = 0x8,                  /* Show descriptions? */
    HT_DS_ICON  = 0x10,                 /* Show icons? */
    HT_DS_HOTI  = 0x20                  /* Are Icons hot or cold? */
} HTDirShow;

typedef enum _HTDirKey {
    HT_DK_NONE  = 0,                    /* No sorting */
    HT_DK_CSEN  = 1,                    /* Case sensitive */
    HT_DK_CINS  = 2                     /* Case insensitive */
} HTDirKey;
/*

  Length of Filenames and Descriptions
  
 */
extern BOOL HTDir_setWidth (int minfile, int maxfile);
/*

THE DIRECTORY OBJECT

  Width of File Names
  
 */
extern BOOL HTDir_setWidth (int minfile, int maxfile);
/*

  Create a Directory Object
  
 */
typedef struct _HTDir HTDir;

extern HTDir * HTDir_new (HTRequest * request, HTDirShow show, HTDirKey key);
/*

  Add a Line to the List
  
 */
extern BOOL HTDir_addElement    (HTDir *dir, char *name, char *date,
                                 char *size, HTFileMode mode);
/*

  Free a Directory Obejct
  
 */
extern BOOL HTDir_free (HTDir * dir);
/*

 */
#endif /* HTDIR */
/*

   
   ___________________________________
   
                              @(#) $Id: HTDir.html,v 2.5 1998/05/14 02:10:23 frystyk Exp $
                                                                                          
   */
