Skip to content

feat(pairable_host): ready callback for alternate mdns implementation - #133

Open
meponderR wants to merge 2 commits into
jkcoxson:masterfrom
meponderR:master
Open

feat(pairable_host): ready callback for alternate mdns implementation#133
meponderR wants to merge 2 commits into
jkcoxson:masterfrom
meponderR:master

Conversation

@meponderR

Copy link
Copy Markdown

This adds support for using a ready callback similar to StikPair. Primarily useful for skipping the multicast entitlement on iOS. pairable_host_accept works as previously if ready_callback is null, but is used if not. Should allow apps like StikPair that implement pairable host to be able to skip a multicast entitlement without having to make a rust ffi crate. I personally used it in my implementation for Auto Capture's pairing.

AI Disclosure: Copilot was used to some extent. Code has been fully reviewed by myself and changed to ensure minimal changes to overall codebase. I apologize for having used it at all, I just kept having issues.

Comment thread ffi/src/pairable_host.rs Outdated
name: *const c_char,
model: *const c_char,
port: u16,
ready_callback: Option<

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jkcoxson

jkcoxson commented Sep 8, 2026

Copy link
Copy Markdown
Owner

I have that one concern, it should be a pointer that should be checked for null instead of an Option but other than that this looks good to me. Thanks!

@meponderR

Copy link
Copy Markdown
Author

I just changed it to a checked pointer in 9be30c5.

Comment thread ffi/src/pairable_host.rs
name: *const c_char,
model: *const c_char,
port: u16,
ready_callback: *const c_void,

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be a function pointer so the header is generated correctly. There are a few examples in this repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants