9 #ifndef __ewf_adapter__h__included__
10 #define __ewf_adapter__h__included__
51 #ifdef EWF_PARAMETER_CHECKING
52 uint32_t struct_magic;
54 uint32_t struct_version;
82 void* implementation_ptr;
85 #define EWF_ADAPTER_STRUCT_MAGIC (0x000ADA7E)
86 #define EWF_ADAPTER_STRUCT_SIZE (sizeof(struct _ewf_adapter))
87 #define EWF_ADAPTER_VERSION (EWF_DEVELOPER_MICROSOFT | 0x0001)
89 #ifdef EWF_PARAMETER_CHECKING
90 #define EWF_ADAPTER_VALIDATE_POINTER(adapter_ptr) \
92 if ((adapter_ptr == NULL) || \
93 (adapter_ptr->struct_magic != EWF_ADAPTER_STRUCT_MAGIC) || \
94 (adapter_ptr->struct_size != EWF_ADAPTER_STRUCT_SIZE) || \
95 (adapter_ptr->struct_version != EWF_ADAPTER_VERSION) || \
96 (adapter_ptr->implementation_ptr == NULL)) \
98 EWF_LOG_ERROR("The adapter pointer is invalid.\n"); \
99 return EWF_RESULT_INVALID_FUNCTION_ARGUMENT; \
103 #define EWF_ADAPTER_VALIDATE_POINTER(allocator_ptr) \
105 if ((adapter_ptr == NULL) || \
106 (adapter_ptr->implementation_ptr == NULL)) \
108 EWF_LOG_ERROR("The adapter pointer is invalid.\n"); \
109 return EWF_RESULT_INVALID_FUNCTION_ARGUMENT; \
114 #ifdef EWF_PARAMETER_CHECKING
115 #define EWF_ADAPTER_VALIDATE_POINTER_TYPE(adapter_ptr, adapter_type) \
117 if ((adapter_ptr == NULL) || \
118 (adapter_ptr->struct_magic != EWF_ADAPTER_STRUCT_MAGIC) || \
119 (adapter_ptr->struct_size != EWF_ADAPTER_STRUCT_SIZE) || \
120 (adapter_ptr->struct_version != EWF_ADAPTER_VERSION) || \
121 (adapter_ptr->struct_type != adapter_type)) \
123 EWF_LOG_ERROR("The adapter type is invalid.\n"); \
124 return EWF_RESULT_INVALID_FUNCTION_ARGUMENT; \
128 #define EWF_ADAPTER_VALIDATE_POINTER_TYPE(interface_ptr, interface_type)
The Embedded Wireless Framework.
The Embedded Wireless Framework adapter control API.
The Embedded Wireless Framework adapter DTLS API.
The Embedded Wireless Framework adapter info API.
The Embedded Wireless Framework modem adapter API.
The Embedded Wireless Framework adapter MQTT API.
The Embedded Wireless Framework adapter basic MQTT API.
The Embedded Wireless Framework adapter TCP API.
The Embedded Wireless Framework adapter TLS API.
The Embedded Wireless Framework adapter TLS basic API.
The Embedded Wireless Framework adapter UDP API.
The Embedded Wireless Framework WiFi adapter station API.
The adapter control API type.
Definition: ewf_adapter_api_control.h:28
the DTLS context API structure
Definition: ewf_adapter_api_dtls.h:78
Definition: ewf_adapter_api_info.h:26
Definition: ewf_adapter_api_modem.h:34
Definition: ewf_adapter_api_mqtt_basic.h:55
Definition: ewf_adapter_api_mqtt.h:84
The TCP API structure.
Definition: ewf_adapter_api_tcp.h:76
The TLS basic API structure.
Definition: ewf_adapter_api_tls_basic.h:29
the TLS configuration API
Definition: ewf_adapter_api_tls.h:138
The UDP API type.
Definition: ewf_adapter_api_udp.h:63
Definition: ewf_adapter_api_wifi_station.h:29
The EWF network adapter control structure definition.
Definition: ewf_adapter.h:50
ewf_adapter_api_mqtt * mqtt_api_ptr
Definition: ewf_adapter.h:68
ewf_interface * interface_ptr
Definition: ewf_adapter.h:73
The interface structure definition.
Definition: ewf_interface.h:66