.ad 8
.bm 8
.fm 4
.bt $Copyright by SAP AG, 1997$$Page %$
.tm 12
.hm 6
.hs 3
.tt 1 $SAP AG$ADABAS FOR R/3$VTT07X$

.tt 2 $$$
.tt 3 $$$1997-10-28$
***********************************************************
.nf


    ========== licence begin  GPL
    Copyright (C) 2001 SAP AG

    This program is free software; you can redistribute it and/or
    modify it under the terms of the GNU General Public License
    as published by the Free Software Foundation; either version 2
    of the License, or (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
    ========== licence end

.fo
.nf
.sp
Module  :
=========
.sp
Purpose :
.CM *-END-* purpose -------------------------------------
.sp
.cp 3
Define  :

// iserver.h
//

#ifndef __ISERVER_H
#define __ISERVER_H

#include <sys/utime.h>
#include <stdio.h>
#include <stdarg.h>
//#include "iconstants.h"


#ifdef DEBUG
	inline void DBGOUT(const char * fmt, ...)   
	{
		va_list args;
		va_start(args, fmt);
		vfprintf(stderr, fmt, args);
		va_end(args);
	}
#else
	inline void DBGOUT(const char * fmt, ...){}
#endif

// Buffers and pipe symbolic constants.
#define MSG_BUF_SIZE	32768
#define IN_BUF_SIZE	    (MSG_BUF_SIZE + MSG_BUF_SIZE)
#define OUT_BUF_SIZE	(MSG_BUF_SIZE + MSG_BUF_SIZE)
#define ERR_BUF_SIZE	1000
#define TIME_OUT	    20000
#define MAX_PIPE_INSTANCES  1

#define MY_OK	    1
#define MY_NOTOK    0
#define MY_RECOVER  999

// Request/ACK type (service type)
typedef enum t_IREQUEST 
{
    ePUT = 100,
	eRECEIVE,
	ePREPARE_PUT,
	eGET,
	eMGET,
	eDEL,
	eSTARTPUT_OBJECTS,
	eENDPUT_OBJECTS,
	eACK_OK,
	eACK_NOTOK,
	eACK_ALLREADY_LOCKED, // 110
	eACK_NOT_LOCKED,
	eACK_LOCKED_DIFFERENT_USER,
	eACK_LOCKED_DIFFERENT_NODE,
	eACK_MAX_USERS_MGET_REACHED,
	eACK_NOT_LOCKED_BY_USER,
	eACK_TREE_READONLY,
	eSTOP,
	eACK_NOT_CASE_SENSITIVE,
	eSTAT, /* CTS 1103611 */ 
	eEXCL,  /* CTS 1103612 */
    eACK_MLOCKED /* CTS 1103611 */
} T_IREQUEST;

// Message type
typedef struct t_IMSSG
{
    T_IREQUEST RequestType;
    char Module[MAX_MODULE_LENGTH];
    char Node[MAX_NODE_LENGTH];
    char User[MAX_USER_LENGTH];  
	SYSTEMTIME date;				// If locked, when?

} T_IMSSG, *P_IMSSG;


typedef enum t_IMSGBUFSIG
{
    //eSizeInfo,			// len = Size of file to receive
	ePacket,			// Buffer contains a standard packet
	eLastPacket,		// This is the last packed to receive
	eFileInfo			// Message contains a file info structure
} T_IMSGBUFSIG;


// Message Buffer (only used to copy modules)
typedef struct t_IMSGBUF
{
	T_IMSGBUFSIG	Signature;	
	DWORD			len;		
	char			Buf[MSG_BUF_SIZE];
} T_IMSGBUF, *P_IMSGBUF;


// FileInfo structure
typedef struct _tIFileInfo
{
	char Filename[MAX_PATH];	// FileName
	FILETIME mtime;				// Modification date
	BOOL bBackup;				// if TRUE, a backup of the file is created
} T_IFileInfo, *P_IFileInfo;
	


#endif

.CM *-END-* define --------------------------------------
.sp;.cp 3
Use     :

.CM *-END-* use -----------------------------------------
.sp;.cp 3
Synonym :

.CM *-END-* synonym -------------------------------------
.sp;.cp 3
Author  : Josef Hasenberger
.sp
.cp 3

Created : 1997-10-28
.sp
.cp 3
Version : 1997-10-28
.sp
.cp 3
Release :      Date :
.sp
***********************************************************
.sp
.cp 10
.fo
.oc _/1
Specification:

.CM *-END-* specification -------------------------------
.sp 2
***********************************************************
.sp
.cp 10
.fo
.oc _/1
Description:

.CM *-END-* description ---------------------------------
.sp 2
***********************************************************
.sp
.cp 10
.nf
.oc _/1
Structure:

.CM *-END-* structure -----------------------------------
.sp 2
**********************************************************
.sp
.cp 10
.nf
.oc _/1
.CM -lll-
Code    :
/*PRETTY*/



.CM *-END-* code ----------------------------------------
.sp 2
***********************************************************
*-PRETTY-*  statements    :           0
*-PRETTY-*  lines of code :           0
*-PRETTY-*  lines in file :           0
.pa

