/*



    ========== licence begin  GPL
    Copyright (c) 1997-2005 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





*/
.ad 8
.bm 8
.fm 4
.bt $Copyright (c) 1997-2005 SAP AG-2002$$Page %$
.tm 12
.hm 6
.hs 3
.tt 1 $NME$Project Distributed Database System$OMS_LIVECACHETYPES$
.tt 2 $$$
.TT 3 $F. Flohe$LIVECACHE IDL Types$1993-05-28$
***********************************************************
.nf
.sp
MODULE  : LIVECACHE IDL Types
          =========
          .sp
Purpose :
.CM *-END-* purpose -------------------------------------
.sp
.cp 3
Define  :

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

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

.CM *-END-* synonym -------------------------------------
.sp;.cp 3
Author  : F. Flohe
          .sp
          .cp 3
Created : 1997-10-28
          .sp
          .cp 3
Version : 1997-10-28
          .sp
          .cp 3
Release : 7.0.0    Date : 1997-10-28
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
.sp
***********************************************************
.sp
.cp 10
.fo
.oc _/1
Specification:
.nf
.fo
.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    :

/* LiveCacheTypes.idl : IDL source for LiveCacheTypes.dll
*/


&if $OS = WIN32
// This file will be processed by the MIDL tool

import "oaidl.idl";
&else
#ifndef __LIVECACHETYPES_H__
#define __LIVECACHETYPES_H__

#ifdef __cplusplus
extern "C"{
#endif
&endif

&if $OS = WIN32
  typedef hyper OmsTypeInt64;
&else
  /*#include <wchar.h>*/
&if $OS in [ UNIX ] and defined BIT64
  typedef long OmsTypeInt64;
&else
  typedef long long OmsTypeInt64;
&endif
&endif

&if $OS = WIN32
  typedef unsigned hyper OmsTypeUInt64;
&else
  /*#include <wchar.h>*/
&if $OS in [ UNIX ] and defined BIT64
  typedef unsigned long OmsTypeUInt64;
&else
  typedef unsigned long long OmsTypeUInt64;
&endif
&endif

typedef OmsTypeInt64 OmsTypeInt8;


typedef OmsTypeUInt64 OmsTypeUInt8;

typedef
[
  uuid(00489FD1-87B7-11d4-B2E4-0050DAE0298C),
  helpstring("LiveCacheType: UNICODE")
]
unsigned short   DbpTypeUnicode;

typedef
[
  uuid(A6DE9A83-6173-11d1-A943-00A0C94311A5),
  helpstring("LiveCacheType: CHAR")
]
char   OmsTypeChar;

typedef
[
  uuid(A6DE9A85-6173-11d1-A943-00A0C94311A5),
  helpstring("LiveCacheType: BYTE")
]
unsigned char	OmsTypeByte;

typedef
[
  uuid(09D9CE43-88D5-478a-99EA-00AD11A144FF),
  helpstring("LiveCacheType: ASCII7")
]
unsigned char OmsTypeAscii7;


typedef
[
  uuid(32DFBA48-0218-4a2f-AFF5-B6AFCB19E6B9),
  helpstring("LiveCacheType: UTF8")
]
unsigned char OmsTypeUTF8;


typedef
[
  uuid(4A523F86-2315-4e0c-BF9B-95F447742344),
  helpstring("LiveCacheType: WYDE")
]
unsigned short OmsTypeWyde;


typedef
[
  uuid(7B0A5BD0-68F1-11d2-A980-00A0C9430731),
  helpstring("LiveCacheType: INT1")
]
signed char	OmsTypeInt1;

typedef
[
  uuid(92F1D481-A63E-11d3-A997-00A0C94311A5),
  helpstring("LiveCacheType: UINT1")
]
unsigned char	OmsTypeUInt1;

typedef
[
  uuid(25EB01B1-0454-11d3-A994-00A0C94311A5),
  helpstring("LiveCacheType: INT4")
]
int 	        OmsTypeInt4;

typedef
[
  uuid(B02B1C11-09D3-11d3-A994-00A0C94311A5),
  helpstring("LiveCacheType: UINT4")
]
unsigned int 	OmsTypeUInt4;

typedef
[
  uuid(A6DE9A87-6173-11d1-A943-00A0C94311A5),
  helpstring("LiveCacheType: BOOL")
]
unsigned char	OmsTypeBool;

/* PTS 1131373 */
typedef
[
  uuid(2C791281-E895-11d1-A95C-00A0C9430731),
  helpstring("LiveCacheType: ABAP-Timestamp")
]
struct OmsTypeABAPTimeStamp {
  unsigned char m_timeStamp[8];
} OmsTypeABAPTimeStamp;

typedef
[
  uuid(F2AD8221-A641-11d3-A997-00A0C94311A5),
  helpstring("LiveCacheType: SchemaHandle")
]
unsigned int OmsSchemaHandle;

typedef
[
  uuid(F2AD8222-A641-11d3-A997-00A0C94311A5),
  helpstring("LiveCacheType: ContainerNo")
]
unsigned int OmsContainerNo;

typedef
[
  uuid(74F2C121-27EC-11d3-A996-00A0C9430731),
  helpstring("LiveCache internal Type")
]
struct TParamDescriptor {
  OmsTypeInt4    len;
  unsigned char* val;
} TParamDescriptor;

typedef
[
  uuid(6D2A8741-730B-11d1-A946-00A0C9430731),
  helpstring("LiveCacheType: OmsTypeOid")
]
struct OmsTypeOid {
  OmsTypeUInt4   pno;
  unsigned short pagePos;
  unsigned short generation;
} OmsTypeOid;


[
  uuid(4DEA22DD-0417-11d2-A961-00A0C9430731),
  helpstring("LiveCacheType: PACKED(8,3), 15 digits, 3 digits to the right of decimal point")
]
typedef struct OmsTypePacked_8_3
{
  unsigned char m_packed[8];
} OmsTypePacked_8_3;


/* PTS 1122649 */
typedef
[
  uuid(0B9BD0FC-A7AB-4178-B566-71C697B85E66),
  helpstring("LiveCacheType: PACKED(15,3), 29 digits, 3 digits to the right of decimal point")
]
struct OmsTypePacked_15_3
{
  unsigned char m_packed[15];
} OmsTypePacked_15_3;


/* PTS 1131373 */
typedef
[
  uuid(0FAF0BA8-F4FD-4083-9BF8-1C386630B3AB),
  helpstring("LiveCacheType: NUMC")
]
char OmsTypeNumc;


typedef OmsTypeChar OmsVersionId[22];

[
  uuid(968084C1-54BC-11d5-B330-0050DADE3427),
  helpstring("LiveCacheType: OmsLockHandle")
]
typedef struct OmsLockHandle
{
  unsigned char m_handle[8];
} OmsLockHandle;

typedef struct OmsMonitorData
{
  OmsTypeChar   m_methodName[32];
  OmsTypeUInt4  m_runTime;                 /* run time of method call in milliseconds       */
  OmsTypeInt8   m_cntNewObject;            /* number of new objects created                 */
  OmsTypeInt8   m_cntNewKeyedObject;       /* number of new keyed objects created           */
  OmsTypeInt8   m_cntNewVarObject;         /* number of new objects of variable length      */
  OmsTypeInt8   m_cntDeref;                /* number of deref operations                    */
  OmsTypeInt8   m_cntDerefLCBase;          /* number of deref operations via liveCache base */
  OmsTypeInt8   m_cntKeyDeref;             /* number of deref operations via key */
  OmsTypeInt8   m_cntDerefVarObj;          /* number of deref operations for objects of variable length */
  OmsTypeInt8   m_cntDerefVarObjLCBase;    /* number of deref operations for objects of variable length from liveCache base */
  OmsTypeInt8   m_cntOmsStore;             /* number of calls of method omsStore */
  OmsTypeInt8   m_cntStoreVarObj;          /* number of calls of method omsStoreVarObject */
  OmsTypeInt8   m_cntOmsStoreLCBase;       /* number of calls of stores in liveCache base */
  OmsTypeInt8   m_cntStoreVarObjLCBase;    /* number of calls of stores of objects of variable length in liveCache base */
  OmsTypeInt8   m_cntOmsDelete;            /* number of calls of method omsDelete */
  OmsTypeInt8   m_cntOmsDeleteVarObject;   /* number of calls of method omsDelete for objects of variable length */
  OmsTypeInt8   m_cntOmsDeleteLC;          /* number of calls of method omsDelete */
  OmsTypeInt8   m_cntOmsDeleteVarObjectLC; /* number of calls of method omsDelete for objects of variable length */
  OmsTypeInt8   m_cntOmsLock;              /* number of calls of method omsLock   */
  OmsTypeInt8   m_logHops;                 /* number of log hops needed */
  OmsTypeInt8   m_logHopsIter;             /* number of log hops needed */
  OmsTypeInt8   m_cntExceptions;           /* number of thrown DbpErrors */
  OmsTypeInt8   m_cntOutOfDate;            /* number of OutOfDate exceptions */
  OmsTypeInt8   m_cntOutOfMemory;          /* number of bad alloc exceptions */
  OmsTypeInt8   m_cntSubtransRollback;     /* number of calls of method omsRollbackSubtrans */
  OmsTypeInt8   m_cntSubtransCommit;       /* number of calls of method omsRollbackSubtrans */
  OmsTypeInt8   m_maxSubtransLevel;        /* deepest subtrans level */
  OmsTypeInt8   m_cntNewConsistentView;    /* number of calls of method omsNewConsistentView */
  OmsTypeInt8   m_avgWaitNewConsView;      /* average time needed until new consistent view has been granted */
  OmsTypeInt8   m_cntOperatorNew;          /* number of calls of operator new (omsMalloc) */
  OmsTypeUInt4  m_maxChunkAllocated;       /* maximal memory chunk requested in bytes */
  OmsTypeUInt4  m_minChunkAllocated;       /* minimal memory chunk requested in bytes */
  OmsTypeUInt4  m_avgChunkAllocated;       /* average memory chunk requested in bytes */
  OmsTypeInt8   m_cntOperatorDelete;       /* number of calls of operator delete (omsFree) */
  OmsTypeUInt4  m_maxChunkDeleted;         /* maximal memory chunk deleted in bytes */
  OmsTypeUInt4  m_minChunkDeleted;         /* minimal memory chunk deleted in bytes */
  OmsTypeUInt4  m_avgChunkDeleted;         /* average memory chunk deleted in bytes */
  OmsTypeInt8   m_maxHeapUsage;            /* maximum heap usage in bytes */
  OmsTypeInt64  m_memoryDelta;             /* difference between current memory usage and usage at method begin */
  OmsTypeInt8   m_OmsLVCBaseCalls;         /* number of call from the OMS to the liveCache base */
  OmsTypeUInt4  m_cntSelfSuspends;         /* number of suspends forced by current task */
  OmsTypeUInt4  m_cntDispatcher;
  OmsTypeUInt4  m_cntIO;                   /* number of IO operations */
  OmsTypeInt4   m_IORelTime;               /* milliseconds needed for io operations */
  OmsTypeInt4   m_IOAbsTime;               /* milliseconds needed for until task gets control after io operation */
  OmsTypeUInt4  m_cntReplyReceive;         /* number of ReplyReceive operations                                  */
  OmsTypeInt4   m_ReplyReceiveRelTime;
  OmsTypeInt4   m_ReplyReceiveAbsTime;
  OmsTypeUInt4  m_cntReceiveReply;
  OmsTypeInt4   m_ReceiveReplyRelTime;
  OmsTypeInt4   m_ReceiveReplyAbsTime;
  OmsTypeUInt4  m_cntWaits;
  OmsTypeInt4   m_WaitsRelTime;
  OmsTypeInt4   m_WaitsAbsTime;
  OmsTypeUInt4  m_cntSleep;
  OmsTypeInt4   m_SleepRelTime;
  OmsTypeInt4   m_SleepAbsTime;
  /* PTS 1117571 (cached keys) */
  OmsTypeInt4   m_OmsReadCacheHit;    /* number of read accesses on keyed obj. which were found in cache                 */  
  OmsTypeInt4   m_OmsReadCacheMiss;   /* number of read accesses on non-existent keyed obj. which are registerd in cache */
  OmsTypeInt4   m_OmsReadVersion;     /* number of read accesses in a version on obj. which were created in a version    */
  /* PTS PTS 1118855 (Hash info) */
  OmsTypeInt4   m_OmsMaxHashChainLen;     /* maximal length of a chain in the oid-hash array */
  OmsTypeInt4   m_OmsRehash;              /* number of rehash operations of the oid hash array */
  OmsTypeInt8   m_cntStreamRowsRead;      /* no of rows transfered from ABAP tables and streams */
  OmsTypeInt8   m_cntStreamRowsWritten;   /* no of rows transfered to ABAP tables and streams */
  OmsTypeInt4   m_cntWaitForOmsLockObj;   /* no of delayed lock requests on OmsLockObjects */ 
  OmsTypeInt4   m_avgWaitForOmsLockObj;   /* avg delay in seconds per delayed OmsLockObject request */ 
  OmsTypeInt4   m_taskId;                 /* kernel task identification */
} OmsMonitorData;


typedef struct SqlMonitorData     /* PTS 1120794 */
{
   OmsTypeChar   m_MethodName[32];
   OmsTypeUInt4  m_Runtime;
   OmsTypeUInt4  m_cntPrepare;
   OmsTypeUInt4  m_cntInsert;
   OmsTypeUInt4  m_cntSelect;
   OmsTypeUInt4  m_cntUpdate;
   OmsTypeUInt4  m_cntDelete;
   OmsTypeUInt4  m_cntFetch;
   OmsTypeUInt4  m_cntDropParseid;
   OmsTypeUInt4  m_cntOther;
   OmsTypeUInt4  m_lenInsertData;
   OmsTypeUInt4  m_lenUpdateData;
   OmsTypeUInt4  m_lenDeleteData;
   OmsTypeUInt4  m_lenFetchData;
} SqlMonitorData;


typedef enum {
  ABTYPC      = 0,
  ABTYPDATE   = 1,
  ABTYPP      = 2,
  ABTYPTIME   = 3,
  ABTYPX      = 4,
  ABTYPTABH   = 5,
  ABTYPNUM    = 6,
  ABTYPFLOAT  = 7,
  ABTYPINT    = 8,
  ABTYPINT2   = 9,
  ABTYPINT1   = 10,
  ABTYPW      = 11,
  ABTYP1      = 12,
  ABTYP2      = 13,
  ABTYPSTRUC1 = 14,
  ABTYPSTRUC2 = 15,
  ABTYPREF    = 16,
  ABTYPOBJ1   = 17,
  ABTYPOBJ2   = 18,
  ABTYPnull   = 19,
  ABTYPWYDE   = 100 /* caution : internal use only, will never be set in a handle from the application */
} ABTypes;


typedef
[
  uuid(D6AFDBA8-69B9-4108-B6D5-7FA3DB04D558),
  helpstring("LiveCacheType: OmsVersionInfo")
]
struct OmsVersionInfo {
  OmsTypeByte   createDate[8];
  OmsTypeByte   createTime[8];
  OmsTypeByte   openDate[8];
  OmsTypeByte   openTime[8];
  OmsTypeInt4   consistentView;
  OmsTypeBool   isMarked;
  OmsTypeBool   isOpen;
  OmsTypeBool   isUnloaded;
  OmsTypeInt8   heapUsage;
  OmsTypeInt4   hashSize;
} OmsVersionInfo;


typedef struct OmsTypeABAPColDesc {
  unsigned char  inout;
  unsigned char  abap_type;
  unsigned short dec;
  unsigned short length;
  unsigned short offset;
} OmsTypeABAPColDesc;

[	
  uuid(33B799A1-85BD-11d1-A93F-00A0C944907B)
]	
typedef struct OmsTypeABAPTabHandle {
&if $BIT64
&else
  OmsTypeInt4             reserved;
&endif
  unsigned short  rowSize;
  unsigned short  colCount;
  OmsTypeInt4     rowCount;
  OmsTypeInt4     ABAPTabId;
  OmsTypeABAPColDesc colDesc[256];
} OmsTypeABAPTabHandle;

typedef enum {
  STYPE_BOOL  = 0,
  STYPE_I1    = 1,
  STYPE_UI1   = 2,
  STYPE_I2    = 3,
  STYPE_UI2   = 4,
  STYPE_I4    = 5,
  STYPE_UI4   = 6,
  STYPE_I8    = 7,
  STYPE_UI8   = 8,
  STYPE_R4    = 9,
  STYPE_R8    = 10,
  STYPE_INT   = 12,
  STYPE_UINT  = 13,
  STYPE_CHAR  = 14,
  STYPE_WCHAR = 15,
  STYPE_UDT   = 16,
  STYPE_WYDE  = 17
} OmsStreamTypes;

typedef struct OmsTypeStreamMemberDesc {
  unsigned char  inout;
  unsigned char  memberType;
  unsigned short dec;
  unsigned short length;
  unsigned short offset;
} OmsTypeStreamMemberDesc;

[ 
  uuid(EE4B31FB-CF89-11d1-A955-00A0C9430731)
]

typedef struct OmsTypeStreamHandle {
&if $BIT64
&else
  OmsTypeInt4             reserved;
&endif
  unsigned short          size;
  unsigned short          memberCount;
  OmsTypeInt4             filler;
  OmsTypeInt4             ABAPTabId;
  OmsTypeStreamMemberDesc colDesc[256];
} OmsTypeStreamHandle;

&if $OS = WIN32
&else
#ifdef __cplusplus
}
#endif


#endif
&endif
.CM *-END-* code ----------------------------------------
.SP 2
***********************************************************
*-PRETTY-*  statements    :        124
*-PRETTY-*  lines of code :        412        PRETTY  1.12
*-PRETTY-*  lines in file :        796         1989-09-21
.PA
