/*
  File: include/ioutils/Interface_Console.h
  Description: interface for console server
  Part of the Mantis project
  (c) 2002 Lycos Inc.
  
  This file is distributed for the sole purpose of allowing you to write
  software to interface with Sonique 2 and other Mantis programs. It is
  not to be modified or used for any other purpose without written
  authorization.

  If you redistribute this file, it must be in the original package
  complete with all other files provided, including the usage agreement.

  Do not remove this notice.
*/

#ifndef _INTERFACE_CONSOLE_H_
#define _INTERFACE_CONSOLE_H_

#include "Callback.h"
#include "mgeneric.h"

typedef enum { 
    console_none, 
    console_debug, 
    console_info, 
    console_logtext, 
    console_commandtext, 
    console_commandresult, 
    console_warning, 
    console_error 
} ConsoleMessageType;

class MConsoleServer : public MGeneric
{
public:
	virtual void __stdcall		RegisterCallback( CallbackClient* pCBC, bool bAdd = true )			= 0;
	virtual void __stdcall		Output( ConsoleMessageType eType, const wchar_t* wcString	, bool bCastUpdate = true	 )	= 0;
	virtual void __stdcall		FPrint( ConsoleMessageType eType, const wchar_t* wcFormat, ... )	= 0;
	virtual void __stdcall		GetStats( uint32& nLastLine, uint32& nNumLineBuffers )				= 0;
	virtual WString __stdcall	GetLine( uint32 nLine, ConsoleMessageType* pType = NULL )			= 0;

	virtual void __stdcall		EnableDiskLogging( bool bEnable )									= 0;
};

#define MSG_CONSOLE_UPDATE 0x10001

#endif//_INTERFACE_CONSOLE_H_
