JSON_STATUS CAVPlayerOperations::GetPercentage(const CStdString &method, ITransportLayer *transport, IClient *client, const Json::Value& parameterObject, Json::Value &result) { if (!IsCorrectPlayer(method)) return FailedToExecute; Value val = g_application.GetPercentage(); result.swap(val); return OK; }
JSON_STATUS CJSONRPC::Ping(const CStdString &method, ITransportLayer *transport, IClient *client, const Json::Value& parameterObject, Json::Value &result) { Value temp = "pong"; result.swap(temp); return OK; }