JSON-RPC: Runtime Enums & late type-resolving #886

Merged
merged 2 commits into from May 8, 2012

Projects

None yet

1 participant

@Montellese
Team Kodi member

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: Montellese@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.

@Montellese Montellese add AddEnum() to CJSONServiceDescription
can be used to add JSON schema types during runtime (e.g. a list of setting names etc)
1825585
@Montellese Montellese was assigned Apr 16, 2012
@Montellese

This is fixed in the other commit but yeah it should be ==.

@Montellese Montellese merged commit 980e06a into xbmc:master May 8, 2012
@mikedm139 mikedm139 pushed a commit to mikedm139/plex-home-theater-public that referenced this pull request Nov 30, 2013
@tru tru RemoteAPI when we get a back command stop playing video
Fixes #886
0391a98
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment