home *** CD-ROM | disk | FTP | other *** search
/ Network Support Encyclopedia 96-1 / novell-nsepro-1996-1-cd2.iso / download / netware / os232.exe / INCLUDE / NWDIRECT.H < prev    next >
C/C++ Source or Header  |  1995-05-09  |  8KB  |  331 lines

  1. /******************************************************************************
  2.  
  3.   $Workfile:   nwdirect.h  $
  4.   $Revision:   1.15  $
  5.   $Modtime::   08 May 1995 17:11:06                        $
  6.   $Copyright:
  7.  
  8.   Copyright (c) 1989-1995 Novell, Inc.  All Rights Reserved.                      
  9.  
  10.   THIS WORK IS  SUBJECT  TO  U.S.  AND  INTERNATIONAL  COPYRIGHT  LAWS  AND
  11.   TREATIES.   NO  PART  OF  THIS  WORK MAY BE  USED,  PRACTICED,  PERFORMED
  12.   COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED,  ABRIDGED, CONDENSED,
  13.   EXPANDED,  COLLECTED,  COMPILED,  LINKED,  RECAST, TRANSFORMED OR ADAPTED
  14.   WITHOUT THE PRIOR WRITTEN CONSENT OF NOVELL, INC. ANY USE OR EXPLOITATION
  15.   OF THIS WORK WITHOUT AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO
  16.   CRIMINAL AND CIVIL LIABILITY.$
  17.  
  18.  *****************************************************************************/
  19.  
  20. #if ! defined ( NWDIRECT_H )
  21. #define NWDIRECT_H
  22.  
  23. #if ! defined ( NTYPES_H )
  24. #include "ntypes.h"
  25. #endif
  26.  
  27. #if ! defined ( NWCALDEF_H )
  28. #include "nwcaldef.h"
  29. #endif
  30.  
  31. #include "npackon.h"
  32.  
  33. #ifdef __cplusplus
  34. extern "C" {
  35. #endif
  36.  
  37. typedef struct
  38. {
  39.    nuint32 totalBlocks;
  40.    nuint32 availableBlocks;
  41.  
  42.    nuint32 purgeableBlocks;       /* set to zero if a dirHandle is present */
  43.    nuint32 notYetPurgeableBlocks;/*....when the NWGetDIrSpaceInfo() is called */
  44.  
  45.    nuint32 totalDirEntries;
  46.    nuint32 availableDirEntries;
  47.    nuint32 reserved;
  48.    nuint8  sectorsPerBlock;
  49.    nuint8  volLen;
  50.    nuint8  volName[MAX_VOL_LEN];
  51. } DIR_SPACE_INFO;
  52.  
  53. /* Trustee Access Rights in a network directory */
  54. /* NOTE: TA_OPEN is obsolete in 3.x */
  55. #ifndef TA_NONE
  56. #define TA_NONE       0x00
  57. #define TA_READ       0x01
  58. #define TA_WRITE      0x02
  59. #define TA_OPEN       0x04
  60. #define TA_CREATE     0x08
  61. #define TA_DELETE     0x10
  62. #define TA_OWNERSHIP  0x20
  63. #define TA_SEARCH     0x40
  64. #define TA_MODIFY     0x80
  65. #define TA_ALL        0xFB
  66. #endif
  67.  
  68. typedef struct
  69. {
  70.    nuint32  objectID;
  71.    nuint16  objectRights;
  72. } TRUSTEE_INFO;
  73.  
  74. typedef struct
  75. {
  76.    nuint8 numEntries;
  77.    struct
  78.    {
  79.       nuint8  level;
  80.       nuint32 max;
  81.       nuint32 current;
  82.    } list[102];
  83. } NW_LIMIT_LIST;
  84.  
  85. NWCCODE N_API NWAddTrusteeToDirectory
  86. (
  87.    NWCONN_HANDLE  conn,
  88.    NWDIR_HANDLE   dirHandle,
  89.    pnstr8         path,
  90.    nuint32        trusteeID,
  91.    nuint8         rightsMask
  92. );
  93.  
  94. NWCCODE N_API NWDeleteTrusteeFromDirectory
  95. (
  96.    NWCONN_HANDLE  conn,
  97.    NWDIR_HANDLE   dirHandle,
  98.    pnstr8         path,
  99.    nuint32        objID
  100. );
  101.  
  102. NWCCODE N_API NWGetEffectiveDirectoryRights
  103. (
  104.    NWCONN_HANDLE  conn,
  105.    NWDIR_HANDLE   dirHandle,
  106.    pnstr8         path,
  107.    pnuint16       rightsMask
  108. );
  109.  
  110. NWCCODE N_API NWModifyMaximumRightsMask
  111. (
  112.    NWCONN_HANDLE  conn,
  113.    NWDIR_HANDLE   dirHandle,
  114.    pnstr8         path,
  115.    nuint8         revokeRightsMask,
  116.    nuint8         grantRightsMask
  117. );
  118.  
  119. NWCCODE N_API NWScanDirectoryForTrustees
  120. (
  121.    NWCONN_HANDLE  conn,
  122.    NWDIR_HANDLE   dirHandle,
  123.    pnstr8         searchPath,
  124.    pnuint16       iterHandle,
  125.    pnstr8         dirName,
  126.    pnuint32       dirDateTime,
  127.    pnuint32       ownerID,
  128.    pnuint32       trusteeIDs,
  129.    pnuint8        trusteeRights
  130. );
  131.  
  132. NWCCODE N_API NWScanDirectoryForTrustees2
  133. (
  134.    NWCONN_HANDLE  conn,
  135.    NWDIR_HANDLE   dirHandle,
  136.    pnstr8         searchPath,
  137.    pnuint32       iterHandle,
  138.    pnstr8         dirName,
  139.    pnuint32       dirDateTime,
  140.    pnuint32       ownerID,
  141.    TRUSTEE_INFO N_FAR * trusteeList
  142. );
  143.  
  144. #define NWScanDirectoryInformation(a, b, c, d, e, f, g, h) \
  145.         NWIntScanDirectoryInformation(a, b, c, d, e, f, g, h, 0)
  146.  
  147. NWCCODE N_API NWIntScanDirectoryInformation
  148. (
  149.    NWCONN_HANDLE  conn,
  150.    NWDIR_HANDLE   dirHandle,
  151.    pnstr8         searchPath,
  152.    pnuint16       iterHandle,
  153.    pnstr8         dirName,
  154.    pnuint32       dirDateTime,
  155.    pnuint32       ownerID,
  156.    pnuint8        rightsMask,
  157.    nuint16        augmentFlag
  158. );
  159.  
  160. #define NWScanDirectoryInformation2(a, b, c, d, e, f, g, h) \
  161.         NWIntScanDirectoryInformation2(a, b, c, d, e, f, g, h, 0)
  162.  
  163. NWCCODE N_API NWIntScanDirectoryInformation2
  164. (
  165.    NWCONN_HANDLE  conn,
  166.    NWDIR_HANDLE   dirHandle,
  167.    pnstr8         searchPath,
  168.    pnuint8        sequence,
  169.    pnstr8         dirName,
  170.    pnuint32       dirDateTime,
  171.    pnuint32       ownerID,
  172.    pnuint8        rightsMask,
  173.    nuint16        augmentFlag
  174. );
  175.  
  176. NWCCODE N_API NWSetDirectoryInformation
  177. (
  178.    NWCONN_HANDLE  conn,
  179.    NWDIR_HANDLE   dirHandle,
  180.    pnstr8         path,
  181.    nuint32        dirDateTime,
  182.    nuint32        ownerID,
  183.    nuint8         rightsMask
  184. );
  185.  
  186. NWCCODE N_API NWSaveDirectoryHandle
  187. (
  188.    NWCONN_HANDLE  conn,
  189.    NWDIR_HANDLE   dirHandle,
  190.    pnstr8         saveBuffer
  191. );
  192.  
  193.  
  194. NWCCODE N_API NWRestoreDirectoryHandle
  195. (
  196.    NWCONN_HANDLE  conn,
  197.    pnstr8         saveBuffer,
  198.    NWDIR_HANDLE N_FAR * newDirHandle,
  199.    pnuint8        rightsMask
  200. );
  201.  
  202. NWCCODE N_API NWAllocPermanentDirectoryHandle
  203. (
  204.    NWCONN_HANDLE  conn,
  205.    NWDIR_HANDLE   dirHandle,
  206.    pnstr8         dirPath,
  207.    NWDIR_HANDLE N_FAR * newDirHandle,
  208.    pnuint8        effectiveRights
  209. );
  210.  
  211. NWCCODE N_API NWAllocTemporaryDirectoryHandle
  212. (
  213.    NWCONN_HANDLE  conn,
  214.    NWDIR_HANDLE   dirHandle,
  215.    pnstr8         dirPath,
  216.    NWDIR_HANDLE N_FAR * newDirHandle,
  217.    pnuint8        rightsMask
  218. );
  219.  
  220. NWCCODE N_API NWDeallocateDirectoryHandle
  221. (
  222.    NWCONN_HANDLE  conn,
  223.    NWDIR_HANDLE   dirHandle
  224. );
  225.  
  226. NWCCODE N_API NWSetDirectoryHandlePath
  227. (
  228.    NWCONN_HANDLE  conn,
  229.    NWDIR_HANDLE   sourceDirHandle,
  230.    pnstr8         dirPath,
  231.    NWDIR_HANDLE   destDirHandle
  232. );
  233.  
  234. NWCCODE N_API NWGetDirectoryHandlePath
  235. (
  236.    NWCONN_HANDLE  conn,
  237.    NWDIR_HANDLE   dirHandle,
  238.    pnstr8         dirPath
  239. );
  240.  
  241. NWCCODE N_API NWCreateDirectory
  242. (
  243.    NWCONN_HANDLE  conn,
  244.    NWDIR_HANDLE   dirHandle,
  245.    pnstr8         dirPath,
  246.    nuint8         accessMask
  247. );
  248.  
  249. NWCCODE N_API NWDeleteDirectory
  250. (
  251.    NWCONN_HANDLE  conn,
  252.    NWDIR_HANDLE   dirHandle,
  253.    pnstr8         dirPath
  254. );
  255.  
  256. NWCCODE N_API NWRenameDirectory
  257. (
  258.    NWCONN_HANDLE  conn,
  259.    NWDIR_HANDLE   dirHandle,
  260.    pnstr8         oldName,
  261.    pnstr8         newName
  262. );
  263.  
  264. NWCCODE N_API NWSetDirSpaceLimit
  265. (
  266.    NWCONN_HANDLE  conn,
  267.    NWDIR_HANDLE   dirHandle,
  268.    nuint32        spaceLimit
  269. );
  270.  
  271. NWCCODE N_API NWGetDirSpaceLimitList
  272. (
  273.    NWCONN_HANDLE  conn,
  274.    NWDIR_HANDLE   dirHandle,
  275.    pnuint8        returnBuf
  276. );
  277.  
  278. NWCCODE N_API NWGetDirSpaceInfo
  279. (
  280.    NWCONN_HANDLE  conn,
  281.    NWDIR_HANDLE   dirHandle,
  282.    nuint16        volNum,
  283.    DIR_SPACE_INFO N_FAR * spaceInfo
  284. );
  285.  
  286. #ifndef TF_READ_ONLY
  287. #define TF_NORMAL          0x0000
  288. #define TF_READ_ONLY       0x0001L
  289. #define TF_HIDDEN          0x0002L
  290. #define TF_SYSTEM          0x0004L
  291. #define TF_EXECUTE_ONLY    0x0008L
  292.  
  293. #define TF_DIRECTORY       0x0010L
  294. #define TF_NEEDS_ARCHIVED  0x0020L
  295. #define TF_EXECUTE_CONFIRM 0X0040L
  296. #define TF_SHAREABLE       0x0080L
  297.  
  298. #define TF_LOW_SEARCH_BIT  0x0100L
  299. #define TF_MID_SEARCH_BIT  0x0200L
  300. #define TF_HI_SEARCH_BIT   0x0400L
  301. #define TF_PRIVATE         0x0800L
  302.  
  303. #define TF_TRANSACTIONAL   0x1000L
  304. #define TF_INDEXED         0x2000L
  305. #define TF_READ_AUDIT      0x4000L
  306. #define TF_WRITE_AUDIT     0x8000L
  307.  
  308. #define TF_PURGE           0x10000L
  309. #define TF_RENAME_INHIBIT  0x20000L
  310. #define TF_DELETE_INHIBIT  0x40000L
  311. #define TF_COPY_INHIBIT    0x80000L
  312. #define TF_AUDITING_BIT   0x00100000L
  313. #endif
  314.  
  315. /* DIRECTORY ATTRIBUTES */
  316.  
  317. #define TD_HIDDEN          TF_HIDDEN
  318. #define TD_SYSTEM          TF_SYSTEM
  319. #define TD_PURGE           TF_PURGE
  320. #define TD_PRIVATE         TF_PRIVATE
  321. #define TD_VISIBLE         TF_PRIVATE
  322. #define TD_RENAME_INHIBIT  TF_RENAME_INHIBIT
  323. #define TD_DELETE_INHIBIT  TF_DELETE_INHIBIT
  324.  
  325. #ifdef __cplusplus
  326. }
  327. #endif
  328.  
  329. #include "npackoff.h"
  330. #endif
  331.