// ----------------------------------------------------------------------------
// File: DiskInfo.hpp
//
// Author: Jürgen Schober
//
// Copyright: ©1997 Point Design Software
//
// Date: 27.1.1997
//
// Description: DiskInfo Class
//              Used to handle Icon Information (ToolTypes)
//
// ----------------------------------------------------------------------------


#ifndef CPP_DISKINFO_H
#define CPP_DISKINFO_H

#include <clib/exec_protos.h>
#include <clib/icon_protos.h>
#include <clib/dos_protos.h>

#include <pragmas/exec_pragmas.h>
#include <pragmas/icon_pragmas.h>
#include <pragmas/dos_pragmas.h>

#include <exec/libraries.h>
#include <workbench/workbench.h>
#include <workbench/startup.h>

#include <exec/types.h>
#include <exec/memory.h>

#include <dos/dos.h>

#include <stdio.h>
#include <string.h>

#define DI_NO_ERROR  0
#define DI_OBJECT_NOT_FOUND 1
// has to be defined
#define DI_ERROR_UNKNOWN (-1)

class aDiskInfo
{
private:
	struct DiskObject *m_DiskObject;
	char *m_Name;
	char *m_Result;
	long m_Error;
public:
	aDiskInfo(char *Name);
	aDiskInfo(WBStartup *argmsg);
	aDiskInfo(BPTR lock);
	~aDiskInfo();

	char* Get(char *Token);
	BOOL Set(char *Token,char *val);
	BOOL Set(char *Token,long val);
	int GetError() { return m_Error; };

	operator BOOL()
	{
		return (BOOL)m_DiskObject;
	}
};


#endif // DISK_INFO_HPP

