home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Network Support Encyclopedia 96-1
/
novell-nsepro-1996-1-cd2.iso
/
download
/
netware
/
opennv.exe
/
NVAPI.H
< prev
next >
Wrap
Text File
|
1992-11-04
|
7KB
|
228 lines
/*
** (C) Copyright 1992 Novell, Inc. All rights reserved.
**
** File Name: nvapi.h
**
** $Logfile: G:/cs/nma/vcs/nvapi.h_v $
** $Revision: 1.18 $
** $Date: 04 Nov 1992 17:41:40 $
** $Author: RWONG $
** $Log: G:/cs/nma/vcs/nvapi.h_v $
**
** Rev 1.18 04 Nov 1992 17:41:40 RWONG
** API calls use handles again.
**
** Rev 1.17 14 Oct 1992 13:53:50 JCHOU
** Added new error codes.
**
** Rev 1.16 13 Oct 1992 17:41:20 RWONG
** Remove NVERR_BAD_PARMLIST.
**
** Rev 1.15 13 Aug 1992 13:52:14 RWONG
** Remove unused fields.
**
** Rev 1.14 31 Jul 1992 10:12:18 JCHOU
** Added definition for NVERR_INVALID_APPL
**
** Rev 1.13 24 Jul 1992 14:42:12 RWONG
** Change MsgPtr to MsgData.
**
** Rev 1.12 14 Jul 1992 11:35:54 RWONG
** API function prototype change. NLM name instead of nlm handle.
**
** Rev 1.11 26 Jun 1992 16:03:20 RWONG
** Handle multiple line runcmd reply.
**
** Rev 1.10 16 Jun 1992 14:05:42 JCHOU
** Added error code for no host link error and no netview participation error
**
** Rev 1.9 08 Jun 1992 14:10:12 JCHOU
** Added two fields in NVNMVT_t, i.e. DGRId and PPSAMsId for runcmd support
**
** Rev 1.8 27 May 1992 14:01:18 JCHOU
** Added DGRId and reserved fields in the NVNMVT_t to fix the design fault. We
** want to keep track of the DGRId because there might be a case that the runcmd
** for 3rd party might come from different NetView host.
**
** Rev 1.7 13 May 1992 17:48:52 RWONG
**
** Rev 1.6 13 May 1992 15:11:42 RWONG
** Added request id to event structures.
**
** Rev 1.5 30 Apr 1992 10:53:06 RWONG
** Additional error code. Change field name.
**
** Rev 1.4 29 Apr 1992 15:53:52 RWONG
** Add additional fields for predefined alert runtime parameters.
**
** Rev 1.3 28 Apr 1992 10:45:58 RWONG
** Error code for duplicate APPL name.
**
** Rev 1.2 22 Apr 1992 10:28:46 RWONG
** Additional error codes. Comments.
**
** Rev 1.1 20 Apr 1992 15:17:16 RWONG
**
** Rev 1.0 17 Apr 1992 14:12:58 RWONG
** initial check in
**
*/
#ifndef _NVAPI_INCLUDED
#define _NVAPI_INCLUDED
#ifndef _NMVTDEF_INCLUDED
#include <nmvtdef.h>
#endif
/*
** Open NetView API error codes
*/
#define NV_SUCCESS (0x00000000)
#define NV_FAILURE (~NV_SUCCESS)
#define NVERR_NO_CALLBACK (0x00000001)
#define NVERR_MEM (0x00000002)
#define NVERR_INVALID_NLM (0x00000003)
#define NVERR_BAD_TYPE (0x00000004)
#define NVERR_NO_NVPATH (0x00000005)
#define NVERR_BAD_PARM (0x00000006)
#define NVERR_NO_TEXT (0x00000007)
#define NVERR_NO_PCAUSE (0x00000008)
#define NVERR_BAD_HRL (0x00000009)
#define NVERR_BAD_ARL (0x0000000A)
#define NVERR_NO_EVENTID (0x0000000B)
#define NVERR_BOTH_ARL_HRL (0x0000000D)
#define NVERR_NO_DBNAME (0x0000000E)
#define NVERR_NO_REGISTRATION (0x0000000F)
#define NVERR_INVALID_DB (0x00000010)
#define NVERR_NO_DB_REC (0x00000011)
#define NVERR_DUP_APPL (0x00000012)
#define NVERR_NO_HOSTLINK (0x00000013)
#define NVERR_NO_PARTICIPATION (0x00000014)
#define NVERR_INVALID_APPL (0x00000015)
#define NVERR_BAD_HRL_FLAG (0x00000016)
#define NVERR_BAD_DATA_TYPE (0x00000017)
/*
** For Novell internal use only
*/
#define NVERR_INVALID_CE_VER (0x000000F0)
/*
** Open NetView API function prototypes
*/
/* u32_t NWNVRegister (char *appl, u32_t nlm, void (*callback)()) */
u32_t NWNVRegister (char *, u32_t, void (*)());
/* u32_t NWNVDeregister (u32_t nlm) */
u32_t NWNVDeregister (u32_t);
/* u32_t NWNVSend (u32_t nlm, u32_t type, void *msgstruct) */
u32_t NWNVSend (u32_t, u32_t, void *);
/*
** NWNVSend() types
*/
#define NVTYPE_RUNCMD_RSP 0
#define NVTYPE_FORMATTED 1
#define NVTYPE_PREDEFINED 2
/*
** The following structures contain the input fields needed by the
** NWNVSend() routine. The structure used depends on the type of message
** being sent.
*/
typedef struct {
u8_t Flags; // Display option - see below
u8_t RsrcId; // A registered SNA resource type designation
u8_t Name[HRL_NAME_SZ]; // Resource name - null terminated
} NVHRL_t;
/*
** Display options:
**
** DISPLAY_RESOURCE - display on initial alert display
** NODISPLAY_RESOURCE - don't display on initial alert display
*/
typedef struct {
u8_t RsrcId; // A registered SNA resource type designation
u8_t Name[ARL_NAME_SZ]; // Resource name - null terminated
} NVARL_t;
/*
** This structure is used to define runtime parameters for predefined
** alerts.
*/
typedef struct {
u8_t SubvectorKey; // Subvector that this parameter belongs to
u8_t SubfieldKey; // Subfield that this parameter belongs to
u8_t DataId; // For Detailed Data Subfield 0x82
u8_t DataPosition; // If SubvectorKey, SubfieldKey and DataId are
// identical for a set of parameters, use this
// to sequentially number them e.g. 1, 2, 3...
// Otherwise, set to 1.
u8_t DataType; // OCTETSTRING or PRINTABLESTRING
u16_t ValueLen; // Length of the parameter
u8_t *Value;
} NVParm_t;
/*
** This structure is used for predefined alerts. Information to translate
** these events into an alert NMVT is predefined in a Btrieve database file and
** reference by the event prefix and suffix. EventPrefix (may be NULL) and
** EventSuffix are mandatory. Parameters are optional.
*/
typedef struct {
u32_t RequestId; // Identifies alert in case of processing error
char *EventPrefix; // Event identifier prefix
char *EventSuffix; // Event identifier suffix
u8_t ParameterCount; // Count of runtime parameters, may be 0
u8_t ARLCount; // Count of associated resource list entries
u8_t HRLCount; // Count of hierarchy resource list entries
u8_t reserved;
u8_t *DBName; // Name of Btrieve database file
NVARL_t *ARL; // First associated resource list entry
NVHRL_t *HRL; // First hierarchy resource list entry
NVParm_t *Parameters; // First runtime parameter
} NVPredefinedAlert_t;
/*
** This structure is used for fully formatted alert NMVTs, RunCMds passed as
** the second parameter to a 3rd party NLM's callback function, or RunCmd
** response NMVTs.
*/
typedef struct {
u16_t MsgLen; // Line length
u8_t *MsgData; // Text if RunCmd, otherwise NMVT data
} NVMsg_t;
typedef struct {
u32_t RequestId; // Identifies runcmd or alert
u32_t reserved; // for future enhancement */
u32_t MsgCount; // Number of lines
NVMsg_t Msg[1]; // First line
} NVNMVT_t;
/*
** This structure is returned to a third party NLM through its registered
** callback function if an error has occurred in the processing of an alert.
*/
typedef struct {
u32_t RequestId; // Identifies alert which had a processing error
u32_t Error; // Error code
} NVErrData_t;
#endif