ESP SDK C API
C:/cygwin/home/shubhrab/FM/CEP/esp/dev/r5/main/src/cpp/include/public/interfaces/sdk/esp_subscriber.h
00001 #ifndef __ESP_SUBSCRIBER_H
00002 #define __ESP_SUBSCRIBER_H
00003 
00004 #include <sdk/esp_types.h>
00005 #include <sdk/esp_stream.h>
00006 
00007 #ifdef __cplusplus
00008 extern "C" {
00009 #endif
00010 
00021 #define ESP_SUBSCRIBER_EVENT_CONNECTED          0x04000001      
00022 #define ESP_SUBSCRIBER_EVENT_SUBSCRIBED         0x04000002      
00023 #define ESP_SUBSCRIBER_EVENT_UNSUBSCRIBED       0x04000004      
00024 #define ESP_SUBSCRIBER_EVENT_DISCONNECTED       0x04000008      
00025 #define ESP_SUBSCRIBER_EVENT_CLOSED             0x0400000A      
00026 #define ESP_SUBSCRIBER_EVENT_DATA               0x04000010      
00027 #define ESP_SUBSCRIBER_EVENT_SYNC_START         0x04000020      
00028 #define ESP_SUBSCRIBER_EVENT_SYNC_END           0x04000040      
00029 #define ESP_SUBSCRIBER_EVENT_DATA_INVALID       0x04000080      
00030 #define ESP_SUBSCRIBER_EVENT_STREAM_EXIT        0x040000A0      
00031 #define ESP_SUBSCRIBER_EVENT_DATA_LOST          0x04000100      
00032 #define ESP_SUBSCRIBER_EVENT_ERROR              0x04000200      
00033 #define ESP_SUBSCRIBER_EVENT_ALL                0x040003FF      
00043 #define ESP_SUBSCRIBER_FLAG_LOSSY           0x01 
00044 #define ESP_SUBSCRIBER_FLAG_NOBASE          0x02 
00045 #define ESP_SUBSCRIBER_FLAG_DISTRIBUTED     0x04 
00046 #define ESP_SUBSCRIBER_FLAG_DROPPABLE       0x08 
00047 #define ESP_SUBSCRIBER_FLAG_PRESERVE_BLOCKS 0x20 
00048 #define ESP_SUBSCRIBER_FLAG_SHINETHROUGH    0x40 
00062 ESPAPICALL EspSubscriberOptions * esp_subscriber_options_create(
00063         EspError * error);
00064 
00070 ESPAPICALL int32_t esp_subscriber_options_free(
00071         EspSubscriberOptions * options,
00072         EspError * error);
00073 
00080 ESPAPICALL int32_t esp_subscriber_options_set_access_mode(
00081         EspSubscriberOptions * options,                 
00082         ESP_ACCESS_MODE_T mode,                         
00083         EspError * error);                              
00091 ESPAPICALL int32_t esp_subscriber_options_set_dispatcher(
00092         EspSubscriberOptions * options,                 
00093         const EspDispatcher * dispatcher,
00094         EspError * error);                              
00102 ESPAPICALL int32_t esp_subscriber_options_set_updater(
00103         EspSubscriberOptions * options,                 
00104         const EspUpdater * updater,
00105         EspError * error);                              
00112 ESPAPICALL int32_t esp_subscriber_options_set_flags(
00113         EspSubscriberOptions * options,                 
00114         uint32_t flags,                                 
00115         EspError * error);                              
00124 ESPAPICALL int32_t esp_subscriber_options_set_base_drain_timeout(
00125         EspSubscriberOptions * options,                 
00126         int32_t timeout,                                
00127         EspError * error);                              
00136 ESPAPICALL int32_t esp_subscriber_options_set_pulsed(
00137         EspSubscriberOptions * options,                 
00138         int32_t interval,                               
00139         EspError * error);                              
00148 ESPAPICALL int32_t esp_subscriber_options_set_queuesize(
00149         EspSubscriberOptions * options,                 
00150         int32_t size,                                   
00151         EspError * error);                              
00166 ESPAPICALL int32_t esp_subscriber_event_get_type(
00167         const EspSubscriberEvent * event,
00168         uint32_t * type,
00169         EspError * error);                              
00176 ESPAPICALL EspSubscriber * esp_subscriber_event_get_subscriber(
00177         const EspSubscriberEvent * event,
00178         EspError * error);
00179 
00185 ESPAPICALL const EspStream * esp_subscriber_event_get_stream(
00186         const EspSubscriberEvent * event,
00187         EspError * error);
00188 
00195 ESPAPICALL EspMessageReader * esp_subscriber_event_get_reader(
00196         const EspSubscriberEvent * event,
00197         EspError * error);
00198 
00204 ESPAPICALL EspError * esp_subscriber_event_get_error(
00205         const EspSubscriberEvent * event,
00206         EspError * error);
00207 
00211 ESPAPICALL int32_t esp_subscriber_event_free(
00212         EspSubscriberEvent * event,
00213         EspError * error);
00214 
00223 ESPAPICALL EspSubscriber * esp_subscriber_create(
00224         const EspUri * uri,                         
00225         const EspCredentials * credentials,         
00226         const EspSubscriberOptions * options,       
00227         EspError * error);
00228 
00234 ESPAPICALL int32_t esp_subscriber_free(
00235         EspSubscriber * subscriber,                 
00236         EspError * error);
00237 
00243 ESPAPICALL EspProject * esp_subscriber_get_project(
00244         EspSubscriber * subscriber,
00245         EspError * error);
00246 
00253 ESPAPICALL int32_t esp_subscriber_connect(
00254         EspSubscriber * subscriber,                 
00255         EspError * error);
00256 
00263 ESPAPICALL int32_t esp_subscriber_disconnect(
00264         EspSubscriber * subscriber,                 
00265         EspError * error);
00266 
00273 ESPAPICALL int32_t esp_subscriber_close(
00274         EspSubscriber * subscriber,                 
00275         EspError * error);
00276 
00283 ESPAPICALL int32_t esp_subscriber_subscribe(
00284         EspSubscriber * subscriber,                 
00285         const EspStream * stream,                   
00286         EspError * error);
00287 
00294 ESPAPICALL int32_t esp_subscriber_subscribe_streamname(
00295         EspSubscriber * subscriber,                 
00296         const char * stream_name,                   
00297         EspError * error);
00298 
00304 ESPAPICALL int32_t esp_subscriber_subscribe_sql(
00305         EspSubscriber * subscriber,                 
00306         const char * sql,                           
00307         EspError * error);
00308 
00317 ESPAPICALL int32_t esp_subscriber_get_subscribed_streams(
00318         EspSubscriber * subscriber,                 
00319         EspList * stream_list,                      
00320         EspError * error);
00321 
00327 ESPAPICALL int32_t esp_subscriber_set_callback(
00328         EspSubscriber * subscriber,                 
00329         uint32_t events,                            
00330         SUBSCRIBER_CALLBACK_T callback,             
00331         void * user_data,                           
00332         EspError * error);
00333 
00334 
00340 ESPAPICALL int32_t esp_subscriber_select_with(
00341         EspSubscriber * subscriber,                 
00342         EspSelector * selector,                     
00343         uint32_t events,                            
00344         EspError * error);
00345 
00357 ESPAPICALL EspSubscriberEvent * esp_subscriber_get_next_event(
00358         EspSubscriber * subscriber,             
00359         EspError * error);                      
00371 ESPAPICALL int32_t esp_message_reader_is_block(
00372         const EspMessageReader * reader,        
00373         int * is_block,                         
00374         EspError * error);                      
00381 ESPAPICALL EspRowReader * esp_message_reader_next_row(
00382         const EspMessageReader * reader,        
00383         EspError * error);
00384 
00390 ESPAPICALL EspStream * esp_message_reader_get_stream(
00391         const EspMessageReader * reader,
00392         EspError * error);
00393 
00398 ESPAPICALL int32_t esp_messge_reader_get_numoptions(
00399         const EspMessageReader * reader,
00400         int * num_options,
00401         EspError * error);
00402 
00403 
00409 ESPAPICALL int32_t esp_row_reader_get_opcode(
00410         const EspRowReader * reader,            
00411         ESP_OPERATION_T * opcode,               
00412         EspError * error);
00413 
00418 ESPAPICALL int32_t esp_row_reader_get_flags(
00419         const EspRowReader * reader,                
00420         int32_t * flags,
00421         EspError * error);
00422 
00428 ESPAPICALL int32_t esp_row_reader_is_null(
00429         const EspRowReader * reader,                
00430         const int32_t column,                       
00431         int * is_null,
00432         EspError * error);
00433 
00439 ESPAPICALL int32_t esp_row_reader_is_shinethrough(
00440         const EspRowReader * reader,                
00441         const int32_t column,                       
00442         int * is_shinethrough,
00443         EspError * error);
00444 
00450 ESPAPICALL int32_t esp_row_reader_get_integer(
00451         const EspRowReader * reader,                
00452         const int32_t column,                       
00453         int32_t * int_value,                        
00454         EspError * error);
00455 
00461 ESPAPICALL int32_t esp_row_reader_get_long(
00462         const EspRowReader * reader,                
00463         const int32_t column,                       
00464         int64_t * long_value,                       
00465         EspError * error);
00466 
00472 ESPAPICALL int32_t esp_row_reader_get_float(
00473         const EspRowReader * reader,                
00474         const int32_t column,                       
00475         double * double_value,                      
00476         EspError * error);
00477 
00485 ESPAPICALL int32_t esp_row_reader_get_string(
00486         const EspRowReader * reader,                
00487         const int32_t column,                       
00488         char * string_value,                        
00489         uint32_t * buffsize,
00490         EspError * error);
00491 
00497 ESPAPICALL int32_t esp_row_reader_get_date(
00498         const EspRowReader * reader,                
00499         const int32_t column,                       
00500         time_t * date_value,                        
00501         EspError * error);
00502 
00508 ESPAPICALL int32_t esp_row_reader_get_timestamp(
00509         const EspRowReader * reader,                
00510         const int32_t column,                       
00511         int64_t * timestamp_value,                  
00512         EspError * error);
00513 
00519 ESPAPICALL int32_t esp_row_reader_get_legacy_money(
00520         const EspRowReader * reader,                
00521         const int32_t column,                       
00522         EspMoney * money_value,                     
00523         EspError * error);                          
00530 ESPAPICALL int32_t esp_row_reader_get_legacy_money_as_long(
00531         const EspRowReader * reader,                
00532         const int32_t column,                       
00533         int64_t * long_value,                       
00534         EspError * error);                          
00541 ESPAPICALL int32_t esp_row_reader_get_money(
00542         const EspRowReader * reader,                
00543         const int32_t column,                       
00544         EspMoney * money_value,                     
00545         EspError * error);                          
00553 ESPAPICALL int32_t esp_row_reader_get_money_as_long(
00554         const EspRowReader * reader,                
00555         const int32_t column,                       
00556         int64_t * long_value,                       
00557         EspError * error);                          
00564 ESPAPICALL int32_t esp_row_reader_get_bigdatetime(
00565         const EspRowReader * reader,                
00566         const int32_t column,                       
00567         EspBigDatetime * bigdatetime_value,         
00568         EspError * error);                          
00575 ESPAPICALL int32_t esp_row_reader_get_binary(
00576         const EspRowReader * reader,                
00577         const int32_t column,                       
00578         void * binary_value,                        
00579         uint32_t * buffsize, 
00580         EspError * error);                          
00587 ESPAPICALL int32_t esp_row_reader_get_boolean(
00588         const EspRowReader * reader,                
00589         const int32_t column,                       
00590         int32_t * boolean_value,                    
00591         EspError * error);                          
00598 ESPAPICALL int32_t esp_row_reader_get_interval(
00599         const EspRowReader * reader,                
00600         const int32_t column,                       
00601         int64_t * interval_value,                   
00602         EspError * error);                          
00608 #ifdef __cplusplus
00609 }
00610 #endif
00611 
00612 
00613 #endif /* __ESP_SUBSCRIBER_H */
 All Classes Variables