/**************************************************************************/
/*                                                                        */
/*              IBM OS/2(tm) Local Area Network (LAN) Server              */
/*                            Version 3.0                                 */
/* (c) Copyright International Business Machines Corporation, 1988, 1992  */
/*                                                                        */
/**************************************************************************/

/********************************************************************
 *								    *
 *  About this file ...  MESSAGE.H				    *
 *								    *
 *  This file contains information about the NetMessage APIs.	    *
 *								    *
 *	Function prototypes.					    *
 *								    *
 *	Data structure templates.				    *
 *								    *
 *	Definition of special values.				    *
 *								    *
 *								    *
 *  NOTE:  You must include NETCONS.H before this file, since this  *
 *	   file	depends on values defined in NETCONS.H.		    *
 *								    *
 ********************************************************************/


#ifdef  INCL_32
#pragma pack(1)
#endif


#ifndef NETMESSAGE_INCLUDED

#define NETMESSAGE_INCLUDED


/****************************************************************
 *                                                              *
 *              Function prototypes                             *
 *                                                              *
 ****************************************************************/

extern API_FUNCTION
  NetMessageBufferSend ( const char LSFAR * pszServer,
                         char LSFAR *       pszRecipient,
                         char LSFAR *       pbBuffer,
                         unsigned short     cbBuffer );

extern API_FUNCTION
  NetMessageFileSend ( const char LSFAR * pszServer,
                       char LSFAR *       pszRecipient,
                       char LSFAR *       pszFileSpec );

extern API_FUNCTION
  NetMessageLogFileGet ( const char LSFAR * pszServer,
                         char LSFAR *       pbBuffer,
                         unsigned short     cbBuffer,
                         short LSFAR *      pfsEnabled );

extern API_FUNCTION
  NetMessageLogFileSet ( const char LSFAR * pszServer,
                         char LSFAR *       pszFileSpec,
                         short              fsEnabled );

extern API_FUNCTION
  NetMessageNameAdd ( const char LSFAR * pszServer,
                      const char LSFAR * pszMessageName,
                      short              fsFwdAction );

extern API_FUNCTION
  NetMessageNameDel ( const char LSFAR * pszServer,
                      const char LSFAR * pszMessageName,
                      short              fsFwdAction );

extern API_FUNCTION
  NetMessageNameEnum ( const char LSFAR *     pszServer,
                       short                  sLevel,
                       char LSFAR *           pbBuffer,
                       unsigned short         cbBuffer,
                       unsigned short LSFAR * pcEntriesRead,
                       unsigned short LSFAR * pcTotalAvail );

extern API_FUNCTION
  NetMessageNameGetInfo ( const char LSFAR *     pszServer,
                          const char LSFAR *     pszMessageName,
                          short                  sLevel,
                          char LSFAR *           pbBuffer,
                          unsigned short         cbBuffer,
                          unsigned short LSFAR * pcbTotalAvail );

extern API_FUNCTION
  NetMessageNameFwd ( const char LSFAR * pszServer,
                      const char LSFAR * pszMessageName,
                      const char LSFAR * pszForwardName,
                      short              fsDelFwdName );

extern API_FUNCTION
  NetMessageNameUnFwd ( const char LSFAR * pszServer,
                        const char LSFAR * pszMessageName );


/****************************************************************
 *								*
 *	  	Data structure templates			*
 *								*
 ****************************************************************/

struct msg_info_0 {
    char		msgi0_name[CNLEN + 1];
};	/* msg_info_0 */

struct msg_info_1 {
    char		msgi1_name[CNLEN + 1];
    unsigned char	msgi1_forward_flag;
    unsigned char	msgi1_pad1;
    char		msgi1_forward[CNLEN + 1];
};	/* msg_info_1 */


/****************************************************************
 *								*
 *	  	Special values and constants			*
 *								*
 ****************************************************************/


/*
 *	Values for msgi1_forward_flag.
 */

#define MSGNAME_NOT_FORWARDED	0	/* Name not forwarded */
#define MSGNAME_FORWARDED_TO	0x04	/* Name forward to remote station */
#define MSGNAME_FORWARDED_FROM  0x10	/* Name forwarded from remote station */


#endif /* NETMESSAGE_INCLUDED */

#ifdef  INCL_32
#pragma linkage (NetMessageBufferSend, far16 pascal)
#pragma linkage (NetMessageFileSend, far16 pascal)
#pragma linkage (NetMessageLogFileGet, far16 pascal)
#pragma linkage (NetMessageLogFileSet, far16 pascal)
#pragma linkage (NetMessageNameAdd, far16 pascal)
#pragma linkage (NetMessageNameDel, far16 pascal)
#pragma linkage (NetMessageNameEnum, far16 pascal)
#pragma linkage (NetMessageNameGetInfo, far16 pascal)
#pragma linkage (NetMessageNameFwd, far16 pascal)
#pragma linkage (NetMessageNameUnFwd, far16 pascal)
#pragma pack()
#endif
