C Porting Layer API Reference for Oracle Internet of Things Cloud Service Client Software Library. Release 21.1.1.0.0-3. E80003-19
|
00001 /* 00002 * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. 00003 * 00004 * This software is dual-licensed to you under the MIT License (MIT) and 00005 * the Universal Permissive License (UPL). See the LICENSE file in the root 00006 * directory for license terms. You may choose either license, or both. 00007 */ 00008 00014 #ifndef IOTCS_PORT_SSL_H 00015 #define IOTCS_PORT_SSL_H 00016 00017 #ifdef __cplusplus 00018 extern "C" { 00019 #endif 00020 00021 #include "iotcs.h" 00022 00047 #define IOTCS_RESULT_SSL_WANT_READ IOTCS_RESULT_CANNOT_AUTHORIZE 00048 00056 iotcs_result iotcs_port_ssl_init(const char* addr, unsigned short port); 00057 00062 void iotcs_port_ssl_finalize(void); 00063 00069 iotcs_result iotcs_port_ssl_connect(void); 00070 00076 iotcs_result iotcs_port_ssl_disconnect(void); 00077 00085 iotcs_result iotcs_port_ssl_write(char* request, size_t length); 00086 00097 iotcs_result iotcs_port_ssl_read(char* buffer, int len, int *bytes_read); 00098 00099 #if defined IOTCS_LONG_POLLING || defined IOTCS_DOXYGEN 00100 00106 iotcs_result iotcs_port_ssl_connect_lp(int32_t timeout_ms); 00107 00113 iotcs_result iotcs_port_ssl_disconnect_lp(void); 00114 00122 iotcs_result iotcs_port_ssl_write_lp(char* request, size_t length); 00123 00137 iotcs_result iotcs_port_ssl_read_lp(char* buffer, int len, int *bytes_read); 00138 #endif 00139 00140 #if defined IOTCS_STORAGE_SUPPORT || defined IOTCS_DOXYGEN 00141 00149 iotcs_result iotcs_port_storage_ssl_init(const char* addr, unsigned short port, iotcs_bool is_ssl); 00150 00155 void iotcs_port_storage_ssl_finalize(void); 00156 00162 iotcs_result iotcs_port_storage_ssl_connect(void); 00163 00169 iotcs_result iotcs_port_storage_ssl_disconnect(void); 00170 00181 iotcs_result iotcs_port_storage_ssl_read(char* buffer, int len, int *bytes_read); 00182 00190 iotcs_result iotcs_port_storage_ssl_write(char* request, size_t length); 00191 #endif 00192 00193 #ifdef __cplusplus 00194 } 00195 #endif 00196 00197 #endif /* IOTCS_PORT_SSL_H */ 00198