// Path: src/com/bridgewalkerapp/androidclient/apidata/WSStatus.java
// @JsonIgnoreProperties(ignoreUnknown=true)
// public class WSStatus extends WebsocketReply {
// 	private long usdBalance;
// 	private long btcIn;
// 	private String primaryBTCAddress;
// 	private List<PendingTransaction> pendingTxs;
// 	private boolean exchangeAvailable;
// 	private long exchangeRate;
// 
// 	@JsonProperty("usd_balance")
// 	public long getUsdBalance() {
// 		return usdBalance;
// 	}
// 
// 	public void setUsdBalance(long usdBalance) {
// 		this.usdBalance = usdBalance;
// 	}
// 
// 	@JsonProperty("btc_in")
// 	public long getBtcIn() {
// 		return btcIn;
// 	}
// 
// 	public void setBtcIn(long btcIn) {
// 		this.btcIn = btcIn;
// 	}
// 
// 	@JsonProperty("primary_btc_address")
// 	public String getPrimaryBTCAddress() {
// 		return primaryBTCAddress;
// 	}
// 
// 	public void setPrimaryBTCAddress(String primaryBTCAddress) {
// 		this.primaryBTCAddress = primaryBTCAddress;
// 	}
// 
// 	@JsonProperty("pending_txs")
// 	public List<PendingTransaction> getPendingTxs() {
// 		return pendingTxs;
// 	}
// 
// 	public void setPendingTxs(List<PendingTransaction> pendingTxs) {
// 		this.pendingTxs = pendingTxs;
// 	}
// 	
// 	public boolean isExchangeAvailable() {
// 		return exchangeAvailable;
// 	}
// 	
// 	@JsonProperty("exchange_available")
// 	public void setExchangeAvailable(boolean exchangeAvailable) {
// 		this.exchangeAvailable = exchangeAvailable;
// 	}
// 	
// 	public long getExchangeRate() {
// 		return exchangeRate;
// 	}
// 	
// 	@JsonProperty("exchange_rate")
// 	public void setExchangeRate(long exchangeRate) {
// 		this.exchangeRate = exchangeRate;
// 	}
// 
// 	@Override
// 	public int getReplyType() {
// 		return TYPE_WS_STATUS;
// 	}
// 
// 	@Override
// 	public boolean isReplyTo(WebsocketRequest request) {
// 		return request.getRequestType() == WebsocketRequest.TYPE_REQUEST_STATUS;
// 	}
// }
// 
// Path: src/com/bridgewalkerapp/androidclient/apidata/subcomponents/PendingTransaction.java
// public class PendingTransaction {
// 	private long amount;
// 	private PendingReason reason;
// 	
// 	@JsonProperty("amount")
// 	public long getAmount() {
// 		return amount;
// 	}
// 	
// 	public void setAmount(long amount) {
// 		this.amount = amount;
// 	}
// 	
// 	@JsonProperty("reason")
// 	public PendingReason getReason() {
// 		return reason;
// 	}
// 	
// 	public void setReason(PendingReason reason) {
// 		this.reason = reason;
// 	}
// }
// 
// Path: src/com/bridgewalkerapp/androidclient/data/ReplyAndRunnable.java
// public class ReplyAndRunnable {
// 	private WebsocketReply reply;
// 	private ParameterizedRunnable runnable;
// 	
// 	public ReplyAndRunnable(WebsocketReply reply, ParameterizedRunnable runnable) {
// 		this.reply = reply;
// 		this.runnable = runnable;
// 	}
// 
// 	public WebsocketReply getReply() {
// 		return reply;
// 	}
// 	
// 	public ParameterizedRunnable getRunnable() {
// 		return runnable;
// 	}
// }


import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
import android.os.Message;
import android.util.Log;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.ProgressBar;
import android.widget.TextView;
import com.actionbarsherlock.app.SherlockFragment;
import com.bridgewalkerapp.androidclient.apidata.WSStatus;
import com.bridgewalkerapp.androidclient.apidata.subcomponents.PendingTransaction;
import com.bridgewalkerapp.androidclient.data.ReplyAndRunnable;
package com.bridgewalkerapp.androidclient;




abstract public class BalanceFragment extends SherlockFragment implements BitcoinFragment {
	private static final String TAG = "com.bridgewalkerapp";
	private static final boolean DEBUG_LOG = false;
	public static enum Rounding { ROUND_DOWN, NO_ROUNDING }; 
	
	protected ProgressBar progressBar = null;
	protected LinearLayout contentLinearLayout = null;
	protected TextView usdBalanceTextView = null;
	protected TextView exchangeRateTextView = null;
	protected TextView pendingEventsTextView = null;
	
	protected BitcoinFragmentHost parentActivity = null;
		
	protected WSStatus currentStatus = null;
	
	@Override
	public void onStart() {
		super.onStart();
		this.parentActivity = (BitcoinFragmentHost)getActivity();
		this.parentActivity.registerFragment(this);
		
		requestStatus();	// always request current status, in case updates
							// happened, while the fragment was not displayed
		displayStatus();	// if we have status, display that already
	}
	
	@Override
	public boolean handleMessage(Message msg) {
		switch (msg.what) {
			case BackendService.MSG_EXECUTE_RUNNABLE:
// Path: src/com/bridgewalkerapp/androidclient/apidata/WSStatus.java
// @JsonIgnoreProperties(ignoreUnknown=true)
// public class WSStatus extends WebsocketReply {
// 	private long usdBalance;
// 	private long btcIn;
// 	private String primaryBTCAddress;
// 	private List<PendingTransaction> pendingTxs;
// 	private boolean exchangeAvailable;
// 	private long exchangeRate;
// 
// 	@JsonProperty("usd_balance")
// 	public long getUsdBalance() {
// 		return usdBalance;
// 	}
// 
// 	public void setUsdBalance(long usdBalance) {
// 		this.usdBalance = usdBalance;
// 	}
// 
// 	@JsonProperty("btc_in")
// 	public long getBtcIn() {
// 		return btcIn;
// 	}
// 
// 	public void setBtcIn(long btcIn) {
// 		this.btcIn = btcIn;
// 	}
// 
// 	@JsonProperty("primary_btc_address")
// 	public String getPrimaryBTCAddress() {
// 		return primaryBTCAddress;
// 	}
// 
// 	public void setPrimaryBTCAddress(String primaryBTCAddress) {
// 		this.primaryBTCAddress = primaryBTCAddress;
// 	}
// 
// 	@JsonProperty("pending_txs")
// 	public List<PendingTransaction> getPendingTxs() {
// 		return pendingTxs;
// 	}
// 
// 	public void setPendingTxs(List<PendingTransaction> pendingTxs) {
// 		this.pendingTxs = pendingTxs;
// 	}
// 	
// 	public boolean isExchangeAvailable() {
// 		return exchangeAvailable;
// 	}
// 	
// 	@JsonProperty("exchange_available")
// 	public void setExchangeAvailable(boolean exchangeAvailable) {
// 		this.exchangeAvailable = exchangeAvailable;
// 	}
// 	
// 	public long getExchangeRate() {
// 		return exchangeRate;
// 	}
// 	
// 	@JsonProperty("exchange_rate")
// 	public void setExchangeRate(long exchangeRate) {
// 		this.exchangeRate = exchangeRate;
// 	}
// 
// 	@Override
// 	public int getReplyType() {
// 		return TYPE_WS_STATUS;
// 	}
// 
// 	@Override
// 	public boolean isReplyTo(WebsocketRequest request) {
// 		return request.getRequestType() == WebsocketRequest.TYPE_REQUEST_STATUS;
// 	}
// }
// 
// Path: src/com/bridgewalkerapp/androidclient/apidata/subcomponents/PendingTransaction.java
// public class PendingTransaction {
// 	private long amount;
// 	private PendingReason reason;
// 	
// 	@JsonProperty("amount")
// 	public long getAmount() {
// 		return amount;
// 	}
// 	
// 	public void setAmount(long amount) {
// 		this.amount = amount;
// 	}
// 	
// 	@JsonProperty("reason")
// 	public PendingReason getReason() {
// 		return reason;
// 	}
// 	
// 	public void setReason(PendingReason reason) {
// 		this.reason = reason;
// 	}
// }
// 
// Path: src/com/bridgewalkerapp/androidclient/data/ReplyAndRunnable.java
// public class ReplyAndRunnable {
// 	private WebsocketReply reply;
// 	private ParameterizedRunnable runnable;
// 	
// 	public ReplyAndRunnable(WebsocketReply reply, ParameterizedRunnable runnable) {
// 		this.reply = reply;
// 		this.runnable = runnable;
// 	}
// 
// 	public WebsocketReply getReply() {
// 		return reply;
// 	}
// 	
// 	public ParameterizedRunnable getRunnable() {
// 		return runnable;
// 	}
// }


// Path: src/com/bridgewalkerapp/androidclient/BalanceFragment.java
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
import android.os.Message;
import android.util.Log;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.ProgressBar;
import android.widget.TextView;
import com.actionbarsherlock.app.SherlockFragment;
import com.bridgewalkerapp.androidclient.apidata.WSStatus;
import com.bridgewalkerapp.androidclient.apidata.subcomponents.PendingTransaction;
import com.bridgewalkerapp.androidclient.data.ReplyAndRunnable;

package com.bridgewalkerapp.androidclient;




abstract public class BalanceFragment extends SherlockFragment implements BitcoinFragment {
	private static final String TAG = "com.bridgewalkerapp";
	private static final boolean DEBUG_LOG = false;
	public static enum Rounding { ROUND_DOWN, NO_ROUNDING }; 
	
	protected ProgressBar progressBar = null;
	protected LinearLayout contentLinearLayout = null;
	protected TextView usdBalanceTextView = null;
	protected TextView exchangeRateTextView = null;
	protected TextView pendingEventsTextView = null;
	
	protected BitcoinFragmentHost parentActivity = null;
		
	protected WSStatus currentStatus = null;
	
	@Override
	public void onStart() {
		super.onStart();
		this.parentActivity = (BitcoinFragmentHost)getActivity();
		this.parentActivity.registerFragment(this);
		
		requestStatus();	// always request current status, in case updates
							// happened, while the fragment was not displayed
		displayStatus();	// if we have status, display that already
	}
	
	@Override
	public boolean handleMessage(Message msg) {
		switch (msg.what) {
			case BackendService.MSG_EXECUTE_RUNNABLE:
				ReplyAndRunnable randr = (ReplyAndRunnable)msg.obj;