|
ESP SDK C API
|
00001 #ifndef __ESP_TYPES_H 00002 #define __ESP_TYPES_H 00003 00004 #ifdef _MSC_VER 00005 # ifdef esp_sdk_lib_EXPORTS 00006 # define ESPAPICALL __declspec(dllexport) 00007 # else /* esp_sdk_lib_EXPORT_ */ 00008 # define ESPAPICALL __declspec(dllimport) 00009 # endif /* esp_sdk_lib_EXPORT_ */ 00010 #else /* _MSC_VER */ 00011 # define ESPAPICALL 00012 #endif /* _MSC_VER */ 00013 00014 00015 #ifdef _MSC_VER 00016 /* WINDOWS */ 00017 typedef signed char int8_t; 00018 typedef short int int16_t; 00019 typedef int int32_t; 00020 typedef __int64 int64_t; 00021 #ifndef uint8_t 00022 typedef unsigned char uint8_t; 00023 #endif 00024 typedef unsigned short int uint16_t; 00025 typedef unsigned int uint32_t; 00026 typedef unsigned long long uint64_t; 00027 00028 #else 00029 /* UNIX */ 00030 # include <stdint.h> 00031 #endif 00032 00033 #include <stddef.h> 00034 #include <time.h> 00035 00036 00037 00042 typedef struct { 00043 uint32_t size; 00044 char ** items; 00045 } ESP_STRING_ARRAY; 00046 00047 #define ESP_ARRAY_FREE(A) \ 00048 { int i; \ 00049 if ((A) && (A)->size) \ 00050 for (i = 0; i < (A)->size; ++i) \ 00051 if ((A)->items[i]) \ 00052 free ((A)->items[i]); \ 00053 free ((A)->items); \ 00054 } 00055 00056 00065 typedef enum 00066 { 00067 ESP_LIST_MANAGER_T, 00068 ESP_LIST_CONTROLLER_T, 00069 ESP_LIST_WORKSPACE_T, 00070 ESP_LIST_APPLICATION_T, 00071 ESP_LIST_STRING_T, 00072 ESP_LIST_STREAM_T, 00073 ESP_LIST_EVENT_T, 00074 ESP_LIST_UNDEFINED_T 00075 } 00076 ESP_LIST_ITEM_T; 00077 00081 typedef struct EspList EspList; 00082 00083 typedef struct EspMap EspMap; 00084 00085 typedef struct EspSdk EspSdk; 00086 00093 typedef enum 00094 { 00095 UNDEFINED_ACCESS = 0, 00096 DIRECT_ACCESS = 1, 00097 CALLBACK_ACCESS, 00098 SELECTION_ACCESS 00099 } 00100 ESP_ACCESS_MODE_T; 00101 00104 typedef struct EspError EspError; 00105 00110 typedef struct EspCredentials EspCredentials; 00121 typedef enum 00122 { 00123 UNDEFINED_URI = 0, 00124 SERVER_URI = 1, 00125 WORKSPACE_URI, 00126 PROJECT_URI, 00127 STREAM_URI 00128 } 00129 ESP_URI_T; 00130 00141 typedef enum 00142 { 00143 ESP_EVENT_UNKNOWN = -1, 00144 ESP_EVENT_SERVER = 0, 00145 ESP_EVENT_PROJECT, 00146 ESP_EVENT_PUBLISHER, 00147 ESP_EVENT_SUBSCRIBER 00148 } 00149 ESP_EVENT_CATEGORY_T; 00150 00157 typedef struct EspUri EspUri; 00158 00166 typedef struct EspDispatcher EspDispatcher; 00167 00168 typedef struct EspUpdater EspUpdater; 00169 00170 typedef struct EspSelector EspSelector; 00171 00179 typedef struct EspServerEvent EspServerEvent; 00180 00181 typedef struct EspServerOptions EspServerOptions; 00182 00183 typedef struct EspServer EspServer; 00184 00185 typedef void (*SERVER_CALLBACK_T)(const EspServerEvent * event, void * user_data); 00186 00193 typedef struct EspDeployment EspDeployment; 00194 00195 typedef struct EspProjectEvent EspProjectEvent; 00196 00197 typedef struct EspProjectOptions EspProjectOptions; 00198 00199 typedef struct EspProject EspProject; 00200 00201 typedef void (*PROJECT_CALLBACK_T)(const EspProjectEvent * event, void * user_data); 00202 00209 typedef struct EspSchema EspSchema; 00210 00211 typedef struct EspStream EspStream; 00212 00213 typedef struct EspMoney EspMoney; 00214 00215 typedef struct EspBigDatetime EspBigDatetime; 00216 00223 typedef struct EspSubscriberOptions EspSubscriberOptions; 00224 00225 typedef struct EspSubscriberEvent EspSubscriberEvent; 00226 00227 typedef struct EspSubscriber EspSubscriber; 00228 00229 typedef void (*SUBSCRIBER_CALLBACK_T)(const EspSubscriberEvent * event, void * user_data); 00230 00231 typedef struct EspMessageReader EspMessageReader; 00232 00233 typedef struct EspRowReader EspRowReader; 00234 00241 typedef struct EspPublisher EspPublisher; 00242 00243 typedef struct EspPublisherOptions EspPublisherOptions; 00244 00245 typedef struct EspPublisherEvent EspPublisherEvent; 00246 00247 typedef void (*PUBLISHER_CALLBACK_T)(const EspPublisherEvent * event, void * user_data); 00248 00249 typedef struct EspMessageWriter EspMessageWriter; 00250 00251 typedef struct EspRelativeRowWriter EspRelativeRowWriter; 00252 00256 #endif /* __ESP_TYPES_H */ 00257
1.7.5