Maybe an option to do it via plugins?
ie. a plugin would be responsible handling the source of files (ie. connecting, authentication, crawling through folders, caching etc) and then it would be passing the music file, ie. mp3 (steam/file?) to Poweramp to play,
or plugin would be passing playlist/queue to Poweramp and Poweramp would be requesting from plugin the file/stream on playlist/queue change