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

  1. /******************************************************************************
  2.  
  3.   $Workfile:   nwnamspc.h  $
  4.   $Revision:   1.12  $
  5.   $Modtime::   08 May 1995 16:30:46                        $
  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 ( NWNAMSPC_H )
  21. #define NWNAMSPC_H
  22.  
  23. #if ! defined ( NWCALDEF_H )
  24. # include "nwcaldef.h"
  25. #endif
  26.  
  27. #include "npackon.h"
  28.  
  29. #ifdef __cplusplus
  30. extern "C" {
  31. #endif
  32.  
  33. #ifndef SUCCESSFUL
  34. #define SUCCESSFUL                0
  35. #endif
  36.  
  37. #define MORE_NS_TO_READ           0
  38. #define NO_EXTENDED_NS_INFO       9
  39. #define NS_EOF                    0x8910
  40.  
  41. #define NW_NS_DOS     0
  42. #define NW_NS_MAC     1
  43. #define NW_NS_NFS     2
  44. #define NW_NS_FTAM    3
  45. #define NW_NS_OS2     4
  46.  
  47. #define NW_DS_DOS     0
  48. #define NW_DS_MAC     1
  49. #define NW_DS_FTAM    2
  50.  
  51. typedef struct
  52. {
  53.   nuint8  volNumber;
  54.   nuint8  srcNameSpace;
  55.   nuint32 srcDirBase;
  56.   nuint8  dstNameSpace;
  57.   nuint32 dstDirBase;
  58. } NW_IDX;
  59.  
  60. typedef struct
  61. {
  62.   nuint32 NSInfoBitMask;
  63.   nuint32 fixedBitMask;
  64.   nuint32 reservedBitMask;
  65.   nuint32 extendedBitMask;
  66.   nuint16 fixedBitsDefined;
  67.   nuint16 reservedBitsDefined;
  68.   nuint16 extendedBitsDefined;
  69.   nuint32 fieldsLenTable[32];
  70.   nuint8  hugeStateInfo[16];
  71.   nuint32 hugeDataLength;
  72. } NW_NS_INFO;
  73.  
  74. typedef struct
  75. {
  76.   nuint32 spaceAlloc;
  77.   nuint32 attributes;
  78.   nuint16 flags;
  79.   nuint32 dataStreamSize;
  80.   nuint32 totalStreamSize;
  81.   nuint16 numberOfStreams;
  82.   nuint16 creationTime;
  83.   nuint16 creationDate;
  84.   nuint32 creatorID;
  85.   nuint16 modifyTime;
  86.   nuint16 modifyDate;
  87.   nuint32 modifierID;
  88.   nuint16 lastAccessDate;
  89.   nuint16 archiveTime;
  90.   nuint16 archiveDate;
  91.   nuint32 archiverID;
  92.   nuint16 inheritedRightsMask;
  93.   nuint32 dirEntNum;
  94.   nuint32 DosDirNum;
  95.   nuint32 volNumber;
  96.   nuint32 EADataSize;
  97.   nuint32 EAKeyCount;
  98.   nuint32 EAKeySize;
  99.   nuint32 NSCreator;
  100.   nuint8  nameLength;
  101.   nstr8   entryName[256];
  102. } NW_ENTRY_INFO;
  103.  
  104. typedef struct _MODIFY_DOS_INFO
  105. {
  106.   nuint32   attributes;
  107.   nuint16   createDate;
  108.   nuint16   createTime;
  109.   nuint32   creatorID;
  110.   nuint16   modifyDate;
  111.   nuint16   modifyTime;
  112.   nuint32   modifierID;
  113.   nuint16   archiveDate;
  114.   nuint16   archiveTime;
  115.   nuint32   archiverID;
  116.   nuint16   lastAccessDate;
  117.   nuint16   inheritanceGrantMask;
  118.   nuint16   inheritanceRevokeMask;
  119.   nuint32   maximumSpace;
  120. } MODIFY_DOS_INFO;
  121.  
  122. typedef struct
  123. {
  124.   nuint8  volNumber;
  125.   nuint32 dirNumber;
  126.   nuint32 searchDirNumber;
  127. } SEARCH_SEQUENCE;
  128.  
  129. typedef struct
  130. {
  131.   pnstr8  srcPath;
  132.   pnstr8  dstPath;
  133.   nuint16 dstPathSize;
  134. } NW_NS_PATH;
  135.  
  136. typedef struct
  137. {
  138.   nuint8  openCreateMode;
  139.   nuint16 searchAttributes;
  140.   nuint32 reserved;
  141.   nuint32 createAttributes;
  142.   nuint16 accessRights;
  143.   nuint32 NetWareHandle;
  144.   nuint8  openCreateAction;
  145. } NW_NS_OPENCREATE, NW_NS_OPEN;
  146.  
  147.  
  148. /* open/create modes */
  149. #define OC_MODE_OPEN      0x01
  150. #define OC_MODE_TRUNCATE  0x02
  151. #define OC_MODE_REPLACE   0x02
  152. #define OC_MODE_CREATE    0x08
  153.  
  154. /* open/create results */
  155. #define OC_ACTION_NONE     0x00
  156. #define OC_ACTION_OPEN     0x01
  157. #define OC_ACTION_CREATE   0x02
  158. #define OC_ACTION_TRUNCATE 0x04
  159. #define OC_ACTION_REPLACE  0x04
  160.  
  161. /* return info mask */
  162. #define IM_NAME               0x0001L
  163. #define IM_ENTRY_NAME         0x0001L
  164. #define IM_SPACE_ALLOCATED    0x0002L
  165. #define IM_ATTRIBUTES         0x0004L
  166. #define IM_SIZE               0x0008L
  167. #define IM_TOTAL_SIZE         0x0010L
  168. #define IM_EA                 0x0020L
  169. #define IM_ARCHIVE            0x0040L
  170. #define IM_MODIFY             0x0080L
  171. #define IM_CREATION           0x0100L
  172. #define IM_OWNING_NAMESPACE   0x0200L
  173. #define IM_DIRECTORY          0x0400L
  174. #define IM_RIGHTS             0x0800L
  175. #define IM_ALMOST_ALL         0x0FEDL
  176. #define IM_ALL                0x0FFFL
  177. #define IM_REFERENCE_ID       0x1000L
  178. #define IM_NS_ATTRIBUTES      0x2000L
  179. #define IM_DATASTREAM_SIZES   0x4000L
  180. #define IM_COMPRESSED_INFO    0x80000000L
  181. #define IM_NS_SPECIFIC_INFO   0x80000000L
  182.  
  183. /* access rights attributes */
  184. #ifndef AR_READ_ONLY
  185. #define AR_READ            0x0001
  186. #define AR_WRITE           0x0002
  187. #define AR_READ_ONLY       0x0001
  188. #define AR_WRITE_ONLY      0x0002
  189. #define AR_DENY_READ       0x0004
  190. #define AR_DENY_WRITE      0x0008
  191. #define AR_COMPATIBILITY   0x0010
  192. #define AR_WRITE_THROUGH   0x0040
  193. #define AR_OPEN_COMPRESSED 0x0100
  194. #endif
  195.  
  196. /* Trustee Access Rights in a network directory */
  197. /* NOTE: TA_OPEN is obsolete in 3.x */
  198. #ifndef TA_NONE
  199. #define TA_NONE       0x00
  200. #define TA_READ       0x01
  201. #define TA_WRITE      0x02
  202. #define TA_OPEN       0x04
  203. #define TA_CREATE     0x08
  204. #define TA_DELETE     0x10
  205. #define TA_OWNERSHIP  0x20
  206. #define TA_SEARCH     0x40
  207. #define TA_MODIFY     0x80
  208. #define TA_ALL        0xFB
  209. #endif
  210.  
  211. /* search attributes */
  212. #ifndef SA_HIDDEN
  213. #define SA_NORMAL         0x0000
  214. #define SA_HIDDEN         0x0002
  215. #define SA_SYSTEM         0x0004
  216. #define SA_SUBDIR_ONLY    0x0010
  217. #define SA_SUBDIR_FILES   0x8000
  218. #define SA_ALL            0x8006
  219. #endif
  220.  
  221. #define NW_TYPE_FILE      0x8000
  222. #define NW_TYPE_SUBDIR    0x0010
  223.  
  224. #define NW_NAME_CONVERT     0x03
  225. #define NW_NO_NAME_CONVERT  0x04
  226.  
  227. /* modify mask - use with MODIFY_DOS_INFO structure */
  228. #define DM_ATTRIBUTES             0x0002L
  229. #define DM_CREATE_DATE            0x0004L
  230. #define DM_CREATE_TIME            0x0008L
  231. #define DM_CREATOR_ID             0x0010L
  232. #define DM_ARCHIVE_DATE           0x0020L
  233. #define DM_ARCHIVE_TIME           0x0040L
  234. #define DM_ARCHIVER_ID            0x0080L
  235. #define DM_MODIFY_DATE            0x0100L
  236. #define DM_MODIFY_TIME            0x0200L
  237. #define DM_MODIFIER_ID            0x0400L
  238. #define DM_LAST_ACCESS_DATE       0x0800L
  239. #define DM_INHERITED_RIGHTS_MASK  0x1000L
  240. #define DM_MAXIMUM_SPACE          0x2000L
  241.  
  242. NWCCODE N_API NWGetDirectoryBase
  243. (
  244.    NWCONN_HANDLE  conn,
  245.    nuint8         dirHandle,
  246.    pnstr8         path,
  247.    nuint8         dstNamSpc,
  248.    NW_IDX N_FAR *   idxStruct
  249. );
  250.  
  251. NWCCODE N_API NWScanNSEntryInfo
  252. (
  253.    NWCONN_HANDLE        conn,
  254.    nuint8               dirHandle,
  255.    nuint8               namSpc,
  256.    nuint16              attrs,
  257.    SEARCH_SEQUENCE N_FAR * sequence,
  258.    pnstr8               searchPattern,
  259.    nuint32              retInfoMask,
  260.    NW_ENTRY_INFO N_FAR *  entryInfo
  261. );
  262.  
  263. NWCCODE N_API NWGetNSLoadedList
  264. (
  265.    NWCONN_HANDLE  conn,
  266.    nuint8         volNum,
  267.    nuint8         maxListLen,
  268.    pnuint8        NSLoadedList,
  269.    pnuint8        actualListLen
  270. );
  271.  
  272. NWCCODE N_API NWGetOwningNameSpace
  273. (
  274.    NWCONN_HANDLE  conn,
  275.    nuint8         dirHandle,
  276.    pnstr8         path,
  277.    pnuint8        namSpc
  278. );
  279.  
  280. NWCCODE N_API NWOpenCreateNSEntry
  281. (
  282.    NWCONN_HANDLE           conn,
  283.    nuint8                  dirHandle,
  284.    nuint8                  namSpc,
  285.    pnstr8                  path,
  286.    NW_NS_OPENCREATE N_FAR *  NSOpenCreate,
  287.    NWFILE_HANDLE N_FAR *     fileHandle
  288. );
  289.  
  290. NWCCODE N_API NWOpenNSEntry
  291. (
  292.    NWCONN_HANDLE  conn,
  293.    nuint8         dirHandle,
  294.    nuint8         namSpc,
  295.    nuint8         dataStream,
  296.    pnstr8         path,
  297.    NW_NS_OPEN N_FAR * NSOpen,
  298.    NWFILE_HANDLE N_FAR * fileHandle
  299. );
  300.  
  301. NWCCODE N_API NWSetLongName
  302. (
  303.    NWCONN_HANDLE  conn,
  304.    nuint8         dirHandle,
  305.    nuint8         namSpc,
  306.    pnstr8         dstPath,
  307.    nuint16        dstType,
  308.    pnstr8         longName
  309. );
  310.  
  311. NWCCODE N_API NWGetLongName
  312. (
  313.    NWCONN_HANDLE  conn,
  314.    nuint8         dirHandle,
  315.    pnstr8         path,
  316.    nuint8         srcNamSpc,
  317.    nuint8         dstNamSpc,
  318.    pnstr8         longName
  319. );
  320.  
  321. NWCCODE N_API NWGetNSInfo
  322. (
  323.    NWCONN_HANDLE    conn,
  324.    NW_IDX N_FAR *   idxStruct,
  325.    NW_NS_INFO N_FAR *NSInfo
  326. );
  327.  
  328. NWCCODE N_API NWWriteNSInfo
  329. (
  330.    NWCONN_HANDLE     conn,
  331.    NW_IDX N_FAR *    idxStruct,
  332.    NW_NS_INFO N_FAR  *NSInfo,
  333.    pnuint8           data
  334. );
  335.  
  336. NWCCODE N_API NWWriteExtendedNSInfo
  337. (
  338.    NWCONN_HANDLE     conn,
  339.    NW_IDX     N_FAR  *idxStruct,
  340.    NW_NS_INFO N_FAR  *NSInfo,
  341.    pnuint8           data
  342. );
  343.  
  344. NWCCODE N_API NWReadNSInfo
  345. (
  346.    NWCONN_HANDLE     conn,
  347.    NW_IDX N_FAR *    idxStruct,
  348.    NW_NS_INFO  N_FAR *NSInfo,
  349.    pnuint8           data
  350. );
  351.  
  352. NWCCODE N_API NWReadExtendedNSInfo
  353. (
  354.    NWCONN_HANDLE     conn,
  355.    NW_IDX N_FAR *    idxStruct,
  356.    NW_NS_INFO  N_FAR *NSInfo,
  357.    pnuint8           data
  358. );
  359.  
  360. NWCCODE N_API NWGetNSPath
  361. (
  362.    NWCONN_HANDLE  conn,
  363.    nuint8         dirHandle,
  364.    nuint16        fileFlag,
  365.    nuint8         srcNamSpc,
  366.    nuint8         dstNamSpc,
  367.    NW_NS_PATH N_FAR *NSPath
  368. );
  369.  
  370. NWCCODE N_API NWAllocTempNSDirHandle
  371. (
  372.    NWCONN_HANDLE  conn,
  373.    nuint8         dirHandle,
  374.    pnstr8         path,
  375.    nuint8         namSpc,
  376.    nuint8 N_FAR * newDirHandle
  377. );
  378.  
  379. NWCCODE N_API NWAllocTempNSDirHandle2
  380. (
  381.    NWCONN_HANDLE  conn,
  382.    nuint8         dirHandle,
  383.    pnstr8         path,
  384.    nuint8         namSpc,
  385.    pnuint8        newDirHandle,
  386.    nuint8         newNamSpc
  387. );
  388.  
  389. NWCCODE N_API NWGetNSEntryInfo
  390. (
  391.    NWCONN_HANDLE  conn,
  392.    nuint8         dirHandle,
  393.    pnstr8         path,
  394.    nuint8         srcNamSpc,
  395.    nuint8         dstNamSpc,
  396.    nuint16        searchAttrs,
  397.    nuint32        retInfoMask,
  398.    NW_ENTRY_INFO N_FAR * entryInfo
  399. );
  400.  
  401. NWCCODE N_API NWNSGetMiscInfo
  402. (
  403.    NWCONN_HANDLE  conn,
  404.    nuint8         dirHandle,
  405.    pnstr8         path,
  406.    nuint8         dstNameSpace,
  407.    NW_IDX N_FAR * idxStruct
  408. );
  409.  
  410. NWCCODE N_API NWOpenDataStream
  411. (
  412.   NWCONN_HANDLE   conn,
  413.   nuint8          dirHandle,
  414.   pnstr8          fileName,
  415.   nuint16         dataStream,
  416.   nuint16         attrs,
  417.   nuint16         accessMode,
  418.   pnuint32        NWHandle,
  419.   NWFILE_HANDLE N_FAR * fileHandle
  420. );
  421.  
  422. NWCCODE N_API NWNSRename
  423. (
  424.    NWCONN_HANDLE  conn,
  425.    nuint8         dirHandle,
  426.    nuint8         namSpc,
  427.    pnstr8         oldName,
  428.    nuint16        oldType,
  429.    pnstr8         newName,
  430.    nuint8         renameFlag
  431. );
  432.  
  433. NWCCODE N_API NWSetNSEntryDOSInfo
  434. (
  435.    NWCONN_HANDLE  conn,
  436.    nuint8         dirHandle,
  437.    pnstr8         path,
  438.    nuint8         namSpc,
  439.    nuint16        searchAttrs,
  440.    nuint32        modifyDOSMask,
  441.    MODIFY_DOS_INFO N_FAR * dosInfo
  442. );
  443.  
  444. NWCCODE N_API NWGetFullPath
  445. (
  446.    NWCONN_HANDLE  conn,
  447.    nuint8         volNum,
  448.    nuint32        dirBase,
  449.    nuint16        handleFlag,
  450.    nint           srcNamSpc,
  451.    nint           dstNamSpc,
  452.    nuint16        maxPathLen,
  453.    pnstr8         path,
  454.    pnuint16       pathType
  455. );
  456.  
  457. NWCCODE N_API NWDeleteNSEntry
  458. (
  459.    NWCONN_HANDLE  conn,
  460.    NWDIR_HANDLE   dirHandle,
  461.    pnstr8         fileName,
  462.    nuint8         nameSpace,
  463.    nuint16        searchAttr
  464. );
  465.  
  466. #ifdef NWDOS
  467. #define __NWGetCurNS(a, b, c) NW_NS_DOS
  468. #else
  469. nuint16 N_API __NWGetCurNS
  470. (
  471.    NWCONN_HANDLE  conn,
  472.    nuint8         dirHandle,
  473.    pnstr8         path
  474. );
  475. #endif
  476.  
  477. #ifdef __cplusplus
  478. }
  479. #endif
  480.  
  481. #include "npackoff.h"
  482. #endif
  483.