#ifndef __AGENT_MON_CCM_H__
#define __AGENT_MON_CCM_H__
#include "sapitab.h"

/*=======================================================================
  (C) Copyright SAP AG, 2002


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

#define AGENT_INI_FILE                  "/etc/sapmon/agent.cfg"
#define AGENT_LOGIN_FILE                "/etc/sapmon/login.cfg"


#define MT_CLASS_PERFORMANCE            "100"
#define MT_CLASS_ML                     "101"
#define MT_CLASS_SMES                   "102"
#define MT_CLASS_SHORTTEXT              "111"



#ifndef SAP_ST_BAPITNDEXT
#define SAP_ST_BAPITNDEXT
typedef struct {
  RFC_CHAR Mtsysid[8];
  RFC_CHAR Mtmcname[40];
  RFC_CHAR Mtnumrange[3];
  RFC_CHAR Mtuid[10];
  RFC_CHAR Mtclass[3];
  RFC_CHAR Mtindex[10];
  RFC_CHAR Extindex[10];
  RFC_INT Altreenum;
  RFC_INT Alidxintre;
  RFC_INT Allevintre;
  RFC_INT Alparintre;
  RFC_CHAR Objectname[40];
  RFC_CHAR Mtnameshrt[40];
  RFC_CHAR Cusgrpname[40];
  RFC_INT Deliversta;
  RFC_INT Highalval;
  RFC_INT Highalsev;
  RFC_CHAR Alsysid[8];
  RFC_CHAR Msegname[40];
  RFC_CHAR Aluniqnum[10];
  RFC_CHAR Alindex[10];
  RFC_DATE Alertdate;
  RFC_TIME Alerttime;
  RFC_CHAR Dummyalign[2];
  RFC_DATE Lastvaldat;
  RFC_TIME Lastvaltim;
  RFC_CHAR Lastvaldum[2];
  RFC_INT Actualval;
  RFC_INT Actualsev;
  RFC_CHAR Valsysid[8];
  RFC_CHAR Vmsegname[40];
  RFC_CHAR Valuniqnum[10];
  RFC_CHAR Valindex[10];
  RFC_DATE Valertdate;
  RFC_TIME Valerttime;
  RFC_CHAR Valertdum[2];
  RFC_INT Countofact;
  RFC_INT Countsum;
  RFC_INT Visuserlev;
  RFC_INT Tdstatus;
 } BAPITNDEXT;
#endif

#ifndef SAP_ST_BAPITID
#define SAP_ST_BAPITID
typedef struct {
  RFC_CHAR Mtsysid[8];
  RFC_CHAR Mtmcname[40];
  RFC_CHAR Mtnumrange[3];
  RFC_CHAR Mtuid[10];
  RFC_CHAR Mtclass[3];
  RFC_CHAR Mtindex[10];
  RFC_CHAR Extindex[10];
 } BAPITID;
#endif

#ifndef SAP_ST_BAPIPAPROP
#define SAP_ST_BAPIPAPROP
typedef struct {
  RFC_INT Relvaltype;
  RFC_INT Threshdir;
  RFC_INT Threshstat;
  RFC_INT Treshg2y;
  RFC_INT Treshy2r;
  RFC_INT Treshy2g;
  RFC_INT Treshr2y;
  RFC_CHAR Msgclass[16];
  RFC_CHAR Msgid[30];
  RFC_CHAR Attrgroup[40];
  RFC_CHAR Valunit[4];
  RFC_INT Decimals;
 } BAPIPAPROP;
#endif


#ifndef SAP_ST_BAPIAID
#define SAP_ST_BAPIAID
typedef struct {
  RFC_CHAR Alsysid[8];
  RFC_CHAR Msegname[40];
  RFC_CHAR Aluniqnum[10];
  RFC_CHAR Alindex[10];
  RFC_DATE Alertdate;
  RFC_TIME Alerttime;
  RFC_CHAR Dummyalign[2];
 } BAPIAID;
#endif

/*
 * Prototypes
 */

 AlMoniTemplate_T * get_template_by_handle (AlMoniHandle_T MoniHandle);

int bapi_system_mte_getperfprop( RFC_HANDLE *, BAPITID *, BAPIPAPROP * );
#endif
