home *** CD-ROM | disk | FTP | other *** search
/ Network Support Encyclopedia 96-1 / novell-nsepro-1996-1-cd2.iso / download / netware / os2hdr.exe / NWAFP.H < prev    next >
C/C++ Source or Header  |  1993-04-01  |  6KB  |  239 lines

  1. /*--------------------------------------------------------------------------
  2.      (C) Copyright Novell, Inc. 1991  All Rights Reserved.
  3.  
  4.  No part of this file may be duplicated, revised, translated, localized or
  5.  modified in any manner or compiled, linked, or uploaded or downloaded to or
  6.  from any computer system without the prior written consent of Novell, Inc.
  7. --------------------------------------------------------------------------*/
  8. #ifndef NWAFP_INC
  9. #define NWAFP_INC
  10.  
  11. #ifndef NWCALDEF_INC
  12. # include <nwcaldef.h>
  13. #endif
  14.  
  15. /** This is the structure that the application expects to see. Note that the
  16.     long name and short name will be null terminated, and one extra byte has
  17.     been added to long name and short name to assure word alignment **/
  18.  
  19. typedef struct
  20. {
  21.   DWORD entryID;
  22.   DWORD parentID;
  23.   WORD attributes;
  24.   DWORD dataForkLength;
  25.   DWORD resourceForkLength;
  26.   WORD numOffspring;
  27.   WORD creationDate;
  28.   WORD accessDate;
  29.   WORD modifyDate;
  30.   WORD modifyTime;
  31.   WORD backupDate;
  32.   WORD backupTime;
  33.   BYTE finderInfo[32];
  34.   char longName[34];
  35.   DWORD ownerID;
  36.   char shortName[14];
  37.   WORD accessPrivileges;
  38.   BYTE proDOSInfo[6];
  39. } AFPFILEINFO, NW_AFP_FILE_INFO;
  40.  
  41. /** This is the structure that is actually returned from the NCP call **/
  42.  
  43. typedef struct
  44. {
  45.   DWORD entryID;
  46.   DWORD parentID;
  47.   WORD attributes;
  48.   DWORD dataForkLength;
  49.   DWORD resourceForkLength;
  50.   WORD numOffspring;
  51.   WORD creationDate;
  52.   WORD accessDate;
  53.   WORD modifyDate;
  54.   WORD modifyTime;
  55.   WORD backupDate;
  56.   WORD backupTime;
  57.   BYTE finderInfo[32];
  58.   char longName[32];
  59.   DWORD ownerID;
  60.   char shortName[12];
  61.   WORD accessPrivileges;
  62.   BYTE proDOSInfo[6];
  63. } RECPKT_AFPFILEINFO;
  64.  
  65. typedef struct
  66. {
  67.   WORD attributes;
  68.   WORD creationDate;
  69.   WORD accessDate;
  70.   WORD modifyDate;
  71.   WORD modifyTime;
  72.   WORD backupDate;
  73.   WORD backupTime;
  74.   BYTE finderInfo[32];
  75.   BYTE proDOSInfo[6];
  76. } AFPSETINFO, NW_AFP_SET_INFO;
  77.  
  78.  
  79. /* the following are the constants that can be used for requestMasks
  80.    in NWAFPScanFileInformation and NWAFPGetFileInformation.
  81. */
  82. #ifndef AFP_GET_ATTRIBUTES
  83. #define AFP_GET_ATTRIBUTES       0x0001
  84. #define AFP_GET_PARENT_ID        0x0002
  85. #define AFP_GET_CREATE_DATE      0x0004
  86. #define AFP_GET_ACCESS_DATE      0x0008
  87. #define AFP_GET_MODIFY_DATETIME  0x0010
  88. #define AFP_GET_BACKUP_DATETIME  0x0020
  89. #define AFP_GET_FINDER_INFO      0x0040
  90. #define AFP_GET_LONG_NAME        0x0080
  91. #define AFP_GET_ENTRY_ID         0x0100
  92. #define AFP_GET_DATA_LEN         0x0200
  93. #define AFP_GET_RESOURCE_LEN     0x0400
  94. #define AFP_GET_NUM_OFFSPRING    0x0800
  95. #define AFP_GET_OWNER_ID         0x1000
  96. #define AFP_GET_SHORT_NAME       0x2000
  97. #define AFP_GET_ACCESS_RIGHTS    0x4000
  98. #define AFP_GET_PRO_DOS_INFO     0x8000
  99. #define AFP_GET_ALL              0xffff
  100. #endif
  101.  
  102. /*
  103.   The following constants are used for NWAFPSetFileInformation
  104. */
  105. #ifndef AFP_SET_ATTRIBUTES
  106. #define AFP_SET_ATTRIBUTES       0x0001
  107. #define AFP_SET_CREATE_DATE      0x0004
  108. #define AFP_SET_ACCESS_DATE      0x0008
  109. #define AFP_SET_MODIFY_DATETIME  0x0010
  110. #define AFP_SET_BACKUP_DATETIME  0x0020
  111. #define AFP_SET_FINDER_INFO      0x0040
  112. #define AFP_SET_PRO_DOS_INFO     0x8000
  113. #endif
  114.  
  115. #ifndef AFP_SA_HIDDEN
  116. #define AFP_SA_NORMAL        0x0000
  117. #define AFP_SA_HIDDEN        0x0100
  118. #define AFP_SA_SYSTEM        0x0200
  119. #define AFP_SA_SUBDIR        0x0400
  120. #define AFP_SA_FILES         0x0800
  121. #define AFP_SA_ALL           0x0F00
  122. #endif
  123.  
  124. #ifdef __cplusplus
  125. extern "C" {
  126. #endif
  127. NWCCODE NWAPI NWAFPAllocTemporaryDirHandle(
  128.   NWCONN_HANDLE conn,
  129.   WORD volNumber,
  130.   DWORD AFPEntryID,
  131.   char NWPTR AFPPathString,
  132.   NWDIR_HANDLE NWPTR dirHandle,
  133.   BYTE NWPTR accessRights);
  134.  
  135. NWCCODE NWAPI NWAFPCreateDirectory(
  136.   NWCONN_HANDLE conn,
  137.   WORD volNumber,
  138.   DWORD AFPEntryID,
  139.   BYTE NWPTR finderInfo,
  140.   char NWPTR AFPPathString,
  141.   DWORD NWPTR newAFPEntryID);
  142.  
  143. NWCCODE NWAPI NWAFPCreateFile(
  144.   NWCONN_HANDLE conn,
  145.   WORD volNumber,
  146.   DWORD AFPEntryID,
  147.   BYTE deleteExistingFile,
  148.   BYTE NWPTR finderInfo,
  149.   char NWPTR AFPPathString,
  150.   DWORD NWPTR newAFPEntryID);
  151.  
  152. NWCCODE NWAPI NWAFPDelete(
  153.   NWCONN_HANDLE conn,
  154.   WORD volNumber,
  155.   DWORD AFPEntryID,
  156.   char NWPTR AFPPathString);
  157.  
  158. NWCCODE NWAPI NWAFPGetEntryIDFromName(
  159.   NWCONN_HANDLE conn,
  160.   WORD volNumber,
  161.   DWORD AFPEntryID,
  162.   char NWPTR AFPPathString,
  163.   DWORD NWPTR newAFPEntryID);
  164.  
  165. NWCCODE NWAPI NWAFPGetEntryIDFromHandle(
  166.   NWCONN_HANDLE conn,
  167.   BYTE NWPTR NetWareHandle,
  168.   WORD NWPTR volNumber,
  169.   DWORD NWPTR AFPEntryID,
  170.   BYTE NWPTR forkIndicator);
  171.  
  172. NWCCODE NWAPI NWAFPGetEntryIDFromPathName(
  173.   NWCONN_HANDLE conn,
  174.   NWDIR_HANDLE dirHandle,
  175.   char NWPTR path,
  176.   DWORD NWPTR AFPEntryID);
  177.  
  178. NWCCODE NWAPI NWAFPGetFileInformation(
  179.   NWCONN_HANDLE conn,
  180.   WORD volNumber,
  181.   DWORD AFPEntryID,
  182.   WORD requestMask,
  183.   char NWPTR AFPPathString,
  184.   WORD structSize,
  185.   NW_AFP_FILE_INFO NWPTR AFPFileInfo);
  186.  
  187. NWCCODE NWAPI NWAFPDirectoryEntry(
  188.   NWCONN_HANDLE conn,
  189.   NWDIR_HANDLE dirHandle,
  190.   char NWPTR path);
  191.  
  192. NWCCODE NWAPI NWAFPOpenFileFork(
  193.   NWCONN_HANDLE conn,
  194.   WORD volNumber,
  195.   DWORD AFPEntryID,
  196.   BYTE forkIndicator,
  197.   BYTE accessMode,
  198.   char NWPTR AFPPathString,
  199.   DWORD NWPTR fileID,
  200.   DWORD NWPTR forkLength,
  201.   BYTE NWPTR NetWareHandle,
  202.   WORD NWPTR DOSFileHandle);
  203.  
  204. NWCCODE NWAPI NWAFPRename(
  205.   NWCONN_HANDLE conn,
  206.   WORD volNumber,
  207.   DWORD AFPSourceEntryID,
  208.   DWORD AFPDestEntryID,
  209.   char NWPTR AFPSourcePath,
  210.   char NWPTR AFPDestPath);
  211.  
  212. NWCCODE NWAPI NWAFPScanFileInformation(
  213.   NWCONN_HANDLE conn,
  214.   WORD volNumber,
  215.   DWORD AFPEntryID,
  216.   DWORD NWPTR AFPLastSeenID,
  217.   WORD searchMask,
  218.   WORD requestMask,
  219.   char NWPTR AFPPathString,
  220.   WORD structSize,
  221.   NW_AFP_FILE_INFO NWPTR AFPFileInfo);
  222.  
  223. NWCCODE NWAPI NWAFPSetFileInformation(
  224.   NWCONN_HANDLE conn,
  225.   WORD volNumber,
  226.   DWORD AFPBaseID,
  227.   WORD requestMask,
  228.   char NWPTR AFPPathString,
  229.   WORD structSize,
  230.   NW_AFP_SET_INFO NWPTR AFPSetInfo);
  231.  
  232. NWCCODE NWAPI NWAFPSupported(NWCONN_HANDLE conn, WORD volNumber);
  233.  
  234. #ifdef __cplusplus
  235. }
  236. #endif
  237.  
  238. #endif
  239.