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

  1. /******************************************************************************
  2.  
  3.   $Workfile:   nwsync.h  $
  4.   $Revision:   1.12  $
  5.   $Modtime::   08 May 1995 16:35:56                        $
  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 ( NWSYNC_H )
  21. #define NWSYNC_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. typedef struct
  34. {
  35.   NWCONN_NUM connNumber;
  36.   nuint16 taskNumber;
  37.   nuint8  lockStatus;
  38. } LOGICAL_LOCK;
  39.  
  40. typedef struct
  41. {
  42.   nuint16 useCount;
  43.   nuint16 shareableLockCount;
  44.   nuint8  locked;
  45.   nuint16 nextRequest;
  46.   nuint16 numRecords;
  47.   LOGICAL_LOCK logicalLock[128];
  48.   nuint16 curRecord;
  49. } LOGICAL_LOCKS;
  50.  
  51. typedef struct
  52. {
  53.   nuint16 taskNumber;
  54.   nuint8  lockStatus;
  55.   nstr8   logicalName[128];
  56. } CONN_LOGICAL_LOCK;
  57.  
  58. typedef struct
  59. {
  60.   nuint16 nextRequest;
  61.   nuint16 numRecords;
  62.   nuint8  records[508];
  63.   nuint16 curOffset;
  64.   nuint16 curRecord;
  65. } CONN_LOGICAL_LOCKS;
  66.  
  67. typedef struct
  68. {
  69.   nuint16 loggedCount;
  70.   nuint16 shareableLockCount;
  71.   nuint32 recordStart;
  72.   nuint32 recordEnd;
  73.   nuint16 connNumber;
  74.   nuint16 taskNumber;
  75.   nuint8  lockType;
  76. } PHYSICAL_LOCK;
  77.  
  78. typedef struct
  79. {
  80.   nuint16 nextRequest;
  81.   nuint16 numRecords;
  82.   PHYSICAL_LOCK locks[32];
  83.   nuint16 curRecord;
  84.   nuint8  reserved[8];
  85. } PHYSICAL_LOCKS;
  86.  
  87. typedef struct
  88. {
  89.   nuint16 taskNumber;
  90.   nuint8  lockType;
  91.   nuint32 recordStart;
  92.   nuint32 recordEnd;
  93. } CONN_PHYSICAL_LOCK;
  94.  
  95. typedef struct
  96. {
  97.   nuint16 nextRequest;
  98.   nuint16 numRecords;
  99.   CONN_PHYSICAL_LOCK locks[51];
  100.   nuint16 curRecord;
  101.   nuint8  reserved[22];
  102. } CONN_PHYSICAL_LOCKS;
  103.  
  104. typedef struct
  105. {
  106.   NWCONN_NUM connNumber;
  107.   nuint16 taskNumber;
  108. } SEMAPHORE;
  109.  
  110. typedef struct
  111. {
  112.   nuint16 nextRequest;
  113.   nuint16 openCount;
  114.   nuint16 semaphoreValue;
  115.   nuint16 semaphoreCount;
  116.   SEMAPHORE semaphores[170];
  117.   nuint16 curRecord;
  118. } SEMAPHORES;
  119.  
  120. typedef struct
  121. {
  122.   nuint16 openCount;
  123.   nuint16 semaphoreValue;
  124.   nuint16 taskNumber;
  125.   nstr8   semaphoreName[128];
  126. } CONN_SEMAPHORE;
  127.  
  128. typedef struct
  129. {
  130.   nuint16 nextRequest;
  131.   nuint16 numRecords;
  132.   nuint8  records[508];
  133.   nuint16 curOffset;
  134.   nuint16 curRecord;
  135. } CONN_SEMAPHORES;
  136.  
  137.  
  138. NWCCODE N_API NWScanPhysicalLocksByFile
  139. (
  140.    NWCONN_HANDLE  conn,
  141.    NWDIR_HANDLE   dirHandle,
  142.    pnstr8         path,
  143.    nuint8         dataStream,
  144.    pnint16        iterHandle,
  145.    PHYSICAL_LOCK N_FAR * lock,
  146.    PHYSICAL_LOCKS N_FAR * locks
  147. );
  148.  
  149. NWCCODE N_API NWScanLogicalLocksByConn
  150. (
  151.    NWCONN_HANDLE  conn,
  152.    NWCONN_NUM     connNum,
  153.    pnint16        iterHandle,
  154.    CONN_LOGICAL_LOCK N_FAR * logicalLock,
  155.    CONN_LOGICAL_LOCKS N_FAR * logicalLocks
  156. );
  157.  
  158. NWCCODE N_API NWScanPhysicalLocksByConnFile
  159. (
  160.    NWCONN_HANDLE  conn,
  161.    NWCONN_NUM     connNum,
  162.    NWDIR_HANDLE   dirHandle,
  163.    pnstr8         path,
  164.    nuint8         dataStream,
  165.    pnint16        iterHandle,
  166.    CONN_PHYSICAL_LOCK N_FAR * lock,
  167.    CONN_PHYSICAL_LOCKS N_FAR * locks
  168. );
  169.  
  170. NWCCODE N_API NWScanLogicalLocksByName
  171. (
  172.    NWCONN_HANDLE  conn,
  173.    pnstr8         logicalName,
  174.    pnint16        iterHandle,
  175.    LOGICAL_LOCK N_FAR * logicalLock,
  176.    LOGICAL_LOCKS N_FAR * logicalLocks
  177. );
  178.  
  179. NWCCODE N_API NWScanSemaphoresByConn
  180. (
  181.    NWCONN_HANDLE  conn,
  182.    NWCONN_NUM     connNum,
  183.    pnint16        iterHandle,
  184.    CONN_SEMAPHORE N_FAR * semaphore,
  185.    CONN_SEMAPHORES N_FAR * semaphores
  186. );
  187.  
  188. NWCCODE N_API NWScanSemaphoresByName
  189. (
  190.    NWCONN_HANDLE  conn,
  191.    pnstr8         semName,
  192.    pnint16        iterHandle,
  193.    SEMAPHORE N_FAR * semaphore,
  194.    SEMAPHORES N_FAR * semaphores
  195. );
  196.  
  197. NWCCODE N_API NWSignalSemaphore
  198. (
  199.    NWCONN_HANDLE  conn,
  200.    nuint32        semHandle
  201. );
  202.  
  203. NWCCODE N_API NWCloseSemaphore
  204. (
  205.    NWCONN_HANDLE  conn,
  206.    nuint32        semHandle
  207. );
  208.  
  209. NWCCODE N_API NWOpenSemaphore
  210. (
  211.    NWCONN_HANDLE  conn,
  212.    pnstr8         semName,
  213.    nint16         initSemHandle,
  214.    pnuint32       semHandle,
  215.    pnuint16       semOpenCount
  216. );
  217.  
  218. NWCCODE N_API NWExamineSemaphore
  219. (
  220.    NWCONN_HANDLE  conn,
  221.    nuint32        semHandle,
  222.    pnint16        semValue,
  223.    pnuint16       semOpenCount
  224. );
  225.  
  226. NWCCODE N_API NWWaitOnSemaphore
  227. (
  228.    NWCONN_HANDLE  conn,
  229.    nuint32        semHandle,
  230.    nuint16        timeOutValue
  231. );
  232.  
  233. #ifdef __cplusplus
  234. }
  235. #endif
  236.  
  237. #include "npackoff.h"
  238. #endif
  239.