Esempio n. 1
0
public virtual void commit(global::com.codename1.cloud.CloudResponse n1){
//XMLVM_BEGIN_WRAPPER[com.codename1.cloud.CloudStorage: void commit(com.codename1.cloud.CloudResponse)]
    global::org.xmlvm._nElement _r0;
    global::System.Object _r0_o = null;
    global::org.xmlvm._nElement _r1;
    global::System.Object _r1_o = null;
    global::org.xmlvm._nElement _r2;
    global::System.Object _r2_o = null;
    global::org.xmlvm._nElement _r3;
    global::System.Object _r3_o = null;
    global::org.xmlvm._nExceptionAdapter _ex = null;
    _r2_o = this;
    _r3_o = n1;
    _r1_o = ((global::com.codename1.cloud.CloudStorage) _r2_o)._fstorageQueue;
    _r1.i = ((global::java.util.Vector) _r1_o).size();
    if (_r1.i <= 0) goto label49;
    _r1_o = global::com.codename1.cloud.CloudPersona.getCurrentPersona();
    _r1_o = ((global::com.codename1.cloud.CloudPersona) _r1_o).getToken();
    if (_r1_o != null) goto label21;
    global::com.codename1.cloud.CloudPersona.createAnonymous();
    label21:;
    _r0_o = new global::com.codename1.cloud.CloudStorage_2StorageRequest();
    ((global::com.codename1.cloud.CloudStorage_2StorageRequest) _r0_o).@this((global::com.codename1.cloud.CloudStorage) _r2_o);
    ((global::com.codename1.cloud.CloudStorage_2StorageRequest) _r0_o)._fresponse = (global::com.codename1.cloud.CloudResponse) _r3_o;
    // Value=multipart/form-data
    _r1_o = new global::java.lang.String();
    ((global::java.lang.String)_r1_o).@this(new global::org.xmlvm._nArrayAdapter<char>(new char[] {unchecked((char) unchecked((uint)109)), unchecked((char) unchecked((uint) 117)), unchecked((char) unchecked((uint) 108)), unchecked((char) unchecked((uint) 116)), unchecked((char) unchecked((uint) 105)), unchecked((char) unchecked((uint) 112)), unchecked((char) unchecked((uint) 97)), unchecked((char) unchecked((uint) 114)), unchecked((char) unchecked((uint) 116)), unchecked((char) unchecked((uint) 47)), unchecked((char) unchecked((uint) 102)), unchecked((char) unchecked((uint) 111)), unchecked((char) unchecked((uint) 114)), unchecked((char) unchecked((uint) 109)), unchecked((char) unchecked((uint) 45)), unchecked((char) unchecked((uint) 100)), unchecked((char) unchecked((uint) 97)), unchecked((char) unchecked((uint) 116)), unchecked((char) unchecked((uint) 97))}));
    ((global::com.codename1.cloud.CloudStorage_2StorageRequest) _r0_o).setContentType((global::java.lang.String) _r1_o);
    // Value=https://codename-one.appspot.com/objStoreCommit
    _r1_o = new global::java.lang.String();
    ((global::java.lang.String)_r1_o).@this(new global::org.xmlvm._nArrayAdapter<char>(new char[] {unchecked((char) unchecked((uint)104)), unchecked((char) unchecked((uint) 116)), unchecked((char) unchecked((uint) 116)), unchecked((char) unchecked((uint) 112)), unchecked((char) unchecked((uint) 115)), unchecked((char) unchecked((uint) 58)), unchecked((char) unchecked((uint) 47)), unchecked((char) unchecked((uint) 47)), unchecked((char) unchecked((uint) 99)), unchecked((char) unchecked((uint) 111)), unchecked((char) unchecked((uint) 100)), unchecked((char) unchecked((uint) 101)), unchecked((char) unchecked((uint) 110)), unchecked((char) unchecked((uint) 97)), unchecked((char) unchecked((uint) 109)), unchecked((char) unchecked((uint) 101)), unchecked((char) unchecked((uint) 45)), unchecked((char) unchecked((uint) 111)), unchecked((char) unchecked((uint) 110)), unchecked((char) unchecked((uint) 101)), unchecked((char) unchecked((uint) 46)), unchecked((char) unchecked((uint) 97)), unchecked((char) unchecked((uint) 112)), unchecked((char) unchecked((uint) 112)), unchecked((char) unchecked((uint) 115)), unchecked((char) unchecked((uint) 112)), unchecked((char) unchecked((uint) 111)), unchecked((char) unchecked((uint) 116)), unchecked((char) unchecked((uint) 46)), unchecked((char) unchecked((uint) 99)), unchecked((char) unchecked((uint) 111)), unchecked((char) unchecked((uint) 109)), unchecked((char) unchecked((uint) 47)), unchecked((char) unchecked((uint) 111)), unchecked((char) unchecked((uint) 98)), unchecked((char) unchecked((uint) 106)), unchecked((char) unchecked((uint) 83)), unchecked((char) unchecked((uint) 116)), unchecked((char) unchecked((uint) 111)), unchecked((char) unchecked((uint) 114)), unchecked((char) unchecked((uint) 101)), unchecked((char) unchecked((uint) 67)), unchecked((char) unchecked((uint) 111)), unchecked((char) unchecked((uint) 109)), unchecked((char) unchecked((uint) 109)), unchecked((char) unchecked((uint) 105)), unchecked((char) unchecked((uint) 116))}));
    ((global::com.codename1.cloud.CloudStorage_2StorageRequest) _r0_o).setUrl((global::java.lang.String) _r1_o);
    _r1.i = 1;
    ((global::com.codename1.cloud.CloudStorage_2StorageRequest) _r0_o).setPost(0!=_r1.i);
    _r1_o = global::com.codename1.io.NetworkManager.getInstance();
    ((global::com.codename1.io.NetworkManager) _r1_o).addToQueue((global::com.codename1.io.ConnectionRequest) _r0_o);
    label49:;
    return;
//XMLVM_END_WRAPPER[com.codename1.cloud.CloudStorage: void commit(com.codename1.cloud.CloudResponse)]
}
Esempio n. 2
0
public virtual int commit(){
//XMLVM_BEGIN_WRAPPER[com.codename1.cloud.CloudStorage: int commit()]
    global::org.xmlvm._nElement _r0;
    global::System.Object _r0_o = null;
    global::org.xmlvm._nElement _r1;
    global::System.Object _r1_o = null;
    global::org.xmlvm._nElement _r2;
    global::System.Object _r2_o = null;
    global::org.xmlvm._nElement _r3;
    global::System.Object _r3_o = null;
    global::org.xmlvm._nElement _r4;
    global::System.Object _r4_o = null;
    global::org.xmlvm._nExceptionAdapter _ex = null;
    _r4_o = this;
    global::System.Threading.Monitor.Enter(_r4_o);
    try {
    _r2_o = ((global::com.codename1.cloud.CloudStorage) _r4_o)._fstorageQueue;
    _r2.i = ((global::java.util.Vector) _r2_o).size();
    if (_r2.i <= 0) goto label71;
    _r2_o = global::com.codename1.cloud.CloudPersona.getCurrentPersona();
    _r2_o = ((global::com.codename1.cloud.CloudPersona) _r2_o).getToken();
    if (_r2_o != null) goto label22;
    global::com.codename1.cloud.CloudPersona.createAnonymous();
    }
    catch (global::System.Exception e) {
 global::org.xmlvm._nExceptionAdapter ex = e as global::org.xmlvm._nExceptionAdapter ?? new global::org.xmlvm._nExceptionAdapter(e.ToString(), e.ToJavaException());
        global::System.Object _java_exception = ex.getJavaException();
        if (_java_exception is global::java.lang.Object) {
            _ex = ex;
            goto label73;
        }
        throw ex;
    } // end catch
    label22:;
    try {
    _r1_o = new global::com.codename1.cloud.CloudStorage_2StorageRequest();
    ((global::com.codename1.cloud.CloudStorage_2StorageRequest) _r1_o).@this((global::com.codename1.cloud.CloudStorage) _r4_o);
    // Value=multipart/form-data
    _r2_o = new global::java.lang.String();
    ((global::java.lang.String)_r2_o).@this(new global::org.xmlvm._nArrayAdapter<char>(new char[] {unchecked((char) unchecked((uint)109)), unchecked((char) unchecked((uint) 117)), unchecked((char) unchecked((uint) 108)), unchecked((char) unchecked((uint) 116)), unchecked((char) unchecked((uint) 105)), unchecked((char) unchecked((uint) 112)), unchecked((char) unchecked((uint) 97)), unchecked((char) unchecked((uint) 114)), unchecked((char) unchecked((uint) 116)), unchecked((char) unchecked((uint) 47)), unchecked((char) unchecked((uint) 102)), unchecked((char) unchecked((uint) 111)), unchecked((char) unchecked((uint) 114)), unchecked((char) unchecked((uint) 109)), unchecked((char) unchecked((uint) 45)), unchecked((char) unchecked((uint) 100)), unchecked((char) unchecked((uint) 97)), unchecked((char) unchecked((uint) 116)), unchecked((char) unchecked((uint) 97))}));
    ((global::com.codename1.cloud.CloudStorage_2StorageRequest) _r1_o).setContentType((global::java.lang.String) _r2_o);
    // Value=https://codename-one.appspot.com/objStoreCommit
    _r2_o = new global::java.lang.String();
    ((global::java.lang.String)_r2_o).@this(new global::org.xmlvm._nArrayAdapter<char>(new char[] {unchecked((char) unchecked((uint)104)), unchecked((char) unchecked((uint) 116)), unchecked((char) unchecked((uint) 116)), unchecked((char) unchecked((uint) 112)), unchecked((char) unchecked((uint) 115)), unchecked((char) unchecked((uint) 58)), unchecked((char) unchecked((uint) 47)), unchecked((char) unchecked((uint) 47)), unchecked((char) unchecked((uint) 99)), unchecked((char) unchecked((uint) 111)), unchecked((char) unchecked((uint) 100)), unchecked((char) unchecked((uint) 101)), unchecked((char) unchecked((uint) 110)), unchecked((char) unchecked((uint) 97)), unchecked((char) unchecked((uint) 109)), unchecked((char) unchecked((uint) 101)), unchecked((char) unchecked((uint) 45)), unchecked((char) unchecked((uint) 111)), unchecked((char) unchecked((uint) 110)), unchecked((char) unchecked((uint) 101)), unchecked((char) unchecked((uint) 46)), unchecked((char) unchecked((uint) 97)), unchecked((char) unchecked((uint) 112)), unchecked((char) unchecked((uint) 112)), unchecked((char) unchecked((uint) 115)), unchecked((char) unchecked((uint) 112)), unchecked((char) unchecked((uint) 111)), unchecked((char) unchecked((uint) 116)), unchecked((char) unchecked((uint) 46)), unchecked((char) unchecked((uint) 99)), unchecked((char) unchecked((uint) 111)), unchecked((char) unchecked((uint) 109)), unchecked((char) unchecked((uint) 47)), unchecked((char) unchecked((uint) 111)), unchecked((char) unchecked((uint) 98)), unchecked((char) unchecked((uint) 106)), unchecked((char) unchecked((uint) 83)), unchecked((char) unchecked((uint) 116)), unchecked((char) unchecked((uint) 111)), unchecked((char) unchecked((uint) 114)), unchecked((char) unchecked((uint) 101)), unchecked((char) unchecked((uint) 67)), unchecked((char) unchecked((uint) 111)), unchecked((char) unchecked((uint) 109)), unchecked((char) unchecked((uint) 109)), unchecked((char) unchecked((uint) 105)), unchecked((char) unchecked((uint) 116))}));
    ((global::com.codename1.cloud.CloudStorage_2StorageRequest) _r1_o).setUrl((global::java.lang.String) _r2_o);
    _r2.i = 1;
    ((global::com.codename1.cloud.CloudStorage_2StorageRequest) _r1_o).setPost(0!=_r2.i);
    _r2_o = global::com.codename1.io.NetworkManager.getInstance();
    ((global::com.codename1.io.NetworkManager) _r2_o).addToQueueAndWait((global::com.codename1.io.ConnectionRequest) _r1_o);
    _r0.i = ((global::com.codename1.cloud.CloudStorage_2StorageRequest) _r1_o).getReturnCode();
    if (_r0.i != 0) goto label68;
    _r2_o = ((global::com.codename1.cloud.CloudStorage) _r4_o)._fstorageQueue;
    ((global::java.util.Vector) _r2_o).clear();
    _r2_o = global::com.codename1.io.Storage.getInstance();
    // Value=CN1StorageQueue
    _r3_o = new global::java.lang.String();
    ((global::java.lang.String)_r3_o).@this(new global::org.xmlvm._nArrayAdapter<char>(new char[] {unchecked((char) unchecked((uint)67)), unchecked((char) unchecked((uint) 78)), unchecked((char) unchecked((uint) 49)), unchecked((char) unchecked((uint) 83)), unchecked((char) unchecked((uint) 116)), unchecked((char) unchecked((uint) 111)), unchecked((char) unchecked((uint) 114)), unchecked((char) unchecked((uint) 97)), unchecked((char) unchecked((uint) 103)), unchecked((char) unchecked((uint) 101)), unchecked((char) unchecked((uint) 81)), unchecked((char) unchecked((uint) 117)), unchecked((char) unchecked((uint) 101)), unchecked((char) unchecked((uint) 117)), unchecked((char) unchecked((uint) 101))}));
    ((global::com.codename1.io.Storage) _r2_o).deleteStorageFile((global::java.lang.String) _r3_o);
    }
    catch (global::System.Exception e) {
 global::org.xmlvm._nExceptionAdapter ex = e as global::org.xmlvm._nExceptionAdapter ?? new global::org.xmlvm._nExceptionAdapter(e.ToString(), e.ToJavaException());
        global::System.Object _java_exception = ex.getJavaException();
        if (_java_exception is global::java.lang.Object) {
            _ex = ex;
            goto label73;
        }
        throw ex;
    } // end catch
    label68:;
    _r2.i = _r0.i;
    label69:;
    global::System.Threading.Monitor.Exit(_r4_o);
    return _r2.i;
    label71:;
    _r2.i = 4;
    goto label69;
    label73:;
    _r2_o = _ex.getJavaException();
    _ex = null;
    global::System.Threading.Monitor.Exit(_r4_o);
    throw new global::org.xmlvm._nExceptionAdapter((global::java.lang.Throwable) _r2_o);
//XMLVM_END_WRAPPER[com.codename1.cloud.CloudStorage: int commit()]
}