package epson.epsonconnectregistration;

public class SoapAUTHENTICATIONDataInfo extends SoapConfigDataParser {
    private static final String GROUP_ID = "AUTHENTICATIONDataInfo";
    static final String ID_ADMINLOCK = "AdminLock";
    static final String ID_MACADDRESS = "MACAddress";
    static final String ID_VERSION = "Version";
    static final String STATUS_DISABLE = "0";
    static final String STATUS_ENABLE = "1";
    private static final String TAG = "SoapAUTHENTICATIONDataInfo";

    public SoapAUTHENTICATIONDataInfo() {
        super(GROUP_ID);
    }

    /**
     * 是否是admin模式
     *
     * @return
     */
    public boolean isAdminMode() {
        EPLog.i(TAG, "Enter isAdminMode");
        if (!getRetVal()) {
            EPLog.i(TAG, "return = " + getRetVal());
            return false;
        } else if (STATUS_ENABLE.equals(getValue(ID_ADMINLOCK))) {
            return true;
        } else {
            return false;
        }
    }
}
