#define CA_COMMON_H_
#include "iotivity_config.h"
+#ifdef WITH_PROCESS_EVENT
+#include "ocevent.h"
+#endif
#ifndef WITH_ARDUINO
#ifdef TCP_ADAPTER
#define CA_MAX_TOKEN_LEN (8)
/**
+* Max interface name length.
+*/
+#define CA_MAX_INTERFACE_NAME_LEN (16)
+
+/**
* Max URI length.
*/
#ifdef ARDUINO
CA_NOT_ACCEPTABLE = 406, /**< Not Acceptable */
CA_REQUEST_ENTITY_INCOMPLETE = 408, /**< Request Entity Incomplete */
CA_REQUEST_ENTITY_TOO_LARGE = 413, /**< Request Entity Too Large */
+ CA_TOO_MANY_REQUESTS = 429, /**< Too Many Requests */
CA_INTERNAL_SERVER_ERROR = 500, /**< Internal Server Error */
CA_NOT_IMPLEMENTED = 501, /**< Not Implenented */
CA_BAD_GATEWAY = 502, /**< Bad Gateway */
CA_RESPONSE_DATA,
CA_ERROR_DATA,
CA_RESPONSE_FOR_RES,
- CA_NETWORK_COMMAND
+ CA_NETWORK_COMMAND,
+ CA_REQUEST_DATA_SERVER_INIT,
+ CA_RESPONSE_DATA_CLIENT_INIT
} CADataType_t;
typedef enum
#endif
#endif
int selectTimeout; /**< in seconds */
- int maxfd; /**< highest fd (for select) */
bool started; /**< the IP adapter has started */
bool terminate; /**< the IP adapter needs to stop */
bool ipv6enabled; /**< IPv6 enabled by OCInit flags */
int shutdownFds[2]; /**< shutdown pipe */
#endif
int connectionFds[2]; /**< connection pipe */
- int maxfd; /**< highest fd (for select) */
bool started; /**< the TCP adapter has started */
bool terminate; /**< the TCP adapter needs to stop */
+ bool bindenabled; /**< binding of TCP socket enabled */
bool ipv4tcpenabled; /**< IPv4 TCP enabled by OCInit flags */
bool ipv6tcpenabled; /**< IPv6 TCP enabled by OCInit flags */
} tcp;
*/
typedef void (*CANetworkMonitorCallback)(const CAEndpoint_t *info, CANetworkStatus_t status);
+/**
+ * Callback function type for editing bluetooth advertisement data before starting bluetooth advertisement.
+ * param[in] max_data_size Maximal size of advertisement data array
+ * param[out] data Advertisement data array
+ * param[out] data_size Actual Data size of advertisement data array
+ */
+typedef void (*CAAdvertisementDataGetterCB)(int max_data_size, char *data, int *data_size);
+
#ifdef __cplusplus
} /* extern "C" */
#endif