/// Get Home handle from SmartHub by name
///
/// # Safety
///
/// handle gets from smart_home_new()
///
/// * `handle`: smart hub handle
/// * `name`: home name to get
Get Home handle from SmartHub by name
Get Home handle from SmartHub by name
pub unsafe extern "C" fn smart_home_get_home(
    handle: *mut Handle,
    name: *const c_char,
) -> *mut Home {
    let handle = &mut *handle;
    let home_name = CStr::from_ptr(name).to_str().unwrap();
    match handle.controller.get_home_mut(home_name) {
        Some(home) => home as *mut Home,
        None => std::ptr::null_mut(),
    }
}
pub unsafe extern " " fn smart_home_get_home ( handle : * mut Handle , name : * const c_char , ) -> * mut Home { let handle = & mut * handle ; let home_name = CStr :: from_ptr ( name ) . to_str ( ) . unwrap ( ) ; match handle . controller . get_home_mut ( home_name ) { Some ( home ) => home as * mut Home , None => std :: ptr :: null_mut ( ) , } }
Get Home handle from SmartHub by name
Get Home handle from SmartHub by name
handle
*mut Handle
name
*const c_char
safety
handle gets from smart_home_new()

`handle`: smart hub handle
`name`: home name to get
handle gets from smart_home_new () ` handle ` : smart hub handle ` name ` : home name to get