azure_iot_rs_sys/
lib.rs

1#![allow(dead_code)]
2#![allow(non_upper_case_globals)]
3#![allow(non_camel_case_types)]
4#![allow(non_snake_case)]
5
6include!(concat!(env!("OUT_DIR"), "/bindings.rs"));
7
8#[cfg(test)]
9mod tests {
10    use std::ffi::CString;
11    use super::*;
12
13
14    #[test]
15    fn test_mqtt() {
16        unsafe { 
17            IoTHub_Init();
18
19            let handle = IoTHubModuleClient_LL_CreateFromEnvironment(Some(MQTT_Protocol));
20            IoTHubModuleClient_LL_Destroy(handle);
21            
22        }
23    }
24
25    #[test]
26    fn test_amqp() {
27        unsafe { 
28            IoTHub_Init();
29
30            //let string = CString::new("").unwrap();
31            //let transport = IoTHubTransport_Create(Some(), string.as_ptr(), string.as_ptr());
32            //let transorthandle = IoTHubTransport_GetLLTransport(transport);
33            //let handle = IoTHubModuleClient_CreateFromConnectionString(string.as_ptr(), transporthandle);
34            //IoTHubModuleClient_LL_Destroy(handle);
35        }
36    }
37
38}