// Path: src/org/sagemath/droid/constants/ExecutionState.java
// public class ExecutionState {
//     public static final int ERROR = 0x000300;
//     public static final int IDLE = 0x000301;
//     public static final int BUSY = 0x000302;
//     public static final int DEAD = 0x000303;
//     public static final int OK = 0x000304;
// }


import org.sagemath.droid.constants.ExecutionState;
package org.sagemath.droid.models.gson;


/**
 * Reply corresponding to server status.
 *
 * @author Nikhil Peter Raj
 */
public class StatusReply extends BaseReply {

    private StatusContent content;

    public StatusReply() {
        super();
    }

    public String toString() {
        return gson.toJson(this);
    }

    public StatusContent getContent() {
        return content;
    }

    public static class StatusContent {

        public static final String STR_BUSY = "busy";
        public static final String STR_IDLE = "idle";
        public static final String STR_DEAD = "dead";
        public static final String STR_OK = "ok"; //Not sure if this status exists

        private String execution_state;

        public String getStringExecutionState() {
            return execution_state;
        }

        public int getExecutionState() {
            if (execution_state.equalsIgnoreCase(STR_BUSY))
                return ExecutionState.BUSY;
            else if (execution_state.equalsIgnoreCase(STR_IDLE))
// Path: src/org/sagemath/droid/constants/ExecutionState.java
// public class ExecutionState {
//     public static final int ERROR = 0x000300;
//     public static final int IDLE = 0x000301;
//     public static final int BUSY = 0x000302;
//     public static final int DEAD = 0x000303;
//     public static final int OK = 0x000304;
// }


// Path: src/org/sagemath/droid/models/gson/StatusReply.java
import org.sagemath.droid.constants.ExecutionState;

package org.sagemath.droid.models.gson;


/**
 * Reply corresponding to server status.
 *
 * @author Nikhil Peter Raj
 */
public class StatusReply extends BaseReply {

    private StatusContent content;

    public StatusReply() {
        super();
    }

    public String toString() {
        return gson.toJson(this);
    }

    public StatusContent getContent() {
        return content;
    }

    public static class StatusContent {

        public static final String STR_BUSY = "busy";
        public static final String STR_IDLE = "idle";
        public static final String STR_DEAD = "dead";
        public static final String STR_OK = "ok"; //Not sure if this status exists

        private String execution_state;

        public String getStringExecutionState() {
            return execution_state;
        }

        public int getExecutionState() {
            if (execution_state.equalsIgnoreCase(STR_BUSY))
                return ExecutionState.BUSY;
            else if (execution_state.equalsIgnoreCase(STR_IDLE))
                return ExecutionState.IDLE;