/* Licensed Materials - Property of IBM IBM Cognos Products: crx (C) Copyright IBM Corp. 2003, 2010 US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. */ /* COPYRIGHT_DATA { 'YEAR':[2010, 2009, 2003], 'RELEASE':['colorado_wave1'], 'VISIBLE':'YES', 'COMPONENT':'crx' }*/ /*All lines above the COPYRIGHT_DATA line will be replaced when copyright notices are generated. */ // crxSDK.h // // // Extracted from several Cognos header files. // // ----------------------------------------------------------------- // CCL types and definitions used by CRX report functions. // ----------------------------------------------------------------- // #if !defined( CRX_SDK_SAMPLE_H ) #define CRX_SDK_SAMPLE_H #include #include #include #include // ************************************************************************ // * DO NOT Use these CCL types as return types for CRX report functions: * // ************************************************************************ // // CCL_byte ; // CCL_uint8 ; // CCL_int8 ; // CCL_uint16 ; // CCL_int16 ; // CCL_uint32 ; // CCL_uint64 ; // CCL_float32 ; // CCL_char ; // CCL_widechar ; // CCL_strictest ; // // ************************************************************************ // * Use instead: CCL_int32, CCL_int64 or CCL_float64 * // ************************************************************************ // // ----------------------------------------------------------------- /* * --------------------------------------------------------------------------- * ----------------------- Microsoft "C/C++" Compiler ------------------------ * --------------------------------------------------------------------------- */ #if defined( _MSC_VER ) #include #define CCL_TYPES_DEFINED typedef signed __int64 CCL_int64 ; typedef unsigned __int64 CCL_uint64 ; typedef long CCL_strictest ; #if defined(_WIN64) || defined(WIN64) typedef signed __int64 CCL_ssize ; #else typedef signed int CCL_ssize ; #endif #define CCL_INT64_LITERAL( _val ) _val##i64 #define CCL_UINT64_LITERAL( _val ) _val##ui64 #endif /* Microsoft "C/C++" Compiler */ /* * --------------------------------------------------------------------------- * ------------------------- HP-UX aCC Complier ------------------------------ * --------------------------------------------------------------------------- */ #if defined( __hpux ) #define CCL_TYPES_DEFINED typedef long long CCL_int64 ; typedef unsigned long long CCL_uint64 ; typedef double CCL_strictest ; typedef ssize_t CCL_ssize ; #endif /* HP-UX aCC Complier */ /* * --------------------------------------------------------------------------- * ---------------------------- IBM Compiler --------------------------------- * --------------------------------------------------------------------------- */ #if defined( __MVS__ ) #include #endif #if ( (defined( _AIX ) && ( defined( __IBMCPP__ ) || defined( __IBMC__ ) )) || (defined( __MVS__ ) && ( defined( __IBMCPP__ ) || defined( __IBMC__ ) ))) #define CCL_TYPES_DEFINED typedef long long CCL_int64 ; typedef unsigned long long CCL_uint64 ; typedef double CCL_strictest ; typedef ssize_t CCL_ssize ; #endif /* IBM Compiler */ /* * --------------------------------------------------------------------------- * ---------------------------- Sun Pro Compiler ----------------------------- * --------------------------------------------------------------------------- */ #if defined( __sun ) #include #define CCL_TYPES_DEFINED typedef long long CCL_int64 ; typedef unsigned long long CCL_uint64 ; typedef double CCL_strictest ; typedef ssize_t CCL_ssize ; #endif /* Sun Pro Compiler */ /* * --------------------------------------------------------------------------- * -------------------------------- Tru64 ------------------------------------ * --------------------------------------------------------------------------- */ #if defined( __osf__ ) #define CCL_TYPES_DEFINED typedef signed long CCL_int64 ; typedef unsigned long CCL_uint64 ; typedef double CCL_strictest ; typedef ssize_t CCL_ssize ; #endif /* AXPOSF */ /* * --------------------------------------------------------------------------- * ---------------------------- GNU C/C++ Compiler --------------------------- * --------------------------------------------------------------------------- */ #if defined( __GNUC__ ) #define CCL_TYPES_DEFINED /* * Check __powerpc64__ before __powerpc__ since both are set for 64-bit */ #if defined( __i386__ ) || defined( __x86_64__ ) || defined( __s390__ ) typedef long long CCL_int64 ; typedef unsigned long long CCL_uint64 ; typedef double CCL_strictest ; typedef ssize_t CCL_ssize ; #elif defined( __powerpc__ ) || defined( __powerpc64__ ) typedef long long CCL_int64 ; typedef unsigned long long CCL_uint64 ; typedef double CCL_strictest ; typedef ssize_t CCL_ssize ; #else # error CCLTypes.h not configured for GNU C/C++ on this platform #endif /* __i386__ */ #endif /* __GNUC__ */ /* * --------------------------------------------------------------------------- * --------------------------- All Platforms --------------------------------- * --------------------------------------------------------------------------- */ #ifndef CCL_TYPES_DEFINED # error CCLTypes.h not configured for this platform #else # undef CCL_TYPES_DEFINED #endif /* CCL_TYPES_DEFINED */ #include typedef unsigned char CCL_byte ; typedef unsigned char CCL_uint8 ; typedef signed char CCL_int8 ; typedef unsigned short CCL_uint16 ; typedef signed short CCL_int16 ; typedef unsigned int CCL_uint32 ; typedef signed int CCL_int32 ; typedef float CCL_float32 ; typedef double CCL_float64 ; typedef char CCL_char ; typedef wchar_t CCL_widechar ; typedef signed int CCL_bool ; typedef size_t CCL_size ; typedef time_t CCL_time ; typedef void* CCL_handle; #if !defined( TRUE ) #define TRUE 1 #endif /* TRUE */ #if !defined( FALSE ) #define FALSE 0 #endif /* FALSE */ #ifndef CCL_INT64_LITERAL #define CCL_INT64_LITERAL( _val ) _val##LL #endif #ifndef CCL_UINT64_LITERAL #define CCL_UINT64_LITERAL( _val ) _val##ULL #endif #if !defined( CCL_size_npos ) #define CCL_size_npos CCL_size(-1) #endif /* CCL_size_npos */ // // ------------- CRX report function return value --------------- // typedef CCL_uint32 CCLDBColumnState; // // ----CCLDBColumnState may take any of these values ------------ // #define CCL_DB_COLSTATE_OK 0x0000 #define CCL_DB_COLSTATE_NULL 0x0001 #define CCL_DB_COLSTATE_NA 0x0002 #define CCL_DB_COLSTATE_DIVBYZERO 0x0004 #define CCL_DB_COLSTATE_OVERFLOW 0x0008 #define CCL_DB_COLSTATE_SECURITY 0x0010 #define CCL_DB_COLSTATE_ERROR 0x0020 #define CCL_DB_COLSTATE_NEW 0x0040 #define CCL_DB_COLSTATE_SAMPLE 0x0080 #define CCL_DB_COLSTATE_PENDING 0x0100 #define CCL_DB_COLSTATE_DATATYPE_CHANGED 0x0200 #define CCL_DB_CASTING_ERROR 0x0210 #define CCL_DB_COLSTATE_UNKNOWN 0xFFFF // ----------------------------------------------------------------- // CRX classes and definitions // ----------------------------------------------------------------- // // ------------ Class: crxDataI forward declaration ------------- // class crxDataI; // // ------------ CRX report function prototype ------------------- // typedef CCLDBColumnState (*PF_CallFunction) ( void* result, CCL_uint32 resultsize, const crxDataI* context, void* arg1, void* arg2, void* arg3, void* arg4, void* arg5, void* arg6, void* arg7, void* arg8, void* arg9, void* arg10, void* arg11, void* arg12, void* arg13, void* arg14, void* arg15, void* arg16 ); // ----------------------------------------------------------------- // Definitions from the Expression Engine // ----------------------------------------------------------------- // // ------------ Decimal size ------------------------------------ // #define CRX_MAX_DECIMAL_BYTES (39) // // ------------ String size ------------------------------------- // #define CRX_MAXIMUM_STR_CODEPOINTS (32767) /** * Day-time Precision */ typedef enum { CCLIntervalUnknown = 0, CCLIntervalYear = 1, CCLIntervalMonth = 2, CCLIntervalDay = 3, CCLIntervalHour = 4, CCLIntervalMinute = 5, CCLIntervalSecond = 6, CCLIntervalYearToMonth = 7, CCLIntervalDayToHour = 8, CCLIntervalDayToMinute = 9, CCLIntervalDayToSecond = 10, CCLIntervalHourToMinute = 11, CCLIntervalHourToSecond = 12, CCLIntervalMinuteToSecond = 13, lastCCLIntervalQualifier } CCLIntervalQualifier; // DATE typedef CCL_uint32 CCLDate; /** * DATE2 */ typedef struct { CCL_uint16 year; CCL_uint8 month; CCL_uint8 day; } CCLDate2; // Time typedef CCL_uint32 CCLTime; /** * TIME2 */ typedef struct { CCL_uint8 hour; CCL_uint8 minute; CCL_uint8 second; CCL_uint32 fSecond; } CCLTime2; /** * TIME WITH TIME ZONE */ typedef struct { CCL_uint8 hour; CCL_uint8 minute; CCL_uint8 second; CCL_uint32 fSecond; CCL_int16 displacement; } CCLTimeTZ; // Will be deprecated soon /** * DATETIME */ //typedef struct { // CCLDate date; // CCLTime time; //} CCLDateTime; /** * TIMESTAMP2 */ typedef struct { CCL_uint16 year; CCL_uint8 month; CCL_uint8 day; CCL_uint8 hour; CCL_uint8 minute; CCL_uint8 second; CCL_uint32 fSecond; } CCLTimestamp2; /** * TIMESTAMP WITH TIME ZONE */ typedef struct { CCL_uint16 year; CCL_uint8 month; CCL_uint8 day; CCL_uint8 hour; CCL_uint8 minute; CCL_uint8 second; CCL_uint32 fSecond; CCL_int16 displacement; } CCLTimestampTZ; /** * YEAR-MONTH INTERVAL */ typedef struct { CCL_bool isNegative; CCL_uint32 year; CCL_uint32 month; } CCLIntervalYM; // Will be deprecated soon ///** // * INTERVAL (DAY-TIME INTERVAL) // */ //typedef struct CCLInterval { // CCL_int32 days; // CCLTime time; //} CCLInterval; /** * INTERVAL2 (DAY-TIME INTERVAL) */ typedef struct { CCL_bool isNegative; CCL_uint32 day; CCL_uint32 hour; CCL_uint32 minute; CCL_uint32 second; CCL_uint32 fSecond; } CCLInterval2; #endif