/******************************************************************************

  %name: nwndscon.h %
  %version: 7 %
  %date_modified: Tue Jun  8 08:54:39 1999 %
  $Copyright:

  Copyright (c) 1989-1995 Novell, Inc.  All Rights Reserved.                      

  THIS WORK IS  SUBJECT  TO  U.S.  AND  INTERNATIONAL  COPYRIGHT  LAWS  AND
  TREATIES.   NO  PART  OF  THIS  WORK MAY BE  USED,  PRACTICED,  PERFORMED
  COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED,  ABRIDGED, CONDENSED,
  EXPANDED,  COLLECTED,  COMPILED,  LINKED,  RECAST, TRANSFORMED OR ADAPTED
  WITHOUT THE PRIOR WRITTEN CONSENT OF NOVELL, INC. ANY USE OR EXPLOITATION
  OF THIS WORK WITHOUT AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO
  CRIMINAL AND CIVIL LIABILITY.$

 *****************************************************************************/
#if ! defined ( NWNDSCON_H )
#define NWNDSCON_H

#if ! defined ( NTYPES_H )
#include "ntypes.h"
#endif

#if ! defined ( NWCALDEF_H )
#include "nwcaldef.h"
#endif

#define NWNDS_CONNECTION         0x0001
#define NWNDS_LICENSED           0x0002
#define NWNDS_AUTHENTICATED      0x0004
#define NWNDS_PACKET_BURST_AVAIL 0x0001
#define NWNDS_NEEDED_MAX_IO      0x0040
#define SYSTEM_LOCK              0x0
#define TASK_LOCK                0x4
#define SYSTEM_DISCONNECT        0x0
#define TASK_DISCONNECT          0x1

#define ALLREADY_ATTACHED        0x1
#define ATTACHED_NOT_AUTH        0X2
#define ATTACHED_AND_AUTH        0X4

#ifdef __cplusplus
   extern "C" {
#endif


N_EXTERN_LIBRARY (NWCCODE)
NWGetNearestDSConnRef
(
   pnuint32    connRef
);

N_EXTERN_LIBRARY (NWCCODE)
NWSetDefaultNameContext
(
   nuint16  contextLength,
   pnuint8  context
);

N_EXTERN_LIBRARY (NWCCODE)
NWGetDefaultNameContext
(
   nuint16  bufferSize,
   pnuint8  context
);

N_EXTERN_LIBRARY (NWCCODE)
NWSetPreferredDSTree
(
   nuint16  length,
   pnuint8  treeName
);

N_EXTERN_LIBRARY (NWCCODE)
NWGetNumConnections
(
   pnuint16 numConnections
);

N_EXTERN_LIBRARY (NWCCODE)
NWDSSetMonitoredConnection
(
   NWCONN_HANDLE  connHandle
);

N_EXTERN_LIBRARY (NWCCODE)
NWIsDSAuthenticated
(
   void
);

N_EXTERN_LIBRARY (NWCCODE)
NWDSUnlockConnection
(
   NWCONN_HANDLE connHandle
);

N_EXTERN_LIBRARY (NWCCODE)
NWGetPreferredConnName
(
   pnuint8  preferredName,
   pnuint8  preferredType
);

N_EXTERN_LIBRARY (NWCCODE)
NWFreeConnectionSlot
(
   NWCONN_HANDLE  connHandle,
   nuint8         disconnectType
);

/*
 * Library calls that have been set as obsolete. These
 * prototypes are scheduled to be removed in September 1999.
 */
N_EXTERN_LIBRARY (NWCCODE)
NWGetNearestDirectoryService
(
   NWCONN_HANDLE N_FAR  *connHandle
);

N_EXTERN_LIBRARY (NWCCODE)
NWGetConnectionIDFromAddress
(
   nuint8               transType,
   nuint32              transLen,
   pnuint8              transBuf,
   NWCONN_HANDLE N_FAR  *connHandle
);

N_EXTERN_LIBRARY (NWCCODE)
NWGetConnectionIDFromName
(
   nuint32              nameLen,
   pnuint8              name,
   NWCONN_HANDLE N_FAR  *connHandle
);

#ifdef __cplusplus
   }
#endif

#ifdef INCLUDE_OBSOLETE
# include "obsolete/o_ndscon.h"
#endif

#endif /* NWNDSCON_H */
