* This file is part of MoLe.
* MoLe is free software: you can distribute it and/or modify it
* under the term of the GNU General Public License as published by
* This file is part of MoLe.
* MoLe is free software: you can distribute it and/or modify it
* under the term of the GNU General Public License as published by
import net.ktnx.mobileledger.json.API;
import net.ktnx.mobileledger.json.ApiNotSupportedException;
import net.ktnx.mobileledger.json.Gateway;
import net.ktnx.mobileledger.model.LedgerTransaction;
import net.ktnx.mobileledger.model.LedgerTransactionAccount;
import net.ktnx.mobileledger.json.API;
import net.ktnx.mobileledger.json.ApiNotSupportedException;
import net.ktnx.mobileledger.json.Gateway;
import net.ktnx.mobileledger.model.LedgerTransaction;
import net.ktnx.mobileledger.model.LedgerTransactionAccount;
import net.ktnx.mobileledger.utils.NetworkUtil;
import net.ktnx.mobileledger.utils.SimpleDate;
import net.ktnx.mobileledger.utils.UrlEncodedFormData;
import net.ktnx.mobileledger.utils.NetworkUtil;
import net.ktnx.mobileledger.utils.SimpleDate;
import net.ktnx.mobileledger.utils.UrlEncodedFormData;
import static net.ktnx.mobileledger.utils.Logger.debug;
/* TODO: get rid of the custom session/cookie and auth code?
import static net.ktnx.mobileledger.utils.Logger.debug;
/* TODO: get rid of the custom session/cookie and auth code?
- public SendTransactionTask(TaskCallback callback, MobileLedgerProfile profile,
- boolean simulate) {
+ public SendTransactionTask(TaskCallback callback, Profile profile,
+ LedgerTransaction transaction, boolean simulate) {
private void sendOK(API apiVersion) throws IOException, ApiNotSupportedException {
HttpURLConnection http = NetworkUtil.prepareConnection(mProfile, "add");
http.setRequestMethod("PUT");
private void sendOK(API apiVersion) throws IOException, ApiNotSupportedException {
HttpURLConnection http = NetworkUtil.prepareConnection(mProfile, "add");
http.setRequestMethod("PUT");