Extract XBMC JSON-RPC client into separate lib