public void ContentPublishedSearchListenerOnResults(string jsonData) { using (JSONObject jsonObject = new JSONObject(jsonData)) { int count = 0; if (jsonObject.has("count")) { count = jsonObject.getInt("count"); } List <OuyaMod> ouyaMods = OuyaUnityPlugin.getOuyaContentPublishedResults(); foreach (OuyaSDK.IContentPublishedSearchListener listener in OuyaSDK.getContentPublishedSearchListeners()) { if (null != listener) { listener.ContentPublishedSearchOnResults(ouyaMods, count); } } } }
public void ContentPublishedSearchListenerOnError(string jsonData) { using (JSONObject jsonObject = new JSONObject(jsonData)) { int code = 0; string reason = string.Empty; if (jsonObject.has("code")) { code = jsonObject.getInt("code"); } if (jsonObject.has("reason")) { reason = jsonObject.getString("reason"); } foreach (OuyaSDK.IContentPublishedSearchListener listener in OuyaSDK.getContentPublishedSearchListeners()) { if (null != listener) { listener.ContentPublishedSearchOnError(code, reason); } } } }