|
ESP SDK C API
|
00001 #ifndef __ESP_PROJECT_H 00002 #define __ESP_PROJECT_H 00003 00004 #include <sdk/esp_types.h> 00005 00006 #ifdef __cplusplus 00007 extern "C" { 00008 #endif 00009 00020 #define ESP_PROJECT_EVENT_CONNECTED 0x02000001 00021 #define ESP_PROJECT_EVENT_DISCONNECTED 0x02000002 00022 #define ESP_PROJECT_EVENT_CLOSED 0x02000004 00023 #define ESP_PROJECT_EVENT_ERROR 0x02000008 00024 #define ESP_PROJECT_EVENT_STALE 0x02000010 00025 #define ESP_PROJECT_EVENT_UPTODATE 0x02000020 00026 #define ESP_PROJECT_EVENT_ALL 0x0200003F 00038 ESPAPICALL EspProjectOptions * esp_project_options_create( 00039 EspError * error); 00040 00045 ESPAPICALL int32_t esp_project_options_set_access_mode( 00046 EspProjectOptions * project_options, 00047 ESP_ACCESS_MODE_T mode, 00048 EspError * error); 00049 00054 ESPAPICALL int32_t esp_project_options_set_dispatcher( 00055 EspProjectOptions * project_options, 00056 EspDispatcher * dispatcher, 00057 EspError * error); 00058 00063 ESPAPICALL int32_t esp_project_options_set_updater( 00064 EspProjectOptions * project_options, 00065 EspUpdater * updater, 00066 EspError * error); 00067 00075 ESPAPICALL int32_t esp_project_options_set_retrycount( 00076 EspProjectOptions * project_options, 00077 int32_t count, 00078 EspError * error); 00084 ESPAPICALL int32_t esp_project_options_free( 00085 EspProjectOptions * project_options, 00086 EspError * error); 00087 00095 ESPAPICALL EspProject * esp_project_get( 00096 const EspUri * uri, 00097 const EspCredentials * creds, 00098 const EspProjectOptions * project_options, 00099 EspError * error); 00100 00107 ESPAPICALL EspProject * esp_project_get_standalone( 00108 const char * host, 00109 const int32_t port, 00110 const EspCredentials * creds, 00111 const EspProjectOptions * project_options, 00112 EspError * error); 00113 00121 ESPAPICALL int32_t esp_project_connect( 00122 EspProject * project, 00123 EspError * error); 00124 00132 ESPAPICALL int32_t esp_project_disconnect( 00133 EspProject * project, 00134 EspError * error); 00135 00143 ESPAPICALL int32_t esp_project_close( 00144 EspProject * project, 00145 EspError * error); 00146 00152 ESPAPICALL EspServer * esp_project_get_server( 00153 EspProject * project, 00154 EspError * error); 00155 00162 ESPAPICALL EspSubscriber * esp_project_create_subscriber( 00163 EspProject * project, 00164 const EspSubscriberOptions * options, 00165 EspError * error); 00166 00173 ESPAPICALL EspPublisher * esp_project_create_publisher( 00174 EspProject * project, 00175 const EspPublisherOptions * options, 00176 EspError * error); 00177 00186 ESPAPICALL int32_t esp_project_get_stream_names( 00187 EspProject * project, 00188 ESP_STRING_ARRAY * names, 00189 EspError * error); 00190 00196 ESPAPICALL int32_t esp_project_get_model_stream_names( 00197 EspProject * project, 00198 EspList * stream_list, 00199 EspError * error); 00200 00206 ESPAPICALL int32_t esp_project_get_intermediate_stream_names( 00207 EspProject * project, 00208 EspList * stream_list, 00209 EspError * error); 00210 00216 ESPAPICALL int32_t esp_project_get_system_stream_names( 00217 EspProject * project, 00218 EspList * stream_list, 00219 EspError * error); 00220 00226 ESPAPICALL int32_t esp_project_get_error_stream_names( 00227 EspProject * project, 00228 EspList * stream_list, 00229 EspError * error); 00230 00231 00237 ESPAPICALL const EspStream * esp_project_get_stream( 00238 EspProject * project, 00239 const char * stream, 00240 EspError * error); 00241 00247 ESPAPICALL int32_t esp_project_is_connected( 00248 EspProject * project, 00249 int32_t * connected, 00250 EspError * error); 00251 00252 00258 ESPAPICALL int32_t esp_project_is_quiesced( 00259 EspProject * project, 00260 int32_t * quiesced, 00261 EspError * error); 00262 00268 ESPAPICALL int32_t esp_project_set_callback( 00269 EspProject * project, 00270 uint32_t events, 00271 PROJECT_CALLBACK_T callback, 00272 void * data, 00273 EspError * error); 00274 00279 ESPAPICALL int32_t esp_project_select_with( 00280 EspProject * project, 00281 EspSelector * selector, 00282 uint32_t events, 00283 EspError * error); 00300 ESPAPICALL const EspDeployment * esp_project_get_deployment( 00301 const EspProject * project, 00302 EspError * error); 00303 00309 ESPAPICALL int32_t esp_deployment_get_active_active( 00310 const EspDeployment * deployment, 00311 char * aa, 00312 int32_t * size, 00313 EspError * error); 00314 00319 ESPAPICALL int32_t esp_deployment_get_role( 00320 const EspDeployment * deployment, 00321 char * role, 00322 int32_t * size, 00323 EspError * error); 00324 00329 ESPAPICALL int32_t esp_deployment_get_instance_id( 00330 const EspDeployment * deployment, 00331 char * id, 00332 int32_t * size, 00333 EspError * error); 00334 00335 00340 ESPAPICALL int32_t esp_deployment_get_instance_index( 00341 const EspDeployment * deployment, 00342 int32_t * index, 00343 EspError * error); 00344 00345 00350 ESPAPICALL int32_t esp_deployment_get_host( 00351 const EspDeployment * deployment, 00352 char * host, 00353 int32_t * size, 00354 EspError * error); 00355 00360 ESPAPICALL int32_t esp_deployment_get_port( 00361 const EspDeployment * deployment, 00362 int32_t * port, 00363 EspError * error); 00364 00368 ESPAPICALL int32_t esp_deployment_get_sql_port( 00369 const EspDeployment * deployment, 00370 int32_t * sql_port, 00371 EspError * error); 00372 00377 ESPAPICALL int32_t esp_deployment_get_data_host( 00378 const EspDeployment * deployment, 00379 char * data_host, 00380 int32_t * size, 00381 EspError * error); 00382 00387 ESPAPICALL int32_t esp_deployment_get_data_port( 00388 const EspDeployment * deployment, 00389 int32_t * data_port, 00390 EspError * error); 00391 00395 ESPAPICALL int32_t esp_deployment_get_pid( 00396 const EspDeployment * deployment, 00397 int32_t * pid, 00398 EspError * error); 00399 00404 ESPAPICALL int32_t esp_deployment_is_bigendian( 00405 const EspDeployment * deployment, 00406 int32_t * big_endian, 00407 EspError * error); 00408 00413 ESPAPICALL int32_t esp_deployment_get_address_size( 00414 const EspDeployment * deployment, 00415 int32_t * address_size, 00416 EspError * error); 00417 00422 ESPAPICALL int32_t esp_deployment_get_date_size( 00423 const EspDeployment * deployment, 00424 int32_t * date_size, 00425 EspError * error); 00426 00431 ESPAPICALL int32_t esp_deployment_get_money_precision( 00432 const EspDeployment * deployment, 00433 int32_t * precision, 00434 EspError * error); 00435 00446 ESPAPICALL int32_t esp_project_event_get_type( 00447 const EspProjectEvent * event, 00448 uint32_t * type, 00449 EspError * error); 00453 ESPAPICALL EspProject * esp_project_event_get_project( 00454 const EspProjectEvent * event, 00455 EspError * error); 00456 00460 ESPAPICALL const EspError * esp_project_event_get_error( 00461 const EspProjectEvent * event, 00462 EspError * error); 00463 00468 #ifdef __cplusplus 00469 } 00470 #endif 00471 00472 #endif /* __ESP_PROJECT_H */
1.7.5