pub unsafe extern "C" fn BNRecognizePlatformForViewType(
type_: *mut BNBinaryViewType,
id: u64,
endian: BNEndianness,
view: *mut BNBinaryView,
metadata: *mut BNMetadata,
) -> *mut BNPlatform
Expand description
BinaryView* passed in here should be the parent view (not the partially constructed object!), and this function should be called from the BNCustomBinaryView::init implementation.
‘id’ and ‘endianness’ are used to determine which registered callbacks are actually invoked to eliminate some common sources of boilerplate that all callbacks would have to implement otherwise. If these aren’t applicable to your binaryviewtype just use constants here and document them so that people registering Platform recognizers for your view type know what to use.