home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / warphead.zip / H / DASD.H < prev    next >
C/C++ Source or Header  |  1997-09-05  |  10KB  |  226 lines

  1. /**************************************************************************/
  2. /*                                                                        */
  3. /*              IBM OS/2(tm) File and Print Client Services               */
  4. /* (c) Copyright International Business Machines Corporation, 1988, 1996  */
  5. /*                                                                        */
  6. /**************************************************************************/
  7.  
  8. /********************************************************************
  9.  *                                                                  *
  10.  *  About this file ...  DASD.H                                     *
  11.  *                                                                  *
  12.  *  This file contains information about the NetDASD apis.          *
  13.  *                                                                  *
  14.  *      Function prototypes.                                        *
  15.  *                                                                  *
  16.  *      Data structure templates.                                   *
  17.  *                                                                  *
  18.  *      Definition of special values.                               *
  19.  *                                                                  *
  20.  *                                                                  *
  21.  *  NOTE:  You must include NETCONS.H before this file, since this  *
  22.  *         file depends on values defined in NETCONS.H.             *
  23.  *                                                                  *
  24.  ********************************************************************/
  25.  
  26.  
  27. #if !defined NETDASD_INCLUDED
  28. #define NETDASD_INCLUDED
  29. #pragma pack(1)
  30.  
  31.  
  32.  
  33. /****************************************************************
  34.  *                                                              *
  35.  *              Function prototypes - API DASD                  *
  36.  *                                                              *
  37.  ****************************************************************/
  38.  
  39. extern  API_FUNCTION
  40.     NetDASDAdd( const unsigned char LSFAR *server,
  41.                 short                      level,
  42.                 unsigned char LSFAR       *buf,
  43.                 unsigned short             buflen
  44.               );
  45.  
  46. extern  API_FUNCTION
  47.     NetDASDDel( const unsigned char LSFAR *server,
  48.                 unsigned char LSFAR       *resource
  49.               );
  50.  
  51. extern  API_FUNCTION
  52.     NetDASDGetInfo( const unsigned char LSFAR    *server,
  53.                     unsigned char LSFAR          *resource,
  54.                     short                         level,
  55.                     unsigned char LSFAR          *buf,
  56.                     unsigned short                buflen,
  57.                     unsigned short LSFAR         *total
  58.                   );
  59.  
  60.  
  61. extern  API_FUNCTION
  62.     NetDASDSetInfo( const unsigned char LSFAR *server,
  63.                     unsigned char LSFAR       *resource,
  64.                     short                      level,
  65.                     unsigned char LSFAR       *buf,
  66.                     unsigned short             buflen
  67.                   );
  68.  
  69.  
  70. extern  API_FUNCTION
  71.     NetDASDEnum( const unsigned char LSFAR *server,
  72.                  unsigned char LSFAR       *path,
  73.                  short                      recursive,
  74.                  short                      level,
  75.                  unsigned char LSFAR       *buf,
  76.                  unsigned short             buflen,
  77.                  unsigned short LSFAR      *entries_returned,
  78.                  unsigned short LSFAR      *total_entries
  79.                );
  80.  
  81.  
  82. extern  API_FUNCTION
  83.     NetDASDCheck( const unsigned char LSFAR   *server,
  84.                   unsigned char LSFAR         *path,
  85.                   short                        level,
  86.                   unsigned char LSFAR         *buf,
  87.                   unsigned short               buflen,
  88.                   unsigned short LSFAR        *TotalAvail
  89.                 );
  90.  
  91. extern  API_FUNCTION
  92.     NetDASDCtl(  const unsigned char LSFAR *server,
  93.                  short                      level,
  94.                  unsigned char LSFAR       *buf,
  95.                  unsigned short             buflen
  96.                );
  97.  
  98.              /****************************
  99.               *      DATA STRUCTURES     *
  100.               ****************************/
  101.  
  102. struct dasd_info_0 {                     /* Level 0 data structure */
  103.     unsigned char LSFAR * LSPTR d0_resource_name; /* Name of resource     */
  104.     unsigned long d0_max;                /* DASD limit             */
  105.     unsigned long d0_use;                /* Usage count (bytes)    */
  106.     unsigned char d0_flag;               /* validate flags         */
  107.     unsigned char d0_thresh;       /* Threshold value in percentage       */
  108.     unsigned char d0_delta;        /* Incremental thresh value in percent.*/
  109. };  /* dasd_info_0 */
  110.  
  111. struct dasd_init_0 {                     /* Used by NetDASDCtl        */
  112.     unsigned char i0_CtlFlag;            /* Control flag              */
  113.     unsigned char i0_Drive;              /* Drive letter: 'C', 'D'... */
  114. };  /* dasd_init_0 */
  115.  
  116. struct dasd_check_0 {                      /* Used by NetDASDCheck  */
  117.     unsigned char LSFAR * LSPTR dc0_path;  /* Determining path      */
  118.     unsigned long               dc0_avail; /* Available space in KB */
  119.     unsigned long               dc0_usage; /* Directory size in KB  */
  120. };  /* dasd_check_0 */
  121.  
  122. /* On return, the dc0_path field contains the directory path
  123.  * at which the dc0_avail value space was calculated.
  124.  */
  125.  
  126. typedef struct dasd_info_0  DASDINFO0;
  127. typedef DASDINFO0 * PDASDINFO0;
  128.  
  129. typedef struct dasd_init_0  DASDINIT0;
  130. typedef DASDINIT0 * PDASDINIT0;
  131.  
  132. typedef struct dasd_check_0 DASDCHECK0;
  133. typedef DASDCHECK0 * PDASDCHECK0;
  134.  
  135.  
  136.  
  137. #ifdef PURE_32
  138. /****************************************************************
  139.  *                                                              *
  140.  *              Function prototypes - API DASD                  *
  141.  *                  for "pure" 32-bit code                      *
  142.  *                                                              *
  143.  ****************************************************************/
  144.  
  145. extern  API32_FUNCTION
  146.   Net32DASDAdd( const unsigned char  * pszServer,
  147.                 unsigned long          uLevel,        /* was signed short */
  148.                 unsigned char        * pbBuffer,
  149.                 unsigned long          ulBuffer       /* was USHORT */
  150.               );
  151.  
  152. extern  API32_FUNCTION
  153.   Net32DASDDel( const unsigned char  * pszServer,
  154.                 unsigned char        * pszResource
  155.               );
  156.  
  157. extern  API32_FUNCTION
  158.   Net32DASDGetInfo( const unsigned char   * pszServer,
  159.                     unsigned char         * pszResource,
  160.                     unsigned long           ulLevel,    /* was signed short */
  161.                     unsigned char         * pbBuffer,
  162.                     unsigned long           ulBuffer,   /* was USHORT  */
  163.                     unsigned long         * pulTotal    /* was USHORT* */
  164.                   );
  165.  
  166.  
  167. extern  API32_FUNCTION
  168.   Net32DASDSetInfo( const unsigned char  * pszServer,
  169.                     unsigned char        * pszResource,
  170.                     unsigned long          ulLevel,      /* was signed short */
  171.                     unsigned char        * pbBuffer,
  172.                     unsigned long          ulBuffer      /* was USHORT */
  173.                   );
  174.  
  175.  
  176. extern  API32_FUNCTION
  177.   Net32DASDEnum( const unsigned char    * pszServer,
  178.                  unsigned char          * pszPath,
  179.                  unsigned long            ulRecursive,   /* was signed short */
  180.                  unsigned long            ulLevel,       /* was signed short */
  181.                  unsigned char          * pbBuffer,
  182.                  unsigned long            ulBuffer,      /* was USHORT */
  183.                  unsigned long          * pulEntriesReturned,  /* was USHORT* */
  184.                  unsigned long          * pulTotalEntries      /* was USHORT* */
  185.                );
  186.  
  187.  
  188. extern  API32_FUNCTION
  189.   Net32DASDCheck( const unsigned char   * pszServer,
  190.                   unsigned char         * pszPath,
  191.                   unsigned long           ulLevel,        /* was signed short */
  192.                   unsigned char         * pbBuffer,
  193.                   unsigned long           ulBuffer,       /* was USHORT  */
  194.                   unsigned long         * pulTotalAvail   /* was USHORT* */
  195.                 );
  196.  
  197. extern  API32_FUNCTION
  198.   Net32DASDCtl(  const unsigned char  * pszServer,
  199.                  unsigned long          ulLevel,         /* was signed short*/
  200.                  unsigned char        * pbBuffer,
  201.                  unsigned long          ulBuffer         /* was USHORT*/
  202.                );
  203. #endif /* PURE_32 */
  204.  
  205.  
  206.              /****************************
  207.               *     MANIFESTS            *
  208.               ****************************/
  209.  
  210. /*  Used with NetDASDCtl() - values for i0_CtlFlag                  */
  211.  
  212. #define DASD_CTL_INSTALL        1       /* Install DASD_LIMITS      */
  213. #define DASD_CTL_REMOVE         2       /* Remove DASD_LIMITS       */
  214. #define DASD_CTL_RECALC         3       /* recalculate usage        */
  215.  
  216.  
  217. /*
  218.  * Bit masks used with d0_flag
  219.  */
  220.  
  221. #define DASD_VALIDATE_LIMIT_ON  0x00    /* Default--set if tree size < limit */
  222. #define DASD_VALIDATE_LIMIT_OFF 0x01    /* Set limit regardless of tree size */
  223.  
  224. #pragma pack()
  225. #endif /* NETDASD_INCLUDED */
  226.