/* PR-QWK - QWK Importer for UMS
 * Copyright (C) 1998 J.Ross Nicoll
 *
 * 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.
 */

#define FORMAT_BUFFER_SIZE 1024
#define MAX_SITE_LENGTH 8
#define CONTROL_NAME "CONTROL.DAT"

struct Conference {
	struct Node Node;
	ULONG ConfNumber;
};

struct ControlData {
	STRPTR BBSName;
	STRPTR CityState;
	STRPTR PhoneNumber;
	STRPTR Sysop;

	STRPTR DoorReg;
	STRPTR CreationDate;
	STRPTR Username;
	STRPTR QmailMenu;
	STRPTR zero;

	UWORD TotalMsgs;
	UWORD TotalConfs;

	UWORD LowConference;					/* The lowest conference number */
	UWORD HighConference;				/* The highest conference number */

	struct List ConfList;				/* List of conferences */
	struct Conference *Conferences;	/* Pointer to array of conferences */

	STRPTR WelcomeFile;
	STRPTR NewsFile;
	STRPTR GoodbyeFile;
};

struct QWKMessage {
	UBYTE Status;
	ULONG MsgNum;
	TEXT Date[9];
	TEXT Time[6];
	TEXT From[26];
	TEXT To[26];
	TEXT Subject[26];
	TEXT Password[13];
	ULONG ReferenceNum;
	ULONG Blocks;
	UBYTE Flag;
	UWORD ConferenceNum;
	UWORD LogicalMsgNum;
	UBYTE Tagline;

	struct Conference *Conference;
};

struct UMSMessage {
	ULONG MsgNum;
	STRPTR Date;
	STRPTR Time;
	STRPTR From;
	STRPTR To;
	STRPTR Subject;
	ULONG Blocks;
	UWORD ConferenceNum;

	STRPTR Conference;
};

#include <dos/dos.h>
#include <intuition/intuition.h>
#include <libraries/ums.h>
#include "global.h"
