This patch adds the ability for libstageplugin to load interfaces from plugins, similarly to the model plugin patch I submitted earlier. This patch depends on changes made in the previous patch, specifically the more generic plugin loading code. The changes have been omitted under the assumption that this patch will be applied second.
Interface plugins cannot be specified in the world file, as the player config which uses the interfaces is parsed before the world file is. So, they are specified in the config file, like this:
Each interface plugin will have RegisterInterface called on it and must register itself as an interface at that point, like this:
RegisterInterface( PLAYER_DIO_CODE, InterfaceCreator<InterfaceDio> );
I did run into a problem where an interface plugin depends on a model plugin but cannot resolve the symbols because the interface plugin was loaded first. My solution was simply to put both plugins in the same shared library and let it be loaded twice (libtool ensures it is not actually loaded twice). It's not elegant but I'm not sure what else to do.