It gets messier.
To determine the input, you need both InputFuncSelect and NetFuncSelect. The formMainZoneXml.xml gives both - eg:
But this one doesn't give mute or volume status, so you also need to query formMainZone_MainZoneXmlStatus.xml - unless there's another hidden call that does both...
Setting the input function does use PutZoneInputFunction. Oddly, although the media server is NET and SERVER as above, to set it you call MEDIA+SERVER (or MEDIA%20SERVER if you prefer):
Other inputs are CD, TUNER, SPOTIFY, IRADIO (internet radio), USB and I'd guess IPOD, but that will only work with one attached.
So it might - might - still be possible to do it with a common codebase, calling formMainZone_MainZoneXmlStatus.xml if volume and mute aren't found in formMainZone_MainZoneXml.xml, but for input selection it looks like a hardcoded lookup table is needed. The power on/off will also have to be varied according to model, unless the Marantz version also works on Denon.
Happy to have a go at editing it, either as a Marantz fork or a change to the existing code.