Commit inicial

This commit is contained in:
2023-09-03 13:48:11 -06:00
commit b266bac50a
165 changed files with 6880 additions and 0 deletions

View File

@@ -0,0 +1,117 @@
package dbcheck.keymon.lat;
import anywheresoftware.b4a.BA;
import anywheresoftware.b4a.B4AClass;
import anywheresoftware.b4a.BALayout;
import anywheresoftware.b4a.debug.*;
public class b4xbitset 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, "dbcheck.keymon.lat.b4xbitset");
if (htSubs == null) {
ba.loadHtSubs(this.getClass());
htSubs = ba.htSubs;
}
}
if (BA.isShellModeRuntimeCheck(ba))
this.getClass().getMethod("_class_globals", dbcheck.keymon.lat.b4xbitset.class).invoke(this, new Object[] {null});
else
ba.raiseEvent2(null, true, "class_globals", false);
}
public anywheresoftware.b4a.keywords.Common __c = null;
public int[] _data = null;
public int _msize = 0;
public dbcheck.keymon.lat.main _main = null;
public dbcheck.keymon.lat.starter _starter = null;
public dbcheck.keymon.lat.subs _subs = null;
public dbcheck.keymon.lat.b4xpages _b4xpages = null;
public dbcheck.keymon.lat.b4xcollections _b4xcollections = null;
public dbcheck.keymon.lat.httputils2service _httputils2service = null;
public String _class_globals() throws Exception{
//BA.debugLineNum = 1;BA.debugLine="Sub Class_Globals";
//BA.debugLineNum = 5;BA.debugLine="Private data() As Int";
_data = new int[(int) (0)];
;
//BA.debugLineNum = 7;BA.debugLine="Private mSize As Int";
_msize = 0;
//BA.debugLineNum = 8;BA.debugLine="End Sub";
return "";
}
public String _clear() throws Exception{
//BA.debugLineNum = 54;BA.debugLine="Public Sub Clear";
//BA.debugLineNum = 58;BA.debugLine="Dim data(Bit.ShiftRight(mSize, 5) + 1) As Int";
_data = new int[(int) (__c.Bit.ShiftRight(_msize,(int) (5))+1)];
;
//BA.debugLineNum = 60;BA.debugLine="End Sub";
return "";
}
public boolean _get(int _index) throws Exception{
int _dindex = 0;
int _offset = 0;
int _blockvalue = 0;
//BA.debugLineNum = 38;BA.debugLine="Public Sub Get(Index As Int) As Boolean";
//BA.debugLineNum = 39;BA.debugLine="Dim dindex As Int = Bit.ShiftRight(Index, 5)";
_dindex = __c.Bit.ShiftRight(_index,(int) (5));
//BA.debugLineNum = 40;BA.debugLine="Dim offset As Int = Bit.And(0x0000001f, Index)";
_offset = __c.Bit.And(((int)0x0000001f),_index);
//BA.debugLineNum = 44;BA.debugLine="Dim BlockValue As Int = data(dindex)";
_blockvalue = _data[_dindex];
//BA.debugLineNum = 46;BA.debugLine="Return Bit.And(BlockValue, Bit.ShiftLeft(1, offse";
if (true) return __c.Bit.And(_blockvalue,__c.Bit.ShiftLeft((int) (1),_offset))!=0;
//BA.debugLineNum = 47;BA.debugLine="End Sub";
return false;
}
public int _getsize() throws Exception{
//BA.debugLineNum = 49;BA.debugLine="Public Sub getSize As Int";
//BA.debugLineNum = 50;BA.debugLine="Return mSize";
if (true) return _msize;
//BA.debugLineNum = 51;BA.debugLine="End Sub";
return 0;
}
public String _initialize(anywheresoftware.b4a.BA _ba,int _size) throws Exception{
innerInitialize(_ba);
//BA.debugLineNum = 10;BA.debugLine="Public Sub Initialize (Size As Int)";
//BA.debugLineNum = 11;BA.debugLine="mSize = Size";
_msize = _size;
//BA.debugLineNum = 12;BA.debugLine="Clear";
_clear();
//BA.debugLineNum = 13;BA.debugLine="End Sub";
return "";
}
public String _set(int _index,boolean _value) throws Exception{
int _dindex = 0;
int _offset = 0;
int _blockvalue = 0;
int _newblockvalue = 0;
//BA.debugLineNum = 16;BA.debugLine="Public Sub Set(Index As Int, Value As Boolean)";
//BA.debugLineNum = 17;BA.debugLine="Dim dindex As Int = Bit.ShiftRight(Index, 5)";
_dindex = __c.Bit.ShiftRight(_index,(int) (5));
//BA.debugLineNum = 18;BA.debugLine="Dim offset As Int = Bit.And(0x0000001f, Index)";
_offset = __c.Bit.And(((int)0x0000001f),_index);
//BA.debugLineNum = 22;BA.debugLine="Dim BlockValue As Int = data(dindex)";
_blockvalue = _data[_dindex];
//BA.debugLineNum = 24;BA.debugLine="Dim NewBlockValue As Int";
_newblockvalue = 0;
//BA.debugLineNum = 25;BA.debugLine="If Value Then";
if (_value) {
//BA.debugLineNum = 26;BA.debugLine="NewBlockValue = Bit.Or(BlockValue, Bit.ShiftLeft";
_newblockvalue = __c.Bit.Or(_blockvalue,__c.Bit.ShiftLeft((int) (1),_offset));
}else {
//BA.debugLineNum = 28;BA.debugLine="NewBlockValue = Bit.And(BlockValue, Bit.Not(Bit.";
_newblockvalue = __c.Bit.And(_blockvalue,__c.Bit.Not(__c.Bit.ShiftLeft((int) (1),_offset)));
};
//BA.debugLineNum = 33;BA.debugLine="data(dindex) = NewBlockValue";
_data[_dindex] = _newblockvalue;
//BA.debugLineNum = 35;BA.debugLine="End Sub";
return "";
}
public Object callSub(String sub, Object sender, Object[] args) throws Exception {
BA.senderHolder.set(sender);
return BA.SubDelegator.SubNotFound;
}
}

View File

@@ -0,0 +1,261 @@
package dbcheck.keymon.lat;
import anywheresoftware.b4a.BA;
import anywheresoftware.b4a.B4AClass;
import anywheresoftware.b4a.BALayout;
import anywheresoftware.b4a.debug.*;
public class b4xbytesbuilder 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, "dbcheck.keymon.lat.b4xbytesbuilder");
if (htSubs == null) {
ba.loadHtSubs(this.getClass());
htSubs = ba.htSubs;
}
}
if (BA.isShellModeRuntimeCheck(ba))
this.getClass().getMethod("_class_globals", dbcheck.keymon.lat.b4xbytesbuilder.class).invoke(this, new Object[] {null});
else
ba.raiseEvent2(null, true, "class_globals", false);
}
public anywheresoftware.b4a.keywords.Common __c = null;
public byte[] _mbuffer = null;
public int _mlength = 0;
public dbcheck.keymon.lat.main _main = null;
public dbcheck.keymon.lat.starter _starter = null;
public dbcheck.keymon.lat.subs _subs = null;
public dbcheck.keymon.lat.b4xpages _b4xpages = null;
public dbcheck.keymon.lat.b4xcollections _b4xcollections = null;
public dbcheck.keymon.lat.httputils2service _httputils2service = null;
public dbcheck.keymon.lat.b4xbytesbuilder _append(byte[] _data) throws Exception{
//BA.debugLineNum = 24;BA.debugLine="Public Sub Append(Data() As Byte) As B4XBytesBuild";
//BA.debugLineNum = 25;BA.debugLine="Return Append2(Data, 0, Data.Length)";
if (true) return _append2(_data,(int) (0),_data.length);
//BA.debugLineNum = 26;BA.debugLine="End Sub";
return null;
}
public dbcheck.keymon.lat.b4xbytesbuilder _append2(byte[] _data,int _startindex,int _length) throws Exception{
int _oldlength = 0;
//BA.debugLineNum = 31;BA.debugLine="Public Sub Append2(Data() As Byte, StartIndex As I";
//BA.debugLineNum = 32;BA.debugLine="Dim OldLength As Int = ChangeLength(mLength + Len";
_oldlength = _changelength((int) (_mlength+_length));
//BA.debugLineNum = 33;BA.debugLine="Bit.ArrayCopy(Data, StartIndex, mBuffer, OldLengt";
__c.Bit.ArrayCopy((Object)(_data),_startindex,(Object)(_mbuffer),_oldlength,_length);
//BA.debugLineNum = 34;BA.debugLine="Return Me";
if (true) return (dbcheck.keymon.lat.b4xbytesbuilder)(this);
//BA.debugLineNum = 35;BA.debugLine="End Sub";
return null;
}
public int _changelength(int _newlength) throws Exception{
int _oldlength = 0;
byte[] _b = null;
//BA.debugLineNum = 12;BA.debugLine="Private Sub ChangeLength (NewLength As Int) As Int";
//BA.debugLineNum = 13;BA.debugLine="Dim OldLength As Int = mLength";
_oldlength = _mlength;
//BA.debugLineNum = 14;BA.debugLine="mLength = NewLength";
_mlength = _newlength;
//BA.debugLineNum = 15;BA.debugLine="If mBuffer.Length < mLength Then";
if (_mbuffer.length<_mlength) {
//BA.debugLineNum = 16;BA.debugLine="Dim b(Max(mBuffer.Length * 2, NewLength)) As Byt";
_b = new byte[(int) (__c.Max(_mbuffer.length*2,_newlength))];
;
//BA.debugLineNum = 17;BA.debugLine="Bit.ArrayCopy(mBuffer, 0, b, 0, mBuffer.Length)";
__c.Bit.ArrayCopy((Object)(_mbuffer),(int) (0),(Object)(_b),(int) (0),_mbuffer.length);
//BA.debugLineNum = 18;BA.debugLine="mBuffer = b";
_mbuffer = _b;
};
//BA.debugLineNum = 20;BA.debugLine="Return OldLength";
if (true) return _oldlength;
//BA.debugLineNum = 21;BA.debugLine="End Sub";
return 0;
}
public String _class_globals() throws Exception{
//BA.debugLineNum = 1;BA.debugLine="Sub Class_Globals";
//BA.debugLineNum = 2;BA.debugLine="Private mBuffer() As Byte";
_mbuffer = new byte[(int) (0)];
;
//BA.debugLineNum = 3;BA.debugLine="Private mLength As Int";
_mlength = 0;
//BA.debugLineNum = 4;BA.debugLine="End Sub";
return "";
}
public String _clear() throws Exception{
//BA.debugLineNum = 37;BA.debugLine="Public Sub Clear";
//BA.debugLineNum = 38;BA.debugLine="ChangeLength(0)";
_changelength((int) (0));
//BA.debugLineNum = 39;BA.debugLine="End Sub";
return "";
}
public byte[] _getbuffer() throws Exception{
//BA.debugLineNum = 103;BA.debugLine="Private Sub getBuffer As Byte() 'ignore";
//BA.debugLineNum = 104;BA.debugLine="End Sub";
return null;
}
public byte[] _getinternalbuffer() throws Exception{
//BA.debugLineNum = 127;BA.debugLine="Public Sub getInternalBuffer As Byte()";
//BA.debugLineNum = 128;BA.debugLine="Return mBuffer";
if (true) return _mbuffer;
//BA.debugLineNum = 129;BA.debugLine="End Sub";
return null;
}
public int _getlength() throws Exception{
//BA.debugLineNum = 92;BA.debugLine="Public Sub getLength As Int";
//BA.debugLineNum = 93;BA.debugLine="Return mLength";
if (true) return _mlength;
//BA.debugLineNum = 94;BA.debugLine="End Sub";
return 0;
}
public int _indexof(byte[] _searchfor) throws Exception{
//BA.debugLineNum = 107;BA.debugLine="Public Sub IndexOf(SearchFor() As Byte) As Int";
//BA.debugLineNum = 108;BA.debugLine="Return IndexOf2(SearchFor, 0)";
if (true) return _indexof2(_searchfor,(int) (0));
//BA.debugLineNum = 109;BA.debugLine="End Sub";
return 0;
}
public int _indexof2(byte[] _searchfor,int _index) throws Exception{
int _i1 = 0;
int _i2 = 0;
//BA.debugLineNum = 112;BA.debugLine="Public Sub IndexOf2(SearchFor() As Byte, Index As";
//BA.debugLineNum = 113;BA.debugLine="For i1 = Index To mLength - SearchFor.Length";
{
final int step1 = 1;
final int limit1 = (int) (_mlength-_searchfor.length);
_i1 = _index ;
for (;_i1 <= limit1 ;_i1 = _i1 + step1 ) {
//BA.debugLineNum = 114;BA.debugLine="For i2 = 0 To SearchFor.Length - 1";
{
final int step2 = 1;
final int limit2 = (int) (_searchfor.length-1);
_i2 = (int) (0) ;
for (;_i2 <= limit2 ;_i2 = _i2 + step2 ) {
//BA.debugLineNum = 115;BA.debugLine="If SearchFor(i2) <> mBuffer(i1 + i2) Then";
if (_searchfor[_i2]!=_mbuffer[(int) (_i1+_i2)]) {
//BA.debugLineNum = 116;BA.debugLine="Exit";
if (true) break;
};
}
};
//BA.debugLineNum = 119;BA.debugLine="If i2 = SearchFor.Length Then";
if (_i2==_searchfor.length) {
//BA.debugLineNum = 120;BA.debugLine="Return i1";
if (true) return _i1;
};
}
};
//BA.debugLineNum = 123;BA.debugLine="Return -1";
if (true) return (int) (-1);
//BA.debugLineNum = 124;BA.debugLine="End Sub";
return 0;
}
public String _initialize(anywheresoftware.b4a.BA _ba) throws Exception{
innerInitialize(_ba);
//BA.debugLineNum = 6;BA.debugLine="Public Sub Initialize";
//BA.debugLineNum = 7;BA.debugLine="Dim mBuffer(100) As Byte";
_mbuffer = new byte[(int) (100)];
;
//BA.debugLineNum = 8;BA.debugLine="mLength = 0";
_mlength = (int) (0);
//BA.debugLineNum = 9;BA.debugLine="End Sub";
return "";
}
public String _insert(int _index,byte[] _data) throws Exception{
byte[] _afterindex = null;
//BA.debugLineNum = 43;BA.debugLine="Public Sub Insert(Index As Int, Data() As Byte)";
//BA.debugLineNum = 44;BA.debugLine="If Index >= mLength Then";
if (_index>=_mlength) {
//BA.debugLineNum = 45;BA.debugLine="If Index > mLength Then Log(\"Index too large\")";
if (_index>_mlength) {
__c.LogImpl("93014658","Index too large",0);};
//BA.debugLineNum = 46;BA.debugLine="Append(Data)";
_append(_data);
}else {
//BA.debugLineNum = 48;BA.debugLine="Dim AfterIndex() As Byte = SubArray(Index)";
_afterindex = _subarray(_index);
//BA.debugLineNum = 49;BA.debugLine="ChangeLength(mLength + Data.Length)";
_changelength((int) (_mlength+_data.length));
//BA.debugLineNum = 50;BA.debugLine="Bit.ArrayCopy(Data, 0, mBuffer, Index, Data.Leng";
__c.Bit.ArrayCopy((Object)(_data),(int) (0),(Object)(_mbuffer),_index,_data.length);
//BA.debugLineNum = 51;BA.debugLine="Bit.ArrayCopy(AfterIndex, 0, mBuffer, Index + Da";
__c.Bit.ArrayCopy((Object)(_afterindex),(int) (0),(Object)(_mbuffer),(int) (_index+_data.length),_afterindex.length);
};
//BA.debugLineNum = 53;BA.debugLine="End Sub";
return "";
}
public byte[] _remove(int _beginindex,int _endindex) throws Exception{
byte[] _res = null;
byte[] _afterendindex = null;
//BA.debugLineNum = 69;BA.debugLine="Public Sub Remove(BeginIndex As Int, EndIndex As I";
//BA.debugLineNum = 70;BA.debugLine="Dim res() As Byte = SubArray2(BeginIndex, EndInde";
_res = _subarray2(_beginindex,_endindex);
//BA.debugLineNum = 71;BA.debugLine="If EndIndex <= mLength Then";
if (_endindex<=_mlength) {
//BA.debugLineNum = 72;BA.debugLine="Dim AfterEndIndex() As Byte = SubArray(EndIndex)";
_afterendindex = _subarray(_endindex);
//BA.debugLineNum = 73;BA.debugLine="Bit.ArrayCopy(AfterEndIndex, 0, mBuffer, BeginIn";
__c.Bit.ArrayCopy((Object)(_afterendindex),(int) (0),(Object)(_mbuffer),_beginindex,_afterendindex.length);
};
//BA.debugLineNum = 75;BA.debugLine="ChangeLength(mLength - (EndIndex - BeginIndex))";
_changelength((int) (_mlength-(_endindex-_beginindex)));
//BA.debugLineNum = 76;BA.debugLine="Return res";
if (true) return _res;
//BA.debugLineNum = 77;BA.debugLine="End Sub";
return null;
}
public String _set(int _index,byte[] _data) throws Exception{
//BA.debugLineNum = 56;BA.debugLine="Public Sub Set(Index As Int, Data() As Byte)";
//BA.debugLineNum = 57;BA.debugLine="If Index >= mLength Then";
if (_index>=_mlength) {
//BA.debugLineNum = 58;BA.debugLine="If Index > mLength Then Log(\"Index too large\")";
if (_index>_mlength) {
__c.LogImpl("93080194","Index too large",0);};
//BA.debugLineNum = 59;BA.debugLine="Append(Data)";
_append(_data);
}else {
//BA.debugLineNum = 61;BA.debugLine="If Data.Length + Index > mLength Then";
if (_data.length+_index>_mlength) {
//BA.debugLineNum = 62;BA.debugLine="ChangeLength(Data.Length + Index)";
_changelength((int) (_data.length+_index));
};
//BA.debugLineNum = 64;BA.debugLine="Bit.ArrayCopy(Data, 0, mBuffer, Index, Data.Leng";
__c.Bit.ArrayCopy((Object)(_data),(int) (0),(Object)(_mbuffer),_index,_data.length);
};
//BA.debugLineNum = 66;BA.debugLine="End Sub";
return "";
}
public byte[] _subarray(int _beginindex) throws Exception{
//BA.debugLineNum = 80;BA.debugLine="Public Sub SubArray(BeginIndex As Int) As Byte()";
//BA.debugLineNum = 81;BA.debugLine="Return SubArray2(BeginIndex, mLength)";
if (true) return _subarray2(_beginindex,_mlength);
//BA.debugLineNum = 82;BA.debugLine="End Sub";
return null;
}
public byte[] _subarray2(int _beginindex,int _endindex) throws Exception{
byte[] _b = null;
//BA.debugLineNum = 86;BA.debugLine="Public Sub SubArray2(BeginIndex As Int, EndIndex A";
//BA.debugLineNum = 87;BA.debugLine="Dim b(EndIndex - BeginIndex) As Byte";
_b = new byte[(int) (_endindex-_beginindex)];
;
//BA.debugLineNum = 88;BA.debugLine="Bit.ArrayCopy(mBuffer, BeginIndex, b, 0, b.Length";
__c.Bit.ArrayCopy((Object)(_mbuffer),_beginindex,(Object)(_b),(int) (0),_b.length);
//BA.debugLineNum = 89;BA.debugLine="Return b";
if (true) return _b;
//BA.debugLineNum = 90;BA.debugLine="End Sub";
return null;
}
public byte[] _toarray() throws Exception{
//BA.debugLineNum = 97;BA.debugLine="Public Sub ToArray() As Byte()";
//BA.debugLineNum = 98;BA.debugLine="Return SubArray(0)";
if (true) return _subarray((int) (0));
//BA.debugLineNum = 99;BA.debugLine="End Sub";
return null;
}
public Object callSub(String sub, Object sender, Object[] args) throws Exception {
BA.senderHolder.set(sender);
return BA.SubDelegator.SubNotFound;
}
}

View File

@@ -0,0 +1,265 @@
package dbcheck.keymon.lat;
import anywheresoftware.b4a.BA;
import anywheresoftware.b4a.B4AClass;
import anywheresoftware.b4a.BALayout;
import anywheresoftware.b4a.debug.*;
public class b4xcache 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, "dbcheck.keymon.lat.b4xcache");
if (htSubs == null) {
ba.loadHtSubs(this.getClass());
htSubs = ba.htSubs;
}
}
if (BA.isShellModeRuntimeCheck(ba))
this.getClass().getMethod("_class_globals", dbcheck.keymon.lat.b4xcache.class).invoke(this, new Object[] {null});
else
ba.raiseEvent2(null, true, "class_globals", false);
}
public anywheresoftware.b4a.keywords.Common __c = null;
public dbcheck.keymon.lat.b4xorderedmap _data = null;
public int _mmaxsize = 0;
public float _removethreshold = 0f;
public int _eternalcounts = 0;
public dbcheck.keymon.lat.main _main = null;
public dbcheck.keymon.lat.starter _starter = null;
public dbcheck.keymon.lat.subs _subs = null;
public dbcheck.keymon.lat.b4xpages _b4xpages = null;
public dbcheck.keymon.lat.b4xcollections _b4xcollections = null;
public dbcheck.keymon.lat.httputils2service _httputils2service = null;
public static class _b4xcacheitem{
public boolean IsInitialized;
public Object Value;
public long LastAccessedTime;
public String Key;
public boolean Eternal;
public void Initialize() {
IsInitialized = true;
Value = new Object();
LastAccessedTime = 0L;
Key = "";
Eternal = false;
}
@Override
public String toString() {
return BA.TypeToString(this, false);
}}
public String _class_globals() throws Exception{
//BA.debugLineNum = 1;BA.debugLine="Sub Class_Globals";
//BA.debugLineNum = 2;BA.debugLine="Type B4XCacheItem (Value As Object, LastAccessedT";
;
//BA.debugLineNum = 3;BA.debugLine="Private Data As B4XOrderedMap";
_data = new dbcheck.keymon.lat.b4xorderedmap();
//BA.debugLineNum = 4;BA.debugLine="Private mMaxSize As Int = 100";
_mmaxsize = (int) (100);
//BA.debugLineNum = 5;BA.debugLine="Private RemoveThreshold As Float = 0.3";
_removethreshold = (float) (0.3);
//BA.debugLineNum = 6;BA.debugLine="Private EternalCounts As Int";
_eternalcounts = 0;
//BA.debugLineNum = 7;BA.debugLine="End Sub";
return "";
}
public boolean _containskey(String _key) throws Exception{
//BA.debugLineNum = 66;BA.debugLine="Public Sub ContainsKey(Key As String) As Boolean";
//BA.debugLineNum = 67;BA.debugLine="Return Data.ContainsKey(Key)";
if (true) return _data._containskey /*boolean*/ ((Object)(_key));
//BA.debugLineNum = 68;BA.debugLine="End Sub";
return false;
}
public dbcheck.keymon.lat.b4xcache._b4xcacheitem _createb4xcacheitem(Object _value,String _key) throws Exception{
dbcheck.keymon.lat.b4xcache._b4xcacheitem _t1 = null;
//BA.debugLineNum = 102;BA.debugLine="Private Sub CreateB4XCacheItem (Value As Object, K";
//BA.debugLineNum = 103;BA.debugLine="Dim t1 As B4XCacheItem";
_t1 = new dbcheck.keymon.lat.b4xcache._b4xcacheitem();
//BA.debugLineNum = 104;BA.debugLine="t1.Initialize";
_t1.Initialize();
//BA.debugLineNum = 105;BA.debugLine="t1.Value = Value";
_t1.Value /*Object*/ = _value;
//BA.debugLineNum = 106;BA.debugLine="t1.LastAccessedTime = DateTime.Now";
_t1.LastAccessedTime /*long*/ = __c.DateTime.getNow();
//BA.debugLineNum = 107;BA.debugLine="t1.Key = Key";
_t1.Key /*String*/ = _key;
//BA.debugLineNum = 108;BA.debugLine="Return t1";
if (true) return _t1;
//BA.debugLineNum = 109;BA.debugLine="End Sub";
return null;
}
public Object _get(String _key) throws Exception{
dbcheck.keymon.lat.b4xcache._b4xcacheitem _ci = null;
//BA.debugLineNum = 24;BA.debugLine="Public Sub Get (Key As String) As Object";
//BA.debugLineNum = 25;BA.debugLine="Dim ci As B4XCacheItem = Data.Get(Key)";
_ci = (dbcheck.keymon.lat.b4xcache._b4xcacheitem)(_data._get /*Object*/ ((Object)(_key)));
//BA.debugLineNum = 26;BA.debugLine="If ci <> Null Then";
if (_ci!= null) {
//BA.debugLineNum = 27;BA.debugLine="If ci.Eternal = False Then ci.LastAccessedTime =";
if (_ci.Eternal /*boolean*/ ==__c.False) {
_ci.LastAccessedTime /*long*/ = __c.DateTime.getNow();};
//BA.debugLineNum = 28;BA.debugLine="Return ci.Value";
if (true) return _ci.Value /*Object*/ ;
};
//BA.debugLineNum = 30;BA.debugLine="Return Null";
if (true) return __c.Null;
//BA.debugLineNum = 31;BA.debugLine="End Sub";
return null;
}
public int _getmaxsize() throws Exception{
//BA.debugLineNum = 19;BA.debugLine="Public Sub getMaxSize As Int";
//BA.debugLineNum = 20;BA.debugLine="Return mMaxSize";
if (true) return _mmaxsize;
//BA.debugLineNum = 21;BA.debugLine="End Sub";
return 0;
}
public String _initialize(anywheresoftware.b4a.BA _ba) throws Exception{
innerInitialize(_ba);
//BA.debugLineNum = 9;BA.debugLine="Public Sub Initialize";
//BA.debugLineNum = 10;BA.debugLine="Data.Initialize";
_data._initialize /*String*/ (ba);
//BA.debugLineNum = 11;BA.debugLine="End Sub";
return "";
}
public boolean _iseternal(String _key) throws Exception{
dbcheck.keymon.lat.b4xcache._b4xcacheitem _ci = null;
//BA.debugLineNum = 60;BA.debugLine="Private Sub IsEternal(Key As String) As Boolean";
//BA.debugLineNum = 61;BA.debugLine="Dim ci As B4XCacheItem = Data.Get(Key)";
_ci = (dbcheck.keymon.lat.b4xcache._b4xcacheitem)(_data._get /*Object*/ ((Object)(_key)));
//BA.debugLineNum = 62;BA.debugLine="Return IIf(ci = Null, False, ci.Eternal)";
if (true) return BA.ObjectToBoolean(((_ci== null) ? ((Object)(__c.False)) : ((Object)(_ci.Eternal /*boolean*/ ))));
//BA.debugLineNum = 63;BA.debugLine="End Sub";
return false;
}
public anywheresoftware.b4a.objects.collections.List _keys() throws Exception{
//BA.debugLineNum = 98;BA.debugLine="Public Sub Keys As List";
//BA.debugLineNum = 99;BA.debugLine="Return Data.Keys";
if (true) return _data._getkeys /*anywheresoftware.b4a.objects.collections.List*/ ();
//BA.debugLineNum = 100;BA.debugLine="End Sub";
return null;
}
public Object _put(String _key,Object _value) throws Exception{
//BA.debugLineNum = 35;BA.debugLine="Public Sub Put (Key As String, Value As Object) As";
//BA.debugLineNum = 36;BA.debugLine="If IsEternal(Key) Then EternalCounts = EternalCou";
if (_iseternal(_key)) {
_eternalcounts = (int) (_eternalcounts-1);};
//BA.debugLineNum = 37;BA.debugLine="Data.Put(Key, CreateB4XCacheItem(Value, Key))";
_data._put /*String*/ ((Object)(_key),(Object)(_createb4xcacheitem(_value,_key)));
//BA.debugLineNum = 38;BA.debugLine="TrimIfOversize";
_trimifoversize();
//BA.debugLineNum = 39;BA.debugLine="Return Value";
if (true) return _value;
//BA.debugLineNum = 40;BA.debugLine="End Sub";
return null;
}
public Object _puteternal(String _key,Object _value) throws Exception{
dbcheck.keymon.lat.b4xcache._b4xcacheitem _ci = null;
//BA.debugLineNum = 44;BA.debugLine="Public Sub PutEternal (Key As String, Value As Obj";
//BA.debugLineNum = 45;BA.debugLine="If IsEternal(Key) Then EternalCounts = EternalCou";
if (_iseternal(_key)) {
_eternalcounts = (int) (_eternalcounts-1);};
//BA.debugLineNum = 46;BA.debugLine="Dim ci As B4XCacheItem = CreateB4XCacheItem(Value";
_ci = _createb4xcacheitem(_value,_key);
//BA.debugLineNum = 47;BA.debugLine="ci.Eternal = True";
_ci.Eternal /*boolean*/ = __c.True;
//BA.debugLineNum = 48;BA.debugLine="ci.LastAccessedTime = 9223372036854775807";
_ci.LastAccessedTime /*long*/ = (long) (9223372036854775807L);
//BA.debugLineNum = 49;BA.debugLine="EternalCounts = EternalCounts + 1";
_eternalcounts = (int) (_eternalcounts+1);
//BA.debugLineNum = 50;BA.debugLine="Data.Put(Key, ci)";
_data._put /*String*/ ((Object)(_key),(Object)(_ci));
//BA.debugLineNum = 51;BA.debugLine="Return Value";
if (true) return _value;
//BA.debugLineNum = 52;BA.debugLine="End Sub";
return null;
}
public String _remove(String _key) throws Exception{
//BA.debugLineNum = 55;BA.debugLine="Public Sub Remove (Key As String)";
//BA.debugLineNum = 56;BA.debugLine="If IsEternal(Key) Then EternalCounts = EternalCou";
if (_iseternal(_key)) {
_eternalcounts = (int) (_eternalcounts-1);};
//BA.debugLineNum = 57;BA.debugLine="Data.Remove(Key)";
_data._remove /*String*/ ((Object)(_key));
//BA.debugLineNum = 58;BA.debugLine="End Sub";
return "";
}
public String _removeolditems(long _agems) throws Exception{
anywheresoftware.b4a.objects.collections.List _values = null;
long _level = 0L;
dbcheck.keymon.lat.b4xcache._b4xcacheitem _ci = null;
//BA.debugLineNum = 82;BA.debugLine="Public Sub RemoveOldItems (AgeMs As Long)";
//BA.debugLineNum = 83;BA.debugLine="Dim values As List = Data.Values";
_values = new anywheresoftware.b4a.objects.collections.List();
_values = _data._getvalues /*anywheresoftware.b4a.objects.collections.List*/ ();
//BA.debugLineNum = 84;BA.debugLine="Dim level As Long = DateTime.Now - AgeMs";
_level = (long) (__c.DateTime.getNow()-_agems);
//BA.debugLineNum = 85;BA.debugLine="For Each ci As B4XCacheItem In values";
{
final anywheresoftware.b4a.BA.IterableList group3 = _values;
final int groupLen3 = group3.getSize()
;int index3 = 0;
;
for (; index3 < groupLen3;index3++){
_ci = (dbcheck.keymon.lat.b4xcache._b4xcacheitem)(group3.Get(index3));
//BA.debugLineNum = 86;BA.debugLine="If ci.LastAccessedTime <= level Then";
if (_ci.LastAccessedTime /*long*/ <=_level) {
//BA.debugLineNum = 87;BA.debugLine="Data.Remove(ci.Key)";
_data._remove /*String*/ ((Object)(_ci.Key /*String*/ ));
};
}
};
//BA.debugLineNum = 90;BA.debugLine="End Sub";
return "";
}
public String _setmaxsize(int _s) throws Exception{
//BA.debugLineNum = 14;BA.debugLine="Public Sub setMaxSize(s As Int)";
//BA.debugLineNum = 15;BA.debugLine="mMaxSize = s";
_mmaxsize = _s;
//BA.debugLineNum = 16;BA.debugLine="TrimIfOversize";
_trimifoversize();
//BA.debugLineNum = 17;BA.debugLine="End Sub";
return "";
}
public int _size() throws Exception{
//BA.debugLineNum = 93;BA.debugLine="Public Sub Size As Int";
//BA.debugLineNum = 94;BA.debugLine="Return Data.Size";
if (true) return _data._getsize /*int*/ ();
//BA.debugLineNum = 95;BA.debugLine="End Sub";
return 0;
}
public String _trimifoversize() throws Exception{
anywheresoftware.b4a.objects.collections.List _values = null;
int _numberofitemstoremove = 0;
int _i = 0;
//BA.debugLineNum = 70;BA.debugLine="Private Sub TrimIfOversize";
//BA.debugLineNum = 71;BA.debugLine="If Data.Size - EternalCounts > mMaxSize Then";
if (_data._getsize /*int*/ ()-_eternalcounts>_mmaxsize) {
//BA.debugLineNum = 72;BA.debugLine="Dim values As List = Data.Values";
_values = new anywheresoftware.b4a.objects.collections.List();
_values = _data._getvalues /*anywheresoftware.b4a.objects.collections.List*/ ();
//BA.debugLineNum = 73;BA.debugLine="values.SortType(\"LastAccessedTime\", True)";
_values.SortType("LastAccessedTime",__c.True);
//BA.debugLineNum = 74;BA.debugLine="Dim NumberOfItemsToRemove As Int = Ceil(mMaxSize";
_numberofitemstoremove = (int) (__c.Ceil(_mmaxsize*_removethreshold));
//BA.debugLineNum = 75;BA.debugLine="For i = 0 To NumberOfItemsToRemove";
{
final int step5 = 1;
final int limit5 = _numberofitemstoremove;
_i = (int) (0) ;
for (;_i <= limit5 ;_i = _i + step5 ) {
//BA.debugLineNum = 76;BA.debugLine="Data.Remove(values.Get(i).As(B4XCacheItem).Key)";
_data._remove /*String*/ ((Object)(((dbcheck.keymon.lat.b4xcache._b4xcacheitem)(_values.Get(_i))).Key /*String*/ ));
}
};
};
//BA.debugLineNum = 79;BA.debugLine="End Sub";
return "";
}
public Object callSub(String sub, Object sender, Object[] args) throws Exception {
BA.senderHolder.set(sender);
return BA.SubDelegator.SubNotFound;
}
}

View File

@@ -0,0 +1,104 @@
package dbcheck.keymon.lat;
import anywheresoftware.b4a.BA;
import anywheresoftware.b4a.BALayout;
import anywheresoftware.b4a.debug.*;
public class b4xcollections {
private static b4xcollections mostCurrent = new b4xcollections();
public static Object getObject() {
throw new RuntimeException("Code module does not support this method.");
}
public anywheresoftware.b4a.keywords.Common __c = null;
public dbcheck.keymon.lat.main _main = null;
public dbcheck.keymon.lat.starter _starter = null;
public dbcheck.keymon.lat.subs _subs = null;
public dbcheck.keymon.lat.b4xpages _b4xpages = null;
public dbcheck.keymon.lat.httputils2service _httputils2service = null;
public static dbcheck.keymon.lat.b4xbitset _createbitset(anywheresoftware.b4a.BA _ba,int _size) throws Exception{
dbcheck.keymon.lat.b4xbitset _s = null;
//BA.debugLineNum = 52;BA.debugLine="Public Sub CreateBitSet (Size As Int) As B4XBitSet";
//BA.debugLineNum = 53;BA.debugLine="Dim s As B4XBitSet";
_s = new dbcheck.keymon.lat.b4xbitset();
//BA.debugLineNum = 54;BA.debugLine="s.Initialize(Size)";
_s._initialize /*String*/ ((_ba.processBA == null ? _ba : _ba.processBA),_size);
//BA.debugLineNum = 55;BA.debugLine="Return s";
if (true) return _s;
//BA.debugLineNum = 56;BA.debugLine="End Sub";
return null;
}
public static dbcheck.keymon.lat.b4xorderedmap _createorderedmap(anywheresoftware.b4a.BA _ba) throws Exception{
//BA.debugLineNum = 30;BA.debugLine="Public Sub CreateOrderedMap As B4XOrderedMap";
//BA.debugLineNum = 31;BA.debugLine="Return CreateOrderedMap2(Null, Null)";
if (true) return _createorderedmap2(_ba,(anywheresoftware.b4a.objects.collections.List) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.collections.List(), (java.util.List)(anywheresoftware.b4a.keywords.Common.Null)),(anywheresoftware.b4a.objects.collections.List) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.collections.List(), (java.util.List)(anywheresoftware.b4a.keywords.Common.Null)));
//BA.debugLineNum = 32;BA.debugLine="End Sub";
return null;
}
public static dbcheck.keymon.lat.b4xorderedmap _createorderedmap2(anywheresoftware.b4a.BA _ba,anywheresoftware.b4a.objects.collections.List _keys,anywheresoftware.b4a.objects.collections.List _values) throws Exception{
dbcheck.keymon.lat.b4xorderedmap _m = null;
int _i = 0;
//BA.debugLineNum = 38;BA.debugLine="Public Sub CreateOrderedMap2 (Keys As List, Values";
//BA.debugLineNum = 39;BA.debugLine="Dim m As B4XOrderedMap";
_m = new dbcheck.keymon.lat.b4xorderedmap();
//BA.debugLineNum = 40;BA.debugLine="m.Initialize";
_m._initialize /*String*/ ((_ba.processBA == null ? _ba : _ba.processBA));
//BA.debugLineNum = 41;BA.debugLine="If Keys <> Null And Values <> Null And Keys.IsIni";
if (_keys!= null && _values!= null && _keys.IsInitialized() && _values.IsInitialized()) {
//BA.debugLineNum = 42;BA.debugLine="For i = 0 To Keys.Size - 1";
{
final int step4 = 1;
final int limit4 = (int) (_keys.getSize()-1);
_i = (int) (0) ;
for (;_i <= limit4 ;_i = _i + step4 ) {
//BA.debugLineNum = 43;BA.debugLine="m.Put(Keys.Get(i), Values.Get(i))";
_m._put /*String*/ (_keys.Get(_i),_values.Get(_i));
}
};
};
//BA.debugLineNum = 46;BA.debugLine="Return m";
if (true) return _m;
//BA.debugLineNum = 47;BA.debugLine="End Sub";
return null;
}
public static dbcheck.keymon.lat.b4xset _createset(anywheresoftware.b4a.BA _ba) throws Exception{
//BA.debugLineNum = 9;BA.debugLine="Public Sub CreateSet As B4XSet";
//BA.debugLineNum = 10;BA.debugLine="Return CreateSet2(Null)";
if (true) return _createset2(_ba,(anywheresoftware.b4a.objects.collections.List) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.collections.List(), (java.util.List)(anywheresoftware.b4a.keywords.Common.Null)));
//BA.debugLineNum = 11;BA.debugLine="End Sub";
return null;
}
public static dbcheck.keymon.lat.b4xset _createset2(anywheresoftware.b4a.BA _ba,anywheresoftware.b4a.objects.collections.List _values) throws Exception{
dbcheck.keymon.lat.b4xset _s = null;
Object _v = null;
//BA.debugLineNum = 16;BA.debugLine="Public Sub CreateSet2 (Values As List) As B4XSet";
//BA.debugLineNum = 17;BA.debugLine="Dim s As B4XSet";
_s = new dbcheck.keymon.lat.b4xset();
//BA.debugLineNum = 18;BA.debugLine="s.Initialize";
_s._initialize /*String*/ ((_ba.processBA == null ? _ba : _ba.processBA));
//BA.debugLineNum = 19;BA.debugLine="If Values <> Null And Values.IsInitialized Then";
if (_values!= null && _values.IsInitialized()) {
//BA.debugLineNum = 20;BA.debugLine="For Each v As Object In Values";
{
final anywheresoftware.b4a.BA.IterableList group4 = _values;
final int groupLen4 = group4.getSize()
;int index4 = 0;
;
for (; index4 < groupLen4;index4++){
_v = group4.Get(index4);
//BA.debugLineNum = 21;BA.debugLine="s.Add(v)";
_s._add /*String*/ (_v);
}
};
};
//BA.debugLineNum = 24;BA.debugLine="Return s";
if (true) return _s;
//BA.debugLineNum = 25;BA.debugLine="End Sub";
return null;
}
public static String _process_globals() throws Exception{
//BA.debugLineNum = 2;BA.debugLine="Sub Process_Globals";
//BA.debugLineNum = 4;BA.debugLine="End Sub";
return "";
}
}

View File

@@ -0,0 +1,118 @@
package dbcheck.keymon.lat;
import anywheresoftware.b4a.BA;
import anywheresoftware.b4a.B4AClass;
import anywheresoftware.b4a.BALayout;
import anywheresoftware.b4a.debug.*;
public class b4xcomparatorsort 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, "dbcheck.keymon.lat.b4xcomparatorsort");
if (htSubs == null) {
ba.loadHtSubs(this.getClass());
htSubs = ba.htSubs;
}
}
if (BA.isShellModeRuntimeCheck(ba))
this.getClass().getMethod("_class_globals", dbcheck.keymon.lat.b4xcomparatorsort.class).invoke(this, new Object[] {null});
else
ba.raiseEvent2(null, true, "class_globals", false);
}
public anywheresoftware.b4a.keywords.Common __c = null;
public dbcheck.keymon.lat.main _main = null;
public dbcheck.keymon.lat.starter _starter = null;
public dbcheck.keymon.lat.subs _subs = null;
public dbcheck.keymon.lat.b4xpages _b4xpages = null;
public dbcheck.keymon.lat.b4xcollections _b4xcollections = null;
public dbcheck.keymon.lat.httputils2service _httputils2service = null;
public String _class_globals() throws Exception{
//BA.debugLineNum = 1;BA.debugLine="Sub Class_Globals";
//BA.debugLineNum = 2;BA.debugLine="End Sub";
return "";
}
public String _initialize(anywheresoftware.b4a.BA _ba) throws Exception{
innerInitialize(_ba);
//BA.debugLineNum = 4;BA.debugLine="Public Sub Initialize";
//BA.debugLineNum = 5;BA.debugLine="End Sub";
return "";
}
public int _partition(anywheresoftware.b4a.objects.collections.List _data,int _startindex,int _length,int _pivotindex,Object _comparator) throws Exception{
Object _pivotvalue = null;
int _l = 0;
int _i = 0;
//BA.debugLineNum = 30;BA.debugLine="Private Sub Partition(Data As List, StartIndex As";
//BA.debugLineNum = 31;BA.debugLine="Dim PivotValue As Object = Data.Get(StartIndex +";
_pivotvalue = _data.Get((int) (_startindex+_pivotindex));
//BA.debugLineNum = 32;BA.debugLine="Swap(Data, StartIndex, PivotIndex, Length - 1)";
_swap(_data,_startindex,_pivotindex,(int) (_length-1));
//BA.debugLineNum = 33;BA.debugLine="Dim L As Int = 0";
_l = (int) (0);
//BA.debugLineNum = 34;BA.debugLine="For i = 0 To Length - 2";
{
final int step4 = 1;
final int limit4 = (int) (_length-2);
_i = (int) (0) ;
for (;_i <= limit4 ;_i = _i + step4 ) {
//BA.debugLineNum = 35;BA.debugLine="If CallSub3(Comparator, \"Compare\", Data.Get(Star";
if (((int)(BA.ObjectToNumber(__c.CallSubNew3(ba,_comparator,"Compare",_data.Get((int) (_startindex+_i)),_pivotvalue))))<0) {
//BA.debugLineNum = 36;BA.debugLine="L = L + 1";
_l = (int) (_l+1);
//BA.debugLineNum = 37;BA.debugLine="Swap(Data, StartIndex, L - 1, i)";
_swap(_data,_startindex,(int) (_l-1),_i);
};
}
};
//BA.debugLineNum = 40;BA.debugLine="Swap(Data, StartIndex, Length - 1, L)";
_swap(_data,_startindex,(int) (_length-1),_l);
//BA.debugLineNum = 41;BA.debugLine="Return L";
if (true) return _l;
//BA.debugLineNum = 42;BA.debugLine="End Sub";
return 0;
}
public String _quicksort(anywheresoftware.b4a.objects.collections.List _data,int _startindex,int _length,Object _comparator) throws Exception{
int _pivotindex = 0;
int _r = 0;
//BA.debugLineNum = 21;BA.debugLine="Private Sub QuickSort (Data As List, StartIndex As";
//BA.debugLineNum = 22;BA.debugLine="If Length > 1 Then";
if (_length>1) {
//BA.debugLineNum = 23;BA.debugLine="Dim PivotIndex As Int = Rnd(0, Length)";
_pivotindex = __c.Rnd((int) (0),_length);
//BA.debugLineNum = 24;BA.debugLine="Dim r As Int = Partition(Data, StartIndex, Lengt";
_r = _partition(_data,_startindex,_length,_pivotindex,_comparator);
//BA.debugLineNum = 25;BA.debugLine="QuickSort(Data, StartIndex, r, Comparator)";
_quicksort(_data,_startindex,_r,_comparator);
//BA.debugLineNum = 26;BA.debugLine="QuickSort(Data, StartIndex + r + 1, Length - r -";
_quicksort(_data,(int) (_startindex+_r+1),(int) (_length-_r-1),_comparator);
};
//BA.debugLineNum = 28;BA.debugLine="End Sub";
return "";
}
public String _sort(anywheresoftware.b4a.objects.collections.List _data,Object _comparator) throws Exception{
//BA.debugLineNum = 12;BA.debugLine="Public Sub Sort (Data As List, Comparator As Objec";
//BA.debugLineNum = 14;BA.debugLine="QuickSort(Data, 0, Data.Size, Comparator)";
_quicksort(_data,(int) (0),_data.getSize(),_comparator);
//BA.debugLineNum = 18;BA.debugLine="End Sub";
return "";
}
public String _swap(anywheresoftware.b4a.objects.collections.List _data,int _startindex,int _i1,int _i2) throws Exception{
Object _o = null;
//BA.debugLineNum = 44;BA.debugLine="Private Sub Swap (Data As List, StartIndex As Int,";
//BA.debugLineNum = 45;BA.debugLine="Dim o As Object = Data.Get(StartIndex + i1)";
_o = _data.Get((int) (_startindex+_i1));
//BA.debugLineNum = 46;BA.debugLine="Data.Set(StartIndex + i1, Data.Get(StartIndex + i";
_data.Set((int) (_startindex+_i1),_data.Get((int) (_startindex+_i2)));
//BA.debugLineNum = 47;BA.debugLine="Data.Set(StartIndex + i2, o)";
_data.Set((int) (_startindex+_i2),_o);
//BA.debugLineNum = 48;BA.debugLine="End Sub";
return "";
}
public Object callSub(String sub, Object sender, Object[] args) throws Exception {
BA.senderHolder.set(sender);
return BA.SubDelegator.SubNotFound;
}
}

View File

@@ -0,0 +1,811 @@
package dbcheck.keymon.lat;
import anywheresoftware.b4a.BA;
import anywheresoftware.b4a.B4AClass;
import anywheresoftware.b4a.BALayout;
import anywheresoftware.b4a.debug.*;
public class b4xmainpage 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, "dbcheck.keymon.lat.b4xmainpage");
if (htSubs == null) {
ba.loadHtSubs(this.getClass());
htSubs = ba.htSubs;
}
}
if (BA.isShellModeRuntimeCheck(ba))
this.getClass().getMethod("_class_globals", dbcheck.keymon.lat.b4xmainpage.class).invoke(this, new Object[] {null});
else
ba.raiseEvent2(null, true, "class_globals", false);
}
public anywheresoftware.b4a.keywords.Common __c = null;
public anywheresoftware.b4a.objects.B4XViewWrapper _root = null;
public anywheresoftware.b4a.objects.B4XViewWrapper.XUI _xui = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_enviar = null;
public anywheresoftware.b4a.sql.SQL _skmt = null;
public dbcheck.keymon.lat.dbrequestmanager _reqmanager = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_pedidos2 = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_diasventa = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_totalventa = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_cantsencero = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_clientenonumerico = null;
public String _cuantos_pedido = "";
public String _cuantos_pedidosc = "";
public String _cuantos_noventa = "";
public anywheresoftware.b4a.objects.collections.List _reqspendientes = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_ruta2 = null;
public String _ruta = "";
public anywheresoftware.b4a.objects.LabelWrapper _l_usuario2 = null;
public String _usuario = "";
public anywheresoftware.b4a.objects.LabelWrapper _l_almacen2 = null;
public String _almacen = "";
public anywheresoftware.b4a.objects.PanelWrapper _p_progressdialog = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_progressdialog = null;
public anywheresoftware.b4a.objects.PanelWrapper _p_editaruta = null;
public anywheresoftware.b4a.objects.PanelWrapper _p_editaalmacen = null;
public dbcheck.keymon.lat.main _main = null;
public dbcheck.keymon.lat.starter _starter = null;
public dbcheck.keymon.lat.subs _subs = null;
public dbcheck.keymon.lat.b4xpages _b4xpages = null;
public dbcheck.keymon.lat.b4xcollections _b4xcollections = null;
public dbcheck.keymon.lat.httputils2service _httputils2service = null;
public String _b_enviar_click() throws Exception{
String _resultado = "";
anywheresoftware.b4a.sql.SQL.CursorWrapper _c = null;
anywheresoftware.b4a.sql.SQL.CursorWrapper _d = null;
int _i = 0;
dbcheck.keymon.lat.dbrequestmanager._dbcommand _cmd = null;
//BA.debugLineNum = 114;BA.debugLine="Private Sub b_enviar_Click";
//BA.debugLineNum = 115;BA.debugLine="Dim resultado = Msgbox2(\"Se va a enviar la venta";
_resultado = BA.NumberToString(__c.Msgbox2(BA.ObjectToCharSequence("Se va a enviar la venta de la BD"),BA.ObjectToCharSequence("AVISO"),"Continuar","Cancelar","",(android.graphics.Bitmap)(__c.Null),ba));
//BA.debugLineNum = 116;BA.debugLine="If resultado = DialogResponse.POSITIVE Then";
if ((_resultado).equals(BA.NumberToString(__c.DialogResponse.POSITIVE))) {
//BA.debugLineNum = 117;BA.debugLine="reqsPendientes.Initialize";
_reqspendientes.Initialize();
//BA.debugLineNum = 118;BA.debugLine="l_progressDialog.Text = \" Enviando información .";
_l_progressdialog.setText(BA.ObjectToCharSequence(" Enviando información ..."));
//BA.debugLineNum = 119;BA.debugLine="p_progressDialog.Visible = True";
_p_progressdialog.setVisible(__c.True);
//BA.debugLineNum = 120;BA.debugLine="p_progressDialog.BringToFront";
_p_progressdialog.BringToFront();
//BA.debugLineNum = 121;BA.debugLine="skmt.ExecNonQuery2(\"delete from PEDIDO WHERE PE_";
_skmt.ExecNonQuery2("delete from PEDIDO WHERE PE_PRONOMBRE = ? ",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)("N/A")}));
//BA.debugLineNum = 122;BA.debugLine="skmt.ExecNonQuery(\"delete from pedido_cliente wh";
_skmt.ExecNonQuery("delete from pedido_cliente where PC_CLIENTE not In (select PE_CLIENTE from pedido)");
//BA.debugLineNum = 124;BA.debugLine="Dim c As Cursor = skmt.ExecQuery(\"SELECT PC_CLIE";
_c = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_skmt.ExecQuery("SELECT PC_CLIENTE, PC_FECHA, PC_USER, PC_NOART, PC_MONTO,PC_LON, PC_LAT, PC_COSTO_SIN, PC_RUTA, PC_ALMACEN, PC_FACTURA FROM PEDIDO_CLIENTE ")));
//BA.debugLineNum = 125;BA.debugLine="Dim d As Cursor = skmt.ExecQuery(\"SELECT COUNT(*";
_d = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_d = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_skmt.ExecQuery("SELECT COUNT(*) as CUANTOS_PEDIDOSC FROM PEDIDO_CLIENTE ")));
//BA.debugLineNum = 126;BA.debugLine="If c.RowCount>0 Then";
if (_c.getRowCount()>0) {
//BA.debugLineNum = 127;BA.debugLine="For i=0 To c.RowCount -1";
{
final int step12 = 1;
final int limit12 = (int) (_c.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit12 ;_i = _i + step12 ) {
//BA.debugLineNum = 128;BA.debugLine="c.Position=i";
_c.setPosition(_i);
//BA.debugLineNum = 129;BA.debugLine="Dim cmd As DBCommand";
_cmd = new dbcheck.keymon.lat.dbrequestmanager._dbcommand();
//BA.debugLineNum = 130;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
//BA.debugLineNum = 131;BA.debugLine="cmd.Name = \"insert_pedidos_MARDS\"";
_cmd.Name /*String*/ = "insert_pedidos_MARDS";
//BA.debugLineNum = 132;BA.debugLine="cmd.Parameters = Array As Object(c.GetString(\"";
_cmd.Parameters /*Object[]*/ = new Object[]{(Object)(_c.GetString("PC_CLIENTE")),(Object)(_c.GetString("PC_FECHA")),(Object)(_c.GetString("PC_USER")),(Object)(_c.GetString("PC_NOART")),(Object)(_c.GetString("PC_MONTO")),(Object)(_c.GetString("PC_LON")),(Object)(_c.GetString("PC_LAT")),(Object)(_almacen),(Object)(_ruta),(Object)(_c.GetString("PC_COSTO_SIN")),(Object)(_c.GetString("PC_FACTURA"))};
//BA.debugLineNum = 133;BA.debugLine="reqManager.ExecuteCommand(cmd , \"ins_pedidos_1";
_reqmanager._executecommand /*String*/ (_cmd,(Object)("ins_pedidos_1"));
//BA.debugLineNum = 134;BA.debugLine="reqsPendientes.Add(\"ins_pedidos_1\")";
_reqspendientes.Add((Object)("ins_pedidos_1"));
}
};
};
//BA.debugLineNum = 137;BA.debugLine="c.Close";
_c.Close();
//BA.debugLineNum = 138;BA.debugLine="d.Position=0";
_d.setPosition((int) (0));
//BA.debugLineNum = 140;BA.debugLine="d.Close";
_d.Close();
//BA.debugLineNum = 143;BA.debugLine="c = skmt.ExecQuery(\"SELECT CODIGOKMTS, CODIGOB,";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_skmt.ExecQuery("SELECT CODIGOKMTS, CODIGOB, LAT, LON FROM HIST_CODIGO_BARRAS")));
//BA.debugLineNum = 144;BA.debugLine="If c.RowCount>0 Then";
if (_c.getRowCount()>0) {
//BA.debugLineNum = 145;BA.debugLine="For i=0 To c.RowCount -1";
{
final int step27 = 1;
final int limit27 = (int) (_c.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit27 ;_i = _i + step27 ) {
//BA.debugLineNum = 146;BA.debugLine="c.Position=i";
_c.setPosition(_i);
//BA.debugLineNum = 147;BA.debugLine="Dim cmd As DBCommand";
_cmd = new dbcheck.keymon.lat.dbrequestmanager._dbcommand();
//BA.debugLineNum = 148;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
//BA.debugLineNum = 149;BA.debugLine="cmd.Name = \"insert_QR_2_MARDS\"";
_cmd.Name /*String*/ = "insert_QR_2_MARDS";
//BA.debugLineNum = 150;BA.debugLine="cmd.Parameters = Array As Object(C.GetString(\"";
_cmd.Parameters /*Object[]*/ = new Object[]{(Object)(_c.GetString("CODIGOKMTS")),(Object)(_c.GetString("CODIGOB")),(Object)(_c.GetString("LON")),(Object)(_c.GetString("LAT")),(Object)(_almacen),(Object)(_ruta)};
//BA.debugLineNum = 151;BA.debugLine="reqManager.ExecuteCommand(cmd , \"ins_QR\")";
_reqmanager._executecommand /*String*/ (_cmd,(Object)("ins_QR"));
//BA.debugLineNum = 152;BA.debugLine="reqsPendientes.Add(\"ins_QR\")";
_reqspendientes.Add((Object)("ins_QR"));
}
};
};
//BA.debugLineNum = 155;BA.debugLine="c.Close";
_c.Close();
//BA.debugLineNum = 157;BA.debugLine="c = skmt.ExecQuery(\"SELECT HE_CLIE, HE_RES, HE_F";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_skmt.ExecQuery("SELECT HE_CLIE, HE_RES, HE_FECHA, HE_TIPO FROM HIST_ENCUESTA")));
//BA.debugLineNum = 158;BA.debugLine="If c.RowCount>0 Then";
if (_c.getRowCount()>0) {
//BA.debugLineNum = 159;BA.debugLine="For i=0 To c.RowCount -1";
{
final int step40 = 1;
final int limit40 = (int) (_c.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit40 ;_i = _i + step40 ) {
//BA.debugLineNum = 160;BA.debugLine="c.Position=i";
_c.setPosition(_i);
//BA.debugLineNum = 161;BA.debugLine="Dim cmd As DBCommand";
_cmd = new dbcheck.keymon.lat.dbrequestmanager._dbcommand();
//BA.debugLineNum = 162;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
//BA.debugLineNum = 163;BA.debugLine="cmd.Name = \"insert_encuesta_MARDS\"";
_cmd.Name /*String*/ = "insert_encuesta_MARDS";
//BA.debugLineNum = 164;BA.debugLine="cmd.Parameters = Array As Object(C.GetString(\"";
_cmd.Parameters /*Object[]*/ = new Object[]{(Object)(_c.GetString("HE_CLIE")),(Object)(_c.GetString("HE_RES")),(Object)(_c.GetString("HE_FECHA")),(Object)(_c.GetString("HE_TIPO"))};
//BA.debugLineNum = 165;BA.debugLine="reqManager.ExecuteCommand(cmd , \"hist_encuesta";
_reqmanager._executecommand /*String*/ (_cmd,(Object)("hist_encuesta"));
//BA.debugLineNum = 166;BA.debugLine="reqsPendientes.Add(\"hist_encuesta\")";
_reqspendientes.Add((Object)("hist_encuesta"));
}
};
};
//BA.debugLineNum = 169;BA.debugLine="c.Close";
_c.Close();
//BA.debugLineNum = 171;BA.debugLine="c = skmt.ExecQuery(\"SELECT PE_CEDIS,PE_COSTO_TOT";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_skmt.ExecQuery("SELECT PE_CEDIS,PE_COSTO_TOT,PE_COSTOU,PE_CANT,PE_PRONOMBRE,PE_PROID,PE_CLIENTE,PE_FECHA,PE_USUARIO, PE_COSTO_SIN, PE_RUTA, PE_DESC, PE_FOLIO FROM PEDIDO")));
//BA.debugLineNum = 172;BA.debugLine="d = skmt.ExecQuery(\"SELECT COUNT(*) as CUANTOS_P";
_d = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_skmt.ExecQuery("SELECT COUNT(*) as CUANTOS_PEDIDO FROM PEDIDO")));
//BA.debugLineNum = 173;BA.debugLine="If c.RowCount>0 Then";
if (_c.getRowCount()>0) {
//BA.debugLineNum = 174;BA.debugLine="For i=0 To c.RowCount -1";
{
final int step54 = 1;
final int limit54 = (int) (_c.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit54 ;_i = _i + step54 ) {
//BA.debugLineNum = 175;BA.debugLine="c.Position=i";
_c.setPosition(_i);
//BA.debugLineNum = 176;BA.debugLine="Dim cmd As DBCommand";
_cmd = new dbcheck.keymon.lat.dbrequestmanager._dbcommand();
//BA.debugLineNum = 177;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
//BA.debugLineNum = 178;BA.debugLine="cmd.Name = \"insert_pedido_MARDS\"";
_cmd.Name /*String*/ = "insert_pedido_MARDS";
//BA.debugLineNum = 179;BA.debugLine="cmd.Parameters = Array As Object(C.GetString(\"";
_cmd.Parameters /*Object[]*/ = new Object[]{(Object)(_c.GetString("PE_CEDIS")),(Object)(_almacen),(Object)(_c.GetString("PE_COSTO_TOT")),(Object)(_c.GetString("PE_COSTOU")),(Object)(_c.GetString("PE_CANT")),(Object)(_c.GetString("PE_PRONOMBRE")),(Object)(_c.GetString("PE_PROID")),(Object)(_c.GetString("PE_CLIENTE")),(Object)(_c.GetString("PE_FECHA")),(Object)(_c.GetString("PE_USUARIO")),(Object)(_c.GetString("PE_RUTA")),(Object)(_c.GetString("PE_COSTO_SIN")),(Object)(_c.GetString("PE_DESC")),(Object)(_c.GetString("PE_FOLIO"))};
//BA.debugLineNum = 180;BA.debugLine="reqManager.ExecuteCommand(cmd , \"ins_pedido_1\"";
_reqmanager._executecommand /*String*/ (_cmd,(Object)("ins_pedido_1"));
//BA.debugLineNum = 181;BA.debugLine="reqsPendientes.Add(\"ins_pedido_1\")";
_reqspendientes.Add((Object)("ins_pedido_1"));
}
};
};
//BA.debugLineNum = 184;BA.debugLine="c.Close";
_c.Close();
//BA.debugLineNum = 185;BA.debugLine="d.Position=0";
_d.setPosition((int) (0));
//BA.debugLineNum = 186;BA.debugLine="cuantos_pedido = D.GetString(\"CUANTOS_PEDIDO\")";
_cuantos_pedido = _d.GetString("CUANTOS_PEDIDO");
//BA.debugLineNum = 187;BA.debugLine="d.Close";
_d.Close();
//BA.debugLineNum = 190;BA.debugLine="c = skmt.ExecQuery(\"SELECT NV_CLIENTE,NV_FECHA,N";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_skmt.ExecQuery("SELECT NV_CLIENTE,NV_FECHA,NV_USER,NV_MOTIVO,NV_COMM,NV_LAT,NV_LON, NV_NOMBRE, NV_DIRECCION FROM NOVENTA")));
//BA.debugLineNum = 191;BA.debugLine="If c.RowCount>0 Then";
if (_c.getRowCount()>0) {
//BA.debugLineNum = 192;BA.debugLine="For i=0 To c.RowCount -1";
{
final int step70 = 1;
final int limit70 = (int) (_c.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit70 ;_i = _i + step70 ) {
//BA.debugLineNum = 193;BA.debugLine="c.Position=i";
_c.setPosition(_i);
//BA.debugLineNum = 194;BA.debugLine="Dim cmd As DBCommand";
_cmd = new dbcheck.keymon.lat.dbrequestmanager._dbcommand();
//BA.debugLineNum = 195;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
//BA.debugLineNum = 196;BA.debugLine="cmd.Name = \"insert_noventa_MARDS\"";
_cmd.Name /*String*/ = "insert_noventa_MARDS";
//BA.debugLineNum = 197;BA.debugLine="cmd.Parameters = Array As Object(C.GetString(\"";
_cmd.Parameters /*Object[]*/ = new Object[]{(Object)(_c.GetString("NV_CLIENTE")),(Object)(_c.GetString("NV_FECHA")),(Object)(_c.GetString("NV_USER")),(Object)(_c.GetString("NV_MOTIVO")),(Object)(_c.GetString("NV_COMM")),(Object)(_c.GetString("NV_LAT")),(Object)(_c.GetString("NV_LON")),(Object)(_almacen),(Object)(_ruta),(Object)(_c.GetString("NV_NOMBRE")),(Object)(_c.GetString("NV_DIRECCION"))};
//BA.debugLineNum = 198;BA.debugLine="reqManager.ExecuteCommand(cmd , \"inst_noventa\"";
_reqmanager._executecommand /*String*/ (_cmd,(Object)("inst_noventa"));
//BA.debugLineNum = 199;BA.debugLine="reqsPendientes.Add(\"inst_noventa\")";
_reqspendientes.Add((Object)("inst_noventa"));
}
};
};
//BA.debugLineNum = 202;BA.debugLine="c.Close";
_c.Close();
//BA.debugLineNum = 210;BA.debugLine="c=skmt.ExecQuery(\"Select HGCLIENTE, HGDATE, HGLA";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_skmt.ExecQuery("Select HGCLIENTE, HGDATE, HGLAT, HGLON from HIST_GEOCERCA")));
//BA.debugLineNum = 211;BA.debugLine="If c.RowCount>0 Then";
if (_c.getRowCount()>0) {
//BA.debugLineNum = 212;BA.debugLine="For i=0 To c.RowCount -1";
{
final int step83 = 1;
final int limit83 = (int) (_c.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit83 ;_i = _i + step83 ) {
//BA.debugLineNum = 213;BA.debugLine="c.Position=i";
_c.setPosition(_i);
//BA.debugLineNum = 214;BA.debugLine="Dim cmd As DBCommand";
_cmd = new dbcheck.keymon.lat.dbrequestmanager._dbcommand();
//BA.debugLineNum = 215;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
//BA.debugLineNum = 216;BA.debugLine="cmd.Name = \"insert_geocerca_MARDS\"";
_cmd.Name /*String*/ = "insert_geocerca_MARDS";
//BA.debugLineNum = 217;BA.debugLine="cmd.Parameters = Array As Object(C.GetString(\"";
_cmd.Parameters /*Object[]*/ = new Object[]{(Object)(_c.GetString("HGCLIENTE")),(Object)(_c.GetString("HGDATE")),(Object)(_c.GetString("HGLAT")),(Object)(_c.GetString("HGLON"))};
//BA.debugLineNum = 218;BA.debugLine="reqManager.ExecuteCommand(cmd , \"inst_noventa\"";
_reqmanager._executecommand /*String*/ (_cmd,(Object)("inst_noventa"));
}
};
};
//BA.debugLineNum = 221;BA.debugLine="c.Close";
_c.Close();
//BA.debugLineNum = 224;BA.debugLine="c=skmt.ExecQuery(\"Select HFCLIENTE, HFALIAS,HFRU";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_skmt.ExecQuery("Select HFCLIENTE, HFALIAS,HFRUTA,HFALMACEN from HIST_FACE")));
//BA.debugLineNum = 225;BA.debugLine="If c.RowCount>0 Then";
if (_c.getRowCount()>0) {
//BA.debugLineNum = 226;BA.debugLine="For i=0 To c.RowCount -1";
{
final int step95 = 1;
final int limit95 = (int) (_c.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit95 ;_i = _i + step95 ) {
//BA.debugLineNum = 227;BA.debugLine="c.Position=i";
_c.setPosition(_i);
//BA.debugLineNum = 228;BA.debugLine="Dim cmd As DBCommand";
_cmd = new dbcheck.keymon.lat.dbrequestmanager._dbcommand();
//BA.debugLineNum = 229;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
//BA.debugLineNum = 230;BA.debugLine="cmd.Name = \"insert_face_like_MARDS\"";
_cmd.Name /*String*/ = "insert_face_like_MARDS";
//BA.debugLineNum = 231;BA.debugLine="cmd.Parameters = Array As Object(C.GetString(\"";
_cmd.Parameters /*Object[]*/ = new Object[]{(Object)(_c.GetString("HFCLIENTE")),(Object)(_c.GetString("HFALIAS")),(Object)(_c.GetString("HFRUTA")),(Object)(_c.GetString("HFALMACEN"))};
//BA.debugLineNum = 232;BA.debugLine="reqManager.ExecuteCommand(cmd , \"inst_noventa\"";
_reqmanager._executecommand /*String*/ (_cmd,(Object)("inst_noventa"));
}
};
};
//BA.debugLineNum = 235;BA.debugLine="c.Close";
_c.Close();
//BA.debugLineNum = 247;BA.debugLine="ToastMessageShow(\"Se Actualizaran los datos, Est";
__c.ToastMessageShow(BA.ObjectToCharSequence("Se Actualizaran los datos, Este proceso podria tardar hasta un minuto, gracias "+_ruta),__c.True);
};
//BA.debugLineNum = 250;BA.debugLine="End Sub";
return "";
}
public String _b_guardaalmacen_click() throws Exception{
//BA.debugLineNum = 396;BA.debugLine="Private Sub b_guardaAlmacen_Click";
//BA.debugLineNum = 397;BA.debugLine="p_editaAlmacen.Visible = False";
_p_editaalmacen.setVisible(__c.False);
//BA.debugLineNum = 398;BA.debugLine="End Sub";
return "";
}
public String _b_guardaruta_click() throws Exception{
//BA.debugLineNum = 391;BA.debugLine="Private Sub b_guardaRuta_Click";
//BA.debugLineNum = 392;BA.debugLine="p_editaRuta.Visible = False";
_p_editaruta.setVisible(__c.False);
//BA.debugLineNum = 393;BA.debugLine="skmt.ExecNonQuery($\"update \"$)";
_skmt.ExecNonQuery(("update "));
//BA.debugLineNum = 394;BA.debugLine="End Sub";
return "";
}
public String _b4xpage_appear() throws Exception{
anywheresoftware.b4a.objects.IntentWrapper _in = null;
String _xmldata = "";
anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper _outstr = null;
anywheresoftware.b4a.objects.streams.File.InputStreamWrapper _instr = null;
anywheresoftware.b4a.sql.SQL.CursorWrapper _c = null;
//BA.debugLineNum = 55;BA.debugLine="Sub B4XPage_Appear";
//BA.debugLineNum = 56;BA.debugLine="Log(\"INICIO\")";
__c.LogImpl("110616833","INICIO",0);
//BA.debugLineNum = 58;BA.debugLine="Dim in As Intent = B4XPages.GetNativeParent(Me).G";
_in = new anywheresoftware.b4a.objects.IntentWrapper();
_in = _b4xpages._getnativeparent /*anywheresoftware.b4a.objects.ActivityWrapper*/ (ba,this).GetStartingIntent();
//BA.debugLineNum = 59;BA.debugLine="If in <> Null Then";
if (_in!= null) {
//BA.debugLineNum = 60;BA.debugLine="Log(in.GetData)";
__c.LogImpl("110616837",_in.GetData(),0);
//BA.debugLineNum = 61;BA.debugLine="If in.GetData <> Null Then";
if (_in.GetData()!= null) {
//BA.debugLineNum = 62;BA.debugLine="Dim XmlData As String";
_xmldata = "";
//BA.debugLineNum = 63;BA.debugLine="XmlData = in.GetData";
_xmldata = _in.GetData();
//BA.debugLineNum = 64;BA.debugLine="ToastMessageShow(XmlData, False)";
__c.ToastMessageShow(BA.ObjectToCharSequence(_xmldata),__c.False);
//BA.debugLineNum = 67;BA.debugLine="Try";
try { //BA.debugLineNum = 68;BA.debugLine="Dim OutStr As OutputStream = File.OpenOutput(F";
_outstr = new anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper();
_outstr = __c.File.OpenOutput(__c.File.getDirInternal(),"kmt.db",__c.False);
//BA.debugLineNum = 69;BA.debugLine="Dim InStr As InputStream = File.OpenInput(\"Con";
_instr = new anywheresoftware.b4a.objects.streams.File.InputStreamWrapper();
_instr = __c.File.OpenInput("ContentDir",_xmldata);
//BA.debugLineNum = 70;BA.debugLine="File.Copy2(InStr,OutStr)";
__c.File.Copy2((java.io.InputStream)(_instr.getObject()),(java.io.OutputStream)(_outstr.getObject()));
//BA.debugLineNum = 71;BA.debugLine="Log(\"BD copiada a interna.\")";
__c.LogImpl("110616848","BD copiada a interna.",0);
//BA.debugLineNum = 72;BA.debugLine="OutStr.Close";
_outstr.Close();
}
catch (Exception e16) {
ba.setLastException(e16); //BA.debugLineNum = 74;BA.debugLine="Log(LastException)";
__c.LogImpl("110616851",BA.ObjectToString(__c.LastException(ba)),0);
};
};
};
//BA.debugLineNum = 79;BA.debugLine="Log($\"Existe BD: ${File.Exists(File.DirInternal,";
__c.LogImpl("110616856",("Existe BD: "+__c.SmartStringFormatter("",(Object)(__c.File.Exists(__c.File.getDirInternal(),"kmt.db")))+""),0);
//BA.debugLineNum = 80;BA.debugLine="If File.Exists(File.DirInternal, \"kmt.db\") Then";
if (__c.File.Exists(__c.File.getDirInternal(),"kmt.db")) {
//BA.debugLineNum = 81;BA.debugLine="If Not(skmt.IsInitialized) Then skmt.Initialize(";
if (__c.Not(_skmt.IsInitialized())) {
_skmt.Initialize(__c.File.getDirInternal(),"kmt.db",__c.True);};
//BA.debugLineNum = 82;BA.debugLine="Dim c As Cursor = skmt.ExecQuery($\"select count(";
_c = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_skmt.ExecQuery(("select count(distinct pe_cliente) as pedidos, group_concat(distinct substr(pe_fecha, 4,2)) as diasVenta, sum(pe_costo_tot) as total, (select PE_CANT from pedido where PE_CANT = 0) as cantsEnCero, (select count(PE_CLIENTE) from pedido where printf(\"%d\", PE_CLIENTE) <> PE_CLIENTE ) as clienteNoNumerico from pedido"))));
//BA.debugLineNum = 83;BA.debugLine="Log(c.RowCount)";
__c.LogImpl("110616860",BA.NumberToString(_c.getRowCount()),0);
//BA.debugLineNum = 84;BA.debugLine="If c.RowCount > 0 Then";
if (_c.getRowCount()>0) {
//BA.debugLineNum = 85;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
//BA.debugLineNum = 86;BA.debugLine="l_pedidos2.Text = c.GetString(\"pedidos\")";
_l_pedidos2.setText(BA.ObjectToCharSequence(_c.GetString("pedidos")));
//BA.debugLineNum = 87;BA.debugLine="l_diasVenta.Text = c.GetString(\"diasVenta\")";
_l_diasventa.setText(BA.ObjectToCharSequence(_c.GetString("diasVenta")));
//BA.debugLineNum = 88;BA.debugLine="l_totalVenta.Text = \"$\" & NumberFormat2(c.GetSt";
_l_totalventa.setText(BA.ObjectToCharSequence("$"+__c.NumberFormat2((double)(Double.parseDouble(_c.GetString("total"))),(int) (1),(int) (2),(int) (2),__c.True)));
//BA.debugLineNum = 89;BA.debugLine="l_cantsEnCero.Text = c.GetString(\"cantsEnCero\")";
_l_cantsencero.setText(BA.ObjectToCharSequence(_c.GetString("cantsEnCero")));
//BA.debugLineNum = 90;BA.debugLine="l_clienteNoNumerico.Text = c.GetString(\"cliente";
_l_clientenonumerico.setText(BA.ObjectToCharSequence(_c.GetString("clienteNoNumerico")));
};
//BA.debugLineNum = 92;BA.debugLine="Dim c As Cursor = skmt.ExecQuery(\"select pe_ruta";
_c = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_skmt.ExecQuery("select pe_ruta from pedido")));
//BA.debugLineNum = 93;BA.debugLine="If c.RowCount > 0 Then";
if (_c.getRowCount()>0) {
//BA.debugLineNum = 94;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
//BA.debugLineNum = 95;BA.debugLine="ruta = c.GetString(\"PE_RUTA\")";
_ruta = _c.GetString("PE_RUTA");
//BA.debugLineNum = 96;BA.debugLine="l_ruta2.Text = ruta";
_l_ruta2.setText(BA.ObjectToCharSequence(_ruta));
};
//BA.debugLineNum = 98;BA.debugLine="Dim c As Cursor = skmt.ExecQuery(\"select USUARIO";
_c = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_skmt.ExecQuery("select USUARIO from usuarioa")));
//BA.debugLineNum = 99;BA.debugLine="If c.RowCount > 0 Then";
if (_c.getRowCount()>0) {
//BA.debugLineNum = 100;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
//BA.debugLineNum = 101;BA.debugLine="usuario = c.GetString(\"USUARIO\")";
_usuario = _c.GetString("USUARIO");
//BA.debugLineNum = 102;BA.debugLine="l_usuario2.Text = usuario";
_l_usuario2.setText(BA.ObjectToCharSequence(_usuario));
};
//BA.debugLineNum = 104;BA.debugLine="Dim c As Cursor = skmt.ExecQuery(\"select ID_ALMA";
_c = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_skmt.ExecQuery("select ID_ALMACEN from cat_almacen")));
//BA.debugLineNum = 105;BA.debugLine="If c.RowCount > 0 Then";
if (_c.getRowCount()>0) {
//BA.debugLineNum = 106;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
//BA.debugLineNum = 107;BA.debugLine="almacen = c.GetString(\"ID_ALMACEN\")";
_almacen = _c.GetString("ID_ALMACEN");
//BA.debugLineNum = 108;BA.debugLine="l_almacen2.Text = almacen";
_l_almacen2.setText(BA.ObjectToCharSequence(_almacen));
};
//BA.debugLineNum = 110;BA.debugLine="c.Close";
_c.Close();
};
//BA.debugLineNum = 112;BA.debugLine="End Sub";
return "";
}
public anywheresoftware.b4a.keywords.Common.ResumableSubWrapper _b4xpage_closerequest() throws Exception{
ResumableSub_B4XPage_CloseRequest rsub = new ResumableSub_B4XPage_CloseRequest(this);
rsub.resume(ba, null);
return (anywheresoftware.b4a.keywords.Common.ResumableSubWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.keywords.Common.ResumableSubWrapper(), rsub);
}
public static class ResumableSub_B4XPage_CloseRequest extends BA.ResumableSub {
public ResumableSub_B4XPage_CloseRequest(dbcheck.keymon.lat.b4xmainpage parent) {
this.parent = parent;
}
dbcheck.keymon.lat.b4xmainpage parent;
@Override
public void resume(BA ba, Object[] result) throws Exception{
while (true) {
switch (state) {
case -1:
{
parent.__c.ReturnFromResumableSub(this,null);return;}
case 0:
//C
this.state = -1;
//BA.debugLineNum = 373;BA.debugLine="ExitApplication";
parent.__c.ExitApplication();
//BA.debugLineNum = 374;BA.debugLine="Return False";
if (true) {
parent.__c.ReturnFromResumableSub(this,(Object)(parent.__c.False));return;};
//BA.debugLineNum = 375;BA.debugLine="End Sub";
if (true) break;
}
}
}
}
public String _b4xpage_created(anywheresoftware.b4a.objects.B4XViewWrapper _root1) throws Exception{
//BA.debugLineNum = 42;BA.debugLine="Private Sub B4XPage_Created (Root1 As B4XView)";
//BA.debugLineNum = 43;BA.debugLine="Root = Root1";
_root = _root1;
//BA.debugLineNum = 44;BA.debugLine="Root.LoadLayout(\"MainPage\")";
_root.LoadLayout("MainPage",ba);
//BA.debugLineNum = 45;BA.debugLine="reqManager.Initialize(Me, \"http://187.189.244.154";
_reqmanager._initialize /*String*/ (ba,this,"http://187.189.244.154:1782");
//BA.debugLineNum = 46;BA.debugLine="B4XPages.SetTitle(Me, \"Mariana revisión de BD\")";
_b4xpages._settitle /*String*/ (ba,this,(Object)("Mariana revisión de BD"));
//BA.debugLineNum = 47;BA.debugLine="Subs.centraPanel(p_progressDialog, Root.Width)";
_subs._centrapanel /*String*/ (ba,_p_progressdialog,_root.getWidth());
//BA.debugLineNum = 48;BA.debugLine="Subs.centraPanel(p_editaRuta, Root.Width)";
_subs._centrapanel /*String*/ (ba,_p_editaruta,_root.getWidth());
//BA.debugLineNum = 49;BA.debugLine="Subs.centraPanel(p_editaAlmacen, Root.Width)";
_subs._centrapanel /*String*/ (ba,_p_editaalmacen,_root.getWidth());
//BA.debugLineNum = 51;BA.debugLine="End Sub";
return "";
}
public String _class_globals() throws Exception{
//BA.debugLineNum = 8;BA.debugLine="Sub Class_Globals";
//BA.debugLineNum = 9;BA.debugLine="Private Root As B4XView";
_root = new anywheresoftware.b4a.objects.B4XViewWrapper();
//BA.debugLineNum = 10;BA.debugLine="Private xui As XUI";
_xui = new anywheresoftware.b4a.objects.B4XViewWrapper.XUI();
//BA.debugLineNum = 12;BA.debugLine="Private b_enviar As Button";
_b_enviar = new anywheresoftware.b4a.objects.ButtonWrapper();
//BA.debugLineNum = 13;BA.debugLine="Dim skmt As SQL";
_skmt = new anywheresoftware.b4a.sql.SQL();
//BA.debugLineNum = 14;BA.debugLine="Dim reqManager As DBRequestManager";
_reqmanager = new dbcheck.keymon.lat.dbrequestmanager();
//BA.debugLineNum = 15;BA.debugLine="Private l_pedidos2 As Label";
_l_pedidos2 = new anywheresoftware.b4a.objects.LabelWrapper();
//BA.debugLineNum = 16;BA.debugLine="Private l_diasVenta As Label";
_l_diasventa = new anywheresoftware.b4a.objects.LabelWrapper();
//BA.debugLineNum = 17;BA.debugLine="Private l_totalVenta As Label";
_l_totalventa = new anywheresoftware.b4a.objects.LabelWrapper();
//BA.debugLineNum = 18;BA.debugLine="Private l_cantsEnCero As Label";
_l_cantsencero = new anywheresoftware.b4a.objects.LabelWrapper();
//BA.debugLineNum = 19;BA.debugLine="Private l_clienteNoNumerico As Label";
_l_clientenonumerico = new anywheresoftware.b4a.objects.LabelWrapper();
//BA.debugLineNum = 20;BA.debugLine="Dim cuantos_pedido As String";
_cuantos_pedido = "";
//BA.debugLineNum = 22;BA.debugLine="Dim cuantos_pedidosc As String";
_cuantos_pedidosc = "";
//BA.debugLineNum = 23;BA.debugLine="Dim cuantos_noventa As String";
_cuantos_noventa = "";
//BA.debugLineNum = 24;BA.debugLine="Dim reqsPendientes As List";
_reqspendientes = new anywheresoftware.b4a.objects.collections.List();
//BA.debugLineNum = 25;BA.debugLine="Private l_ruta2 As Label";
_l_ruta2 = new anywheresoftware.b4a.objects.LabelWrapper();
//BA.debugLineNum = 26;BA.debugLine="Dim ruta As String = \"\"";
_ruta = "";
//BA.debugLineNum = 27;BA.debugLine="Private l_usuario2 As Label";
_l_usuario2 = new anywheresoftware.b4a.objects.LabelWrapper();
//BA.debugLineNum = 28;BA.debugLine="Dim usuario As String = \"\"";
_usuario = "";
//BA.debugLineNum = 29;BA.debugLine="Private l_almacen2 As Label";
_l_almacen2 = new anywheresoftware.b4a.objects.LabelWrapper();
//BA.debugLineNum = 30;BA.debugLine="Dim almacen As String = \"\"";
_almacen = "";
//BA.debugLineNum = 31;BA.debugLine="Private p_progressDialog As Panel";
_p_progressdialog = new anywheresoftware.b4a.objects.PanelWrapper();
//BA.debugLineNum = 32;BA.debugLine="Private l_progressDialog As Label";
_l_progressdialog = new anywheresoftware.b4a.objects.LabelWrapper();
//BA.debugLineNum = 33;BA.debugLine="Private p_editaRuta As Panel";
_p_editaruta = new anywheresoftware.b4a.objects.PanelWrapper();
//BA.debugLineNum = 34;BA.debugLine="Private p_editaAlmacen As Panel";
_p_editaalmacen = new anywheresoftware.b4a.objects.PanelWrapper();
//BA.debugLineNum = 35;BA.debugLine="End Sub";
return "";
}
public String _initialize(anywheresoftware.b4a.BA _ba) throws Exception{
innerInitialize(_ba);
//BA.debugLineNum = 37;BA.debugLine="Public Sub Initialize";
//BA.debugLineNum = 39;BA.debugLine="End Sub";
return "";
}
public String _jobdone(dbcheck.keymon.lat.httpjob _job) throws Exception{
dbcheck.keymon.lat.dbrequestmanager._dbresult _resultado = null;
String _cliente = "";
Object[] _records = null;
String _k = "";
dbcheck.keymon.lat.dbrequestmanager._dbresult _result = null;
int _cuantosp = 0;
int _cuantosc = 0;
int _cuantosn = 0;
//BA.debugLineNum = 252;BA.debugLine="Sub JobDone(Job As HttpJob)";
//BA.debugLineNum = 253;BA.debugLine="If Job.Success = False Then";
if (_job._success /*boolean*/ ==__c.False) {
}else {
//BA.debugLineNum = 256;BA.debugLine="LogColor(\"JobDone: '\" & reqManager.HandleJob(Job";
__c.LogImpl("114417924","JobDone: '"+BA.ObjectToString(_reqmanager._handlejob /*dbcheck.keymon.lat.dbrequestmanager._dbresult*/ (_job).Tag /*Object*/ )+"' - Registros: "+BA.NumberToString(_reqmanager._handlejob /*dbcheck.keymon.lat.dbrequestmanager._dbresult*/ (_job).Rows /*anywheresoftware.b4a.objects.collections.List*/ .getSize()),__c.Colors.Green);
//BA.debugLineNum = 257;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) {
//BA.debugLineNum = 258;BA.debugLine="Dim resultado As DBResult = reqManager.HandleJo";
_resultado = _reqmanager._handlejob /*dbcheck.keymon.lat.dbrequestmanager._dbresult*/ (_job);
//BA.debugLineNum = 259;BA.debugLine="reqsPendientes.RemoveAt(reqsPendientes.IndexOf(";
_reqspendientes.RemoveAt(_reqspendientes.IndexOf(_resultado.Tag /*Object*/ ));
};
//BA.debugLineNum = 262;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) {
//BA.debugLineNum = 263;BA.debugLine="Dim resultado As DBResult = reqManager.HandleJo";
_resultado = _reqmanager._handlejob /*dbcheck.keymon.lat.dbrequestmanager._dbresult*/ (_job);
//BA.debugLineNum = 264;BA.debugLine="If resultado.Tag.As(String).IndexOf(\"ins_pedido";
if ((BA.ObjectToString(_resultado.Tag /*Object*/ )).indexOf("ins_pedido_")>-1) {
//BA.debugLineNum = 265;BA.debugLine="Private cliente As String= resultado.Tag";
_cliente = BA.ObjectToString(_resultado.Tag /*Object*/ );
//BA.debugLineNum = 266;BA.debugLine="Log($\"Cliente1:${cliente}\"$)";
__c.LogImpl("114417934",("Cliente1:"+__c.SmartStringFormatter("",(Object)(_cliente))+""),0);
//BA.debugLineNum = 267;BA.debugLine="For Each records() As Object In resultado.Rows";
{
final anywheresoftware.b4a.BA.IterableList group13 = _resultado.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen13 = group13.getSize()
;int index13 = 0;
;
for (; index13 < groupLen13;index13++){
_records = (Object[])(group13.Get(index13));
//BA.debugLineNum = 268;BA.debugLine="For Each k As String In resultado.Columns.Key";
{
final anywheresoftware.b4a.BA.IterableList group14 = _resultado.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Keys();
final int groupLen14 = group14.getSize()
;int index14 = 0;
;
for (; index14 < groupLen14;index14++){
_k = BA.ObjectToString(group14.Get(index14));
//BA.debugLineNum = 269;BA.debugLine="Log(resultado.Tag & \": \" & k & \": \" & record";
__c.LogImpl("114417937",BA.ObjectToString(_resultado.Tag /*Object*/ )+": "+_k+": "+BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_resultado.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)(_k))))]),0);
}
};
}
};
};
};
//BA.debugLineNum = 275;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) {
//BA.debugLineNum = 276;BA.debugLine="Dim resultado As DBResult = reqManager.HandleJo";
_resultado = _reqmanager._handlejob /*dbcheck.keymon.lat.dbrequestmanager._dbresult*/ (_job);
//BA.debugLineNum = 277;BA.debugLine="If resultado.Tag.As(String).IndexOf(\"hist_encue";
if ((BA.ObjectToString(_resultado.Tag /*Object*/ )).indexOf("hist_encuesta")>-1) {
//BA.debugLineNum = 278;BA.debugLine="Private cliente As String= resultado.Tag";
_cliente = BA.ObjectToString(_resultado.Tag /*Object*/ );
//BA.debugLineNum = 279;BA.debugLine="reqsPendientes.RemoveAt(reqsPendientes.IndexOf";
_reqspendientes.RemoveAt(_reqspendientes.IndexOf(_resultado.Tag /*Object*/ ));
//BA.debugLineNum = 280;BA.debugLine="Log($\"Cliente1:${cliente}\"$)";
__c.LogImpl("114417948",("Cliente1:"+__c.SmartStringFormatter("",(Object)(_cliente))+""),0);
//BA.debugLineNum = 281;BA.debugLine="For Each records() As Object In resultado.Rows";
{
final anywheresoftware.b4a.BA.IterableList group26 = _resultado.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen26 = group26.getSize()
;int index26 = 0;
;
for (; index26 < groupLen26;index26++){
_records = (Object[])(group26.Get(index26));
//BA.debugLineNum = 282;BA.debugLine="For Each k As String In resultado.Columns.Key";
{
final anywheresoftware.b4a.BA.IterableList group27 = _resultado.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Keys();
final int groupLen27 = group27.getSize()
;int index27 = 0;
;
for (; index27 < groupLen27;index27++){
_k = BA.ObjectToString(group27.Get(index27));
//BA.debugLineNum = 283;BA.debugLine="Log(resultado.Tag & \": \" & k & \": \" & record";
__c.LogImpl("114417951",BA.ObjectToString(_resultado.Tag /*Object*/ )+": "+_k+": "+BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_resultado.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)(_k))))]),0);
}
};
}
};
};
};
//BA.debugLineNum = 289;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) {
//BA.debugLineNum = 290;BA.debugLine="Dim RESULT As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*dbcheck.keymon.lat.dbrequestmanager._dbresult*/ (_job);
//BA.debugLineNum = 291;BA.debugLine="If RESULT.Tag = \"valida_pedido\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("valida_pedido"))) {
//BA.debugLineNum = 292;BA.debugLine="For Each records() As Object In RESULT.Rows";
{
final anywheresoftware.b4a.BA.IterableList group36 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen36 = group36.getSize()
;int index36 = 0;
;
for (; index36 < groupLen36;index36++){
_records = (Object[])(group36.Get(index36));
//BA.debugLineNum = 293;BA.debugLine="Dim CUANTOSP As Int = records(RESULT.Columns.";
_cuantosp = (int)(BA.ObjectToNumber(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CUANTOSP"))))]));
//BA.debugLineNum = 294;BA.debugLine="If cuantos_pedido < = CUANTOSP Then";
if ((double)(Double.parseDouble(_cuantos_pedido))<=_cuantosp) {
//BA.debugLineNum = 298;BA.debugLine="ToastMessageShow(\"INFO OK\", True)";
__c.ToastMessageShow(BA.ObjectToCharSequence("INFO OK"),__c.True);
}else {
//BA.debugLineNum = 300;BA.debugLine="ToastMessageShow(\"No se cargo bien la info P";
__c.ToastMessageShow(BA.ObjectToCharSequence("No se cargo bien la info P. Sync Nuevamente"+BA.NumberToString(_cuantosp)+" "+_cuantos_pedido),__c.True);
//BA.debugLineNum = 302;BA.debugLine="ToastMessageShow(\"ENVIAR DATOS (K-2)\", True)";
__c.ToastMessageShow(BA.ObjectToCharSequence("ENVIAR DATOS (K-2)"),__c.True);
//BA.debugLineNum = 303;BA.debugLine="Log(\"No se cargo bien la info P. Sync Nuevam";
__c.LogImpl("114417971","No se cargo bien la info P. Sync Nuevamente"+BA.NumberToString(_cuantosp)+" "+_cuantos_pedido,0);
};
}
};
};
};
//BA.debugLineNum = 309;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) {
//BA.debugLineNum = 310;BA.debugLine="Dim RESULT As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*dbcheck.keymon.lat.dbrequestmanager._dbresult*/ (_job);
//BA.debugLineNum = 311;BA.debugLine="If RESULT.Tag = \"valida_pedidoc\" Then 'query ta";
if ((_result.Tag /*Object*/ ).equals((Object)("valida_pedidoc"))) {
//BA.debugLineNum = 312;BA.debugLine="For Each records() As Object In RESULT.Rows";
{
final anywheresoftware.b4a.BA.IterableList group51 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen51 = group51.getSize()
;int index51 = 0;
;
for (; index51 < groupLen51;index51++){
_records = (Object[])(group51.Get(index51));
//BA.debugLineNum = 313;BA.debugLine="Dim CUANTOSC As Int = records(RESULT.Columns.";
_cuantosc = (int)(BA.ObjectToNumber(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CUANTOSC"))))]));
//BA.debugLineNum = 314;BA.debugLine="If cuantos_pedidosc = CUANTOSC Then";
if ((_cuantos_pedidosc).equals(BA.NumberToString(_cuantosc))) {
}else {
//BA.debugLineNum = 318;BA.debugLine="ToastMessageShow(\"No se cargo bien la info C";
__c.ToastMessageShow(BA.ObjectToCharSequence("No se cargo bien la info C. Sync Nuevamente"+BA.NumberToString(_cuantosc)+" "+_cuantos_pedidosc),__c.True);
//BA.debugLineNum = 319;BA.debugLine="Log(\"No se cargo bien la info C. Sync Nuevam";
__c.LogImpl("114417987","No se cargo bien la info C. Sync Nuevamente "+BA.NumberToString(_cuantosc)+" "+_cuantos_pedidosc,0);
};
}
};
};
};
//BA.debugLineNum = 325;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) {
//BA.debugLineNum = 326;BA.debugLine="Dim RESULT As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*dbcheck.keymon.lat.dbrequestmanager._dbresult*/ (_job);
//BA.debugLineNum = 327;BA.debugLine="If RESULT.Tag = \"valida_noventa\" Then 'query ta";
if ((_result.Tag /*Object*/ ).equals((Object)("valida_noventa"))) {
//BA.debugLineNum = 328;BA.debugLine="For Each records() As Object In RESULT.Rows";
{
final anywheresoftware.b4a.BA.IterableList group64 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen64 = group64.getSize()
;int index64 = 0;
;
for (; index64 < groupLen64;index64++){
_records = (Object[])(group64.Get(index64));
//BA.debugLineNum = 329;BA.debugLine="Dim CUANTOSN As Int = records(RESULT.Columns.";
_cuantosn = (int)(BA.ObjectToNumber(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CUANTOSN"))))]));
//BA.debugLineNum = 330;BA.debugLine="If cuantos_noventa = CUANTOSN Then";
if ((_cuantos_noventa).equals(BA.NumberToString(_cuantosn))) {
}else {
//BA.debugLineNum = 334;BA.debugLine="ToastMessageShow(\"No se cargo bien la info N";
__c.ToastMessageShow(BA.ObjectToCharSequence("No se cargo bien la info N. Sync Nuevamente"+BA.NumberToString(_cuantosn)+" "+_cuantos_noventa),__c.True);
//BA.debugLineNum = 335;BA.debugLine="Log(\"No se cargo bien la info N. Sync Nuevam";
__c.LogImpl("114418003","No se cargo bien la info N. Sync Nuevamente "+BA.NumberToString(_cuantosn)+" "+_cuantos_noventa,0);
};
}
};
};
};
//BA.debugLineNum = 341;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) {
//BA.debugLineNum = 342;BA.debugLine="Dim RESULT As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*dbcheck.keymon.lat.dbrequestmanager._dbresult*/ (_job);
//BA.debugLineNum = 343;BA.debugLine="If RESULT.Tag = \"ins_pedido\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("ins_pedido"))) {
//BA.debugLineNum = 344;BA.debugLine="For Each records() As Object In RESULT.Rows";
{
final anywheresoftware.b4a.BA.IterableList group77 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen77 = group77.getSize()
;int index77 = 0;
;
for (; index77 < groupLen77;index77++){
_records = (Object[])(group77.Get(index77));
}
};
//BA.debugLineNum = 350;BA.debugLine="Log(\"5\")";
__c.LogImpl("114418018","5",0);
};
};
//BA.debugLineNum = 354;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) {
//BA.debugLineNum = 355;BA.debugLine="Dim RESULT As DBResult = B4XPages.MainPage.reqM";
_result = _b4xpages._mainpage /*dbcheck.keymon.lat.b4xmainpage*/ (ba)._reqmanager /*dbcheck.keymon.lat.dbrequestmanager*/ ._handlejob /*dbcheck.keymon.lat.dbrequestmanager._dbresult*/ (_job);
//BA.debugLineNum = 356;BA.debugLine="If RESULT.Tag = \"ins_pedido\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("ins_pedido"))) {
//BA.debugLineNum = 357;BA.debugLine="For Each records() As Object In RESULT.Rows";
{
final anywheresoftware.b4a.BA.IterableList group85 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen85 = group85.getSize()
;int index85 = 0;
;
for (; index85 < groupLen85;index85++){
_records = (Object[])(group85.Get(index85));
}
};
//BA.debugLineNum = 364;BA.debugLine="Log(\"5\")";
__c.LogImpl("114418032","5",0);
};
};
};
//BA.debugLineNum = 368;BA.debugLine="If reqsPendientes.Size = 0 Then p_progressDialog.";
if (_reqspendientes.getSize()==0) {
_p_progressdialog.setVisible(__c.False);};
//BA.debugLineNum = 369;BA.debugLine="Job.Release";
_job._release /*String*/ ();
//BA.debugLineNum = 370;BA.debugLine="End Sub";
return "";
}
public String _l_almacen2_longclick() throws Exception{
//BA.debugLineNum = 382;BA.debugLine="Private Sub l_almacen2_LongClick";
//BA.debugLineNum = 383;BA.debugLine="p_editaAlmacen.Top = l_almacen2.top";
_p_editaalmacen.setTop(_l_almacen2.getTop());
//BA.debugLineNum = 384;BA.debugLine="p_editaAlmacen.Visible = True";
_p_editaalmacen.setVisible(__c.True);
//BA.debugLineNum = 385;BA.debugLine="End Sub";
return "";
}
public String _l_ruta2_longclick() throws Exception{
//BA.debugLineNum = 377;BA.debugLine="Private Sub l_ruta2_LongClick";
//BA.debugLineNum = 378;BA.debugLine="p_editaRuta.Top = l_ruta2.top";
_p_editaruta.setTop(_l_ruta2.getTop());
//BA.debugLineNum = 379;BA.debugLine="p_editaRuta.Visible = True";
_p_editaruta.setVisible(__c.True);
//BA.debugLineNum = 380;BA.debugLine="End Sub";
return "";
}
public String _l_usuario2_longclick() throws Exception{
//BA.debugLineNum = 387;BA.debugLine="Private Sub l_usuario2_LongClick";
//BA.debugLineNum = 389;BA.debugLine="End Sub";
return "";
}
public String _p_principal_click() throws Exception{
//BA.debugLineNum = 400;BA.debugLine="Private Sub p_principal_Click";
//BA.debugLineNum = 401;BA.debugLine="p_editaAlmacen.Visible = False";
_p_editaalmacen.setVisible(__c.False);
//BA.debugLineNum = 402;BA.debugLine="p_editaRuta.Visible = False";
_p_editaruta.setVisible(__c.False);
//BA.debugLineNum = 403;BA.debugLine="End Sub";
return "";
}
public Object callSub(String sub, Object sender, Object[] args) throws Exception {
BA.senderHolder.set(sender);
if (BA.fastSubCompare(sub, "B4XPAGE_CREATED"))
return _b4xpage_created((anywheresoftware.b4a.objects.B4XViewWrapper) args[0]);
if (BA.fastSubCompare(sub, "JOBDONE"))
return _jobdone((dbcheck.keymon.lat.httpjob) args[0]);
return BA.SubDelegator.SubNotFound;
}
}

View File

@@ -0,0 +1,170 @@
package dbcheck.keymon.lat;
import anywheresoftware.b4a.BA;
import anywheresoftware.b4a.B4AClass;
import anywheresoftware.b4a.BALayout;
import anywheresoftware.b4a.debug.*;
public class b4xorderedmap 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, "dbcheck.keymon.lat.b4xorderedmap");
if (htSubs == null) {
ba.loadHtSubs(this.getClass());
htSubs = ba.htSubs;
}
}
if (BA.isShellModeRuntimeCheck(ba))
this.getClass().getMethod("_class_globals", dbcheck.keymon.lat.b4xorderedmap.class).invoke(this, new Object[] {null});
else
ba.raiseEvent2(null, true, "class_globals", false);
}
public anywheresoftware.b4a.keywords.Common __c = null;
public anywheresoftware.b4a.objects.collections.Map _map = null;
public anywheresoftware.b4a.objects.collections.List _list = null;
public dbcheck.keymon.lat.main _main = null;
public dbcheck.keymon.lat.starter _starter = null;
public dbcheck.keymon.lat.subs _subs = null;
public dbcheck.keymon.lat.b4xpages _b4xpages = null;
public dbcheck.keymon.lat.b4xcollections _b4xcollections = null;
public dbcheck.keymon.lat.httputils2service _httputils2service = null;
public String _class_globals() throws Exception{
//BA.debugLineNum = 1;BA.debugLine="Sub Class_Globals";
//BA.debugLineNum = 2;BA.debugLine="Private map As Map";
_map = new anywheresoftware.b4a.objects.collections.Map();
//BA.debugLineNum = 3;BA.debugLine="Private list As List";
_list = new anywheresoftware.b4a.objects.collections.List();
//BA.debugLineNum = 4;BA.debugLine="End Sub";
return "";
}
public String _clear() throws Exception{
//BA.debugLineNum = 26;BA.debugLine="Public Sub Clear";
//BA.debugLineNum = 27;BA.debugLine="list.Clear";
_list.Clear();
//BA.debugLineNum = 28;BA.debugLine="map.Clear";
_map.Clear();
//BA.debugLineNum = 29;BA.debugLine="End Sub";
return "";
}
public boolean _containskey(Object _key) throws Exception{
//BA.debugLineNum = 46;BA.debugLine="Public Sub ContainsKey (Key As Object) As Boolean";
//BA.debugLineNum = 47;BA.debugLine="Return map.ContainsKey(Key)";
if (true) return _map.ContainsKey(_key);
//BA.debugLineNum = 48;BA.debugLine="End Sub";
return false;
}
public Object _get(Object _key) throws Exception{
//BA.debugLineNum = 37;BA.debugLine="Public Sub Get (Key As Object) As Object";
//BA.debugLineNum = 38;BA.debugLine="Return map.Get(Key)";
if (true) return _map.Get(_key);
//BA.debugLineNum = 39;BA.debugLine="End Sub";
return null;
}
public Object _getdataforserializator() throws Exception{
//BA.debugLineNum = 65;BA.debugLine="Public Sub GetDataForSerializator As Object";
//BA.debugLineNum = 66;BA.debugLine="Return Array(map, list)";
if (true) return (Object)(new Object[]{(Object)(_map.getObject()),(Object)(_list.getObject())});
//BA.debugLineNum = 67;BA.debugLine="End Sub";
return null;
}
public Object _getdefault(Object _key,Object _defaultvalue) throws Exception{
//BA.debugLineNum = 42;BA.debugLine="Public Sub GetDefault (Key As Object, DefaultValue";
//BA.debugLineNum = 43;BA.debugLine="Return map.GetDefault(Key, DefaultValue)";
if (true) return _map.GetDefault(_key,_defaultvalue);
//BA.debugLineNum = 44;BA.debugLine="End Sub";
return null;
}
public anywheresoftware.b4a.objects.collections.List _getkeys() throws Exception{
//BA.debugLineNum = 32;BA.debugLine="Public Sub getKeys As List";
//BA.debugLineNum = 33;BA.debugLine="Return list";
if (true) return _list;
//BA.debugLineNum = 34;BA.debugLine="End Sub";
return null;
}
public int _getsize() throws Exception{
//BA.debugLineNum = 50;BA.debugLine="Public Sub getSize As Int";
//BA.debugLineNum = 51;BA.debugLine="Return map.Size";
if (true) return _map.getSize();
//BA.debugLineNum = 52;BA.debugLine="End Sub";
return 0;
}
public anywheresoftware.b4a.objects.collections.List _getvalues() throws Exception{
anywheresoftware.b4a.objects.collections.List _res = null;
Object _key = null;
//BA.debugLineNum = 55;BA.debugLine="Public Sub getValues As List";
//BA.debugLineNum = 56;BA.debugLine="Dim res As List";
_res = new anywheresoftware.b4a.objects.collections.List();
//BA.debugLineNum = 57;BA.debugLine="res.Initialize";
_res.Initialize();
//BA.debugLineNum = 58;BA.debugLine="For Each key As Object In list";
{
final anywheresoftware.b4a.BA.IterableList group3 = _list;
final int groupLen3 = group3.getSize()
;int index3 = 0;
;
for (; index3 < groupLen3;index3++){
_key = group3.Get(index3);
//BA.debugLineNum = 59;BA.debugLine="res.Add(map.Get(key))";
_res.Add(_map.Get(_key));
}
};
//BA.debugLineNum = 61;BA.debugLine="Return res";
if (true) return _res;
//BA.debugLineNum = 62;BA.debugLine="End Sub";
return null;
}
public String _initialize(anywheresoftware.b4a.BA _ba) throws Exception{
innerInitialize(_ba);
//BA.debugLineNum = 6;BA.debugLine="Public Sub Initialize";
//BA.debugLineNum = 7;BA.debugLine="map.Initialize";
_map.Initialize();
//BA.debugLineNum = 8;BA.debugLine="list.Initialize";
_list.Initialize();
//BA.debugLineNum = 9;BA.debugLine="End Sub";
return "";
}
public String _put(Object _key,Object _value) throws Exception{
//BA.debugLineNum = 12;BA.debugLine="Public Sub Put (Key As Object, Value As Object)";
//BA.debugLineNum = 13;BA.debugLine="If map.ContainsKey(Key) = False Then";
if (_map.ContainsKey(_key)==__c.False) {
//BA.debugLineNum = 14;BA.debugLine="list.Add(Key)";
_list.Add(_key);
};
//BA.debugLineNum = 16;BA.debugLine="map.Put(Key, Value)";
_map.Put(_key,_value);
//BA.debugLineNum = 17;BA.debugLine="End Sub";
return "";
}
public String _remove(Object _key) throws Exception{
//BA.debugLineNum = 20;BA.debugLine="Public Sub Remove (Key As Object)";
//BA.debugLineNum = 21;BA.debugLine="If map.ContainsKey(Key) = False Then Return";
if (_map.ContainsKey(_key)==__c.False) {
if (true) return "";};
//BA.debugLineNum = 22;BA.debugLine="list.RemoveAt(list.IndexOf(Key))";
_list.RemoveAt(_list.IndexOf(_key));
//BA.debugLineNum = 23;BA.debugLine="map.Remove(Key)";
_map.Remove(_key);
//BA.debugLineNum = 24;BA.debugLine="End Sub";
return "";
}
public String _setdatafromserializator(Object _data) throws Exception{
Object[] _o = null;
//BA.debugLineNum = 70;BA.debugLine="Public Sub SetDataFromSerializator (Data As Object";
//BA.debugLineNum = 71;BA.debugLine="Dim o() As Object = Data";
_o = (Object[])(_data);
//BA.debugLineNum = 72;BA.debugLine="map = o(0)";
_map = (anywheresoftware.b4a.objects.collections.Map) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.collections.Map(), (java.util.Map)(_o[(int) (0)]));
//BA.debugLineNum = 73;BA.debugLine="list = o(1)";
_list = (anywheresoftware.b4a.objects.collections.List) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.collections.List(), (java.util.List)(_o[(int) (1)]));
//BA.debugLineNum = 74;BA.debugLine="End Sub";
return "";
}
public Object callSub(String sub, Object sender, Object[] args) throws Exception {
BA.senderHolder.set(sender);
return BA.SubDelegator.SubNotFound;
}
}

View File

@@ -0,0 +1,133 @@
package dbcheck.keymon.lat;
import anywheresoftware.b4a.BA;
import anywheresoftware.b4a.BALayout;
import anywheresoftware.b4a.debug.*;
public class b4xpages {
private static b4xpages mostCurrent = new b4xpages();
public static Object getObject() {
throw new RuntimeException("Code module does not support this method.");
}
public anywheresoftware.b4a.keywords.Common __c = null;
public static Object _mpm = null;
public static dbcheck.keymon.lat.b4xpagesdelegator _delegate = null;
public static Object _globalcontext = null;
public dbcheck.keymon.lat.main _main = null;
public dbcheck.keymon.lat.starter _starter = null;
public dbcheck.keymon.lat.subs _subs = null;
public dbcheck.keymon.lat.b4xcollections _b4xcollections = null;
public dbcheck.keymon.lat.httputils2service _httputils2service = null;
public static dbcheck.keymon.lat.b4xpagesmanager._b4amenuitem _addmenuitem(anywheresoftware.b4a.BA _ba,Object _b4xpage,Object _title) throws Exception{
//BA.debugLineNum = 91;BA.debugLine="Public Sub AddMenuItem(B4XPage As Object, Title As";
//BA.debugLineNum = 92;BA.debugLine="Return GetManager.AddMenuItem(B4XPage, Title)";
if (true) return _getmanager(_ba)._addmenuitem /*dbcheck.keymon.lat.b4xpagesmanager._b4amenuitem*/ (_b4xpage,_title);
//BA.debugLineNum = 93;BA.debugLine="End Sub";
return null;
}
public static String _addpage(anywheresoftware.b4a.BA _ba,String _id,Object _b4xpage) throws Exception{
//BA.debugLineNum = 37;BA.debugLine="Public Sub AddPage (Id As String, B4XPage As Objec";
//BA.debugLineNum = 38;BA.debugLine="GetManager.AddPage(Id, B4XPage)";
_getmanager(_ba)._addpage /*String*/ (_id,_b4xpage);
//BA.debugLineNum = 39;BA.debugLine="End Sub";
return "";
}
public static String _addpageandcreate(anywheresoftware.b4a.BA _ba,String _id,Object _b4xpage) throws Exception{
//BA.debugLineNum = 42;BA.debugLine="Public Sub AddPageAndCreate (Id As String, B4XPage";
//BA.debugLineNum = 43;BA.debugLine="GetManager.AddPageAndCreate(Id, B4XPage)";
_getmanager(_ba)._addpageandcreate /*String*/ (_id,_b4xpage);
//BA.debugLineNum = 44;BA.debugLine="End Sub";
return "";
}
public static String _closepage(anywheresoftware.b4a.BA _ba,Object _b4xpage) throws Exception{
//BA.debugLineNum = 62;BA.debugLine="Public Sub ClosePage (B4XPage As Object)";
//BA.debugLineNum = 63;BA.debugLine="GetManager.ClosePage (B4XPage)";
_getmanager(_ba)._closepage /*String*/ (_b4xpage);
//BA.debugLineNum = 64;BA.debugLine="End Sub";
return "";
}
public static dbcheck.keymon.lat.b4xpagesmanager _getmanager(anywheresoftware.b4a.BA _ba) throws Exception{
//BA.debugLineNum = 14;BA.debugLine="Public Sub GetManager As B4XPagesManager";
//BA.debugLineNum = 15;BA.debugLine="Return mPM";
if (true) return (dbcheck.keymon.lat.b4xpagesmanager)(_mpm);
//BA.debugLineNum = 16;BA.debugLine="End Sub";
return null;
}
public static anywheresoftware.b4a.objects.ActivityWrapper _getnativeparent(anywheresoftware.b4a.BA _ba,Object _b4xpage) throws Exception{
//BA.debugLineNum = 79;BA.debugLine="Public Sub GetNativeParent (B4XPage As Object) As";
//BA.debugLineNum = 87;BA.debugLine="Return GetManager.FindPIFromB4XPage(B4XPage).Pare";
if (true) return _getmanager(_ba)._findpifromb4xpage /*dbcheck.keymon.lat.b4xpagesmanager._b4xpageinfo*/ (_b4xpage).Parent /*dbcheck.keymon.lat.b4xpagesmanager._b4xpageparent*/ .NativeType /*anywheresoftware.b4a.objects.ActivityWrapper*/ ;
//BA.debugLineNum = 88;BA.debugLine="End Sub";
return null;
}
public static Object _getpage(anywheresoftware.b4a.BA _ba,String _id) throws Exception{
//BA.debugLineNum = 27;BA.debugLine="Public Sub GetPage (Id As String) As Object";
//BA.debugLineNum = 28;BA.debugLine="Return GetManager.GetPage(Id)";
if (true) return _getmanager(_ba)._getpage /*Object*/ (_id);
//BA.debugLineNum = 29;BA.debugLine="End Sub";
return null;
}
public static String _getpageid(anywheresoftware.b4a.BA _ba,Object _b4xpage) throws Exception{
//BA.debugLineNum = 32;BA.debugLine="Public Sub GetPageId (B4XPage As Object) As String";
//BA.debugLineNum = 33;BA.debugLine="Return GetManager.FindPIFromB4XPage(B4XPage).Id";
if (true) return _getmanager(_ba)._findpifromb4xpage /*dbcheck.keymon.lat.b4xpagesmanager._b4xpageinfo*/ (_b4xpage).Id /*String*/ ;
//BA.debugLineNum = 34;BA.debugLine="End Sub";
return "";
}
public static String _internalsetpagesmanager(anywheresoftware.b4a.BA _ba,Object _pm) throws Exception{
//BA.debugLineNum = 19;BA.debugLine="Public Sub InternalSetPagesManager(PM As Object)";
//BA.debugLineNum = 20;BA.debugLine="Delegate.Initialize";
_delegate._initialize /*String*/ ((_ba.processBA == null ? _ba : _ba.processBA));
//BA.debugLineNum = 21;BA.debugLine="mPM = PM";
_mpm = _pm;
//BA.debugLineNum = 22;BA.debugLine="End Sub";
return "";
}
public static boolean _isinitialized(anywheresoftware.b4a.BA _ba) throws Exception{
//BA.debugLineNum = 9;BA.debugLine="Public Sub IsInitialized As Boolean";
//BA.debugLineNum = 10;BA.debugLine="Return mPM Is B4XPagesManager";
if (true) return _mpm instanceof dbcheck.keymon.lat.b4xpagesmanager;
//BA.debugLineNum = 11;BA.debugLine="End Sub";
return false;
}
public static dbcheck.keymon.lat.b4xmainpage _mainpage(anywheresoftware.b4a.BA _ba) throws Exception{
//BA.debugLineNum = 73;BA.debugLine="Public Sub MainPage As B4XMainPage";
//BA.debugLineNum = 74;BA.debugLine="Return GetManager.MainPage";
if (true) return _getmanager(_ba)._mainpage /*dbcheck.keymon.lat.b4xmainpage*/ ;
//BA.debugLineNum = 75;BA.debugLine="End Sub";
return null;
}
public static String _process_globals() throws Exception{
//BA.debugLineNum = 1;BA.debugLine="Sub Process_Globals";
//BA.debugLineNum = 2;BA.debugLine="Private mPM As Object";
_mpm = new Object();
//BA.debugLineNum = 3;BA.debugLine="Public Delegate As B4XPagesDelegator";
_delegate = new dbcheck.keymon.lat.b4xpagesdelegator();
//BA.debugLineNum = 4;BA.debugLine="Public GlobalContext As Object";
_globalcontext = new Object();
//BA.debugLineNum = 5;BA.debugLine="End Sub";
return "";
}
public static String _settitle(anywheresoftware.b4a.BA _ba,Object _b4xpage,Object _title) throws Exception{
//BA.debugLineNum = 68;BA.debugLine="Public Sub SetTitle (B4XPage As Object, Title As O";
//BA.debugLineNum = 69;BA.debugLine="GetManager.SetTitle(B4XPage, Title)";
_getmanager(_ba)._settitle /*String*/ (_b4xpage,_title);
//BA.debugLineNum = 70;BA.debugLine="End Sub";
return "";
}
public static String _showpage(anywheresoftware.b4a.BA _ba,String _id) throws Exception{
//BA.debugLineNum = 50;BA.debugLine="Public Sub ShowPage (Id As String)";
//BA.debugLineNum = 51;BA.debugLine="GetManager.ShowPage(Id)";
_getmanager(_ba)._showpage /*String*/ (_id);
//BA.debugLineNum = 52;BA.debugLine="End Sub";
return "";
}
public static String _showpageandremovepreviouspages(anywheresoftware.b4a.BA _ba,String _id) throws Exception{
//BA.debugLineNum = 56;BA.debugLine="Public Sub ShowPageAndRemovePreviousPages (Id As S";
//BA.debugLineNum = 57;BA.debugLine="GetManager.ShowPageAndRemovePreviousPages (Id)";
_getmanager(_ba)._showpageandremovepreviouspages /*String*/ (_id);
//BA.debugLineNum = 58;BA.debugLine="End Sub";
return "";
}
}

View File

@@ -0,0 +1,97 @@
package dbcheck.keymon.lat;
import anywheresoftware.b4a.BA;
import anywheresoftware.b4a.B4AClass;
import anywheresoftware.b4a.BALayout;
import anywheresoftware.b4a.debug.*;
public class b4xpagesdelegator 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, "dbcheck.keymon.lat.b4xpagesdelegator");
if (htSubs == null) {
ba.loadHtSubs(this.getClass());
htSubs = ba.htSubs;
}
}
if (BA.isShellModeRuntimeCheck(ba))
this.getClass().getMethod("_class_globals", dbcheck.keymon.lat.b4xpagesdelegator.class).invoke(this, new Object[] {null});
else
ba.raiseEvent2(null, true, "class_globals", false);
}
public anywheresoftware.b4a.keywords.Common __c = null;
public dbcheck.keymon.lat.main _main = null;
public dbcheck.keymon.lat.starter _starter = null;
public dbcheck.keymon.lat.subs _subs = null;
public dbcheck.keymon.lat.b4xpages _b4xpages = null;
public dbcheck.keymon.lat.b4xcollections _b4xcollections = null;
public dbcheck.keymon.lat.httputils2service _httputils2service = null;
public String _activity_actionbarhomeclick() throws Exception{
//BA.debugLineNum = 35;BA.debugLine="Public Sub Activity_ActionBarHomeClick";
//BA.debugLineNum = 36;BA.debugLine="B4XPages.GetManager.Activity_ActionBarHomeClick";
_b4xpages._getmanager /*dbcheck.keymon.lat.b4xpagesmanager*/ (getActivityBA())._activity_actionbarhomeclick /*String*/ ();
//BA.debugLineNum = 37;BA.debugLine="End Sub";
return "";
}
public boolean _activity_keypress(int _keycode) throws Exception{
//BA.debugLineNum = 27;BA.debugLine="Public Sub Activity_KeyPress (KeyCode As Int) As B";
//BA.debugLineNum = 28;BA.debugLine="Return B4XPages.GetManager.Activity_KeyPress (Key";
if (true) return _b4xpages._getmanager /*dbcheck.keymon.lat.b4xpagesmanager*/ (getActivityBA())._activity_keypress /*boolean*/ (_keycode);
//BA.debugLineNum = 29;BA.debugLine="End Sub";
return false;
}
public String _activity_pause() throws Exception{
//BA.debugLineNum = 52;BA.debugLine="Public Sub Activity_Pause";
//BA.debugLineNum = 53;BA.debugLine="B4XPages.GetManager.Activity_Pause";
_b4xpages._getmanager /*dbcheck.keymon.lat.b4xpagesmanager*/ (getActivityBA())._activity_pause /*String*/ ();
//BA.debugLineNum = 54;BA.debugLine="End Sub";
return "";
}
public String _activity_permissionresult(String _permission,boolean _result) throws Exception{
//BA.debugLineNum = 31;BA.debugLine="Sub Activity_PermissionResult (Permission As Strin";
//BA.debugLineNum = 32;BA.debugLine="B4XPages.GetManager.RaiseEvent(B4XPages.GetManage";
_b4xpages._getmanager /*dbcheck.keymon.lat.b4xpagesmanager*/ (getActivityBA())._raiseevent /*String*/ (_b4xpages._getmanager /*dbcheck.keymon.lat.b4xpagesmanager*/ (getActivityBA())._gettoppage /*dbcheck.keymon.lat.b4xpagesmanager._b4xpageinfo*/ (),"B4XPage_PermissionResult",new Object[]{(Object)(_permission),(Object)(_result)});
//BA.debugLineNum = 33;BA.debugLine="End Sub";
return "";
}
public String _activity_resume() throws Exception{
//BA.debugLineNum = 48;BA.debugLine="Public Sub Activity_Resume";
//BA.debugLineNum = 49;BA.debugLine="B4XPages.GetManager.Activity_Resume";
_b4xpages._getmanager /*dbcheck.keymon.lat.b4xpagesmanager*/ (getActivityBA())._activity_resume /*String*/ ();
//BA.debugLineNum = 50;BA.debugLine="End Sub";
return "";
}
public String _class_globals() throws Exception{
//BA.debugLineNum = 1;BA.debugLine="Sub Class_Globals";
//BA.debugLineNum = 2;BA.debugLine="End Sub";
return "";
}
public String _create_menu(Object _menu) throws Exception{
//BA.debugLineNum = 39;BA.debugLine="Public Sub Create_Menu (Menu As Object)";
//BA.debugLineNum = 40;BA.debugLine="B4XPages.GetManager.CreateMenu(Menu)";
_b4xpages._getmanager /*dbcheck.keymon.lat.b4xpagesmanager*/ (getActivityBA())._createmenu /*String*/ (_menu);
//BA.debugLineNum = 41;BA.debugLine="End Sub";
return "";
}
public String _initialize(anywheresoftware.b4a.BA _ba) throws Exception{
innerInitialize(_ba);
//BA.debugLineNum = 4;BA.debugLine="Public Sub Initialize";
//BA.debugLineNum = 6;BA.debugLine="End Sub";
return "";
}
public String _mainform_resize(double _width,double _height) throws Exception{
//BA.debugLineNum = 44;BA.debugLine="Public Sub MainForm_Resize(Width As Double, Height";
//BA.debugLineNum = 45;BA.debugLine="B4XPages.GetManager.MainForm_Resize(Width, Height";
_b4xpages._getmanager /*dbcheck.keymon.lat.b4xpagesmanager*/ (getActivityBA())._mainform_resize /*String*/ (_width,_height);
//BA.debugLineNum = 46;BA.debugLine="End Sub";
return "";
}
public Object callSub(String sub, Object sender, Object[] args) throws Exception {
BA.senderHolder.set(sender);
return BA.SubDelegator.SubNotFound;
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,95 @@
package dbcheck.keymon.lat;
import anywheresoftware.b4a.BA;
import anywheresoftware.b4a.B4AClass;
import anywheresoftware.b4a.BALayout;
import anywheresoftware.b4a.debug.*;
public class b4xset 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, "dbcheck.keymon.lat.b4xset");
if (htSubs == null) {
ba.loadHtSubs(this.getClass());
htSubs = ba.htSubs;
}
}
if (BA.isShellModeRuntimeCheck(ba))
this.getClass().getMethod("_class_globals", dbcheck.keymon.lat.b4xset.class).invoke(this, new Object[] {null});
else
ba.raiseEvent2(null, true, "class_globals", false);
}
public anywheresoftware.b4a.keywords.Common __c = null;
public dbcheck.keymon.lat.b4xorderedmap _map = null;
public dbcheck.keymon.lat.main _main = null;
public dbcheck.keymon.lat.starter _starter = null;
public dbcheck.keymon.lat.subs _subs = null;
public dbcheck.keymon.lat.b4xpages _b4xpages = null;
public dbcheck.keymon.lat.b4xcollections _b4xcollections = null;
public dbcheck.keymon.lat.httputils2service _httputils2service = null;
public String _add(Object _value) throws Exception{
//BA.debugLineNum = 9;BA.debugLine="Public Sub Add(Value As Object)";
//BA.debugLineNum = 10;BA.debugLine="map.Put(Value, \"\")";
_map._put /*String*/ (_value,(Object)(""));
//BA.debugLineNum = 11;BA.debugLine="End Sub";
return "";
}
public anywheresoftware.b4a.objects.collections.List _aslist() throws Exception{
//BA.debugLineNum = 29;BA.debugLine="Public Sub AsList As List";
//BA.debugLineNum = 30;BA.debugLine="Return map.Keys";
if (true) return _map._getkeys /*anywheresoftware.b4a.objects.collections.List*/ ();
//BA.debugLineNum = 31;BA.debugLine="End Sub";
return null;
}
public String _class_globals() throws Exception{
//BA.debugLineNum = 1;BA.debugLine="Sub Class_Globals";
//BA.debugLineNum = 2;BA.debugLine="Private map As B4XOrderedMap";
_map = new dbcheck.keymon.lat.b4xorderedmap();
//BA.debugLineNum = 3;BA.debugLine="End Sub";
return "";
}
public String _clear() throws Exception{
//BA.debugLineNum = 25;BA.debugLine="Public Sub Clear";
//BA.debugLineNum = 26;BA.debugLine="map.Clear";
_map._clear /*String*/ ();
//BA.debugLineNum = 27;BA.debugLine="End Sub";
return "";
}
public boolean _contains(Object _value) throws Exception{
//BA.debugLineNum = 17;BA.debugLine="Public Sub Contains (Value As Object) As Boolean";
//BA.debugLineNum = 18;BA.debugLine="Return map.ContainsKey(Value)";
if (true) return _map._containskey /*boolean*/ (_value);
//BA.debugLineNum = 19;BA.debugLine="End Sub";
return false;
}
public int _getsize() throws Exception{
//BA.debugLineNum = 21;BA.debugLine="Public Sub getSize As Int";
//BA.debugLineNum = 22;BA.debugLine="Return map.Size";
if (true) return _map._getsize /*int*/ ();
//BA.debugLineNum = 23;BA.debugLine="End Sub";
return 0;
}
public String _initialize(anywheresoftware.b4a.BA _ba) throws Exception{
innerInitialize(_ba);
//BA.debugLineNum = 5;BA.debugLine="Public Sub Initialize";
//BA.debugLineNum = 6;BA.debugLine="map.Initialize";
_map._initialize /*String*/ (ba);
//BA.debugLineNum = 7;BA.debugLine="End Sub";
return "";
}
public String _remove(Object _value) throws Exception{
//BA.debugLineNum = 13;BA.debugLine="Public Sub Remove(Value As Object)";
//BA.debugLineNum = 14;BA.debugLine="map.Remove(Value)";
_map._remove /*String*/ (_value);
//BA.debugLineNum = 15;BA.debugLine="End Sub";
return "";
}
public Object callSub(String sub, Object sender, Object[] args) throws Exception {
BA.senderHolder.set(sender);
return BA.SubDelegator.SubNotFound;
}
}

View File

@@ -0,0 +1,685 @@
package dbcheck.keymon.lat;
import anywheresoftware.b4a.BA;
import anywheresoftware.b4a.B4AClass;
import anywheresoftware.b4a.BALayout;
import anywheresoftware.b4a.debug.*;
public class dbrequestmanager 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, "dbcheck.keymon.lat.dbrequestmanager");
if (htSubs == null) {
ba.loadHtSubs(this.getClass());
htSubs = ba.htSubs;
}
}
if (BA.isShellModeRuntimeCheck(ba))
this.getClass().getMethod("_class_globals", dbcheck.keymon.lat.dbrequestmanager.class).invoke(this, new Object[] {null});
else
ba.raiseEvent2(null, true, "class_globals", false);
}
public anywheresoftware.b4a.keywords.Common __c = null;
public Object _mtarget = null;
public String _link = "";
public anywheresoftware.b4a.agraham.byteconverter.ByteConverter _bc = null;
public byte _t_null = (byte)0;
public byte _t_string = (byte)0;
public byte _t_short = (byte)0;
public byte _t_int = (byte)0;
public byte _t_long = (byte)0;
public byte _t_float = (byte)0;
public byte _t_double = (byte)0;
public byte _t_boolean = (byte)0;
public byte _t_blob = (byte)0;
public float _version = 0f;
public Object[] _temparray = null;
public String _jobtaganterior = "";
public dbcheck.keymon.lat.main _main = null;
public dbcheck.keymon.lat.starter _starter = null;
public dbcheck.keymon.lat.subs _subs = null;
public dbcheck.keymon.lat.b4xpages _b4xpages = null;
public dbcheck.keymon.lat.b4xcollections _b4xcollections = null;
public dbcheck.keymon.lat.httputils2service _httputils2service = null;
public static class _dbresult{
public boolean IsInitialized;
public Object Tag;
public anywheresoftware.b4a.objects.collections.Map Columns;
public anywheresoftware.b4a.objects.collections.List Rows;
public void Initialize() {
IsInitialized = true;
Tag = new Object();
Columns = new anywheresoftware.b4a.objects.collections.Map();
Rows = new anywheresoftware.b4a.objects.collections.List();
}
@Override
public String toString() {
return BA.TypeToString(this, false);
}}
public static class _dbcommand{
public boolean IsInitialized;
public String Name;
public Object[] Parameters;
public void Initialize() {
IsInitialized = true;
Name = "";
Parameters = new Object[0];
{
int d0 = Parameters.length;
for (int i0 = 0;i0 < d0;i0++) {
Parameters[i0] = new Object();
}
}
;
}
@Override
public String toString() {
return BA.TypeToString(this, false);
}}
public anywheresoftware.b4a.objects.drawable.CanvasWrapper.BitmapWrapper _bytestoimage(byte[] _bytes) throws Exception{
anywheresoftware.b4a.objects.streams.File.InputStreamWrapper _in = null;
anywheresoftware.b4a.objects.drawable.CanvasWrapper.BitmapWrapper _bmp = null;
//BA.debugLineNum = 240;BA.debugLine="Public Sub BytesToImage(bytes() As Byte) As Bitmap";
//BA.debugLineNum = 241;BA.debugLine="Dim In As InputStream";
_in = new anywheresoftware.b4a.objects.streams.File.InputStreamWrapper();
//BA.debugLineNum = 242;BA.debugLine="In.InitializeFromBytesArray(bytes, 0, bytes.Lengt";
_in.InitializeFromBytesArray(_bytes,(int) (0),_bytes.length);
//BA.debugLineNum = 243;BA.debugLine="Dim bmp As Bitmap";
_bmp = new anywheresoftware.b4a.objects.drawable.CanvasWrapper.BitmapWrapper();
//BA.debugLineNum = 244;BA.debugLine="bmp.Initialize2(In)";
_bmp.Initialize2((java.io.InputStream)(_in.getObject()));
//BA.debugLineNum = 245;BA.debugLine="Return bmp";
if (true) return _bmp;
//BA.debugLineNum = 246;BA.debugLine="End Sub";
return null;
}
public String _class_globals() throws Exception{
//BA.debugLineNum = 4;BA.debugLine="Sub Class_Globals";
//BA.debugLineNum = 5;BA.debugLine="Private mTarget As Object";
_mtarget = new Object();
//BA.debugLineNum = 6;BA.debugLine="Type DBResult (Tag As Object, Columns As Map, Row";
;
//BA.debugLineNum = 7;BA.debugLine="Type DBCommand (Name As String, Parameters() As O";
;
//BA.debugLineNum = 8;BA.debugLine="Private link As String";
_link = "";
//BA.debugLineNum = 9;BA.debugLine="Private bc As ByteConverter";
_bc = new anywheresoftware.b4a.agraham.byteconverter.ByteConverter();
//BA.debugLineNum = 10;BA.debugLine="Private T_NULL = 0, T_STRING = 1, T_SHORT = 2, T_";
_t_null = (byte) (0);
_t_string = (byte) (1);
_t_short = (byte) (2);
_t_int = (byte) (3);
_t_long = (byte) (4);
_t_float = (byte) (5);
_t_double = (byte) (6);
_t_boolean = (byte) (7);
_t_blob = (byte) (8);
//BA.debugLineNum = 12;BA.debugLine="Private VERSION As Float = 0.9";
_version = (float) (0.9);
//BA.debugLineNum = 13;BA.debugLine="Private tempArray(1) As Object";
_temparray = new Object[(int) (1)];
{
int d0 = _temparray.length;
for (int i0 = 0;i0 < d0;i0++) {
_temparray[i0] = new Object();
}
}
;
//BA.debugLineNum = 14;BA.debugLine="Dim jobTagAnterior As String = \"\" 'Mod por CHV -";
_jobtaganterior = "";
//BA.debugLineNum = 15;BA.debugLine="End Sub";
return "";
}
public String _executebatch(anywheresoftware.b4a.objects.collections.List _listofcommands,Object _tag) throws Exception{
dbcheck.keymon.lat.httpjob _j = null;
anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper _ms = null;
anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper _out2 = null;
dbcheck.keymon.lat.dbrequestmanager._dbcommand _command = null;
//BA.debugLineNum = 43;BA.debugLine="Public Sub ExecuteBatch(ListOfCommands As List, Ta";
//BA.debugLineNum = 44;BA.debugLine="Dim j As HttpJob";
_j = new dbcheck.keymon.lat.httpjob();
//BA.debugLineNum = 45;BA.debugLine="Dim ms As OutputStream";
_ms = new anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper();
//BA.debugLineNum = 46;BA.debugLine="Dim out2 As OutputStream = StartJob(j,ms, Tag)";
_out2 = new anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper();
_out2 = _startjob(_j,_ms,_tag);
//BA.debugLineNum = 47;BA.debugLine="WriteInt(ListOfCommands.Size, out2)";
_writeint(_listofcommands.getSize(),_out2);
//BA.debugLineNum = 48;BA.debugLine="For Each Command As DBCommand In ListOfCommands";
{
final anywheresoftware.b4a.BA.IterableList group5 = _listofcommands;
final int groupLen5 = group5.getSize()
;int index5 = 0;
;
for (; index5 < groupLen5;index5++){
_command = (dbcheck.keymon.lat.dbrequestmanager._dbcommand)(group5.Get(index5));
//BA.debugLineNum = 49;BA.debugLine="WriteObject(Command.Name, out2)";
_writeobject((Object)(_command.Name /*String*/ ),_out2);
//BA.debugLineNum = 50;BA.debugLine="WriteList(Command.Parameters, out2)";
_writelist(anywheresoftware.b4a.keywords.Common.ArrayToList(_command.Parameters /*Object[]*/ ),_out2);
}
};
//BA.debugLineNum = 52;BA.debugLine="out2.Close";
_out2.Close();
//BA.debugLineNum = 53;BA.debugLine="j.PostBytes(link & \"?method=batch\", ms.ToBytesArr";
_j._postbytes /*String*/ (_link+"?method=batch",_ms.ToBytesArray());
//BA.debugLineNum = 54;BA.debugLine="End Sub";
return "";
}
public String _executecommand(dbcheck.keymon.lat.dbrequestmanager._dbcommand _command,Object _tag) throws Exception{
//BA.debugLineNum = 57;BA.debugLine="Public Sub ExecuteCommand(Command As DBCommand, Ta";
//BA.debugLineNum = 58;BA.debugLine="ExecuteBatch(Array As DBCommand(Command), Tag)";
_executebatch(anywheresoftware.b4a.keywords.Common.ArrayToList(new dbcheck.keymon.lat.dbrequestmanager._dbcommand[]{_command}),_tag);
//BA.debugLineNum = 59;BA.debugLine="End Sub";
return "";
}
public String _executequery(dbcheck.keymon.lat.dbrequestmanager._dbcommand _command,int _limit,Object _tag) throws Exception{
dbcheck.keymon.lat.httpjob _j = null;
anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper _ms = null;
anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper _out2 = null;
//BA.debugLineNum = 28;BA.debugLine="Public Sub ExecuteQuery(Command As DBCommand, Limi";
//BA.debugLineNum = 29;BA.debugLine="Dim j As HttpJob";
_j = new dbcheck.keymon.lat.httpjob();
//BA.debugLineNum = 30;BA.debugLine="Dim ms As OutputStream";
_ms = new anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper();
//BA.debugLineNum = 31;BA.debugLine="Dim out2 As OutputStream = StartJob(j,ms, Tag)";
_out2 = new anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper();
_out2 = _startjob(_j,_ms,_tag);
//BA.debugLineNum = 33;BA.debugLine="WriteObject(Command.Name, out2)";
_writeobject((Object)(_command.Name /*String*/ ),_out2);
//BA.debugLineNum = 34;BA.debugLine="WriteInt(Limit, out2)";
_writeint(_limit,_out2);
//BA.debugLineNum = 35;BA.debugLine="WriteList(Command.Parameters, out2)";
_writelist(anywheresoftware.b4a.keywords.Common.ArrayToList(_command.Parameters /*Object[]*/ ),_out2);
//BA.debugLineNum = 36;BA.debugLine="out2.Close";
_out2.Close();
//BA.debugLineNum = 37;BA.debugLine="j.PostBytes(link & \"?method=query\", ms.ToBytesArr";
_j._postbytes /*String*/ (_link+"?method=query",_ms.ToBytesArray());
//BA.debugLineNum = 38;BA.debugLine="End Sub";
return "";
}
public byte[] _filetobytes(String _dir,String _filename) throws Exception{
anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper _out = null;
anywheresoftware.b4a.objects.streams.File.InputStreamWrapper _in = null;
//BA.debugLineNum = 223;BA.debugLine="Public Sub FileToBytes(Dir As String, FileName As";
//BA.debugLineNum = 224;BA.debugLine="Dim out As OutputStream";
_out = new anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper();
//BA.debugLineNum = 225;BA.debugLine="out.InitializeToBytesArray(0)";
_out.InitializeToBytesArray((int) (0));
//BA.debugLineNum = 226;BA.debugLine="Dim In As InputStream = File.OpenInput(Dir, FileN";
_in = new anywheresoftware.b4a.objects.streams.File.InputStreamWrapper();
_in = __c.File.OpenInput(_dir,_filename);
//BA.debugLineNum = 227;BA.debugLine="File.Copy2(In, out)";
__c.File.Copy2((java.io.InputStream)(_in.getObject()),(java.io.OutputStream)(_out.getObject()));
//BA.debugLineNum = 228;BA.debugLine="out.Close";
_out.Close();
//BA.debugLineNum = 229;BA.debugLine="Return out.ToBytesArray";
if (true) return _out.ToBytesArray();
//BA.debugLineNum = 230;BA.debugLine="End Sub";
return null;
}
public dbcheck.keymon.lat.dbrequestmanager._dbresult _handlejob(dbcheck.keymon.lat.httpjob _job) throws Exception{
long _start = 0L;
anywheresoftware.b4a.objects.streams.File.InputStreamWrapper _in = null;
anywheresoftware.b4a.randomaccessfile.CompressedStreams _cs = null;
float _serverversion = 0f;
String _method = "";
dbcheck.keymon.lat.dbrequestmanager._dbresult _table = null;
int _numberofcolumns = 0;
int _i = 0;
Object[] _rowobjects = null;
int _col = 0;
Object _o = null;
int _rows = 0;
//BA.debugLineNum = 184;BA.debugLine="Public Sub HandleJob(Job As HttpJob) As DBResult";
//BA.debugLineNum = 185;BA.debugLine="Dim start As Long = DateTime.Now 'ignore";
_start = __c.DateTime.getNow();
//BA.debugLineNum = 186;BA.debugLine="Dim In As InputStream = Job.GetInputStream";
_in = new anywheresoftware.b4a.objects.streams.File.InputStreamWrapper();
_in = _job._getinputstream /*anywheresoftware.b4a.objects.streams.File.InputStreamWrapper*/ ();
//BA.debugLineNum = 187;BA.debugLine="Dim cs As CompressedStreams";
_cs = new anywheresoftware.b4a.randomaccessfile.CompressedStreams();
//BA.debugLineNum = 188;BA.debugLine="In = cs.WrapInputStream(In, \"gzip\")";
_in = _cs.WrapInputStream((java.io.InputStream)(_in.getObject()),"gzip");
//BA.debugLineNum = 189;BA.debugLine="Dim serverVersion As Float = ReadObject(In) 'igno";
_serverversion = (float)(BA.ObjectToNumber(_readobject(_in)));
//BA.debugLineNum = 190;BA.debugLine="Dim method As String = ReadObject(In)";
_method = BA.ObjectToString(_readobject(_in));
//BA.debugLineNum = 191;BA.debugLine="Dim table As DBResult";
_table = new dbcheck.keymon.lat.dbrequestmanager._dbresult();
//BA.debugLineNum = 192;BA.debugLine="table.Initialize";
_table.Initialize();
//BA.debugLineNum = 193;BA.debugLine="table.Columns.Initialize";
_table.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Initialize();
//BA.debugLineNum = 194;BA.debugLine="table.rows.Initialize";
_table.Rows /*anywheresoftware.b4a.objects.collections.List*/ .Initialize();
//BA.debugLineNum = 195;BA.debugLine="table.Tag = Job.Tag";
_table.Tag /*Object*/ = _job._tag /*Object*/ ;
//BA.debugLineNum = 196;BA.debugLine="If jobTagAnterior <> Job.Tag Then LogColor(\"Handl";
if ((_jobtaganterior).equals(BA.ObjectToString(_job._tag /*Object*/ )) == false) {
__c.LogImpl("111730956","HandleJob: '"+BA.ObjectToString(_job._tag /*Object*/ )+"'",__c.Colors.Blue);};
//BA.debugLineNum = 197;BA.debugLine="jobTagAnterior = Job.Tag 'Mod por CHV - 211109";
_jobtaganterior = BA.ObjectToString(_job._tag /*Object*/ );
//BA.debugLineNum = 198;BA.debugLine="If method = \"query\" Then";
if ((_method).equals("query")) {
//BA.debugLineNum = 199;BA.debugLine="Dim numberOfColumns As Int = ReadInt(In)";
_numberofcolumns = _readint(_in);
//BA.debugLineNum = 200;BA.debugLine="For i = 0 To numberOfColumns - 1";
{
final int step16 = 1;
final int limit16 = (int) (_numberofcolumns-1);
_i = (int) (0) ;
for (;_i <= limit16 ;_i = _i + step16 ) {
//BA.debugLineNum = 201;BA.debugLine="table.Columns.Put(ReadObject(In), i)";
_table.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Put(_readobject(_in),(Object)(_i));
}
};
//BA.debugLineNum = 203;BA.debugLine="Do While ReadByte(In) = 1";
while (_readbyte(_in)==1) {
//BA.debugLineNum = 204;BA.debugLine="Dim rowObjects(numberOfColumns) As Object";
_rowobjects = new Object[_numberofcolumns];
{
int d0 = _rowobjects.length;
for (int i0 = 0;i0 < d0;i0++) {
_rowobjects[i0] = new Object();
}
}
;
//BA.debugLineNum = 205;BA.debugLine="table.rows.Add(rowObjects)";
_table.Rows /*anywheresoftware.b4a.objects.collections.List*/ .Add((Object)(_rowobjects));
//BA.debugLineNum = 206;BA.debugLine="For col = 0 To numberOfColumns - 1";
{
final int step22 = 1;
final int limit22 = (int) (_numberofcolumns-1);
_col = (int) (0) ;
for (;_col <= limit22 ;_col = _col + step22 ) {
//BA.debugLineNum = 207;BA.debugLine="Dim o As Object = ReadObject(In)";
_o = _readobject(_in);
//BA.debugLineNum = 208;BA.debugLine="rowObjects(col) = o";
_rowobjects[_col] = _o;
}
};
}
;
}else if((_method).equals("batch")) {
//BA.debugLineNum = 212;BA.debugLine="table.Columns.Put(\"AffectedRows\", 0)";
_table.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Put((Object)("AffectedRows"),(Object)(0));
//BA.debugLineNum = 213;BA.debugLine="Dim rows As Int = ReadInt(In)";
_rows = _readint(_in);
//BA.debugLineNum = 214;BA.debugLine="For i = 0 To rows - 1";
{
final int step30 = 1;
final int limit30 = (int) (_rows-1);
_i = (int) (0) ;
for (;_i <= limit30 ;_i = _i + step30 ) {
//BA.debugLineNum = 215;BA.debugLine="table.rows.Add(Array As Object(ReadInt(In)))";
_table.Rows /*anywheresoftware.b4a.objects.collections.List*/ .Add((Object)(new Object[]{(Object)(_readint(_in))}));
}
};
};
//BA.debugLineNum = 218;BA.debugLine="In.Close";
_in.Close();
//BA.debugLineNum = 220;BA.debugLine="Return table";
if (true) return _table;
//BA.debugLineNum = 221;BA.debugLine="End Sub";
return null;
}
public byte[] _imagetobytes(anywheresoftware.b4a.objects.drawable.CanvasWrapper.BitmapWrapper _image) throws Exception{
anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper _out = null;
//BA.debugLineNum = 232;BA.debugLine="Public Sub ImageToBytes(Image As Bitmap) As Byte()";
//BA.debugLineNum = 233;BA.debugLine="Dim out As OutputStream";
_out = new anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper();
//BA.debugLineNum = 234;BA.debugLine="out.InitializeToBytesArray(0)";
_out.InitializeToBytesArray((int) (0));
//BA.debugLineNum = 235;BA.debugLine="Image.WriteToStream(out, 100, \"JPEG\")";
_image.WriteToStream((java.io.OutputStream)(_out.getObject()),(int) (100),BA.getEnumFromString(android.graphics.Bitmap.CompressFormat.class,"JPEG"));
//BA.debugLineNum = 236;BA.debugLine="out.Close";
_out.Close();
//BA.debugLineNum = 237;BA.debugLine="Return out.ToBytesArray";
if (true) return _out.ToBytesArray();
//BA.debugLineNum = 238;BA.debugLine="End Sub";
return null;
}
public String _initialize(anywheresoftware.b4a.BA _ba,Object _target,String _connectorlink) throws Exception{
innerInitialize(_ba);
//BA.debugLineNum = 19;BA.debugLine="Public Sub Initialize (Target As Object, Connector";
//BA.debugLineNum = 20;BA.debugLine="mTarget = Target";
_mtarget = _target;
//BA.debugLineNum = 21;BA.debugLine="link = ConnectorLink";
_link = _connectorlink;
//BA.debugLineNum = 22;BA.debugLine="End Sub";
return "";
}
public String _printtable(dbcheck.keymon.lat.dbrequestmanager._dbresult _table) throws Exception{
anywheresoftware.b4a.keywords.StringBuilderWrapper _sb = null;
Object _col = null;
Object[] _row = null;
Object _record = null;
//BA.debugLineNum = 248;BA.debugLine="Public Sub PrintTable(Table As DBResult)";
//BA.debugLineNum = 249;BA.debugLine="Log(\"Tag: \" & Table.Tag & \", Columns: \" & Table.C";
__c.LogImpl("111993089","Tag: "+BA.ObjectToString(_table.Tag /*Object*/ )+", Columns: "+BA.NumberToString(_table.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .getSize())+", Rows: "+BA.NumberToString(_table.Rows /*anywheresoftware.b4a.objects.collections.List*/ .getSize()),0);
//BA.debugLineNum = 250;BA.debugLine="Dim sb As StringBuilder";
_sb = new anywheresoftware.b4a.keywords.StringBuilderWrapper();
//BA.debugLineNum = 251;BA.debugLine="sb.Initialize";
_sb.Initialize();
//BA.debugLineNum = 252;BA.debugLine="For Each col In Table.Columns.Keys";
{
final anywheresoftware.b4a.BA.IterableList group4 = _table.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Keys();
final int groupLen4 = group4.getSize()
;int index4 = 0;
;
for (; index4 < groupLen4;index4++){
_col = group4.Get(index4);
//BA.debugLineNum = 253;BA.debugLine="sb.Append(col).Append(TAB)";
_sb.Append(BA.ObjectToString(_col)).Append(__c.TAB);
}
};
//BA.debugLineNum = 255;BA.debugLine="Log(sb.ToString)";
__c.LogImpl("111993095",_sb.ToString(),0);
//BA.debugLineNum = 256;BA.debugLine="For Each row() As Object In Table.Rows";
{
final anywheresoftware.b4a.BA.IterableList group8 = _table.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen8 = group8.getSize()
;int index8 = 0;
;
for (; index8 < groupLen8;index8++){
_row = (Object[])(group8.Get(index8));
//BA.debugLineNum = 257;BA.debugLine="Dim sb As StringBuilder";
_sb = new anywheresoftware.b4a.keywords.StringBuilderWrapper();
//BA.debugLineNum = 258;BA.debugLine="sb.Initialize";
_sb.Initialize();
//BA.debugLineNum = 259;BA.debugLine="For Each record As Object In row";
{
final Object[] group11 = _row;
final int groupLen11 = group11.length
;int index11 = 0;
;
for (; index11 < groupLen11;index11++){
_record = group11[index11];
//BA.debugLineNum = 260;BA.debugLine="sb.Append(record).Append(TAB)";
_sb.Append(BA.ObjectToString(_record)).Append(__c.TAB);
}
};
//BA.debugLineNum = 262;BA.debugLine="ToastMessageShow(sb.ToString, True)";
__c.ToastMessageShow(BA.ObjectToCharSequence(_sb.ToString()),__c.True);
}
};
//BA.debugLineNum = 264;BA.debugLine="End Sub";
return "";
}
public byte _readbyte(anywheresoftware.b4a.objects.streams.File.InputStreamWrapper _in) throws Exception{
byte[] _data = null;
//BA.debugLineNum = 177;BA.debugLine="Private Sub ReadByte(In As InputStream) As Byte";
//BA.debugLineNum = 178;BA.debugLine="Dim data(1) As Byte";
_data = new byte[(int) (1)];
;
//BA.debugLineNum = 179;BA.debugLine="In.ReadBytes(data, 0, 1)";
_in.ReadBytes(_data,(int) (0),(int) (1));
//BA.debugLineNum = 180;BA.debugLine="Return data(0)";
if (true) return _data[(int) (0)];
//BA.debugLineNum = 181;BA.debugLine="End Sub";
return (byte)0;
}
public byte[] _readbytesfully(anywheresoftware.b4a.objects.streams.File.InputStreamWrapper _in,byte[] _data,int _len) throws Exception{
int _count = 0;
int _read = 0;
//BA.debugLineNum = 157;BA.debugLine="Private Sub ReadBytesFully(In As InputStream, Data";
//BA.debugLineNum = 158;BA.debugLine="Dim count = 0, read As Int";
_count = (int) (0);
_read = 0;
//BA.debugLineNum = 159;BA.debugLine="Do While count < Len And read > -1";
while (_count<_len && _read>-1) {
//BA.debugLineNum = 160;BA.debugLine="read = In.ReadBytes(Data, count, Len - count)";
_read = _in.ReadBytes(_data,_count,(int) (_len-_count));
//BA.debugLineNum = 161;BA.debugLine="count = count + read";
_count = (int) (_count+_read);
}
;
//BA.debugLineNum = 163;BA.debugLine="Return Data";
if (true) return _data;
//BA.debugLineNum = 164;BA.debugLine="End Sub";
return null;
}
public int _readint(anywheresoftware.b4a.objects.streams.File.InputStreamWrapper _in) throws Exception{
byte[] _data = null;
//BA.debugLineNum = 172;BA.debugLine="Private Sub ReadInt(In As InputStream) As Int";
//BA.debugLineNum = 173;BA.debugLine="Dim data(4) As Byte";
_data = new byte[(int) (4)];
;
//BA.debugLineNum = 174;BA.debugLine="Return bc.IntsFromBytes(ReadBytesFully(In, data,";
if (true) return _bc.IntsFromBytes(_readbytesfully(_in,_data,_data.length))[(int) (0)];
//BA.debugLineNum = 175;BA.debugLine="End Sub";
return 0;
}
public Object _readobject(anywheresoftware.b4a.objects.streams.File.InputStreamWrapper _in) throws Exception{
byte[] _data = null;
byte _b = (byte)0;
int _len = 0;
//BA.debugLineNum = 121;BA.debugLine="Private Sub ReadObject(In As InputStream) As Objec";
//BA.debugLineNum = 122;BA.debugLine="Dim data(1) As Byte";
_data = new byte[(int) (1)];
;
//BA.debugLineNum = 123;BA.debugLine="In.ReadBytes(data, 0, 1)";
_in.ReadBytes(_data,(int) (0),(int) (1));
//BA.debugLineNum = 124;BA.debugLine="Select data(0)";
switch (BA.switchObjectToInt(_data[(int) (0)],_t_null,_t_short,_t_int,_t_long,_t_float,_t_double,_t_boolean,_t_blob)) {
case 0: {
//BA.debugLineNum = 126;BA.debugLine="Return Null";
if (true) return __c.Null;
break; }
case 1: {
//BA.debugLineNum = 128;BA.debugLine="Dim data(2) As Byte";
_data = new byte[(int) (2)];
;
//BA.debugLineNum = 129;BA.debugLine="Return bc.ShortsFromBytes(ReadBytesFully(In, da";
if (true) return (Object)(_bc.ShortsFromBytes(_readbytesfully(_in,_data,_data.length))[(int) (0)]);
break; }
case 2: {
//BA.debugLineNum = 131;BA.debugLine="Dim data(4) As Byte";
_data = new byte[(int) (4)];
;
//BA.debugLineNum = 132;BA.debugLine="Return bc.IntsFromBytes(ReadBytesFully(In, data";
if (true) return (Object)(_bc.IntsFromBytes(_readbytesfully(_in,_data,_data.length))[(int) (0)]);
break; }
case 3: {
//BA.debugLineNum = 134;BA.debugLine="Dim data(8) As Byte";
_data = new byte[(int) (8)];
;
//BA.debugLineNum = 135;BA.debugLine="Return bc.LongsFromBytes(ReadBytesFully(In, dat";
if (true) return (Object)(_bc.LongsFromBytes(_readbytesfully(_in,_data,_data.length))[(int) (0)]);
break; }
case 4: {
//BA.debugLineNum = 137;BA.debugLine="Dim data(4) As Byte";
_data = new byte[(int) (4)];
;
//BA.debugLineNum = 138;BA.debugLine="Return bc.FloatsFromBytes(ReadBytesFully(In, da";
if (true) return (Object)(_bc.FloatsFromBytes(_readbytesfully(_in,_data,_data.length))[(int) (0)]);
break; }
case 5: {
//BA.debugLineNum = 140;BA.debugLine="Dim data(8) As Byte";
_data = new byte[(int) (8)];
;
//BA.debugLineNum = 141;BA.debugLine="Return bc.DoublesFromBytes(ReadBytesFully(In, d";
if (true) return (Object)(_bc.DoublesFromBytes(_readbytesfully(_in,_data,_data.length))[(int) (0)]);
break; }
case 6: {
//BA.debugLineNum = 143;BA.debugLine="Dim b As Byte = ReadByte(In)";
_b = _readbyte(_in);
//BA.debugLineNum = 144;BA.debugLine="Return b = 1";
if (true) return (Object)(_b==1);
break; }
case 7: {
//BA.debugLineNum = 146;BA.debugLine="Dim len As Int = ReadInt(In)";
_len = _readint(_in);
//BA.debugLineNum = 147;BA.debugLine="Dim data(len) As Byte";
_data = new byte[_len];
;
//BA.debugLineNum = 148;BA.debugLine="Return ReadBytesFully(In, data, data.Length)";
if (true) return (Object)(_readbytesfully(_in,_data,_data.length));
break; }
default: {
//BA.debugLineNum = 150;BA.debugLine="Dim len As Int = ReadInt(In)";
_len = _readint(_in);
//BA.debugLineNum = 151;BA.debugLine="Dim data(len) As Byte";
_data = new byte[_len];
;
//BA.debugLineNum = 152;BA.debugLine="ReadBytesFully(In, data, data.Length)";
_readbytesfully(_in,_data,_data.length);
//BA.debugLineNum = 153;BA.debugLine="Return BytesToString(data, 0, data.Length, \"UTF";
if (true) return (Object)(__c.BytesToString(_data,(int) (0),_data.length,"UTF8"));
break; }
}
;
//BA.debugLineNum = 155;BA.debugLine="End Sub";
return null;
}
public anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper _startjob(dbcheck.keymon.lat.httpjob _j,anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper _memorystream,Object _tag) throws Exception{
anywheresoftware.b4a.randomaccessfile.CompressedStreams _compress = null;
anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper _out = null;
//BA.debugLineNum = 61;BA.debugLine="Private Sub StartJob(j As HttpJob, MemoryStream As";
//BA.debugLineNum = 62;BA.debugLine="j.Initialize(\"DBRequest\", mTarget)";
_j._initialize /*String*/ (ba,"DBRequest",_mtarget);
//BA.debugLineNum = 63;BA.debugLine="j.Tag = Tag";
_j._tag /*Object*/ = _tag;
//BA.debugLineNum = 64;BA.debugLine="MemoryStream.InitializeToBytesArray(0)";
_memorystream.InitializeToBytesArray((int) (0));
//BA.debugLineNum = 65;BA.debugLine="Dim compress As CompressedStreams";
_compress = new anywheresoftware.b4a.randomaccessfile.CompressedStreams();
//BA.debugLineNum = 66;BA.debugLine="Dim out As OutputStream = compress.WrapOutputStre";
_out = new anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper();
_out = _compress.WrapOutputStream((java.io.OutputStream)(_memorystream.getObject()),"gzip");
//BA.debugLineNum = 67;BA.debugLine="WriteObject(VERSION, out)";
_writeobject((Object)(_version),_out);
//BA.debugLineNum = 68;BA.debugLine="Return out";
if (true) return _out;
//BA.debugLineNum = 69;BA.debugLine="End Sub";
return null;
}
public String _writeint(int _i,anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper _out) throws Exception{
byte[] _data = null;
//BA.debugLineNum = 166;BA.debugLine="Private Sub WriteInt(i As Int, out As OutputStream";
//BA.debugLineNum = 167;BA.debugLine="Dim data() As Byte";
_data = new byte[(int) (0)];
;
//BA.debugLineNum = 168;BA.debugLine="data = bc.IntsToBytes(Array As Int(i))";
_data = _bc.IntsToBytes(new int[]{_i});
//BA.debugLineNum = 169;BA.debugLine="out.WriteBytes(data, 0, data.Length)";
_out.WriteBytes(_data,(int) (0),_data.length);
//BA.debugLineNum = 170;BA.debugLine="End Sub";
return "";
}
public String _writelist(anywheresoftware.b4a.objects.collections.List _parameters,anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper _out) throws Exception{
byte[] _data = null;
Object _o = null;
//BA.debugLineNum = 71;BA.debugLine="Private Sub WriteList(Parameters As List, out As O";
//BA.debugLineNum = 72;BA.debugLine="Dim data() As Byte";
_data = new byte[(int) (0)];
;
//BA.debugLineNum = 73;BA.debugLine="If Parameters = Null Or Parameters.IsInitialized";
if (_parameters== null || _parameters.IsInitialized()==__c.False) {
//BA.debugLineNum = 74;BA.debugLine="Dim Parameters As List";
_parameters = new anywheresoftware.b4a.objects.collections.List();
//BA.debugLineNum = 75;BA.debugLine="Parameters.Initialize";
_parameters.Initialize();
};
//BA.debugLineNum = 77;BA.debugLine="data = bc.IntsToBytes(Array As Int(Parameters.Siz";
_data = _bc.IntsToBytes(new int[]{_parameters.getSize()});
//BA.debugLineNum = 78;BA.debugLine="out.WriteBytes(data, 0, data.Length)";
_out.WriteBytes(_data,(int) (0),_data.length);
//BA.debugLineNum = 79;BA.debugLine="For Each o As Object In Parameters";
{
final anywheresoftware.b4a.BA.IterableList group8 = _parameters;
final int groupLen8 = group8.getSize()
;int index8 = 0;
;
for (; index8 < groupLen8;index8++){
_o = group8.Get(index8);
//BA.debugLineNum = 80;BA.debugLine="WriteObject(o, out)";
_writeobject(_o,_out);
}
};
//BA.debugLineNum = 82;BA.debugLine="End Sub";
return "";
}
public String _writeobject(Object _o,anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper _out) throws Exception{
byte[] _data = null;
boolean _b = false;
//BA.debugLineNum = 84;BA.debugLine="Private Sub WriteObject(o As Object, out As Output";
//BA.debugLineNum = 85;BA.debugLine="Dim data() As Byte";
_data = new byte[(int) (0)];
;
//BA.debugLineNum = 86;BA.debugLine="tempArray(0) = o";
_temparray[(int) (0)] = _o;
//BA.debugLineNum = 87;BA.debugLine="If tempArray(0) = Null Then";
if (_temparray[(int) (0)]== null) {
//BA.debugLineNum = 88;BA.debugLine="out.WriteBytes(Array As Byte(T_NULL), 0, 1)";
_out.WriteBytes(new byte[]{_t_null},(int) (0),(int) (1));
}else if(_temparray[(int) (0)] instanceof Short) {
//BA.debugLineNum = 90;BA.debugLine="out.WriteBytes(Array As Byte(T_SHORT), 0, 1)";
_out.WriteBytes(new byte[]{_t_short},(int) (0),(int) (1));
//BA.debugLineNum = 91;BA.debugLine="data = bc.ShortsToBytes(Array As Short(o))";
_data = _bc.ShortsToBytes(new short[]{(short)(BA.ObjectToNumber(_o))});
}else if(_temparray[(int) (0)] instanceof Integer) {
//BA.debugLineNum = 93;BA.debugLine="out.WriteBytes(Array As Byte(T_INT), 0, 1)";
_out.WriteBytes(new byte[]{_t_int},(int) (0),(int) (1));
//BA.debugLineNum = 94;BA.debugLine="data = bc.IntsToBytes(Array As Int(o))";
_data = _bc.IntsToBytes(new int[]{(int)(BA.ObjectToNumber(_o))});
}else if(_temparray[(int) (0)] instanceof Float) {
//BA.debugLineNum = 96;BA.debugLine="out.WriteBytes(Array As Byte(T_FLOAT), 0, 1)";
_out.WriteBytes(new byte[]{_t_float},(int) (0),(int) (1));
//BA.debugLineNum = 97;BA.debugLine="data = bc.FloatsToBytes(Array As Float(o))";
_data = _bc.FloatsToBytes(new float[]{(float)(BA.ObjectToNumber(_o))});
}else if(_temparray[(int) (0)] instanceof Double) {
//BA.debugLineNum = 99;BA.debugLine="out.WriteBytes(Array As Byte(T_DOUBLE), 0, 1)";
_out.WriteBytes(new byte[]{_t_double},(int) (0),(int) (1));
//BA.debugLineNum = 100;BA.debugLine="data = bc.DoublesToBytes(Array As Double(o))";
_data = _bc.DoublesToBytes(new double[]{(double)(BA.ObjectToNumber(_o))});
}else if(_temparray[(int) (0)] instanceof Long) {
//BA.debugLineNum = 102;BA.debugLine="out.WriteBytes(Array As Byte(T_LONG), 0, 1)";
_out.WriteBytes(new byte[]{_t_long},(int) (0),(int) (1));
//BA.debugLineNum = 103;BA.debugLine="data = bc.LongsToBytes(Array As Long(o))";
_data = _bc.LongsToBytes(new long[]{BA.ObjectToLongNumber(_o)});
}else if(_temparray[(int) (0)] instanceof Boolean) {
//BA.debugLineNum = 105;BA.debugLine="out.WriteBytes(Array As Byte(T_BOOLEAN), 0, 1)";
_out.WriteBytes(new byte[]{_t_boolean},(int) (0),(int) (1));
//BA.debugLineNum = 106;BA.debugLine="Dim b As Boolean = 0";
_b = BA.ObjectToBoolean(0);
//BA.debugLineNum = 107;BA.debugLine="Dim data(1) As Byte";
_data = new byte[(int) (1)];
;
//BA.debugLineNum = 108;BA.debugLine="If b Then data(0) = 1 Else data(0) = 0";
if (_b) {
_data[(int) (0)] = (byte) (1);}
else {
_data[(int) (0)] = (byte) (0);};
}else if((__c.GetType(_temparray[(int) (0)])).equals("[B")) {
//BA.debugLineNum = 110;BA.debugLine="data = o";
_data = (byte[])(_o);
//BA.debugLineNum = 111;BA.debugLine="out.WriteBytes(Array As Byte(T_BLOB), 0, 1)";
_out.WriteBytes(new byte[]{_t_blob},(int) (0),(int) (1));
//BA.debugLineNum = 112;BA.debugLine="WriteInt(data.Length, out)";
_writeint(_data.length,_out);
}else {
//BA.debugLineNum = 114;BA.debugLine="out.WriteBytes(Array As Byte(T_STRING), 0, 1)";
_out.WriteBytes(new byte[]{_t_string},(int) (0),(int) (1));
//BA.debugLineNum = 115;BA.debugLine="data = bc.StringToBytes(o, \"UTF8\")";
_data = _bc.StringToBytes(BA.ObjectToString(_o),"UTF8");
//BA.debugLineNum = 116;BA.debugLine="WriteInt(data.Length, out)";
_writeint(_data.length,_out);
};
//BA.debugLineNum = 118;BA.debugLine="If data.Length > 0 Then out.WriteBytes(data, 0, d";
if (_data.length>0) {
_out.WriteBytes(_data,(int) (0),_data.length);};
//BA.debugLineNum = 119;BA.debugLine="End Sub";
return "";
}
public Object callSub(String sub, Object sender, Object[] args) throws Exception {
BA.senderHolder.set(sender);
return BA.SubDelegator.SubNotFound;
}
}

View File

@@ -0,0 +1,16 @@
package dbcheck.keymon.lat.designerscripts;
import anywheresoftware.b4a.objects.TextViewWrapper;
import anywheresoftware.b4a.objects.ImageViewWrapper;
import anywheresoftware.b4a.BA;
public class LS_mainpage{
public static void LS_general(anywheresoftware.b4a.BA ba, android.view.View parent, anywheresoftware.b4a.keywords.LayoutValues lv, java.util.Map props,
java.util.Map<String, anywheresoftware.b4a.keywords.LayoutBuilder.ViewWrapperAndAnchor> views, int width, int height, float scale) throws Exception {
anywheresoftware.b4a.keywords.LayoutBuilder.setScaleRate(0.3);
//BA.debugLineNum = 2;BA.debugLine="AutoScaleAll"[MainPage/General script]
anywheresoftware.b4a.keywords.LayoutBuilder.scaleAll(views);
}
}

View File

@@ -0,0 +1,559 @@
package dbcheck.keymon.lat;
import anywheresoftware.b4a.BA;
import anywheresoftware.b4a.B4AClass;
import anywheresoftware.b4a.BALayout;
import anywheresoftware.b4a.debug.*;
public class httpjob 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, "dbcheck.keymon.lat.httpjob");
if (htSubs == null) {
ba.loadHtSubs(this.getClass());
htSubs = ba.htSubs;
}
}
if (BA.isShellModeRuntimeCheck(ba))
this.getClass().getMethod("_class_globals", dbcheck.keymon.lat.httpjob.class).invoke(this, new Object[] {null});
else
ba.raiseEvent2(null, true, "class_globals", false);
}
public anywheresoftware.b4a.keywords.Common __c = null;
public String _jobname = "";
public boolean _success = false;
public String _username = "";
public String _password = "";
public String _errormessage = "";
public Object _target = null;
public String _taskid = "";
public anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper _out = null;
public anywheresoftware.b4h.okhttp.OkHttpClientWrapper.OkHttpRequest _req = null;
public anywheresoftware.b4h.okhttp.OkHttpClientWrapper.OkHttpResponse _response = null;
public Object _tag = null;
public String _invalidurl = "";
public String _defaultscheme = "";
public dbcheck.keymon.lat.main _main = null;
public dbcheck.keymon.lat.starter _starter = null;
public dbcheck.keymon.lat.subs _subs = null;
public dbcheck.keymon.lat.b4xpages _b4xpages = null;
public dbcheck.keymon.lat.b4xcollections _b4xcollections = null;
public dbcheck.keymon.lat.httputils2service _httputils2service = null;
public static class _multipartfiledata{
public boolean IsInitialized;
public String Dir;
public String FileName;
public String KeyName;
public String ContentType;
public void Initialize() {
IsInitialized = true;
Dir = "";
FileName = "";
KeyName = "";
ContentType = "";
}
@Override
public String toString() {
return BA.TypeToString(this, false);
}}
public String _addscheme(String _link) throws Exception{
//BA.debugLineNum = 43;BA.debugLine="Private Sub AddScheme (Link As String) As String";
//BA.debugLineNum = 44;BA.debugLine="If DefaultScheme = \"\" Or Link.Contains(\":\") Then";
if ((_defaultscheme).equals("") || _link.contains(":")) {
if (true) return _link;};
//BA.debugLineNum = 45;BA.debugLine="Return DefaultScheme & \"://\" & Link";
if (true) return _defaultscheme+"://"+_link;
//BA.debugLineNum = 46;BA.debugLine="End Sub";
return "";
}
public String _class_globals() throws Exception{
//BA.debugLineNum = 2;BA.debugLine="Sub Class_Globals";
//BA.debugLineNum = 3;BA.debugLine="Public JobName As String";
_jobname = "";
//BA.debugLineNum = 4;BA.debugLine="Public Success As Boolean";
_success = false;
//BA.debugLineNum = 5;BA.debugLine="Public Username, Password As String";
_username = "";
_password = "";
//BA.debugLineNum = 6;BA.debugLine="Public ErrorMessage As String";
_errormessage = "";
//BA.debugLineNum = 7;BA.debugLine="Private target As Object";
_target = new Object();
//BA.debugLineNum = 10;BA.debugLine="Public taskId As String";
_taskid = "";
//BA.debugLineNum = 11;BA.debugLine="Public Out As OutputStream";
_out = new anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper();
//BA.debugLineNum = 15;BA.debugLine="Private req As OkHttpRequest";
_req = new anywheresoftware.b4h.okhttp.OkHttpClientWrapper.OkHttpRequest();
//BA.debugLineNum = 16;BA.debugLine="Public Response As OkHttpResponse";
_response = new anywheresoftware.b4h.okhttp.OkHttpClientWrapper.OkHttpResponse();
//BA.debugLineNum = 25;BA.debugLine="Public Tag As Object";
_tag = new Object();
//BA.debugLineNum = 26;BA.debugLine="Type MultipartFileData (Dir As String, FileName A";
;
//BA.debugLineNum = 30;BA.debugLine="Private Const InvalidURL As String = \"https://inv";
_invalidurl = "https://invalid-url/";
//BA.debugLineNum = 31;BA.debugLine="Public DefaultScheme As String = \"https\"";
_defaultscheme = "https";
//BA.debugLineNum = 32;BA.debugLine="End Sub";
return "";
}
public String _complete(int _id) throws Exception{
//BA.debugLineNum = 306;BA.debugLine="Public Sub Complete (id As Int)";
//BA.debugLineNum = 307;BA.debugLine="taskId = id";
_taskid = BA.NumberToString(_id);
//BA.debugLineNum = 308;BA.debugLine="CallSubDelayed2(target, \"JobDone\", Me)";
__c.CallSubDelayed2(ba,_target,"JobDone",this);
//BA.debugLineNum = 309;BA.debugLine="End Sub";
return "";
}
public String _delete(String _link) throws Exception{
//BA.debugLineNum = 252;BA.debugLine="Public Sub Delete(Link As String)";
//BA.debugLineNum = 253;BA.debugLine="Try";
try { //BA.debugLineNum = 254;BA.debugLine="Link = AddScheme(Link)";
_link = _addscheme(_link);
//BA.debugLineNum = 255;BA.debugLine="req.InitializeDelete(Link)";
_req.InitializeDelete(_link);
}
catch (Exception e5) {
ba.setLastException(e5); //BA.debugLineNum = 257;BA.debugLine="Log($\"Invalid link: ${Link}\"$)";
__c.LogImpl("913697029",("Invalid link: "+__c.SmartStringFormatter("",(Object)(_link))+""),0);
//BA.debugLineNum = 258;BA.debugLine="req.InitializeDelete(InvalidURL)";
_req.InitializeDelete(_invalidurl);
};
//BA.debugLineNum = 260;BA.debugLine="CallSubDelayed2(HttpUtils2Service, \"SubmitJob\", M";
__c.CallSubDelayed2(ba,(Object)(_httputils2service.getObject()),"SubmitJob",this);
//BA.debugLineNum = 261;BA.debugLine="End Sub";
return "";
}
public String _delete2(String _link,String[] _parameters) throws Exception{
//BA.debugLineNum = 263;BA.debugLine="Public Sub Delete2(Link As String, Parameters() As";
//BA.debugLineNum = 264;BA.debugLine="Try";
try { //BA.debugLineNum = 265;BA.debugLine="Link = AddScheme(Link)";
_link = _addscheme(_link);
//BA.debugLineNum = 266;BA.debugLine="req.InitializeDelete(escapeLink(Link, Parameters";
_req.InitializeDelete(_escapelink(_link,_parameters));
}
catch (Exception e5) {
ba.setLastException(e5); //BA.debugLineNum = 268;BA.debugLine="Log($\"Invalid link: ${Link}\"$)";
__c.LogImpl("913762565",("Invalid link: "+__c.SmartStringFormatter("",(Object)(_link))+""),0);
//BA.debugLineNum = 269;BA.debugLine="req.InitializeDelete(escapeLink(InvalidURL, Para";
_req.InitializeDelete(_escapelink(_invalidurl,_parameters));
};
//BA.debugLineNum = 271;BA.debugLine="CallSubDelayed2(HttpUtils2Service, \"SubmitJob\", M";
__c.CallSubDelayed2(ba,(Object)(_httputils2service.getObject()),"SubmitJob",this);
//BA.debugLineNum = 272;BA.debugLine="End Sub";
return "";
}
public String _download(String _link) throws Exception{
//BA.debugLineNum = 210;BA.debugLine="Public Sub Download(Link As String)";
//BA.debugLineNum = 211;BA.debugLine="Try";
try { //BA.debugLineNum = 212;BA.debugLine="Link = AddScheme(Link)";
_link = _addscheme(_link);
//BA.debugLineNum = 213;BA.debugLine="req.InitializeGet(Link)";
_req.InitializeGet(_link);
}
catch (Exception e5) {
ba.setLastException(e5); //BA.debugLineNum = 215;BA.debugLine="Log($\"Invalid link: ${Link}\"$)";
__c.LogImpl("913500421",("Invalid link: "+__c.SmartStringFormatter("",(Object)(_link))+""),0);
//BA.debugLineNum = 216;BA.debugLine="req.InitializeGet(InvalidURL)";
_req.InitializeGet(_invalidurl);
};
//BA.debugLineNum = 218;BA.debugLine="CallSubDelayed2(HttpUtils2Service, \"SubmitJob\", M";
__c.CallSubDelayed2(ba,(Object)(_httputils2service.getObject()),"SubmitJob",this);
//BA.debugLineNum = 219;BA.debugLine="End Sub";
return "";
}
public String _download2(String _link,String[] _parameters) throws Exception{
//BA.debugLineNum = 226;BA.debugLine="Public Sub Download2(Link As String, Parameters()";
//BA.debugLineNum = 227;BA.debugLine="Try";
try { //BA.debugLineNum = 228;BA.debugLine="Link = AddScheme(Link)";
_link = _addscheme(_link);
//BA.debugLineNum = 229;BA.debugLine="req.InitializeGet(escapeLink(Link, Parameters))";
_req.InitializeGet(_escapelink(_link,_parameters));
}
catch (Exception e5) {
ba.setLastException(e5); //BA.debugLineNum = 231;BA.debugLine="Log($\"Invalid link: ${Link}\"$)";
__c.LogImpl("913565957",("Invalid link: "+__c.SmartStringFormatter("",(Object)(_link))+""),0);
//BA.debugLineNum = 232;BA.debugLine="req.InitializeGet(escapeLink(InvalidURL, Paramet";
_req.InitializeGet(_escapelink(_invalidurl,_parameters));
};
//BA.debugLineNum = 234;BA.debugLine="CallSubDelayed2(HttpUtils2Service, \"SubmitJob\", M";
__c.CallSubDelayed2(ba,(Object)(_httputils2service.getObject()),"SubmitJob",this);
//BA.debugLineNum = 235;BA.debugLine="End Sub";
return "";
}
public String _escapelink(String _link,String[] _parameters) throws Exception{
anywheresoftware.b4a.keywords.StringBuilderWrapper _sb = null;
anywheresoftware.b4a.objects.StringUtils _su = null;
int _i = 0;
//BA.debugLineNum = 237;BA.debugLine="Private Sub escapeLink(Link As String, Parameters(";
//BA.debugLineNum = 238;BA.debugLine="Dim sb As StringBuilder";
_sb = new anywheresoftware.b4a.keywords.StringBuilderWrapper();
//BA.debugLineNum = 239;BA.debugLine="sb.Initialize";
_sb.Initialize();
//BA.debugLineNum = 240;BA.debugLine="sb.Append(Link)";
_sb.Append(_link);
//BA.debugLineNum = 241;BA.debugLine="If Parameters.Length > 0 Then sb.Append(\"?\")";
if (_parameters.length>0) {
_sb.Append("?");};
//BA.debugLineNum = 242;BA.debugLine="Dim su As StringUtils";
_su = new anywheresoftware.b4a.objects.StringUtils();
//BA.debugLineNum = 243;BA.debugLine="For i = 0 To Parameters.Length - 1 Step 2";
{
final int step6 = 2;
final int limit6 = (int) (_parameters.length-1);
_i = (int) (0) ;
for (;_i <= limit6 ;_i = _i + step6 ) {
//BA.debugLineNum = 244;BA.debugLine="If i > 0 Then sb.Append(\"&\")";
if (_i>0) {
_sb.Append("&");};
//BA.debugLineNum = 245;BA.debugLine="sb.Append(su.EncodeUrl(Parameters(i), \"UTF8\")).A";
_sb.Append(_su.EncodeUrl(_parameters[_i],"UTF8")).Append("=");
//BA.debugLineNum = 246;BA.debugLine="sb.Append(su.EncodeUrl(Parameters(i + 1), \"UTF8\"";
_sb.Append(_su.EncodeUrl(_parameters[(int) (_i+1)],"UTF8"));
}
};
//BA.debugLineNum = 248;BA.debugLine="Return sb.ToString";
if (true) return _sb.ToString();
//BA.debugLineNum = 249;BA.debugLine="End Sub";
return "";
}
public anywheresoftware.b4a.objects.drawable.CanvasWrapper.BitmapWrapper _getbitmap() throws Exception{
anywheresoftware.b4a.objects.drawable.CanvasWrapper.BitmapWrapper _b = null;
//BA.debugLineNum = 321;BA.debugLine="Public Sub GetBitmap As Bitmap";
//BA.debugLineNum = 322;BA.debugLine="Dim b As Bitmap";
_b = new anywheresoftware.b4a.objects.drawable.CanvasWrapper.BitmapWrapper();
//BA.debugLineNum = 323;BA.debugLine="b = LoadBitmap(HttpUtils2Service.TempFolder, task";
_b = __c.LoadBitmap(_httputils2service._tempfolder /*String*/ ,_taskid);
//BA.debugLineNum = 324;BA.debugLine="Return b";
if (true) return _b;
//BA.debugLineNum = 325;BA.debugLine="End Sub";
return null;
}
public anywheresoftware.b4a.objects.drawable.CanvasWrapper.BitmapWrapper _getbitmapresize(int _width,int _height,boolean _keepaspectratio) throws Exception{
//BA.debugLineNum = 332;BA.debugLine="Public Sub GetBitmapResize(Width As Int, Height As";
//BA.debugLineNum = 333;BA.debugLine="Return LoadBitmapResize(HttpUtils2Service.TempFol";
if (true) return __c.LoadBitmapResize(_httputils2service._tempfolder /*String*/ ,_taskid,_width,_height,_keepaspectratio);
//BA.debugLineNum = 334;BA.debugLine="End Sub";
return null;
}
public anywheresoftware.b4a.objects.drawable.CanvasWrapper.BitmapWrapper _getbitmapsample(int _width,int _height) throws Exception{
//BA.debugLineNum = 328;BA.debugLine="Public Sub GetBitmapSample(Width As Int, Height As";
//BA.debugLineNum = 329;BA.debugLine="Return LoadBitmapSample(HttpUtils2Service.TempFol";
if (true) return __c.LoadBitmapSample(_httputils2service._tempfolder /*String*/ ,_taskid,_width,_height);
//BA.debugLineNum = 330;BA.debugLine="End Sub";
return null;
}
public anywheresoftware.b4a.objects.streams.File.InputStreamWrapper _getinputstream() throws Exception{
anywheresoftware.b4a.objects.streams.File.InputStreamWrapper _in = null;
//BA.debugLineNum = 338;BA.debugLine="Public Sub GetInputStream As InputStream";
//BA.debugLineNum = 339;BA.debugLine="Dim In As InputStream";
_in = new anywheresoftware.b4a.objects.streams.File.InputStreamWrapper();
//BA.debugLineNum = 340;BA.debugLine="In = File.OpenInput(HttpUtils2Service.TempFolder,";
_in = __c.File.OpenInput(_httputils2service._tempfolder /*String*/ ,_taskid);
//BA.debugLineNum = 341;BA.debugLine="Return In";
if (true) return _in;
//BA.debugLineNum = 342;BA.debugLine="End Sub";
return null;
}
public anywheresoftware.b4h.okhttp.OkHttpClientWrapper.OkHttpRequest _getrequest() throws Exception{
//BA.debugLineNum = 301;BA.debugLine="Public Sub GetRequest As OkHttpRequest";
//BA.debugLineNum = 302;BA.debugLine="Return req";
if (true) return _req;
//BA.debugLineNum = 303;BA.debugLine="End Sub";
return null;
}
public String _getstring() throws Exception{
//BA.debugLineNum = 282;BA.debugLine="Public Sub GetString As String";
//BA.debugLineNum = 283;BA.debugLine="Return GetString2(\"UTF8\")";
if (true) return _getstring2("UTF8");
//BA.debugLineNum = 284;BA.debugLine="End Sub";
return "";
}
public String _getstring2(String _encoding) throws Exception{
anywheresoftware.b4a.objects.streams.File.TextReaderWrapper _tr = null;
String _res = "";
//BA.debugLineNum = 287;BA.debugLine="Public Sub GetString2(Encoding As String) As Strin";
//BA.debugLineNum = 291;BA.debugLine="Dim tr As TextReader";
_tr = new anywheresoftware.b4a.objects.streams.File.TextReaderWrapper();
//BA.debugLineNum = 292;BA.debugLine="tr.Initialize2(File.OpenInput(HttpUtils2Service.T";
_tr.Initialize2((java.io.InputStream)(__c.File.OpenInput(_httputils2service._tempfolder /*String*/ ,_taskid).getObject()),_encoding);
//BA.debugLineNum = 293;BA.debugLine="Dim res As String = tr.ReadAll";
_res = _tr.ReadAll();
//BA.debugLineNum = 294;BA.debugLine="tr.Close";
_tr.Close();
//BA.debugLineNum = 295;BA.debugLine="Return res";
if (true) return _res;
//BA.debugLineNum = 297;BA.debugLine="End Sub";
return "";
}
public String _head(String _link) throws Exception{
//BA.debugLineNum = 110;BA.debugLine="Public Sub Head(Link As String)";
//BA.debugLineNum = 111;BA.debugLine="Try";
try { //BA.debugLineNum = 112;BA.debugLine="Link = AddScheme(Link)";
_link = _addscheme(_link);
//BA.debugLineNum = 113;BA.debugLine="req.InitializeHead(Link)";
_req.InitializeHead(_link);
}
catch (Exception e5) {
ba.setLastException(e5); //BA.debugLineNum = 115;BA.debugLine="Log($\"Invalid link: ${Link}\"$)";
__c.LogImpl("913238277",("Invalid link: "+__c.SmartStringFormatter("",(Object)(_link))+""),0);
//BA.debugLineNum = 116;BA.debugLine="req.InitializeHead(InvalidURL)";
_req.InitializeHead(_invalidurl);
};
//BA.debugLineNum = 118;BA.debugLine="CallSubDelayed2(HttpUtils2Service, \"SubmitJob\", M";
__c.CallSubDelayed2(ba,(Object)(_httputils2service.getObject()),"SubmitJob",this);
//BA.debugLineNum = 119;BA.debugLine="End Sub";
return "";
}
public String _initialize(anywheresoftware.b4a.BA _ba,String _name,Object _targetmodule) throws Exception{
innerInitialize(_ba);
//BA.debugLineNum = 38;BA.debugLine="Public Sub Initialize (Name As String, TargetModul";
//BA.debugLineNum = 39;BA.debugLine="JobName = Name";
_jobname = _name;
//BA.debugLineNum = 40;BA.debugLine="target = TargetModule";
_target = _targetmodule;
//BA.debugLineNum = 41;BA.debugLine="End Sub";
return "";
}
public boolean _multipartstartsection(anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper _stream,boolean _empty) throws Exception{
//BA.debugLineNum = 170;BA.debugLine="Private Sub MultipartStartSection (stream As Outpu";
//BA.debugLineNum = 171;BA.debugLine="If empty = False Then";
if (_empty==__c.False) {
//BA.debugLineNum = 172;BA.debugLine="stream.WriteBytes(Array As Byte(13, 10), 0, 2)";
_stream.WriteBytes(new byte[]{(byte) (13),(byte) (10)},(int) (0),(int) (2));
}else {
//BA.debugLineNum = 174;BA.debugLine="empty = False";
_empty = __c.False;
};
//BA.debugLineNum = 176;BA.debugLine="Return empty";
if (true) return _empty;
//BA.debugLineNum = 177;BA.debugLine="End Sub";
return false;
}
public String _patchbytes(String _link,byte[] _data) throws Exception{
//BA.debugLineNum = 88;BA.debugLine="Public Sub PatchBytes(Link As String, Data() As By";
//BA.debugLineNum = 89;BA.debugLine="Link = AddScheme(Link)";
_link = _addscheme(_link);
//BA.debugLineNum = 97;BA.debugLine="Try";
try { //BA.debugLineNum = 98;BA.debugLine="req.InitializePatch2(Link, Data)";
_req.InitializePatch2(_link,_data);
}
catch (Exception e5) {
ba.setLastException(e5); //BA.debugLineNum = 100;BA.debugLine="Log($\"Invalid link: ${Link}\"$)";
__c.LogImpl("913172748",("Invalid link: "+__c.SmartStringFormatter("",(Object)(_link))+""),0);
//BA.debugLineNum = 101;BA.debugLine="req.InitializePatch2(InvalidURL, Data)";
_req.InitializePatch2(_invalidurl,_data);
};
//BA.debugLineNum = 105;BA.debugLine="CallSubDelayed2(HttpUtils2Service, \"SubmitJob\", M";
__c.CallSubDelayed2(ba,(Object)(_httputils2service.getObject()),"SubmitJob",this);
//BA.debugLineNum = 106;BA.debugLine="End Sub";
return "";
}
public String _patchstring(String _link,String _text) throws Exception{
//BA.debugLineNum = 83;BA.debugLine="Public Sub PatchString(Link As String, Text As Str";
//BA.debugLineNum = 84;BA.debugLine="PatchBytes(Link, Text.GetBytes(\"UTF8\"))";
_patchbytes(_link,_text.getBytes("UTF8"));
//BA.debugLineNum = 85;BA.debugLine="End Sub";
return "";
}
public String _postbytes(String _link,byte[] _data) throws Exception{
//BA.debugLineNum = 54;BA.debugLine="Public Sub PostBytes(Link As String, Data() As Byt";
//BA.debugLineNum = 55;BA.debugLine="Try";
try { //BA.debugLineNum = 56;BA.debugLine="Link = AddScheme(Link)";
_link = _addscheme(_link);
//BA.debugLineNum = 57;BA.debugLine="req.InitializePost2(Link, Data)";
_req.InitializePost2(_link,_data);
}
catch (Exception e5) {
ba.setLastException(e5); //BA.debugLineNum = 59;BA.debugLine="Log($\"Invalid link: ${Link}\"$)";
__c.LogImpl("912910597",("Invalid link: "+__c.SmartStringFormatter("",(Object)(_link))+""),0);
//BA.debugLineNum = 60;BA.debugLine="req.InitializePost2(InvalidURL, Data)";
_req.InitializePost2(_invalidurl,_data);
};
//BA.debugLineNum = 62;BA.debugLine="CallSubDelayed2(HttpUtils2Service, \"SubmitJob\", M";
__c.CallSubDelayed2(ba,(Object)(_httputils2service.getObject()),"SubmitJob",this);
//BA.debugLineNum = 63;BA.debugLine="End Sub";
return "";
}
public String _postfile(String _link,String _dir,String _filename) throws Exception{
int _length = 0;
anywheresoftware.b4a.objects.streams.File.InputStreamWrapper _in = null;
//BA.debugLineNum = 181;BA.debugLine="Public Sub PostFile(Link As String, Dir As String,";
//BA.debugLineNum = 182;BA.debugLine="Link = AddScheme(Link)";
_link = _addscheme(_link);
//BA.debugLineNum = 187;BA.debugLine="Dim length As Int";
_length = 0;
//BA.debugLineNum = 188;BA.debugLine="If Dir = File.DirAssets Then";
if ((_dir).equals(__c.File.getDirAssets())) {
//BA.debugLineNum = 189;BA.debugLine="Log(\"Cannot send files from the assets folder.\")";
__c.LogImpl("913434888","Cannot send files from the assets folder.",0);
//BA.debugLineNum = 190;BA.debugLine="Return";
if (true) return "";
};
//BA.debugLineNum = 192;BA.debugLine="length = File.Size(Dir, FileName)";
_length = (int) (__c.File.Size(_dir,_filename));
//BA.debugLineNum = 193;BA.debugLine="Dim In As InputStream";
_in = new anywheresoftware.b4a.objects.streams.File.InputStreamWrapper();
//BA.debugLineNum = 194;BA.debugLine="In = File.OpenInput(Dir, FileName)";
_in = __c.File.OpenInput(_dir,_filename);
//BA.debugLineNum = 195;BA.debugLine="If length < 1000000 Then '1mb";
if (_length<1000000) {
//BA.debugLineNum = 198;BA.debugLine="Dim out As OutputStream";
_out = new anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper();
//BA.debugLineNum = 199;BA.debugLine="out.InitializeToBytesArray(length)";
_out.InitializeToBytesArray(_length);
//BA.debugLineNum = 200;BA.debugLine="File.Copy2(In, out)";
__c.File.Copy2((java.io.InputStream)(_in.getObject()),(java.io.OutputStream)(_out.getObject()));
//BA.debugLineNum = 201;BA.debugLine="PostBytes(Link, out.ToBytesArray)";
_postbytes(_link,_out.ToBytesArray());
}else {
//BA.debugLineNum = 203;BA.debugLine="req.InitializePost(Link, In, length)";
_req.InitializePost(_link,(java.io.InputStream)(_in.getObject()),_length);
//BA.debugLineNum = 204;BA.debugLine="CallSubDelayed2(HttpUtils2Service, \"SubmitJob\",";
__c.CallSubDelayed2(ba,(Object)(_httputils2service.getObject()),"SubmitJob",this);
};
//BA.debugLineNum = 207;BA.debugLine="End Sub";
return "";
}
public String _postmultipart(String _link,anywheresoftware.b4a.objects.collections.Map _namevalues,anywheresoftware.b4a.objects.collections.List _files) throws Exception{
String _boundary = "";
anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper _stream = null;
byte[] _b = null;
String _eol = "";
boolean _empty = false;
String _key = "";
String _value = "";
String _s = "";
dbcheck.keymon.lat.httpjob._multipartfiledata _fd = null;
anywheresoftware.b4a.objects.streams.File.InputStreamWrapper _in = null;
//BA.debugLineNum = 124;BA.debugLine="Public Sub PostMultipart(Link As String, NameValue";
//BA.debugLineNum = 125;BA.debugLine="Dim boundary As String = \"-----------------------";
_boundary = "---------------------------1461124740692";
//BA.debugLineNum = 126;BA.debugLine="Dim stream As OutputStream";
_stream = new anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper();
//BA.debugLineNum = 127;BA.debugLine="stream.InitializeToBytesArray(0)";
_stream.InitializeToBytesArray((int) (0));
//BA.debugLineNum = 128;BA.debugLine="Dim b() As Byte";
_b = new byte[(int) (0)];
;
//BA.debugLineNum = 129;BA.debugLine="Dim eol As String = Chr(13) & Chr(10)";
_eol = BA.ObjectToString(__c.Chr((int) (13)))+BA.ObjectToString(__c.Chr((int) (10)));
//BA.debugLineNum = 130;BA.debugLine="Dim empty As Boolean = True";
_empty = __c.True;
//BA.debugLineNum = 131;BA.debugLine="If NameValues <> Null And NameValues.IsInitialize";
if (_namevalues!= null && _namevalues.IsInitialized()) {
//BA.debugLineNum = 132;BA.debugLine="For Each key As String In NameValues.Keys";
{
final anywheresoftware.b4a.BA.IterableList group8 = _namevalues.Keys();
final int groupLen8 = group8.getSize()
;int index8 = 0;
;
for (; index8 < groupLen8;index8++){
_key = BA.ObjectToString(group8.Get(index8));
//BA.debugLineNum = 133;BA.debugLine="Dim value As String = NameValues.Get(key)";
_value = BA.ObjectToString(_namevalues.Get((Object)(_key)));
//BA.debugLineNum = 134;BA.debugLine="empty = MultipartStartSection (stream, empty)";
_empty = _multipartstartsection(_stream,_empty);
//BA.debugLineNum = 135;BA.debugLine="Dim s As String = _ $\"--${boundary} Content-Dis";
_s = ("--"+__c.SmartStringFormatter("",(Object)(_boundary))+"\n"+"Content-Disposition: form-data; name=\""+__c.SmartStringFormatter("",(Object)(_key))+"\"\n"+"\n"+""+__c.SmartStringFormatter("",(Object)(_value))+"");
//BA.debugLineNum = 140;BA.debugLine="b = s.Replace(CRLF, eol).GetBytes(\"UTF8\")";
_b = _s.replace(__c.CRLF,_eol).getBytes("UTF8");
//BA.debugLineNum = 141;BA.debugLine="stream.WriteBytes(b, 0, b.Length)";
_stream.WriteBytes(_b,(int) (0),_b.length);
}
};
};
//BA.debugLineNum = 144;BA.debugLine="If Files <> Null And Files.IsInitialized Then";
if (_files!= null && _files.IsInitialized()) {
//BA.debugLineNum = 145;BA.debugLine="For Each fd As MultipartFileData In Files";
{
final anywheresoftware.b4a.BA.IterableList group17 = _files;
final int groupLen17 = group17.getSize()
;int index17 = 0;
;
for (; index17 < groupLen17;index17++){
_fd = (dbcheck.keymon.lat.httpjob._multipartfiledata)(group17.Get(index17));
//BA.debugLineNum = 146;BA.debugLine="empty = MultipartStartSection (stream, empty)";
_empty = _multipartstartsection(_stream,_empty);
//BA.debugLineNum = 147;BA.debugLine="Dim s As String = _ $\"--${boundary} Content-Dis";
_s = ("--"+__c.SmartStringFormatter("",(Object)(_boundary))+"\n"+"Content-Disposition: form-data; name=\""+__c.SmartStringFormatter("",(Object)(_fd.KeyName /*String*/ ))+"\"; filename=\""+__c.SmartStringFormatter("",(Object)(_fd.FileName /*String*/ ))+"\"\n"+"Content-Type: "+__c.SmartStringFormatter("",(Object)(_fd.ContentType /*String*/ ))+"\n"+"\n"+"");
//BA.debugLineNum = 153;BA.debugLine="b = s.Replace(CRLF, eol).GetBytes(\"UTF8\")";
_b = _s.replace(__c.CRLF,_eol).getBytes("UTF8");
//BA.debugLineNum = 154;BA.debugLine="stream.WriteBytes(b, 0, b.Length)";
_stream.WriteBytes(_b,(int) (0),_b.length);
//BA.debugLineNum = 155;BA.debugLine="Dim in As InputStream = File.OpenInput(fd.Dir,";
_in = new anywheresoftware.b4a.objects.streams.File.InputStreamWrapper();
_in = __c.File.OpenInput(_fd.Dir /*String*/ ,_fd.FileName /*String*/ );
//BA.debugLineNum = 156;BA.debugLine="File.Copy2(in, stream)";
__c.File.Copy2((java.io.InputStream)(_in.getObject()),(java.io.OutputStream)(_stream.getObject()));
}
};
};
//BA.debugLineNum = 159;BA.debugLine="empty = MultipartStartSection (stream, empty)";
_empty = _multipartstartsection(_stream,_empty);
//BA.debugLineNum = 160;BA.debugLine="s = _ $\"--${boundary}-- \"$";
_s = ("--"+__c.SmartStringFormatter("",(Object)(_boundary))+"--\n"+"");
//BA.debugLineNum = 163;BA.debugLine="b = s.Replace(CRLF, eol).GetBytes(\"UTF8\")";
_b = _s.replace(__c.CRLF,_eol).getBytes("UTF8");
//BA.debugLineNum = 164;BA.debugLine="stream.WriteBytes(b, 0, b.Length)";
_stream.WriteBytes(_b,(int) (0),_b.length);
//BA.debugLineNum = 165;BA.debugLine="PostBytes(Link, stream.ToBytesArray)";
_postbytes(_link,_stream.ToBytesArray());
//BA.debugLineNum = 166;BA.debugLine="req.SetContentType(\"multipart/form-data; boundary";
_req.SetContentType("multipart/form-data; boundary="+_boundary);
//BA.debugLineNum = 167;BA.debugLine="req.SetContentEncoding(\"UTF8\")";
_req.SetContentEncoding("UTF8");
//BA.debugLineNum = 168;BA.debugLine="End Sub";
return "";
}
public String _poststring(String _link,String _text) throws Exception{
//BA.debugLineNum = 49;BA.debugLine="Public Sub PostString(Link As String, Text As Stri";
//BA.debugLineNum = 50;BA.debugLine="PostBytes(Link, Text.GetBytes(\"UTF8\"))";
_postbytes(_link,_text.getBytes("UTF8"));
//BA.debugLineNum = 51;BA.debugLine="End Sub";
return "";
}
public String _putbytes(String _link,byte[] _data) throws Exception{
//BA.debugLineNum = 71;BA.debugLine="Public Sub PutBytes(Link As String, Data() As Byte";
//BA.debugLineNum = 72;BA.debugLine="Try";
try { //BA.debugLineNum = 73;BA.debugLine="Link = AddScheme(Link)";
_link = _addscheme(_link);
//BA.debugLineNum = 74;BA.debugLine="req.InitializePut2(Link, Data)";
_req.InitializePut2(_link,_data);
}
catch (Exception e5) {
ba.setLastException(e5); //BA.debugLineNum = 76;BA.debugLine="Log($\"Invalid link: ${Link}\"$)";
__c.LogImpl("913041669",("Invalid link: "+__c.SmartStringFormatter("",(Object)(_link))+""),0);
//BA.debugLineNum = 77;BA.debugLine="req.InitializePut2(InvalidURL, Data)";
_req.InitializePut2(_invalidurl,_data);
};
//BA.debugLineNum = 79;BA.debugLine="CallSubDelayed2(HttpUtils2Service, \"SubmitJob\", M";
__c.CallSubDelayed2(ba,(Object)(_httputils2service.getObject()),"SubmitJob",this);
//BA.debugLineNum = 80;BA.debugLine="End Sub";
return "";
}
public String _putstring(String _link,String _text) throws Exception{
//BA.debugLineNum = 66;BA.debugLine="Public Sub PutString(Link As String, Text As Strin";
//BA.debugLineNum = 67;BA.debugLine="PutBytes(Link, Text.GetBytes(\"UTF8\"))";
_putbytes(_link,_text.getBytes("UTF8"));
//BA.debugLineNum = 68;BA.debugLine="End Sub";
return "";
}
public String _release() throws Exception{
//BA.debugLineNum = 275;BA.debugLine="Public Sub Release";
//BA.debugLineNum = 277;BA.debugLine="File.Delete(HttpUtils2Service.TempFolder, taskId)";
__c.File.Delete(_httputils2service._tempfolder /*String*/ ,_taskid);
//BA.debugLineNum = 279;BA.debugLine="End Sub";
return "";
}
public Object callSub(String sub, Object sender, Object[] args) throws Exception {
BA.senderHolder.set(sender);
return BA.SubDelegator.SubNotFound;
}
}

View File

@@ -0,0 +1,303 @@
package dbcheck.keymon.lat;
import anywheresoftware.b4a.BA;
import anywheresoftware.b4a.objects.ServiceHelper;
import anywheresoftware.b4a.debug.*;
public class httputils2service extends android.app.Service{
public static class httputils2service_BR extends android.content.BroadcastReceiver {
@Override
public void onReceive(android.content.Context context, android.content.Intent intent) {
BA.LogInfo("** Receiver (httputils2service) OnReceive **");
android.content.Intent in = new android.content.Intent(context, httputils2service.class);
if (intent != null)
in.putExtra("b4a_internal_intent", intent);
ServiceHelper.StarterHelper.startServiceFromReceiver (context, in, false, BA.class);
}
}
static httputils2service mostCurrent;
public static BA processBA;
private ServiceHelper _service;
public static Class<?> getObject() {
return httputils2service.class;
}
@Override
public void onCreate() {
super.onCreate();
mostCurrent = this;
if (processBA == null) {
processBA = new BA(this, null, null, "dbcheck.keymon.lat", "dbcheck.keymon.lat.httputils2service");
if (BA.isShellModeRuntimeCheck(processBA)) {
processBA.raiseEvent2(null, true, "SHELL", false);
}
try {
Class.forName(BA.applicationContext.getPackageName() + ".main").getMethod("initializeProcessGlobals").invoke(null, null);
} catch (Exception e) {
throw new RuntimeException(e);
}
processBA.loadHtSubs(this.getClass());
ServiceHelper.init();
}
_service = new ServiceHelper(this);
processBA.service = this;
if (BA.isShellModeRuntimeCheck(processBA)) {
processBA.raiseEvent2(null, true, "CREATE", true, "dbcheck.keymon.lat.httputils2service", processBA, _service, anywheresoftware.b4a.keywords.Common.Density);
}
if (!false && ServiceHelper.StarterHelper.startFromServiceCreate(processBA, false) == false) {
}
else {
processBA.setActivityPaused(false);
BA.LogInfo("*** Service (httputils2service) Create ***");
processBA.raiseEvent(null, "service_create");
}
processBA.runHook("oncreate", this, null);
if (false) {
ServiceHelper.StarterHelper.runWaitForLayouts();
}
}
@Override
public void onStart(android.content.Intent intent, int startId) {
onStartCommand(intent, 0, 0);
}
@Override
public int onStartCommand(final android.content.Intent intent, int flags, int startId) {
if (ServiceHelper.StarterHelper.onStartCommand(processBA, new Runnable() {
public void run() {
handleStart(intent);
}}))
;
else {
ServiceHelper.StarterHelper.addWaitForLayout (new Runnable() {
public void run() {
processBA.setActivityPaused(false);
BA.LogInfo("** Service (httputils2service) Create **");
processBA.raiseEvent(null, "service_create");
handleStart(intent);
ServiceHelper.StarterHelper.removeWaitForLayout();
}
});
}
processBA.runHook("onstartcommand", this, new Object[] {intent, flags, startId});
return android.app.Service.START_NOT_STICKY;
}
public void onTaskRemoved(android.content.Intent rootIntent) {
super.onTaskRemoved(rootIntent);
if (false)
processBA.raiseEvent(null, "service_taskremoved");
}
private void handleStart(android.content.Intent intent) {
BA.LogInfo("** Service (httputils2service) Start **");
java.lang.reflect.Method startEvent = processBA.htSubs.get("service_start");
if (startEvent != null) {
if (startEvent.getParameterTypes().length > 0) {
anywheresoftware.b4a.objects.IntentWrapper iw = ServiceHelper.StarterHelper.handleStartIntent(intent, _service, processBA);
processBA.raiseEvent(null, "service_start", iw);
}
else {
processBA.raiseEvent(null, "service_start");
}
}
}
@Override
public void onDestroy() {
super.onDestroy();
if (false) {
BA.LogInfo("** Service (httputils2service) Destroy (ignored)**");
}
else {
BA.LogInfo("** Service (httputils2service) Destroy **");
processBA.raiseEvent(null, "service_destroy");
processBA.service = null;
mostCurrent = null;
processBA.setActivityPaused(true);
processBA.runHook("ondestroy", this, null);
}
}
@Override
public android.os.IBinder onBind(android.content.Intent intent) {
return null;
}public anywheresoftware.b4a.keywords.Common __c = null;
public static anywheresoftware.b4h.okhttp.OkHttpClientWrapper _hc = null;
public static anywheresoftware.b4a.objects.collections.Map _taskidtojob = null;
public static String _tempfolder = "";
public static int _taskcounter = 0;
public dbcheck.keymon.lat.main _main = null;
public dbcheck.keymon.lat.starter _starter = null;
public dbcheck.keymon.lat.subs _subs = null;
public dbcheck.keymon.lat.b4xpages _b4xpages = null;
public dbcheck.keymon.lat.b4xcollections _b4xcollections = null;
public static String _completejob(int _taskid,boolean _success,String _errormessage) throws Exception{
dbcheck.keymon.lat.httpjob _job = null;
//BA.debugLineNum = 146;BA.debugLine="Sub CompleteJob(TaskId As Int, success As Boolean,";
//BA.debugLineNum = 150;BA.debugLine="Dim job As HttpJob = TaskIdToJob.Get(TaskId)";
_job = (dbcheck.keymon.lat.httpjob)(_taskidtojob.Get((Object)(_taskid)));
//BA.debugLineNum = 151;BA.debugLine="If job = Null Then";
if (_job== null) {
//BA.debugLineNum = 152;BA.debugLine="Log(\"HttpUtils2Service: job completed multiple t";
anywheresoftware.b4a.keywords.Common.LogImpl("112582918","HttpUtils2Service: job completed multiple times - "+BA.NumberToString(_taskid),0);
//BA.debugLineNum = 153;BA.debugLine="Return";
if (true) return "";
};
//BA.debugLineNum = 155;BA.debugLine="TaskIdToJob.Remove(TaskId)";
_taskidtojob.Remove((Object)(_taskid));
//BA.debugLineNum = 156;BA.debugLine="job.success = success";
_job._success /*boolean*/ = _success;
//BA.debugLineNum = 157;BA.debugLine="job.errorMessage = errorMessage";
_job._errormessage /*String*/ = _errormessage;
//BA.debugLineNum = 159;BA.debugLine="job.Complete(TaskId)";
_job._complete /*String*/ (_taskid);
//BA.debugLineNum = 163;BA.debugLine="End Sub";
return "";
}
public static String _hc_responseerror(anywheresoftware.b4h.okhttp.OkHttpClientWrapper.OkHttpResponse _response,String _reason,int _statuscode,int _taskid) throws Exception{
dbcheck.keymon.lat.httpjob _job = null;
//BA.debugLineNum = 109;BA.debugLine="Sub hc_ResponseError (Response As OkHttpResponse,";
//BA.debugLineNum = 111;BA.debugLine="Log($\"ResponseError. Reason: ${Reason}, Response:";
anywheresoftware.b4a.keywords.Common.LogImpl("112517378",("ResponseError. Reason: "+anywheresoftware.b4a.keywords.Common.SmartStringFormatter("",(Object)(_reason))+", Response: "+anywheresoftware.b4a.keywords.Common.SmartStringFormatter("",(Object)(_response.getErrorResponse()))+""),0);
//BA.debugLineNum = 113;BA.debugLine="Response.Release";
_response.Release();
//BA.debugLineNum = 114;BA.debugLine="Dim job As HttpJob = TaskIdToJob.Get(TaskId)";
_job = (dbcheck.keymon.lat.httpjob)(_taskidtojob.Get((Object)(_taskid)));
//BA.debugLineNum = 115;BA.debugLine="If job = Null Then";
if (_job== null) {
//BA.debugLineNum = 116;BA.debugLine="Log(\"HttpUtils2Service (hc_ResponseError): job c";
anywheresoftware.b4a.keywords.Common.LogImpl("112517383","HttpUtils2Service (hc_ResponseError): job completed multiple times - "+BA.NumberToString(_taskid),0);
//BA.debugLineNum = 117;BA.debugLine="Return";
if (true) return "";
};
//BA.debugLineNum = 119;BA.debugLine="job.Response = Response";
_job._response /*anywheresoftware.b4h.okhttp.OkHttpClientWrapper.OkHttpResponse*/ = _response;
//BA.debugLineNum = 120;BA.debugLine="If Response.ErrorResponse <> \"\" Then";
if ((_response.getErrorResponse()).equals("") == false) {
//BA.debugLineNum = 121;BA.debugLine="CompleteJob(TaskId, False, Response.ErrorRespons";
_completejob(_taskid,anywheresoftware.b4a.keywords.Common.False,_response.getErrorResponse());
}else {
//BA.debugLineNum = 123;BA.debugLine="CompleteJob(TaskId, False, Reason)";
_completejob(_taskid,anywheresoftware.b4a.keywords.Common.False,_reason);
};
//BA.debugLineNum = 125;BA.debugLine="End Sub";
return "";
}
public static String _hc_responsesuccess(anywheresoftware.b4h.okhttp.OkHttpClientWrapper.OkHttpResponse _response,int _taskid) throws Exception{
dbcheck.keymon.lat.httpjob _job = null;
anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper _out = null;
//BA.debugLineNum = 86;BA.debugLine="Sub hc_ResponseSuccess (Response As OkHttpResponse";
//BA.debugLineNum = 87;BA.debugLine="Dim job As HttpJob = TaskIdToJob.Get(TaskId)";
_job = (dbcheck.keymon.lat.httpjob)(_taskidtojob.Get((Object)(_taskid)));
//BA.debugLineNum = 88;BA.debugLine="If job = Null Then";
if (_job== null) {
//BA.debugLineNum = 89;BA.debugLine="Log(\"HttpUtils2Service (hc_ResponseSuccess): job";
anywheresoftware.b4a.keywords.Common.LogImpl("112386307","HttpUtils2Service (hc_ResponseSuccess): job completed multiple times - "+BA.NumberToString(_taskid),0);
//BA.debugLineNum = 90;BA.debugLine="Return";
if (true) return "";
};
//BA.debugLineNum = 92;BA.debugLine="job.Response = Response";
_job._response /*anywheresoftware.b4h.okhttp.OkHttpClientWrapper.OkHttpResponse*/ = _response;
//BA.debugLineNum = 93;BA.debugLine="Dim out As OutputStream = File.OpenOutput(TempFol";
_out = new anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper();
_out = anywheresoftware.b4a.keywords.Common.File.OpenOutput(_tempfolder,BA.NumberToString(_taskid),anywheresoftware.b4a.keywords.Common.False);
//BA.debugLineNum = 95;BA.debugLine="job.Out = out";
_job._out /*anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper*/ = _out;
//BA.debugLineNum = 97;BA.debugLine="Response.GetAsynchronously(\"response\", out , _";
_response.GetAsynchronously(processBA,"response",(java.io.OutputStream)(_out.getObject()),anywheresoftware.b4a.keywords.Common.True,_taskid);
//BA.debugLineNum = 99;BA.debugLine="End Sub";
return "";
}
public static String _process_globals() throws Exception{
//BA.debugLineNum = 2;BA.debugLine="Sub Process_Globals";
//BA.debugLineNum = 5;BA.debugLine="Public hc As OkHttpClient";
_hc = new anywheresoftware.b4h.okhttp.OkHttpClientWrapper();
//BA.debugLineNum = 9;BA.debugLine="Public TaskIdToJob As Map";
_taskidtojob = new anywheresoftware.b4a.objects.collections.Map();
//BA.debugLineNum = 19;BA.debugLine="Public TempFolder As String";
_tempfolder = "";
//BA.debugLineNum = 23;BA.debugLine="Private taskCounter As Int";
_taskcounter = 0;
//BA.debugLineNum = 25;BA.debugLine="End Sub";
return "";
}
public static String _response_streamfinish(boolean _success,int _taskid) throws Exception{
//BA.debugLineNum = 101;BA.debugLine="Private Sub Response_StreamFinish (Success As Bool";
//BA.debugLineNum = 102;BA.debugLine="If Success Then";
if (_success) {
//BA.debugLineNum = 103;BA.debugLine="CompleteJob(TaskId, Success, \"\")";
_completejob(_taskid,_success,"");
}else {
//BA.debugLineNum = 105;BA.debugLine="CompleteJob(TaskId, Success, LastException.Messa";
_completejob(_taskid,_success,anywheresoftware.b4a.keywords.Common.LastException(processBA).getMessage());
};
//BA.debugLineNum = 107;BA.debugLine="End Sub";
return "";
}
public static String _service_create() throws Exception{
//BA.debugLineNum = 27;BA.debugLine="Sub Service_Create";
//BA.debugLineNum = 29;BA.debugLine="TempFolder = File.DirInternalCache";
_tempfolder = anywheresoftware.b4a.keywords.Common.File.getDirInternalCache();
//BA.debugLineNum = 30;BA.debugLine="Try";
try { //BA.debugLineNum = 31;BA.debugLine="File.WriteString(TempFolder, \"~test.test\", \"test";
anywheresoftware.b4a.keywords.Common.File.WriteString(_tempfolder,"~test.test","test");
//BA.debugLineNum = 32;BA.debugLine="File.Delete(TempFolder, \"~test.test\")";
anywheresoftware.b4a.keywords.Common.File.Delete(_tempfolder,"~test.test");
}
catch (Exception e6) {
processBA.setLastException(e6); //BA.debugLineNum = 34;BA.debugLine="Log(LastException)";
anywheresoftware.b4a.keywords.Common.LogImpl("112124167",BA.ObjectToString(anywheresoftware.b4a.keywords.Common.LastException(processBA)),0);
//BA.debugLineNum = 35;BA.debugLine="Log(\"Switching to File.DirInternal\")";
anywheresoftware.b4a.keywords.Common.LogImpl("112124168","Switching to File.DirInternal",0);
//BA.debugLineNum = 36;BA.debugLine="TempFolder = File.DirInternal";
_tempfolder = anywheresoftware.b4a.keywords.Common.File.getDirInternal();
};
//BA.debugLineNum = 41;BA.debugLine="If hc.IsInitialized = False Then";
if (_hc.IsInitialized()==anywheresoftware.b4a.keywords.Common.False) {
//BA.debugLineNum = 46;BA.debugLine="hc.Initialize(\"hc\")";
_hc.Initialize("hc");
};
//BA.debugLineNum = 54;BA.debugLine="TaskIdToJob.Initialize";
_taskidtojob.Initialize();
//BA.debugLineNum = 56;BA.debugLine="End Sub";
return "";
}
public static String _service_destroy() throws Exception{
//BA.debugLineNum = 62;BA.debugLine="Sub Service_Destroy";
//BA.debugLineNum = 64;BA.debugLine="End Sub";
return "";
}
public static String _service_start(anywheresoftware.b4a.objects.IntentWrapper _startingintent) throws Exception{
//BA.debugLineNum = 58;BA.debugLine="Sub Service_Start (StartingIntent As Intent)";
//BA.debugLineNum = 59;BA.debugLine="Service.StopAutomaticForeground";
mostCurrent._service.StopAutomaticForeground();
//BA.debugLineNum = 60;BA.debugLine="End Sub";
return "";
}
public static String _submitjob(dbcheck.keymon.lat.httpjob _job) throws Exception{
int _taskid = 0;
//BA.debugLineNum = 68;BA.debugLine="Public Sub SubmitJob(job As HttpJob)";
//BA.debugLineNum = 69;BA.debugLine="If TaskIdToJob.IsInitialized = False Then Service";
if (_taskidtojob.IsInitialized()==anywheresoftware.b4a.keywords.Common.False) {
_service_create();};
//BA.debugLineNum = 73;BA.debugLine="taskCounter = taskCounter + 1";
_taskcounter = (int) (_taskcounter+1);
//BA.debugLineNum = 74;BA.debugLine="Dim TaskId As Int = taskCounter";
_taskid = _taskcounter;
//BA.debugLineNum = 76;BA.debugLine="TaskIdToJob.Put(TaskId, job)";
_taskidtojob.Put((Object)(_taskid),(Object)(_job));
//BA.debugLineNum = 77;BA.debugLine="If job.Username <> \"\" And job.Password <> \"\" Then";
if ((_job._username /*String*/ ).equals("") == false && (_job._password /*String*/ ).equals("") == false) {
//BA.debugLineNum = 78;BA.debugLine="hc.ExecuteCredentials(job.GetRequest, TaskId, jo";
_hc.ExecuteCredentials(processBA,_job._getrequest /*anywheresoftware.b4h.okhttp.OkHttpClientWrapper.OkHttpRequest*/ (),_taskid,_job._username /*String*/ ,_job._password /*String*/ );
}else {
//BA.debugLineNum = 80;BA.debugLine="hc.Execute(job.GetRequest, TaskId)";
_hc.Execute(processBA,_job._getrequest /*anywheresoftware.b4h.okhttp.OkHttpClientWrapper.OkHttpRequest*/ (),_taskid);
};
//BA.debugLineNum = 82;BA.debugLine="End Sub";
return "";
}
}

View File

@@ -0,0 +1,440 @@
package dbcheck.keymon.lat;
import anywheresoftware.b4a.B4AMenuItem;
import android.app.Activity;
import android.os.Bundle;
import anywheresoftware.b4a.BA;
import anywheresoftware.b4a.BALayout;
import anywheresoftware.b4a.B4AActivity;
import anywheresoftware.b4a.ObjectWrapper;
import anywheresoftware.b4a.objects.ActivityWrapper;
import java.lang.reflect.InvocationTargetException;
import anywheresoftware.b4a.B4AUncaughtException;
import anywheresoftware.b4a.debug.*;
import java.lang.ref.WeakReference;
public class main extends Activity implements B4AActivity{
public static main mostCurrent;
static boolean afterFirstLayout;
static boolean isFirst = true;
private static boolean processGlobalsRun = false;
BALayout layout;
public static BA processBA;
BA activityBA;
ActivityWrapper _activity;
java.util.ArrayList<B4AMenuItem> menuItems;
public static final boolean fullScreen = false;
public static final boolean includeTitle = true;
public static WeakReference<Activity> previousOne;
public static boolean dontPause;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mostCurrent = this;
if (processBA == null) {
processBA = new BA(this.getApplicationContext(), null, null, "dbcheck.keymon.lat", "dbcheck.keymon.lat.main");
processBA.loadHtSubs(this.getClass());
float deviceScale = getApplicationContext().getResources().getDisplayMetrics().density;
BALayout.setDeviceScale(deviceScale);
}
else if (previousOne != null) {
Activity p = previousOne.get();
if (p != null && p != this) {
BA.LogInfo("Killing previous instance (main).");
p.finish();
}
}
processBA.setActivityPaused(true);
processBA.runHook("oncreate", this, null);
if (!includeTitle) {
this.getWindow().requestFeature(android.view.Window.FEATURE_NO_TITLE);
}
if (fullScreen) {
getWindow().setFlags(android.view.WindowManager.LayoutParams.FLAG_FULLSCREEN,
android.view.WindowManager.LayoutParams.FLAG_FULLSCREEN);
}
processBA.sharedProcessBA.activityBA = null;
layout = new BALayout(this);
setContentView(layout);
afterFirstLayout = false;
WaitForLayout wl = new WaitForLayout();
if (anywheresoftware.b4a.objects.ServiceHelper.StarterHelper.startFromActivity(this, processBA, wl, false))
BA.handler.postDelayed(wl, 5);
}
static class WaitForLayout implements Runnable {
public void run() {
if (afterFirstLayout)
return;
if (mostCurrent == null)
return;
if (mostCurrent.layout.getWidth() == 0) {
BA.handler.postDelayed(this, 5);
return;
}
mostCurrent.layout.getLayoutParams().height = mostCurrent.layout.getHeight();
mostCurrent.layout.getLayoutParams().width = mostCurrent.layout.getWidth();
afterFirstLayout = true;
mostCurrent.afterFirstLayout();
}
}
private void afterFirstLayout() {
if (this != mostCurrent)
return;
activityBA = new BA(this, layout, processBA, "dbcheck.keymon.lat", "dbcheck.keymon.lat.main");
processBA.sharedProcessBA.activityBA = new java.lang.ref.WeakReference<BA>(activityBA);
anywheresoftware.b4a.objects.ViewWrapper.lastId = 0;
_activity = new ActivityWrapper(activityBA, "activity");
anywheresoftware.b4a.Msgbox.isDismissing = false;
if (BA.isShellModeRuntimeCheck(processBA)) {
if (isFirst)
processBA.raiseEvent2(null, true, "SHELL", false);
processBA.raiseEvent2(null, true, "CREATE", true, "dbcheck.keymon.lat.main", processBA, activityBA, _activity, anywheresoftware.b4a.keywords.Common.Density, mostCurrent);
_activity.reinitializeForShell(activityBA, "activity");
}
initializeProcessGlobals();
initializeGlobals();
BA.LogInfo("** Activity (main) Create " + (isFirst ? "(first time)" : "") + " **");
processBA.raiseEvent2(null, true, "activity_create", false, isFirst);
isFirst = false;
if (this != mostCurrent)
return;
processBA.setActivityPaused(false);
BA.LogInfo("** Activity (main) Resume **");
processBA.raiseEvent(null, "activity_resume");
if (android.os.Build.VERSION.SDK_INT >= 11) {
try {
android.app.Activity.class.getMethod("invalidateOptionsMenu").invoke(this,(Object[]) null);
} catch (Exception e) {
e.printStackTrace();
}
}
}
public void addMenuItem(B4AMenuItem item) {
if (menuItems == null)
menuItems = new java.util.ArrayList<B4AMenuItem>();
menuItems.add(item);
}
@Override
public boolean onCreateOptionsMenu(android.view.Menu menu) {
super.onCreateOptionsMenu(menu);
try {
if (processBA.subExists("activity_actionbarhomeclick")) {
Class.forName("android.app.ActionBar").getMethod("setHomeButtonEnabled", boolean.class).invoke(
getClass().getMethod("getActionBar").invoke(this), true);
}
} catch (Exception e) {
e.printStackTrace();
}
if (processBA.runHook("oncreateoptionsmenu", this, new Object[] {menu}))
return true;
if (menuItems == null)
return false;
for (B4AMenuItem bmi : menuItems) {
android.view.MenuItem mi = menu.add(bmi.title);
if (bmi.drawable != null)
mi.setIcon(bmi.drawable);
if (android.os.Build.VERSION.SDK_INT >= 11) {
try {
if (bmi.addToBar) {
android.view.MenuItem.class.getMethod("setShowAsAction", int.class).invoke(mi, 1);
}
} catch (Exception e) {
e.printStackTrace();
}
}
mi.setOnMenuItemClickListener(new B4AMenuItemsClickListener(bmi.eventName.toLowerCase(BA.cul)));
}
return true;
}
@Override
public boolean onOptionsItemSelected(android.view.MenuItem item) {
if (item.getItemId() == 16908332) {
processBA.raiseEvent(null, "activity_actionbarhomeclick");
return true;
}
else
return super.onOptionsItemSelected(item);
}
@Override
public boolean onPrepareOptionsMenu(android.view.Menu menu) {
super.onPrepareOptionsMenu(menu);
processBA.runHook("onprepareoptionsmenu", this, new Object[] {menu});
return true;
}
protected void onStart() {
super.onStart();
processBA.runHook("onstart", this, null);
}
protected void onStop() {
super.onStop();
processBA.runHook("onstop", this, null);
}
public void onWindowFocusChanged(boolean hasFocus) {
super.onWindowFocusChanged(hasFocus);
if (processBA.subExists("activity_windowfocuschanged"))
processBA.raiseEvent2(null, true, "activity_windowfocuschanged", false, hasFocus);
}
private class B4AMenuItemsClickListener implements android.view.MenuItem.OnMenuItemClickListener {
private final String eventName;
public B4AMenuItemsClickListener(String eventName) {
this.eventName = eventName;
}
public boolean onMenuItemClick(android.view.MenuItem item) {
processBA.raiseEventFromUI(item.getTitle(), eventName + "_click");
return true;
}
}
public static Class<?> getObject() {
return main.class;
}
private Boolean onKeySubExist = null;
private Boolean onKeyUpSubExist = null;
@Override
public boolean onKeyDown(int keyCode, android.view.KeyEvent event) {
if (processBA.runHook("onkeydown", this, new Object[] {keyCode, event}))
return true;
if (onKeySubExist == null)
onKeySubExist = processBA.subExists("activity_keypress");
if (onKeySubExist) {
if (keyCode == anywheresoftware.b4a.keywords.constants.KeyCodes.KEYCODE_BACK &&
android.os.Build.VERSION.SDK_INT >= 18) {
HandleKeyDelayed hk = new HandleKeyDelayed();
hk.kc = keyCode;
BA.handler.post(hk);
return true;
}
else {
boolean res = new HandleKeyDelayed().runDirectly(keyCode);
if (res)
return true;
}
}
return super.onKeyDown(keyCode, event);
}
private class HandleKeyDelayed implements Runnable {
int kc;
public void run() {
runDirectly(kc);
}
public boolean runDirectly(int keyCode) {
Boolean res = (Boolean)processBA.raiseEvent2(_activity, false, "activity_keypress", false, keyCode);
if (res == null || res == true) {
return true;
}
else if (keyCode == anywheresoftware.b4a.keywords.constants.KeyCodes.KEYCODE_BACK) {
finish();
return true;
}
return false;
}
}
@Override
public boolean onKeyUp(int keyCode, android.view.KeyEvent event) {
if (processBA.runHook("onkeyup", this, new Object[] {keyCode, event}))
return true;
if (onKeyUpSubExist == null)
onKeyUpSubExist = processBA.subExists("activity_keyup");
if (onKeyUpSubExist) {
Boolean res = (Boolean)processBA.raiseEvent2(_activity, false, "activity_keyup", false, keyCode);
if (res == null || res == true)
return true;
}
return super.onKeyUp(keyCode, event);
}
@Override
public void onNewIntent(android.content.Intent intent) {
super.onNewIntent(intent);
this.setIntent(intent);
processBA.runHook("onnewintent", this, new Object[] {intent});
}
@Override
public void onPause() {
super.onPause();
if (_activity == null)
return;
if (this != mostCurrent)
return;
anywheresoftware.b4a.Msgbox.dismiss(true);
if (!dontPause)
BA.LogInfo("** Activity (main) Pause, UserClosed = " + activityBA.activity.isFinishing() + " **");
else
BA.LogInfo("** Activity (main) Pause event (activity is not paused). **");
if (mostCurrent != null)
processBA.raiseEvent2(_activity, true, "activity_pause", false, activityBA.activity.isFinishing());
if (!dontPause) {
processBA.setActivityPaused(true);
mostCurrent = null;
}
if (!activityBA.activity.isFinishing())
previousOne = new WeakReference<Activity>(this);
anywheresoftware.b4a.Msgbox.isDismissing = false;
processBA.runHook("onpause", this, null);
}
@Override
public void onDestroy() {
super.onDestroy();
previousOne = null;
processBA.runHook("ondestroy", this, null);
}
@Override
public void onResume() {
super.onResume();
mostCurrent = this;
anywheresoftware.b4a.Msgbox.isDismissing = false;
if (activityBA != null) { //will be null during activity create (which waits for AfterLayout).
ResumeMessage rm = new ResumeMessage(mostCurrent);
BA.handler.post(rm);
}
processBA.runHook("onresume", this, null);
}
private static class ResumeMessage implements Runnable {
private final WeakReference<Activity> activity;
public ResumeMessage(Activity activity) {
this.activity = new WeakReference<Activity>(activity);
}
public void run() {
main mc = mostCurrent;
if (mc == null || mc != activity.get())
return;
processBA.setActivityPaused(false);
BA.LogInfo("** Activity (main) Resume **");
if (mc != mostCurrent)
return;
processBA.raiseEvent(mc._activity, "activity_resume", (Object[])null);
}
}
@Override
protected void onActivityResult(int requestCode, int resultCode,
android.content.Intent data) {
processBA.onActivityResult(requestCode, resultCode, data);
processBA.runHook("onactivityresult", this, new Object[] {requestCode, resultCode});
}
private static void initializeGlobals() {
processBA.raiseEvent2(null, true, "globals", false, (Object[])null);
}
public void onRequestPermissionsResult(int requestCode,
String permissions[], int[] grantResults) {
for (int i = 0;i < permissions.length;i++) {
Object[] o = new Object[] {permissions[i], grantResults[i] == 0};
processBA.raiseEventFromDifferentThread(null,null, 0, "activity_permissionresult", true, o);
}
}
public anywheresoftware.b4a.keywords.Common __c = null;
public static boolean _actionbarhomeclicked = false;
public dbcheck.keymon.lat.starter _starter = null;
public dbcheck.keymon.lat.subs _subs = null;
public dbcheck.keymon.lat.b4xpages _b4xpages = null;
public dbcheck.keymon.lat.b4xcollections _b4xcollections = null;
public dbcheck.keymon.lat.httputils2service _httputils2service = null;
public static boolean isAnyActivityVisible() {
boolean vis = false;
vis = vis | (main.mostCurrent != null);
return vis;}
public static String _activity_actionbarhomeclick() throws Exception{
//BA.debugLineNum = 33;BA.debugLine="Sub Activity_ActionBarHomeClick";
//BA.debugLineNum = 34;BA.debugLine="ActionBarHomeClicked = True";
_actionbarhomeclicked = anywheresoftware.b4a.keywords.Common.True;
//BA.debugLineNum = 35;BA.debugLine="B4XPages.Delegate.Activity_ActionBarHomeClick";
mostCurrent._b4xpages._delegate /*dbcheck.keymon.lat.b4xpagesdelegator*/ ._activity_actionbarhomeclick /*String*/ ();
//BA.debugLineNum = 36;BA.debugLine="ActionBarHomeClicked = False";
_actionbarhomeclicked = anywheresoftware.b4a.keywords.Common.False;
//BA.debugLineNum = 37;BA.debugLine="End Sub";
return "";
}
public static String _activity_create(boolean _firsttime) throws Exception{
dbcheck.keymon.lat.b4xpagesmanager _pm = null;
//BA.debugLineNum = 25;BA.debugLine="Sub Activity_Create(FirstTime As Boolean)";
//BA.debugLineNum = 26;BA.debugLine="Dim pm As B4XPagesManager";
_pm = new dbcheck.keymon.lat.b4xpagesmanager();
//BA.debugLineNum = 27;BA.debugLine="pm.Initialize(Activity)";
_pm._initialize /*String*/ (mostCurrent.activityBA,mostCurrent._activity);
//BA.debugLineNum = 28;BA.debugLine="End Sub";
return "";
}
public static boolean _activity_keypress(int _keycode) throws Exception{
//BA.debugLineNum = 39;BA.debugLine="Sub Activity_KeyPress (KeyCode As Int) As Boolean";
//BA.debugLineNum = 40;BA.debugLine="Return B4XPages.Delegate.Activity_KeyPress(KeyCod";
if (true) return mostCurrent._b4xpages._delegate /*dbcheck.keymon.lat.b4xpagesdelegator*/ ._activity_keypress /*boolean*/ (_keycode);
//BA.debugLineNum = 41;BA.debugLine="End Sub";
return false;
}
public static String _activity_pause(boolean _userclosed) throws Exception{
//BA.debugLineNum = 47;BA.debugLine="Sub Activity_Pause (UserClosed As Boolean)";
//BA.debugLineNum = 48;BA.debugLine="B4XPages.Delegate.Activity_Pause";
mostCurrent._b4xpages._delegate /*dbcheck.keymon.lat.b4xpagesdelegator*/ ._activity_pause /*String*/ ();
//BA.debugLineNum = 49;BA.debugLine="End Sub";
return "";
}
public static String _activity_permissionresult(String _permission,boolean _result) throws Exception{
//BA.debugLineNum = 51;BA.debugLine="Sub Activity_PermissionResult (Permission As Strin";
//BA.debugLineNum = 52;BA.debugLine="B4XPages.Delegate.Activity_PermissionResult(Permi";
mostCurrent._b4xpages._delegate /*dbcheck.keymon.lat.b4xpagesdelegator*/ ._activity_permissionresult /*String*/ (_permission,_result);
//BA.debugLineNum = 53;BA.debugLine="End Sub";
return "";
}
public static String _activity_resume() throws Exception{
//BA.debugLineNum = 43;BA.debugLine="Sub Activity_Resume";
//BA.debugLineNum = 44;BA.debugLine="B4XPages.Delegate.Activity_Resume";
mostCurrent._b4xpages._delegate /*dbcheck.keymon.lat.b4xpagesdelegator*/ ._activity_resume /*String*/ ();
//BA.debugLineNum = 45;BA.debugLine="End Sub";
return "";
}
public static String _create_menu(Object _menu) throws Exception{
//BA.debugLineNum = 55;BA.debugLine="Sub Create_Menu (Menu As Object)";
//BA.debugLineNum = 56;BA.debugLine="B4XPages.Delegate.Create_Menu(Menu)";
mostCurrent._b4xpages._delegate /*dbcheck.keymon.lat.b4xpagesdelegator*/ ._create_menu /*String*/ (_menu);
//BA.debugLineNum = 57;BA.debugLine="End Sub";
return "";
}
public static String _globals() throws Exception{
//BA.debugLineNum = 21;BA.debugLine="Sub Globals";
//BA.debugLineNum = 23;BA.debugLine="End Sub";
return "";
}
public static void initializeProcessGlobals() {
if (main.processGlobalsRun == false) {
main.processGlobalsRun = true;
try {
main._process_globals();
starter._process_globals();
subs._process_globals();
b4xpages._process_globals();
b4xcollections._process_globals();
httputils2service._process_globals();
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}public static String _process_globals() throws Exception{
//BA.debugLineNum = 17;BA.debugLine="Sub Process_Globals";
//BA.debugLineNum = 18;BA.debugLine="Public ActionBarHomeClicked As Boolean";
_actionbarhomeclicked = false;
//BA.debugLineNum = 19;BA.debugLine="End Sub";
return "";
}
public boolean _onCreateOptionsMenu(android.view.Menu menu) {
processBA.raiseEvent(null, "create_menu", menu);
return true;
}
}

View File

@@ -0,0 +1,167 @@
package dbcheck.keymon.lat;
import anywheresoftware.b4a.BA;
import anywheresoftware.b4a.objects.ServiceHelper;
import anywheresoftware.b4a.debug.*;
public class starter extends android.app.Service{
public static class starter_BR extends android.content.BroadcastReceiver {
@Override
public void onReceive(android.content.Context context, android.content.Intent intent) {
BA.LogInfo("** Receiver (starter) OnReceive **");
android.content.Intent in = new android.content.Intent(context, starter.class);
if (intent != null)
in.putExtra("b4a_internal_intent", intent);
ServiceHelper.StarterHelper.startServiceFromReceiver (context, in, true, BA.class);
}
}
static starter mostCurrent;
public static BA processBA;
private ServiceHelper _service;
public static Class<?> getObject() {
return starter.class;
}
@Override
public void onCreate() {
super.onCreate();
mostCurrent = this;
if (processBA == null) {
processBA = new BA(this, null, null, "dbcheck.keymon.lat", "dbcheck.keymon.lat.starter");
if (BA.isShellModeRuntimeCheck(processBA)) {
processBA.raiseEvent2(null, true, "SHELL", false);
}
try {
Class.forName(BA.applicationContext.getPackageName() + ".main").getMethod("initializeProcessGlobals").invoke(null, null);
} catch (Exception e) {
throw new RuntimeException(e);
}
processBA.loadHtSubs(this.getClass());
ServiceHelper.init();
}
_service = new ServiceHelper(this);
processBA.service = this;
if (BA.isShellModeRuntimeCheck(processBA)) {
processBA.raiseEvent2(null, true, "CREATE", true, "dbcheck.keymon.lat.starter", processBA, _service, anywheresoftware.b4a.keywords.Common.Density);
}
if (!true && ServiceHelper.StarterHelper.startFromServiceCreate(processBA, false) == false) {
}
else {
processBA.setActivityPaused(false);
BA.LogInfo("*** Service (starter) Create ***");
processBA.raiseEvent(null, "service_create");
}
processBA.runHook("oncreate", this, null);
if (true) {
ServiceHelper.StarterHelper.runWaitForLayouts();
}
}
@Override
public void onStart(android.content.Intent intent, int startId) {
onStartCommand(intent, 0, 0);
}
@Override
public int onStartCommand(final android.content.Intent intent, int flags, int startId) {
if (ServiceHelper.StarterHelper.onStartCommand(processBA, new Runnable() {
public void run() {
handleStart(intent);
}}))
;
else {
ServiceHelper.StarterHelper.addWaitForLayout (new Runnable() {
public void run() {
processBA.setActivityPaused(false);
BA.LogInfo("** Service (starter) Create **");
processBA.raiseEvent(null, "service_create");
handleStart(intent);
ServiceHelper.StarterHelper.removeWaitForLayout();
}
});
}
processBA.runHook("onstartcommand", this, new Object[] {intent, flags, startId});
return android.app.Service.START_NOT_STICKY;
}
public void onTaskRemoved(android.content.Intent rootIntent) {
super.onTaskRemoved(rootIntent);
if (true)
processBA.raiseEvent(null, "service_taskremoved");
}
private void handleStart(android.content.Intent intent) {
BA.LogInfo("** Service (starter) Start **");
java.lang.reflect.Method startEvent = processBA.htSubs.get("service_start");
if (startEvent != null) {
if (startEvent.getParameterTypes().length > 0) {
anywheresoftware.b4a.objects.IntentWrapper iw = ServiceHelper.StarterHelper.handleStartIntent(intent, _service, processBA);
processBA.raiseEvent(null, "service_start", iw);
}
else {
processBA.raiseEvent(null, "service_start");
}
}
}
@Override
public void onDestroy() {
super.onDestroy();
if (true) {
BA.LogInfo("** Service (starter) Destroy (ignored)**");
}
else {
BA.LogInfo("** Service (starter) Destroy **");
processBA.raiseEvent(null, "service_destroy");
processBA.service = null;
mostCurrent = null;
processBA.setActivityPaused(true);
processBA.runHook("ondestroy", this, null);
}
}
@Override
public android.os.IBinder onBind(android.content.Intent intent) {
return null;
}public anywheresoftware.b4a.keywords.Common __c = null;
public dbcheck.keymon.lat.main _main = null;
public dbcheck.keymon.lat.subs _subs = null;
public dbcheck.keymon.lat.b4xpages _b4xpages = null;
public dbcheck.keymon.lat.b4xcollections _b4xcollections = null;
public dbcheck.keymon.lat.httputils2service _httputils2service = null;
public static boolean _application_error(anywheresoftware.b4a.objects.B4AException _error,String _stacktrace) throws Exception{
//BA.debugLineNum = 27;BA.debugLine="Sub Application_Error (Error As Exception, StackTr";
//BA.debugLineNum = 28;BA.debugLine="Return True";
if (true) return anywheresoftware.b4a.keywords.Common.True;
//BA.debugLineNum = 29;BA.debugLine="End Sub";
return false;
}
public static String _process_globals() throws Exception{
//BA.debugLineNum = 6;BA.debugLine="Sub Process_Globals";
//BA.debugLineNum = 10;BA.debugLine="End Sub";
return "";
}
public static String _service_create() throws Exception{
//BA.debugLineNum = 12;BA.debugLine="Sub Service_Create";
//BA.debugLineNum = 16;BA.debugLine="End Sub";
return "";
}
public static String _service_destroy() throws Exception{
//BA.debugLineNum = 31;BA.debugLine="Sub Service_Destroy";
//BA.debugLineNum = 33;BA.debugLine="End Sub";
return "";
}
public static String _service_start(anywheresoftware.b4a.objects.IntentWrapper _startingintent) throws Exception{
//BA.debugLineNum = 18;BA.debugLine="Sub Service_Start (StartingIntent As Intent)";
//BA.debugLineNum = 19;BA.debugLine="Service.StopAutomaticForeground 'Starter service";
mostCurrent._service.StopAutomaticForeground();
//BA.debugLineNum = 20;BA.debugLine="End Sub";
return "";
}
public static String _service_taskremoved() throws Exception{
//BA.debugLineNum = 22;BA.debugLine="Sub Service_TaskRemoved";
//BA.debugLineNum = 24;BA.debugLine="End Sub";
return "";
}
}

View File

@@ -0,0 +1,230 @@
package dbcheck.keymon.lat;
import anywheresoftware.b4a.BA;
import anywheresoftware.b4a.BALayout;
import anywheresoftware.b4a.debug.*;
public class subs {
private static subs mostCurrent = new subs();
public static Object getObject() {
throw new RuntimeException("Code module does not support this method.");
}
public anywheresoftware.b4a.keywords.Common __c = null;
public static anywheresoftware.b4a.objects.StringUtils _su = null;
public dbcheck.keymon.lat.main _main = null;
public dbcheck.keymon.lat.starter _starter = null;
public dbcheck.keymon.lat.b4xpages _b4xpages = null;
public dbcheck.keymon.lat.b4xcollections _b4xcollections = null;
public dbcheck.keymon.lat.httputils2service _httputils2service = null;
public static String _centraedittext(anywheresoftware.b4a.BA _ba,anywheresoftware.b4a.objects.EditTextWrapper _elemento,int _anchoelementosuperior) throws Exception{
//BA.debugLineNum = 103;BA.debugLine="Sub centraEditText(elemento As EditText, anchoElem";
//BA.debugLineNum = 104;BA.debugLine="elemento.Left = Round(anchoElementoSuperior/2)-(e";
_elemento.setLeft((int) (anywheresoftware.b4a.keywords.Common.Round(_anchoelementosuperior/(double)2)-(_elemento.getWidth()/(double)2)));
//BA.debugLineNum = 105;BA.debugLine="End Sub";
return "";
}
public static String _centraetiqueta(anywheresoftware.b4a.BA _ba,anywheresoftware.b4a.objects.LabelWrapper _elemento,int _anchoelementosuperior) throws Exception{
//BA.debugLineNum = 94;BA.debugLine="Sub centraEtiqueta(elemento As Label, anchoElement";
//BA.debugLineNum = 95;BA.debugLine="elemento.Left = Round(anchoElementoSuperior/2)-(e";
_elemento.setLeft((int) (anywheresoftware.b4a.keywords.Common.Round(_anchoelementosuperior/(double)2)-(_elemento.getWidth()/(double)2)));
//BA.debugLineNum = 96;BA.debugLine="End Sub";
return "";
}
public static String _centrapanel(anywheresoftware.b4a.BA _ba,anywheresoftware.b4a.objects.PanelWrapper _elemento,int _anchoelementosuperior) throws Exception{
//BA.debugLineNum = 99;BA.debugLine="Sub centraPanel(elemento As Panel, anchoElementoSu";
//BA.debugLineNum = 100;BA.debugLine="elemento.Left = Round(anchoElementoSuperior/2)-(e";
_elemento.setLeft((int) (anywheresoftware.b4a.keywords.Common.Round(_anchoelementosuperior/(double)2)-(_elemento.getWidth()/(double)2)));
//BA.debugLineNum = 101;BA.debugLine="End Sub";
return "";
}
public static String _centraprogressbar(anywheresoftware.b4a.BA _ba,anywheresoftware.b4a.objects.ProgressBarWrapper _elemento,int _anchoelementosuperior) throws Exception{
//BA.debugLineNum = 108;BA.debugLine="Sub centraProgressBar(elemento As ProgressBar, anc";
//BA.debugLineNum = 109;BA.debugLine="elemento.Left = Round(anchoElementoSuperior/2)-(e";
_elemento.setLeft((int) (anywheresoftware.b4a.keywords.Common.Round(_anchoelementosuperior/(double)2)-(_elemento.getWidth()/(double)2)));
//BA.debugLineNum = 110;BA.debugLine="End Sub";
return "";
}
public static String _damediasemana(anywheresoftware.b4a.BA _ba) throws Exception{
String _ds = "";
//BA.debugLineNum = 122;BA.debugLine="Sub dameDiaSemana As String 'ignore";
//BA.debugLineNum = 123;BA.debugLine="Private ds As String = DateTime.GetDayOfWeek(Date";
_ds = BA.NumberToString(anywheresoftware.b4a.keywords.Common.DateTime.GetDayOfWeek(anywheresoftware.b4a.keywords.Common.DateTime.getNow()));
//BA.debugLineNum = 124;BA.debugLine="If ds = \"1\" Then";
if ((_ds).equals("1")) {
//BA.debugLineNum = 125;BA.debugLine="ds = \"DOMINGO\"";
_ds = "DOMINGO";
}else if((_ds).equals("2")) {
//BA.debugLineNum = 127;BA.debugLine="ds = \"LUNES\"";
_ds = "LUNES";
}else if((_ds).equals("3")) {
//BA.debugLineNum = 129;BA.debugLine="ds = \"MARTES\"";
_ds = "MARTES";
}else if((_ds).equals("4")) {
//BA.debugLineNum = 131;BA.debugLine="ds = \"MIERCOLES\"";
_ds = "MIERCOLES";
}else if((_ds).equals("5")) {
//BA.debugLineNum = 133;BA.debugLine="ds = \"JUEVES\"";
_ds = "JUEVES";
}else if((_ds).equals("6")) {
//BA.debugLineNum = 135;BA.debugLine="ds = \"VIERNES\"";
_ds = "VIERNES";
}else {
//BA.debugLineNum = 137;BA.debugLine="ds = \"SABADO\"";
_ds = "SABADO";
};
//BA.debugLineNum = 139;BA.debugLine="Return ds";
if (true) return _ds;
//BA.debugLineNum = 140;BA.debugLine="End Sub";
return "";
}
public static String _fechainiciohoy(anywheresoftware.b4a.BA _ba) throws Exception{
String _origformat = "";
String _h = "";
//BA.debugLineNum = 21;BA.debugLine="Sub fechaInicioHoy As String 'ignore";
//BA.debugLineNum = 22;BA.debugLine="Dim OrigFormat As String = DateTime.DateFormat";
_origformat = anywheresoftware.b4a.keywords.Common.DateTime.getDateFormat();
//BA.debugLineNum = 23;BA.debugLine="DateTime.DateFormat=\"yyMMdd\"";
anywheresoftware.b4a.keywords.Common.DateTime.setDateFormat("yyMMdd");
//BA.debugLineNum = 24;BA.debugLine="Private h As String = DateTime.Date(DateTime.Now";
_h = anywheresoftware.b4a.keywords.Common.DateTime.Date(anywheresoftware.b4a.keywords.Common.DateTime.getNow())+"000000";
//BA.debugLineNum = 25;BA.debugLine="DateTime.DateFormat=OrigFormat 'return to orig";
anywheresoftware.b4a.keywords.Common.DateTime.setDateFormat(_origformat);
//BA.debugLineNum = 27;BA.debugLine="Return h";
if (true) return _h;
//BA.debugLineNum = 28;BA.debugLine="End Sub";
return "";
}
public static String _fechakmt(anywheresoftware.b4a.BA _ba,String _fecha) throws Exception{
String _origformat = "";
String _nuevafecha = "";
//BA.debugLineNum = 10;BA.debugLine="Sub fechaKMT(fecha As String) As String 'ignore";
//BA.debugLineNum = 12;BA.debugLine="Dim OrigFormat As String = DateTime.DateFormat '";
_origformat = anywheresoftware.b4a.keywords.Common.DateTime.getDateFormat();
//BA.debugLineNum = 13;BA.debugLine="DateTime.DateFormat=\"yyMMddHHmmss\"";
anywheresoftware.b4a.keywords.Common.DateTime.setDateFormat("yyMMddHHmmss");
//BA.debugLineNum = 14;BA.debugLine="Dim nuevaFecha As String=DateTime.Date(fecha)";
_nuevafecha = anywheresoftware.b4a.keywords.Common.DateTime.Date((long)(Double.parseDouble(_fecha)));
//BA.debugLineNum = 15;BA.debugLine="DateTime.DateFormat=OrigFormat 'return to orig d";
anywheresoftware.b4a.keywords.Common.DateTime.setDateFormat(_origformat);
//BA.debugLineNum = 17;BA.debugLine="Return nuevaFecha";
if (true) return _nuevafecha;
//BA.debugLineNum = 18;BA.debugLine="End Sub";
return "";
}
public static long _fechakmt2ticks(anywheresoftware.b4a.BA _ba,String _fkmt) throws Exception{
String _partefecha = "";
String _partehora = "";
String _origformat = "";
long _ticks = 0L;
//BA.debugLineNum = 56;BA.debugLine="Sub fechaKMT2Ticks(fKMT As String) As Long 'ignore";
//BA.debugLineNum = 57;BA.debugLine="Try";
try { //BA.debugLineNum = 58;BA.debugLine="If fKMT.Length = 12 Then";
if (_fkmt.length()==12) {
//BA.debugLineNum = 59;BA.debugLine="Private parteFecha As String = fKMT.SubString2(";
_partefecha = _fkmt.substring((int) (0),(int) (6));
//BA.debugLineNum = 60;BA.debugLine="Private parteHora As String = fKMT.SubString(6)";
_partehora = _fkmt.substring((int) (6));
//BA.debugLineNum = 61;BA.debugLine="Private OrigFormat As String = DateTime.DateFor";
_origformat = anywheresoftware.b4a.keywords.Common.DateTime.getDateFormat();
//BA.debugLineNum = 62;BA.debugLine="DateTime.DateFormat=\"yyMMdd\"";
anywheresoftware.b4a.keywords.Common.DateTime.setDateFormat("yyMMdd");
//BA.debugLineNum = 63;BA.debugLine="DateTime.TimeFormat=\"HHmmss\"";
anywheresoftware.b4a.keywords.Common.DateTime.setTimeFormat("HHmmss");
//BA.debugLineNum = 64;BA.debugLine="Private ticks As Long = DateTime.DateTimeParse(";
_ticks = anywheresoftware.b4a.keywords.Common.DateTime.DateTimeParse(_partefecha,_partehora);
//BA.debugLineNum = 66;BA.debugLine="DateTime.DateFormat=OrigFormat 'return to orig";
anywheresoftware.b4a.keywords.Common.DateTime.setDateFormat(_origformat);
//BA.debugLineNum = 67;BA.debugLine="Return ticks";
if (true) return _ticks;
}else {
//BA.debugLineNum = 69;BA.debugLine="Log(\"Formato de fecha incorrecto, debe de ser '";
anywheresoftware.b4a.keywords.Common.LogImpl("116842765","Formato de fecha incorrecto, debe de ser 'yyMMddHHmmss', no '"+_fkmt+"' largo="+BA.NumberToString(_fkmt.length()),0);
//BA.debugLineNum = 70;BA.debugLine="Return 0";
if (true) return (long) (0);
};
}
catch (Exception e16) {
(_ba.processBA == null ? _ba : _ba.processBA).setLastException(e16); //BA.debugLineNum = 73;BA.debugLine="Log(LastException)";
anywheresoftware.b4a.keywords.Common.LogImpl("116842769",BA.ObjectToString(anywheresoftware.b4a.keywords.Common.LastException(_ba)),0);
//BA.debugLineNum = 75;BA.debugLine="Return 0";
if (true) return (long) (0);
};
//BA.debugLineNum = 77;BA.debugLine="End Sub";
return 0L;
}
public static boolean _masdexxmins(anywheresoftware.b4a.BA _ba,int _hora,int _mins) throws Exception{
//BA.debugLineNum = 31;BA.debugLine="Sub masDeXXMins(hora As Int, mins As Int) As Boole";
//BA.debugLineNum = 32;BA.debugLine="If (hora + mins * DateTime.TicksPerMinute) < Date";
if ((_hora+_mins*anywheresoftware.b4a.keywords.Common.DateTime.TicksPerMinute)<anywheresoftware.b4a.keywords.Common.DateTime.getNow()) {
//BA.debugLineNum = 33;BA.debugLine="Return True";
if (true) return anywheresoftware.b4a.keywords.Common.True;
}else {
//BA.debugLineNum = 35;BA.debugLine="Return False";
if (true) return anywheresoftware.b4a.keywords.Common.False;
};
//BA.debugLineNum = 37;BA.debugLine="End Sub";
return false;
}
public static boolean _masdexxminskmt(anywheresoftware.b4a.BA _ba,String _hora,int _mins) throws Exception{
//BA.debugLineNum = 40;BA.debugLine="Sub masDeXXMinsKMT(hora As String, mins As Int) As";
//BA.debugLineNum = 41;BA.debugLine="Try";
try { //BA.debugLineNum = 43;BA.debugLine="If fechaKMT2Ticks(hora) + mins * DateTime.TicksP";
if (_fechakmt2ticks(_ba,_hora)+_mins*anywheresoftware.b4a.keywords.Common.DateTime.TicksPerMinute<anywheresoftware.b4a.keywords.Common.DateTime.getNow()) {
//BA.debugLineNum = 45;BA.debugLine="Return True";
if (true) return anywheresoftware.b4a.keywords.Common.True;
}else {
//BA.debugLineNum = 48;BA.debugLine="Return False";
if (true) return anywheresoftware.b4a.keywords.Common.False;
};
}
catch (Exception e8) {
(_ba.processBA == null ? _ba : _ba.processBA).setLastException(e8); //BA.debugLineNum = 51;BA.debugLine="Log(LastException)";
anywheresoftware.b4a.keywords.Common.LogImpl("116187403",BA.ObjectToString(anywheresoftware.b4a.keywords.Common.LastException(_ba)),0);
};
//BA.debugLineNum = 53;BA.debugLine="End Sub";
return false;
}
public static String _panelanchoalto(anywheresoftware.b4a.BA _ba,anywheresoftware.b4a.objects.PanelWrapper _p,int _w,int _h) throws Exception{
//BA.debugLineNum = 113;BA.debugLine="Sub panelAnchoAlto(p As Panel, w As Int, h As Int)";
//BA.debugLineNum = 115;BA.debugLine="p.Top = 0";
_p.setTop((int) (0));
//BA.debugLineNum = 116;BA.debugLine="p.Left = 0";
_p.setLeft((int) (0));
//BA.debugLineNum = 117;BA.debugLine="p.Width = w";
_p.setWidth(_w);
//BA.debugLineNum = 118;BA.debugLine="p.Height = h";
_p.setHeight(_h);
//BA.debugLineNum = 119;BA.debugLine="End Sub";
return "";
}
public static String _paneloculto(anywheresoftware.b4a.BA _ba,anywheresoftware.b4a.objects.PanelWrapper _panel) throws Exception{
//BA.debugLineNum = 88;BA.debugLine="Sub panelOculto(panel As Panel) 'ignore";
//BA.debugLineNum = 89;BA.debugLine="panel.SendToBack";
_panel.SendToBack();
//BA.debugLineNum = 90;BA.debugLine="panel.Visible = False";
_panel.setVisible(anywheresoftware.b4a.keywords.Common.False);
//BA.debugLineNum = 91;BA.debugLine="End Sub";
return "";
}
public static String _panelvisible(anywheresoftware.b4a.BA _ba,anywheresoftware.b4a.objects.PanelWrapper _panel,int _top,int _left) throws Exception{
//BA.debugLineNum = 80;BA.debugLine="Sub panelVisible(panel As Panel, top As Int, left";
//BA.debugLineNum = 81;BA.debugLine="panel.BringToFront";
_panel.BringToFront();
//BA.debugLineNum = 82;BA.debugLine="panel.Visible = True";
_panel.setVisible(anywheresoftware.b4a.keywords.Common.True);
//BA.debugLineNum = 83;BA.debugLine="panel.Top = top";
_panel.setTop(_top);
//BA.debugLineNum = 84;BA.debugLine="panel.Left = left";
_panel.setLeft(_left);
//BA.debugLineNum = 85;BA.debugLine="End Sub";
return "";
}
public static String _process_globals() throws Exception{
//BA.debugLineNum = 3;BA.debugLine="Sub Process_Globals";
//BA.debugLineNum = 6;BA.debugLine="Private su As StringUtils 'Usa la libreria Stri";
_su = new anywheresoftware.b4a.objects.StringUtils();
//BA.debugLineNum = 7;BA.debugLine="End Sub";
return "";
}
}