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

  1. /******************************************************************************
  2.  
  3.   $Workfile:   nwafp.h  $
  4.   $Revision:   1.14  $
  5.   $Modtime::   08 May 1995 16:31:42                        $
  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 ( NWAFP_H )
  21. #define NWAFP_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. /** This is the structure that the application expects to see. Note that the
  34.     long name and short name will be null terminated, and one extra byte has
  35.     been added to long name and short name to assure word alignment **/
  36.  
  37. typedef struct
  38. {
  39.    nuint32  entryID;
  40.    nuint32  parentID;
  41.    nuint16  attributes;
  42.    nuint32  dataForkLength;
  43.    nuint32  resourceForkLength;
  44.    nuint16  numOffspring;
  45.    nuint16  creationDate;
  46.    nuint16  accessDate;
  47.    nuint16  modifyDate;
  48.    nuint16  modifyTime;
  49.    nuint16  backupDate;
  50.    nuint16  backupTime;
  51.    nuint8   finderInfo[32];
  52.    nstr8    longName[34];
  53.    nuint32  ownerID;
  54.    nstr8    shortName[14];
  55.    nuint16  accessPrivileges;
  56.    nuint8   proDOSInfo[6];
  57. } AFPFILEINFO, NW_AFP_FILE_INFO;
  58.  
  59. /** This is the structure that is actually returned from the NCP call **/
  60.  
  61. typedef struct
  62. {
  63.    nuint32  entryID;
  64.    nuint32  parentID;
  65.    nuint16  attributes;
  66.    nuint32  dataForkLength;
  67.    nuint32  resourceForkLength;
  68.    nuint16  numOffspring;
  69.    nuint16  creationDate;
  70.    nuint16  accessDate;
  71.    nuint16  modifyDate;
  72.    nuint16  modifyTime;
  73.    nuint16  backupDate;
  74.    nuint16  backupTime;
  75.    nuint8   finderInfo[32];
  76.    nstr8    longName[32];
  77.    nuint32  ownerID;
  78.    nstr8    shortName[12];
  79.    nuint16  accessPrivileges;
  80.    nuint8   proDOSInfo[6];
  81. } RECPKT_AFPFILEINFO;
  82.  
  83. typedef struct
  84. {
  85.    nuint16  attributes;
  86.    nuint16  creationDate;
  87.    nuint16  accessDate;
  88.    nuint16  modifyDate;
  89.    nuint16  modifyTime;
  90.    nuint16  backupDate;
  91.    nuint16  backupTime;
  92.    nuint8   finderInfo[32];
  93.    nuint8   proDOSInfo[6];
  94. } AFPSETINFO, NW_AFP_SET_INFO;
  95.  
  96.  
  97. /* the following are the constants that can be used for requestMasks
  98.    in NWAFPScanFileInformation and NWAFPGetFileInformation.
  99. */
  100. #ifndef AFP_GET_ATTRIBUTES
  101. #define AFP_GET_ATTRIBUTES       0x0001
  102. #define AFP_GET_PARENT_ID        0x0002
  103. #define AFP_GET_CREATE_DATE      0x0004
  104. #define AFP_GET_ACCESS_DATE      0x0008
  105. #define AFP_GET_MODIFY_DATETIME  0x0010
  106. #define AFP_GET_BACKUP_DATETIME  0x0020
  107. #define AFP_GET_FINDER_INFO      0x0040
  108. #define AFP_GET_LONG_NAME        0x0080
  109. #define AFP_GET_ENTRY_ID         0x0100
  110. #define AFP_GET_DATA_LEN         0x0200
  111. #define AFP_GET_RESOURCE_LEN     0x0400
  112. #define AFP_GET_NUM_OFFSPRING    0x0800
  113. #define AFP_GET_OWNER_ID         0x1000
  114. #define AFP_GET_SHORT_NAME       0x2000
  115. #define AFP_GET_ACCESS_RIGHTS    0x4000
  116. #define AFP_GET_PRO_DOS_INFO     0x8000
  117. #define AFP_GET_ALL              0xffff
  118. #endif
  119.  
  120. /*
  121.   The following constants are used for NWAFPSetFileInformation
  122. */
  123. #ifndef AFP_SET_ATTRIBUTES
  124. #define AFP_SET_ATTRIBUTES       0x0001
  125. #define AFP_SET_CREATE_DATE      0x0004
  126. #define AFP_SET_ACCESS_DATE      0x0008
  127. #define AFP_SET_MODIFY_DATETIME  0x0010
  128. #define AFP_SET_BACKUP_DATETIME  0x0020
  129. #define AFP_SET_FINDER_INFO      0x0040
  130. #define AFP_SET_PRO_DOS_INFO     0x8000
  131. #endif
  132.  
  133. #ifndef AFP_SA_HIDDEN
  134. #define AFP_SA_NORMAL        0x0000
  135. #define AFP_SA_HIDDEN        0x0100
  136. #define AFP_SA_SYSTEM        0x0200
  137. #define AFP_SA_SUBDIR        0x0400
  138. #define AFP_SA_FILES         0x0800
  139. #define AFP_SA_ALL           0x0F00
  140. #endif
  141.  
  142. NWCCODE N_API NWAFPAllocTemporaryDirHandle
  143. (
  144.    NWCONN_HANDLE  conn,
  145.    nuint16        volNum,
  146.    nuint32        AFPEntryID,
  147.    pnstr8         AFPPathString,
  148.    NWDIR_HANDLE N_FAR * dirHandle,
  149.    pnuint8        accessRights
  150. );
  151.  
  152. NWCCODE N_API NWAFPCreateDirectory
  153. (
  154.    NWCONN_HANDLE  conn,
  155.    nuint16        volNum,
  156.    nuint32        AFPEntryID,
  157.    pnuint8        finderInfo,
  158.    pnstr8         AFPPathString,
  159.    pnuint32       newAFPEntryID
  160. );
  161.  
  162. NWCCODE N_API NWAFPCreateFile
  163. (
  164.    NWCONN_HANDLE  conn,
  165.    nuint16        volNum,
  166.    nuint32        AFPEntryID,
  167.    nuint8         delExistingFile,
  168.    pnuint8        finderInfo,
  169.    pnstr8         AFPPathString,
  170.    pnuint32       newAFPEntryID
  171. );
  172.  
  173. NWCCODE N_API NWAFPDelete
  174. (
  175.    NWCONN_HANDLE  conn,
  176.    nuint16        volNum,
  177.    nuint32        AFPEntryID,
  178.    pnstr8         AFPPathString
  179. );
  180.  
  181. NWCCODE N_API NWAFPGetEntryIDFromName
  182. (
  183.    NWCONN_HANDLE  conn,
  184.    nuint16        volNum,
  185.    nuint32        AFPEntryID,
  186.    pnstr8         AFPPathString,
  187.    pnuint32       newAFPEntryID
  188. );
  189.  
  190. NWCCODE N_API NWAFPGetEntryIDFromHandle
  191. (
  192.    NWCONN_HANDLE  conn,
  193.    pnuint8        NWHandle,
  194.    pnuint16       volNum,
  195.    pnuint32       AFPEntryID,
  196.    pnuint8        forkIndicator
  197. );
  198.  
  199. NWCCODE N_API NWAFPGetEntryIDFromPathName
  200. (
  201.    NWCONN_HANDLE  conn,
  202.    NWDIR_HANDLE   dirHandle,
  203.    pnstr8         path,
  204.    pnuint32       AFPEntryID
  205. );
  206.  
  207. NWCCODE N_API NWAFPGetFileInformation
  208. (
  209.    NWCONN_HANDLE  conn,
  210.    nuint16        volNum,
  211.    nuint32        AFPEntryID,
  212.    nuint16        reqMask,
  213.    pnstr8         AFPPathString,
  214.    nuint16        structSize,
  215.    NW_AFP_FILE_INFO N_FAR * AFPFileInfo
  216. );
  217.  
  218. NWCCODE N_API NWAFPDirectoryEntry
  219. (
  220.    NWCONN_HANDLE  conn,
  221.    NWDIR_HANDLE   dirHandle,
  222.    pnstr8         path
  223. );
  224.  
  225. NWCCODE N_API NWAFPOpenFileFork
  226. (
  227.    NWCONN_HANDLE  conn,
  228.    nuint16        volNum,
  229.    nuint32        AFPEntryID,
  230.    nuint8         forkIndicator,
  231.    nuint8         accessMode,
  232.    pnstr8         AFPPathString,
  233.    pnuint32       fileID,
  234.    pnuint32       forkLength,
  235.    pnuint8        NWHandle,
  236.    NWFILE_HANDLE N_FAR * DOSFileHandle
  237. );
  238.  
  239. NWCCODE N_API NWAFPRename
  240. (
  241.    NWCONN_HANDLE  conn,
  242.    nuint16        volNum,
  243.    nuint32        AFPSourceEntryID,
  244.    nuint32        AFPDestEntryID,
  245.    pnstr8         AFPSrcPath,
  246.    pnstr8         AFPDstPath
  247. );
  248.  
  249. NWCCODE N_API NWAFPScanFileInformation
  250. (
  251.    NWCONN_HANDLE  conn,
  252.    nuint16        volNum,
  253.    nuint32        AFPEntryID,
  254.    pnuint32       AFPLastSeenID,
  255.    nuint16        searchMask,
  256.    nuint16        reqMask,
  257.    pnstr8         AFPPathString,
  258.    nuint16        structSize,
  259.    NW_AFP_FILE_INFO N_FAR * AFPFileInfo
  260. );
  261.  
  262. NWCCODE N_API NWAFPSetFileInformation
  263. (
  264.    NWCONN_HANDLE  conn,
  265.    nuint16        volNum,
  266.    nuint32        AFPBaseID,
  267.    nuint16        reqMask,
  268.    pnstr8         AFPPathString,
  269.    nuint16        structSize,
  270.    NW_AFP_SET_INFO N_FAR * AFPSetInfo
  271. );
  272.  
  273. NWCCODE N_API NWAFPSupported
  274. (
  275.    NWCONN_HANDLE  conn,
  276.    nuint16        volNum
  277. );
  278.  
  279. NWCCODE N_API NWAFPASCIIZToLenStr
  280. (
  281.    pnstr8 pbstrDstStr,
  282.    pnstr8 pbstrSrcStr
  283. );
  284.  
  285.  
  286. #ifdef __cplusplus
  287. }
  288. #endif
  289.  
  290. #include "npackoff.h"
  291. #endif
  292.