#ifndef AGENT_RFC_H
#define AGENT_RFC_H

#include <stdio.h>
#include <string.h>
#include <stdlib.h>

#include "saprfc.h"
#include "sapitab.h"

#include "agnt_def.h"

#ifndef AGENT_MON_H
#include "agnt_mon.h"
#endif

#include "agnt_bapi.h"
/*=======================================================================
  (C) Copyright SAP AG, 2002

         
 Author  : Dostert/SAP
 Project : Get data from R/3 using XMB
 Using   : RFCSDK 
 ========================================================================*/



/************************************************************************
 THE FOLLOWING IS THE CONTENTS OF THE saprfc.ini FILE LOCATED
 WHERE THE VARIABLE  RFC_INI POINTS TO (e.g. c:\project\xmi\saprfc.ini */

/* Type A only i.e. the C-Progs are the clients to the R/3        */
/*---- BEGIN OF FILE CONTENT -----
DEST=BIN_HS0311
TYPE=A
ASHOST=hs0311
SYSNR=53
RFC_TRACE=0
ABAP_DEBUG=0
USE_SAPGUI=0
------ END OF FILE CONTENT ------
See RFC-Programming Manuals for details. */

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

extern int trace_me;

/*---------------------------------------------------------------------*/
/*--------Prototypes---------------------------------------------------*/
/*---------------------------------------------------------------------*/


void DLL_CALL_BACK_FUNCTION rfc_error(char *operation, char *function);

void rfc_param(RFC_PARAMETER *rfc_param,
               char          *abap_field_name,
               unsigned      data_type,
               void          *data_addr,
               unsigned      data_len );

int sapmon_connect(char *Login_Template, RFC_HANDLE *rfc_handle);
int sapmon_disconnect(RFC_HANDLE *rfc_handle);

int bapi_system_mon_gettree(RFC_HANDLE *rfc_handle,
			    char *MoniSetName,
		   	    char *MoniName,
			    int  *MaxTreeDepth,                            
                            ITAB_H TreeNodes);


#endif
