ESP SDK C API
C:/cygwin/home/shubhrab/FM/CEP/esp/dev/r5/main/src/cpp/include/public/interfaces/sdk/esp_stream.h
00001 #ifndef __ESP_STREAM_H
00002 #define __ESP_STREAM_H
00003 
00004 #include <sdk/esp_types.h>
00005 
00006 #ifdef __cplusplus
00007 extern "C" {
00008 #endif
00009 
00019 #define ESP_DATATYPE_INTEGER    1   
00020 #define ESP_DATATYPE_LONG       2   
00021 #define ESP_DATATYPE_FLOAT      3   
00022 #define ESP_DATATYPE_DATE       4   
00023 #define ESP_DATATYPE_STRING     5   
00024 #define ESP_DATATYPE_NULL       6   
00025 #define ESP_DATATYPE_MONEY      7   
00026 #define ESP_DATATYPE_TIMESTAMP  8   
00027 #define ESP_DATATYPE_OBJECT     9   
00028 #define ESP_DATATYPE_BOOLEAN   10   
00029 #define ESP_DATATYPE_MONEY01   11   
00030 #define ESP_DATATYPE_MONEY02   12   
00031 #define ESP_DATATYPE_MONEY03   13   
00032 #define ESP_DATATYPE_MONEY04   14   
00033 #define ESP_DATATYPE_MONEY05   15   
00034 #define ESP_DATATYPE_MONEY06   16   
00035 #define ESP_DATATYPE_MONEY07   17   
00036 #define ESP_DATATYPE_MONEY08   18   
00037 #define ESP_DATATYPE_MONEY09   19   
00038 #define ESP_DATATYPE_MONEY10   20   
00039 #define ESP_DATATYPE_MONEY11   21   
00040 #define ESP_DATATYPE_MONEY12   22   
00041 #define ESP_DATATYPE_MONEY13   23   
00042 #define ESP_DATATYPE_MONEY14   24   
00043 #define ESP_DATATYPE_MONEY15   25   
00044 #define ESP_DATATYPE_INTERVAL  26   
00045 #define ESP_DATATYPE_BIGDATETIME 27 
00046 #define ESP_DATATYPE_BINARY    28   
00049 typedef enum {
00050     ESP_INTEGER    =  1,    
00051     ESP_LONG       =  2,    
00052     ESP_FLOAT      =  3,    
00053     ESP_DATE       =  4,    
00054     ESP_STRING     =  5,    
00055     ESP_NULL       =  6,    
00056     ESP_MONEY      =  7,    
00057     ESP_TIMESTAMP  =  8,    
00058     ESP_OBJECT     =  9,    
00059     ESP_BOOLEAN    = 10,    
00060     ESP_MONEY01    = 11,    
00061     ESP_MONEY02    = 12,    
00062     ESP_MONEY03    = 13,    
00063     ESP_MONEY04    = 14,    
00064     ESP_MONEY05    = 15,    
00065     ESP_MONEY06    = 16,    
00066     ESP_MONEY07    = 17,    
00067     ESP_MONEY08    = 18,    
00068     ESP_MONEY09    = 19,    
00069     ESP_MONEY10    = 20,    
00070     ESP_MONEY11    = 21,    
00071     ESP_MONEY12    = 22,    
00072     ESP_MONEY13    = 23,    
00073     ESP_MONEY14    = 24,    
00074     ESP_MONEY15    = 25,    
00075     ESP_INTERVAL   = 26,    
00076     ESP_BIGDATETIME= 27,    
00077     ESP_BINARY     = 28,    
00078 }
00079 ESP_DATA_T;
00080 
00089 typedef enum
00090 {
00091     ESP_STREAM_OP_NOOP =   0,       
00092     ESP_STREAM_OP_INSERT = 1,       
00093     ESP_STREAM_OP_UPDATE = 3,       
00094     ESP_STREAM_OP_DELETE = 5,       
00095     ESP_STREAM_OP_UPSERT = 7,       
00096     ESP_STREAM_OP_SAFEDELETE = 13   
00097 }
00098 ESP_OPERATION_T;
00099 
00109 typedef enum
00110 {
00111     SOURCE,                 
00112     DERIVED,                
00113     ESP_STREAM_SQL_QUERY,   
00114     ESP_STREAM_DELTA,       
00115     ESP_STREAM_SIMPLE,      
00116     ESP_STREAM_WINDOW,      
00117     ESP_STREAM_SYSTEM,      
00118     ESP_STREAM_ERROR,       
00119     ESP_STREAM_LEGACY       
00120 }
00121 ESP_STREAM_TYPE_T;
00122 
00129 typedef enum
00130 {
00131     ESP_STREAM_INPUT,          
00132     ESP_STREAM_OUTPUT,         
00133     ESP_STREAM_LOCAL           
00134 }
00135 ESP_STREAM_VISIBILITY_T;
00149 ESPAPICALL int32_t esp_schema_get_numcolumns(
00150         const EspSchema * schema,           
00151         int32_t * numcolumns,               
00152         EspError * error);
00153 
00159 ESPAPICALL const char * esp_schema_get_column_name(
00160         const EspSchema * schema,           
00161         const int32_t column_no,            
00162         EspError * error);
00163 
00169 ESPAPICALL int32_t esp_schema_get_column_type(
00170         const EspSchema * schema,           
00171         const int32_t column_no,            
00172         int32_t * type,                     
00173         EspError * error);
00174 
00180 ESPAPICALL int32_t esp_schema_get_column_type_by_name(
00181         const EspSchema * schema,           
00182         const char * column_name,           
00183         int32_t * type,                     
00184         EspError * error);
00185 
00191 ESPAPICALL int32_t esp_schema_is_keycolumn(
00192         const EspSchema * schema,           
00193         const int32_t column_no,            
00194         int32_t * key,                      
00195         EspError * error);
00196 
00197 
00205 ESPAPICALL int32_t esp_stream_get_type(
00206         const EspStream * stream,                   
00207         ESP_STREAM_TYPE_T * type,                   
00208         EspError * error);
00209 
00215 ESPAPICALL int32_t esp_stream_get_visibility(
00216         const EspStream * stream,                   
00217         ESP_STREAM_VISIBILITY_T * visibility,       
00218         EspError * error);
00219 
00225 ESPAPICALL int32_t esp_stream_get_id(
00226         const EspStream * stream,                   
00227         int32_t * id,                               
00228         EspError * error);
00229 
00235 ESPAPICALL const char * esp_stream_get_name(
00236         const EspStream * stream,                   
00237         EspError * error);
00238 
00244 ESPAPICALL const EspSchema * esp_stream_get_schema(
00245         const EspStream * stream,                   
00246         EspError * error);
00247 
00262 ESPAPICALL int32_t esp_data_binary_from_hexstring(
00263         const char * hexstring,     
00264         uint8_t * binary_data,      
00265         uint32_t * buffsize,        
00266         EspError * error);          
00277 ESPAPICALL int32_t esp_data_hexstring_from_binary(
00278         const uint8_t * binary_data,    
00279         const uint32_t data_size,       
00280         char * hexstring,               
00281         uint32_t * buffsize,            
00282         EspError * error);              
00291 ESPAPICALL EspMoney * esp_money_create(
00292         EspError * error);
00293 
00301 ESPAPICALL EspMoney * esp_money_create_string(
00302         const char * string_value,      
00303         EspError * error);              
00312 ESPAPICALL EspMoney * esp_money_create_long(
00313         const int64_t long_value,           
00314         const uint32_t precision,           
00315         EspError * error);
00316 
00325 ESPAPICALL EspMoney * esp_money_as_precision(
00326         const EspMoney * money,         
00327         const uint32_t precision,       
00328         EspError * error);              
00335 ESPAPICALL int32_t esp_money_free(
00336         EspMoney * money,               
00337         EspError * error);
00338 
00344 ESPAPICALL int32_t esp_money_get_long(
00345         const EspMoney * money,         
00346         int64_t * long_value,           
00347         EspError * error);
00348 
00354 ESPAPICALL int32_t esp_money_get_precision(
00355         const EspMoney * money,         
00356         uint32_t * precision,           
00357         EspError * error);
00358 
00364 ESPAPICALL int32_t esp_money_get_factor(
00365         const EspMoney * money,         
00366         uint64_t * factor,              
00367         EspError * error);
00368 
00369 
00375 ESPAPICALL EspBigDatetime * esp_bigdatetime_create(
00376         EspError * error);
00377 
00383 ESPAPICALL EspBigDatetime * esp_bigdatetime_create_string(
00384         const char * string_value,
00385         EspError * error);
00386 
00392 ESPAPICALL EspBigDatetime * esp_bigdatetime_create_microseconds(
00393         const int64_t microseconds,
00394         EspError * error);
00395 
00396 ESPAPICALL int32_t esp_bigdatetime_free(
00397         EspBigDatetime * datetime,
00398         EspError * error);
00399 
00400 ESPAPICALL int32_t esp_bigdatetime_get_microseconds(
00401         const EspBigDatetime * datetime,
00402         int64_t * microseconds,
00403         EspError * error);
00404 
00409 #ifdef __cplusplus
00410 }
00411 #endif
00412 
00413 #endif /* __ESP_STREAM_H */
 All Classes Variables