package com.pas.abtahibo.parvaz;


import anywheresoftware.b4a.BA;
import anywheresoftware.b4a.B4AClass;
import anywheresoftware.b4a.BALayout;
import anywheresoftware.b4a.debug.*;

public class classupload extends B4AClass.ImplB4AClass implements BA.SubDelegator{
    private static java.util.HashMap<String, java.lang.reflect.Method> htSubs;
    private void innerInitialize(BA _ba) throws Exception {
        if (ba == null) {
            ba = new BA(_ba, this, htSubs, "com.pas.abtahibo.parvaz.classupload");
            if (htSubs == null) {
                ba.loadHtSubs(this.getClass());
                htSubs = ba.htSubs;
            }
            
        }
        if (BA.isShellModeRuntimeCheck(ba)) 
			   this.getClass().getMethod("_class_globals", com.pas.abtahibo.parvaz.classupload.class).invoke(this, new Object[] {null});
        else
            ba.raiseEvent2(null, true, "class_globals", false);
    }

 public anywheresoftware.b4a.keywords.Common __c = null;
public Object _vvvvvvvvvvvvvvvvvvvv5 = null;
public String _vvvvvvvvvvvvvvvvvvvv6 = "";
public aghajari.retrofit.Retrofit _vvvvvvvvvvvvvv4 = null;
public aghajari.retrofit.Builder _vvvvvvvvvvvvvvvvvvvvv6 = null;
public aghajari.retrofit.RequestBodyCreate _vvvvvvvvvvvvvvvvvvvvv7 = null;
public b4a.example.dateutils _vvvvvvvvvvvvvvvv1 = null;
public com.pas.abtahibo.parvaz.main _vvvvvvvvvvvvvvvv2 = null;
public com.pas.abtahibo.parvaz.actbook _vvvvvvvvvvvvvvvv3 = null;
public com.pas.abtahibo.parvaz.actapps _vvvvvvvvvvvvvvvv4 = null;
public com.pas.abtahibo.parvaz.actguide _vvvvvvvvvvvvvvvv5 = null;
public com.pas.abtahibo.parvaz.actnotific _vvvvvvvvvvvvvvvv6 = null;
public com.pas.abtahibo.parvaz.func _vvvvvvvvvvvvvvvv7 = null;
public com.pas.abtahibo.parvaz.myservice _vvvvvvvvvvvvvvvv0 = null;
public com.pas.abtahibo.parvaz.playservicebook _vvvvvvvvvvvvvvvvv1 = null;
public com.pas.abtahibo.parvaz.playsrds _vvvvvvvvvvvvvvvvv2 = null;
public com.pas.abtahibo.parvaz.starter _vvvvvvvvvvvvvvvvv3 = null;
public com.pas.abtahibo.parvaz.support _vvvvvvvvvvvvvvvvv4 = null;
public com.pas.abtahibo.parvaz.urls _vvvvvvvvvvvvvvvvv5 = null;
public com.pas.abtahibo.parvaz.xuiviewsutils _vvvvvvvvvvvvvvvvv6 = null;
public String  _class_globals() throws Exception{
 //BA.debugLineNum = 1;BA.debugLine="Private Sub Class_Globals";
 //BA.debugLineNum = 3;BA.debugLine="Private mCallBack As Object";
_vvvvvvvvvvvvvvvvvvvv5 = new Object();
 //BA.debugLineNum = 4;BA.debugLine="Private mEventName As String";
_vvvvvvvvvvvvvvvvvvvv6 = "";
 //BA.debugLineNum = 6;BA.debugLine="Private Retrofit As Amir_Retrofit";
_vvvvvvvvvvvvvv4 = new aghajari.retrofit.Retrofit();
 //BA.debugLineNum = 7;BA.debugLine="Private Builder As Amir_RetrofitBuilder";
_vvvvvvvvvvvvvvvvvvvvv6 = new aghajari.retrofit.Builder();
 //BA.debugLineNum = 8;BA.debugLine="Private Body As Amir_RequestBody";
_vvvvvvvvvvvvvvvvvvvvv7 = new aghajari.retrofit.RequestBodyCreate();
 //BA.debugLineNum = 11;BA.debugLine="End Sub";
return "";
}
public String  _vvvvvvvvvvvvvvvvvvvvv3(String _s1) throws Exception{
 //BA.debugLineNum = 83;BA.debugLine="Private Sub complet(s1 As String)";
 //BA.debugLineNum = 84;BA.debugLine="If SubExists(mCallBack, mEventName & \"_completed\"";
if (__c.SubExists(ba,_vvvvvvvvvvvvvvvvvvvv5,_vvvvvvvvvvvvvvvvvvvv6+"_completed")) { 
 //BA.debugLineNum = 85;BA.debugLine="CallSub2(mCallBack, mEventName & \"_completed\",s1";
__c.CallSubNew2(ba,_vvvvvvvvvvvvvvvvvvvv5,_vvvvvvvvvvvvvvvvvvvv6+"_completed",(Object)(_s1));
 };
 //BA.debugLineNum = 87;BA.debugLine="End Sub";
return "";
}
public String  _initialize(anywheresoftware.b4a.BA _ba,Object _caller,String _peventname) throws Exception{
innerInitialize(_ba);
 //BA.debugLineNum = 13;BA.debugLine="Public Sub Initialize(Caller As Object, pEventName";
 //BA.debugLineNum = 15;BA.debugLine="mCallBack = Caller";
_vvvvvvvvvvvvvvvvvvvv5 = _caller;
 //BA.debugLineNum = 16;BA.debugLine="mEventName = pEventName";
_vvvvvvvvvvvvvvvvvvvv6 = _peventname;
 //BA.debugLineNum = 18;BA.debugLine="Builder.Initialize.baseUrl(urls.baseUrl)";
_vvvvvvvvvvvvvvvvvvvvv6.Initialize(ba).baseUrl(_vvvvvvvvvvvvvvvvv5._vvvvvvvvv5 /*String*/ (getActivityBA()));
 //BA.debugLineNum = 20;BA.debugLine="Builder.connectTimeout(100000)";
_vvvvvvvvvvvvvvvvvvvvv6.connectTimeout((int) (100000));
 //BA.debugLineNum = 21;BA.debugLine="Builder.readTimeout(100000)";
_vvvvvvvvvvvvvvvvvvvvv6.readTimeout((int) (100000));
 //BA.debugLineNum = 22;BA.debugLine="Builder.writeTimeout(100000)";
_vvvvvvvvvvvvvvvvvvvvv6.writeTimeout((int) (100000));
 //BA.debugLineNum = 24;BA.debugLine="Retrofit.Initialize(Builder)";
_vvvvvvvvvvvvvv4.Initialize(ba,_vvvvvvvvvvvvvvvvvvvvv6);
 //BA.debugLineNum = 26;BA.debugLine="End Sub";
return "";
}
public String  _vvvvvvvvvvvvvvvvvvvvv4(String _progressvalue) throws Exception{
 //BA.debugLineNum = 89;BA.debugLine="Private Sub progressV(ProgressValue As String)";
 //BA.debugLineNum = 90;BA.debugLine="If SubExists(mCallBack, mEventName & \"_onProgres";
if (__c.SubExists(ba,_vvvvvvvvvvvvvvvvvvvv5,_vvvvvvvvvvvvvvvvvvvv6+"_onProgressUpdate")) { 
 //BA.debugLineNum = 91;BA.debugLine="CallSub2(mCallBack, mEventName & \"_onProgressUpd";
__c.CallSubNew2(ba,_vvvvvvvvvvvvvvvvvvvv5,_vvvvvvvvvvvvvvvvvvvv6+"_onProgressUpdate",(Object)(_progressvalue));
 };
 //BA.debugLineNum = 93;BA.debugLine="End Sub";
return "";
}
public String  _upload_oncompleted() throws Exception{
 //BA.debugLineNum = 74;BA.debugLine="Private Sub Upload_onCompleted";
 //BA.debugLineNum = 75;BA.debugLine="Log(\"Completed\")";
__c.LogImpl("312124161","Completed",0);
 //BA.debugLineNum = 76;BA.debugLine="End Sub";
return "";
}
public String  _upload_onerror(String _error) throws Exception{
 //BA.debugLineNum = 78;BA.debugLine="Private Sub Upload_onError (error As String)";
 //BA.debugLineNum = 79;BA.debugLine="Log(error)";
__c.LogImpl("312189697",_error,0);
 //BA.debugLineNum = 80;BA.debugLine="complet(\"error: \"&error)";
_vvvvvvvvvvvvvvvvvvvvv3("error: "+_error);
 //BA.debugLineNum = 81;BA.debugLine="End Sub";
return "";
}
public String  _upload_onnext(aghajari.retrofit.Amir_ResponseBody _responsebody) throws Exception{
anywheresoftware.b4a.objects.collections.JSONParser _parser = null;
anywheresoftware.b4a.objects.collections.Map _root = null;
anywheresoftware.b4a.objects.collections.Map _response = null;
int _code = 0;
String _message = "";
 //BA.debugLineNum = 40;BA.debugLine="Private Sub Upload_onNext (ResponseBody As Amir_Re";
 //BA.debugLineNum = 42;BA.debugLine="Try";
try { //BA.debugLineNum = 44;BA.debugLine="Dim parser As JSONParser";
_parser = new anywheresoftware.b4a.objects.collections.JSONParser();
 //BA.debugLineNum = 45;BA.debugLine="parser.Initialize(ResponseBody.String)";
_parser.Initialize(_responsebody.getString());
 //BA.debugLineNum = 46;BA.debugLine="Dim root As Map = parser.NextObject";
_root = new anywheresoftware.b4a.objects.collections.Map();
_root = _parser.NextObject();
 //BA.debugLineNum = 47;BA.debugLine="Dim response As Map = root.Get(\"response\")";
_response = new anywheresoftware.b4a.objects.collections.Map();
_response = (anywheresoftware.b4a.objects.collections.Map) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.collections.Map(), (java.util.Map)(_root.Get((Object)("response"))));
 //BA.debugLineNum = 48;BA.debugLine="Dim code As Int = response.Get(\"code\")";
_code = (int)(BA.ObjectToNumber(_response.Get((Object)("code"))));
 //BA.debugLineNum = 50;BA.debugLine="If code = 200 Then";
if (_code==200) { 
 //BA.debugLineNum = 51;BA.debugLine="Dim message As String = response.Get(\"message\")";
_message = BA.ObjectToString(_response.Get((Object)("message")));
 //BA.debugLineNum = 53;BA.debugLine="If message = \"successfully\" Then";
if ((_message).equals("successfully")) { 
 //BA.debugLineNum = 54;BA.debugLine="complet(\"successfull\")";
_vvvvvvvvvvvvvvvvvvvvv3("successfull");
 }else {
 //BA.debugLineNum = 56;BA.debugLine="Log(message)";
__c.LogImpl("311993104",_message,0);
 //BA.debugLineNum = 57;BA.debugLine="complet(\"error\")";
_vvvvvvvvvvvvvvvvvvvvv3("error");
 };
 }else {
 //BA.debugLineNum = 60;BA.debugLine="Log(code)";
__c.LogImpl("311993108",BA.NumberToString(_code),0);
 //BA.debugLineNum = 61;BA.debugLine="complet(\"error\")";
_vvvvvvvvvvvvvvvvvvvvv3("error");
 };
 } 
       catch (Exception e20) {
			ba.setLastException(e20); //BA.debugLineNum = 64;BA.debugLine="complet(\"error\")";
_vvvvvvvvvvvvvvvvvvvvv3("error");
 //BA.debugLineNum = 65;BA.debugLine="Log(LastException)";
__c.LogImpl("311993113",BA.ObjectToString(__c.LastException(getActivityBA())),0);
 };
 //BA.debugLineNum = 68;BA.debugLine="End Sub";
return "";
}
public String  _upload_onprogressupdate(float _progressvalue,float _uploaded,float _total) throws Exception{
 //BA.debugLineNum = 70;BA.debugLine="Private Sub Upload_onProgressUpdate (ProgressValue";
 //BA.debugLineNum = 71;BA.debugLine="progressV(ProgressValue)";
_vvvvvvvvvvvvvvvvvvvvv4(BA.NumberToString(_progressvalue));
 //BA.debugLineNum = 72;BA.debugLine="End Sub";
return "";
}
public String  _vvvvvvvvvvvvvvvvvvvvv5(String _dirfile,String _namefile,String _mytype,String _picname) throws Exception{
String _url = "";
anywheresoftware.b4a.objects.collections.Map _m = null;
 //BA.debugLineNum = 29;BA.debugLine="Public Sub uploadFile( DirFile As String , NameFil";
 //BA.debugLineNum = 31;BA.debugLine="Dim url As String = urls.upload";
_url = _vvvvvvvvvvvvvvvvv5._vvvvvvvvvv7 /*String*/ (getActivityBA());
 //BA.debugLineNum = 32;BA.debugLine="Dim M As Map=CreateMap(\"imagenameg\":Body.WithStr";
_m = new anywheresoftware.b4a.objects.collections.Map();
_m = __c.createMap(new Object[] {(Object)("imagenameg"),(Object)(_vvvvvvvvvvvvvvvvvvvvv7.WithString("text/plain",_namefile))});
 //BA.debugLineNum = 34;BA.debugLine="Retrofit.UploadFileWithPartMap(\"Upload\",url,M,Bod";
_vvvvvvvvvvvvvv4.UploadFileWithPartMap("Upload",_url,(java.util.Map)(_m.getObject()),_vvvvvvvvvvvvvvvvvvvvv7.WithPartFormData2("imageg",_picname,(okhttp3.RequestBody)(_vvvvvvvvvvvvvvvvvvvvv7.WithProgressRequestBodyObservable(ba,"Upload",_mytype,_dirfile,_namefile,(int) (2048)))));
 //BA.debugLineNum = 38;BA.debugLine="End Sub";
return "";
}
public Object callSub(String sub, Object sender, Object[] args) throws Exception {
BA.senderHolder.set(sender);
return BA.SubDelegator.SubNotFound;
}
}
