hkstreamer/hkstreamer.rs

200 lines
5.5 KiB
Rust
Raw Normal View History

2023-03-29 19:03:49 +08:00
/* automatically generated by rust-bindgen 0.64.0 */
pub const HPR_OK: u32 = 0;
pub const HPR_ERROR: i32 = -1;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct LoginInfo {
pub sDeviceAddress: [::std::os::raw::c_char; 129usize],
pub sUserName: [::std::os::raw::c_char; 64usize],
pub sPassword: [::std::os::raw::c_char; 64usize],
}
#[test]
fn bindgen_test_layout_LoginInfo() {
const UNINIT: ::std::mem::MaybeUninit<LoginInfo> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<LoginInfo>(),
257usize,
concat!("Size of: ", stringify!(LoginInfo))
);
assert_eq!(
::std::mem::align_of::<LoginInfo>(),
1usize,
concat!("Alignment of ", stringify!(LoginInfo))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).sDeviceAddress) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(LoginInfo),
"::",
stringify!(sDeviceAddress)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).sUserName) as usize - ptr as usize },
129usize,
concat!(
"Offset of field: ",
stringify!(LoginInfo),
"::",
stringify!(sUserName)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).sPassword) as usize - ptr as usize },
193usize,
concat!(
"Offset of field: ",
stringify!(LoginInfo),
"::",
stringify!(sPassword)
)
);
}
pub type LPLoginInfo = *mut LoginInfo;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct StreamDate {
pub dwYear: ::std::os::raw::c_ulong,
pub dwMonth: ::std::os::raw::c_ulong,
pub dwDay: ::std::os::raw::c_ulong,
pub dwHour: ::std::os::raw::c_ulong,
pub dwMinute: ::std::os::raw::c_ulong,
pub dwSecond: ::std::os::raw::c_ulong,
}
#[test]
fn bindgen_test_layout_StreamDate() {
const UNINIT: ::std::mem::MaybeUninit<StreamDate> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<StreamDate>(),
48usize,
concat!("Size of: ", stringify!(StreamDate))
);
assert_eq!(
::std::mem::align_of::<StreamDate>(),
8usize,
concat!("Alignment of ", stringify!(StreamDate))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).dwYear) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(StreamDate),
"::",
stringify!(dwYear)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).dwMonth) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(StreamDate),
"::",
stringify!(dwMonth)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).dwDay) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(StreamDate),
"::",
stringify!(dwDay)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).dwHour) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(StreamDate),
"::",
stringify!(dwHour)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).dwMinute) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(StreamDate),
"::",
stringify!(dwMinute)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).dwSecond) as usize - ptr as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(StreamDate),
"::",
stringify!(dwSecond)
)
);
}
pub type LStreamDate = *mut StreamDate;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct StreamCon {
pub lChannel: ::std::os::raw::c_ulong,
pub start: StreamDate,
pub end: StreamDate,
}
#[test]
fn bindgen_test_layout_StreamCon() {
const UNINIT: ::std::mem::MaybeUninit<StreamCon> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<StreamCon>(),
104usize,
concat!("Size of: ", stringify!(StreamCon))
);
assert_eq!(
::std::mem::align_of::<StreamCon>(),
8usize,
concat!("Alignment of ", stringify!(StreamCon))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).lChannel) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(StreamCon),
"::",
stringify!(lChannel)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).start) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(StreamCon),
"::",
stringify!(start)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).end) as usize - ptr as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(StreamCon),
"::",
stringify!(end)
)
);
}
pub type LPStream = *mut StreamCon;
extern "C" {
pub fn playback(loginInfo: LPLoginInfo, stream: LPStream) -> ::std::os::raw::c_int;
}