// Emacs style mode select -*- C++ -*-
//------------------------------------------------------------------------
//
// Copyright(c) 2001, 2002 Simon Howard
//
// This program 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.
// 
// This program 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 this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
//
//------------------------------------------------------------------------
//
// Basic data types
//
//------------------------------------------------------------------------
#ifndef __TYPES_H__
#define __TYPES_H__
// basic types

typedef struct {
     char *name;
} user_t;

typedef enum {
	STATUS_UNKNOWN, // unknown yet
        STATUS_DOWN,    // not responding to requests
        STATUS_FAULT,   // up, but not responding to requests properly
                        // (eg. connection refused)
        STATUS_UP,      // responding to requests properly
} machinestatus_t;

typedef struct {
	char *hostname;
	enum { 
                MACHINE_UNIX,        // general unix
                MACHINE_LINUX,       // linux
                MACHINE_WIN,         // windows
                MACHINE_CHECKUP,     // general machine - check it is up
                MACHINE_TYPES,
        } type;
	
	int num_users;
	user_t **users;
        machinestatus_t status;

	void *interface_data;
} machine_t;

typedef struct {
     char *name;
     int num_machines;
     machine_t **machines;
} cluster_t;

#endif
