Exemplo n.º 1
0
 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);
             }
         }
     }
 }
Exemplo n.º 2
0
 public void ContentUnpublishListenerOnError(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.IContentUnpublishListener listener in OuyaSDK.getContentUnpublishListeners())
         {
             if (null != listener)
             {
                 listener.ContentUnpublishOnError(null, code, reason);
             }
         }
     }
 }
Exemplo n.º 3
0
 public void ContentDownloadListenerOnProgress(string jsonData)
 {
     using (JSONObject jsonObject = new JSONObject(jsonData))
     {
         int progress = 0;
         if (jsonObject.has("progress"))
         {
             progress = jsonObject.getInt("progress");
         }
         foreach (OuyaSDK.IContentDownloadListener listener in OuyaSDK.getContentDownloadListeners())
         {
             if (null != listener)
             {
                 listener.ContentDownloadOnProgress(null, progress);
             }
         }
     }
 }