/*
Copyright (C) 2005 David Green <green@couchpotato.net>

This file is part of I3J.

I3J is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

I3J is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with I3J; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/

package com.aelfengard.i3;

import java.util.List;

public class MudInfo {

    public static final int MUD_STATE_UP = -1;
    public static final int MUD_STATE_DOWN = 0;

    // These are listed in the spec as examples
    public static final String MUD_TYPE_LP = "LP";
    public static final String MUD_TYPE_MOO = "MOO";

    // These are listed in the spec as "strongly encouraged"
    public static final String OPEN_STATUS_MUDLIB_DEVELOPMENT = "mudlib development";
    public static final String OPEN_STATUS_BETA_TESTING = "beta testing";
    public static final String OPEN_STATUS_OPEN_FOR_PUBLIC = "open for public";
    public static final String OPEN_STATUS_RESTRICTED_ACCESS = "restricted access";

    // Services listed in the spec
    public static final String SERVICE_TYPE_TELL = "tell";
    public static final String SERVICE_TYPE_EMOTE_TO = "emoteto";
    public static final String SERVICE_TYPE_WHO = "who";
    public static final String SERVICE_TYPE_FINGER = "finger";
    public static final String SERVICE_TYPE_LOCATE = "locate";
    public static final String SERVICE_TYPE_CHANNEL = "channel";
    public static final String SERVICE_TYPE_NEWS = "news";
    public static final String SERVICE_TYPE_MAIL = "mail";
    public static final String SERVICE_TYPE_FILE = "file";
    public static final String SERVICE_TYPE_AUTH = "auth";
    public static final String SERVICE_TYPE_UCACHE = "ucache";
    public static final String SERVICE_TYPE_SMTP = "smtp";
    public static final String SERVICE_TYPE_FTP = "ftp";
    public static final String SERVICE_TYPE_NNTP = "nntp";
    public static final String SERVICE_TYPE_HTTP = "http";
    public static final String SERVICE_TYPE_RCP = "rcp";
    public static final String SERVICE_TYPE_AMCP = "amcp";

    private LPCMixed state = new LPCMixed(0); // if > 0, will be down for that many seconds
    private LPCMixed ipAddr = new LPCMixed("");
    private LPCMixed playerPort = new LPCMixed(-1);
    private LPCMixed mudLib = new LPCMixed("");
    private LPCMixed baseMudLib = new LPCMixed("");
    private LPCMixed driver = new LPCMixed("");
    private LPCMixed mudType = new LPCMixed("");
    private LPCMixed openStatus = new LPCMixed("");
    private LPCMixed adminEmail = new LPCMixed("");
    private LPCMixed services = new LPCMixed(null);
    private LPCMixed otherData = new LPCMixed(null);
    
    public MudInfo() {
        // Nothing to do
    }
    
    public MudInfo(List<LPCMixed> args) {
        state = args.get(0);
        ipAddr = args.get(1);
        playerPort = args.get(2);
        mudLib = args.get(5);
        baseMudLib = args.get(6);
        driver = args.get(7);
        mudType = args.get(8);
        openStatus = args.get(9);
        adminEmail = args.get(10);
        services = args.get(11);
        otherData = args.get(12);
    }

    public LPCMixed getAdminEmail() {
        return adminEmail;
    }
    

    public void setAdminEmail(LPCMixed adminEmail) {
        this.adminEmail = adminEmail;
    }
    

    public LPCMixed getBaseMudLib() {
        return baseMudLib;
    }
    

    public void setBaseMudLib(LPCMixed baseMudLib) {
        this.baseMudLib = baseMudLib;
    }
    

    public LPCMixed getDriver() {
        return driver;
    }
    

    public void setDriver(LPCMixed driver) {
        this.driver = driver;
    }
    

    public LPCMixed getIpAddr() {
        return ipAddr;
    }
    

    public void setIpAddr(LPCMixed ipAddr) {
        this.ipAddr = ipAddr;
    }
    

    public LPCMixed getMudLib() {
        return mudLib;
    }
    

    public void setMudLib(LPCMixed mudLib) {
        this.mudLib = mudLib;
    }
    

    public LPCMixed getMudType() {
        return mudType;
    }
    

    public void setMudType(LPCMixed mudType) {
        this.mudType = mudType;
    }
    

    public LPCMixed getOpenStatus() {
        return openStatus;
    }
    

    public void setOpenStatus(LPCMixed openStatus) {
        this.openStatus = openStatus;
    }
    

    public LPCMixed getOtherData() {
        return otherData;
    }
    

    public void setOtherData(LPCMixed otherData) {
        this.otherData = otherData;
    }
    

    public LPCMixed getPlayerPort() {
        return playerPort;
    }
    

    public void setPlayerPort(LPCMixed playerPort) {
        this.playerPort = playerPort;
    }
    

    public LPCMixed getServices() {
        return services;
    }
    

    public void setServices(LPCMixed services) {
        this.services = services;
    }
    

    public LPCMixed getState() {
        return state;
    }
    

    public void setState(LPCMixed state) {
        this.state = state;
    }
    
    
}