xbmc/xbmc — pull request #886 by Montellese (2012-04-16 20:41:18+00:00)
Title: JSON-RPC: Runtime Enums & late type-resolving

These two commits add functionality that I will need later on. The AddEnum() methods allow other parts of code to add enumerations to our JSON schema on startup. One possible use for this is to add all the available fields for smartplaylists as an enum so that it doesn't have to be manually maintained in the JSON schema everytime I new field is added. Adding a call to AddEnum() which passes a list of all available smartplaylist fields will take care of that. An example code of how this would look/work can be found here: https://github.com/Montellese/xbmc/compare/master...jsonrpc_xsp#L1R45

The second commit re-introduces late type-resolving because that's needed to be able to use JSON schema enum types that are added dynamically on startup. With the current implementation every JSON type has to already exist when it is referenced by another type so referencing a dynamically added enum won't work well.