AIRPLAY FUNCTION

I have a project to do a receiver app for airplay using c language. unfortunately, the function of airplay here in kodi is written in c++ and i am not good enough to understand c++. Is there a complete guide/documentation on how kodi implemented the airplay function?

Right now I have written a simple code to let avahi broadcast the _airplay._tcp service which i read from the log of kodi and by editing the sample code in client-publish-service.c of avahi examples, but my phone doens’t detect it yet. I know i’m missing a lot here can someone please explain.

Thanks for your time!