/// Gets a room list from home
///
/// # Safety
///
/// Home gets from smart_home_get_home()
///
/// * `handle`: home handle
Gets a room list from home
Gets a room list from home
pub unsafe extern "C" fn smart_home_get_room_next(iter: *mut HandleRoomIter) -> *const c_char {
    let iter = &mut *iter;
    let handle = &mut *iter.handle;
    let home = &mut *iter.home;
    let room = match home.room_iter().nth(iter.cursor) {
        Some(room) => room,
        None => return std::ptr::null(),
    };
    iter.cursor += 1;
    handle.room_name_buffer = Some(CString::new(room.name()).unwrap());
    handle.room_name_buffer.as_ref().unwrap().as_ptr()
}
pub unsafe extern " " fn smart_home_get_room_next ( iter : * mut HandleRoomIter ) -> * const c_char { let iter = & mut * iter ; let handle = & mut * iter . handle ; let home = & mut * iter . home ; let room = match home . room_iter ( ) . nth ( iter . cursor ) { Some ( room ) => room , None => return std :: ptr :: null ( ) , } ; iter . cursor += 1 ; handle . room_name_buffer = Some ( CString :: new ( room . name ( ) ) . unwrap ( ) ) ; handle . room_name_buffer . as_ref ( ) . unwrap ( ) . as_ptr ( ) }
Gets a room list from home
Gets a room list from home
iter
*mut HandleRoomIter
safety
Home gets from smart_home_get_home()

`handle`: home handle
Home gets from smart_home_get_home () ` handle ` : home handle