#ifndef MY_TYPES_H_13 #define MY_TYPES_H_13 /** *@file * Definice hlavnich typu pouzivanych v rozhrani DapiC. */ #include /*** general types definition ***/ #ifdef WIN32 typedef __int32 int32_t; typedef __int64 int64_t; #define atoi64 _atoi64 #elif defined(__ILEC400__) || defined(__xlc__) typedef long int32_t; typedef long long int64_t; #define atoi64 atoll #else /* Linux */ /* system dependencies - check the int32_t, int64_t, and atoi64 definitions */ #define atoi64 atoll #endif #ifdef __cplusplus extern "C" { #endif /** * enum typ parametru */ typedef enum _DAPIC_APL_EPRMNAME { DAPIC_APL_PRMSTRING, DAPIC_APL_PRMBOOLEAN, DAPIC_APL_PRMLONG, DAPIC_APL_PRMDOUBLE, DAPIC_APL_PRMDATE, DAPIC_APL_PRMTIME, DAPIC_APL_PRMDATETIME, DAPIC_APL_PRMTIMESTAMP, DAPIC_APL_PRMBINARY, DAPIC_APL_PRMRESULTSET, DAPIC_APL_NULL } DAPIC_APL_EPRMNAME; typedef DAPIC_APL_EPRMNAME DAPIC_PARAMTYPE; /** * Byte. */ #ifndef Byte_TYPE_DEFINED typedef unsigned char Byte; #define Byte_TYPE_DEFINED #endif /** * Text character. */ typedef char TextChar; /*** Dapi types definitions ***/ /** * Text character. */ typedef char DapiChar; /** * 64bit integer. */ typedef int64_t DapiInteger; /** * Floating-point double. */ typedef double DapiDouble; /** * Binary byte. */ typedef Byte DapiByte; /** * Obsahuje pole binarnich bytu a delku tohoto pole. */ typedef struct DapiBytes { DapiByte * bytes; size_t length; } DapiBytes; /** * Booleovska hodnota. */ typedef int DapiBool; /** * Struktura reprezentuje datum. */ typedef struct DapiDate { short year; short month; short day; } DapiDate; /** * Struktura reprezentuje cas. */ typedef struct DapiTime { short hour; short minute; short second; } DapiTime; /** * Reprezentuje datum a cas. */ typedef struct DapiDateTime { DapiDate date; DapiTime time; } DapiDateTime; /** * Reprezentuje casovy okamzik s presnosti na milisekundy. */ typedef struct DapiTimestamp { DapiDate date; DapiTime time; unsigned long milisecs; } DapiTimestamp; /** * Nastavi timestamp na 'ted'. */ void dapic_getNowTimestamp(DapiTimestamp * tstamp); #ifdef __cplusplus } #endif #endif /* MY_TYPES_H_13 */