#ifndef _PROTINTER_H_
#define _PROTINTER_H_

#include <pthread.h>

class Protocol;

enum Code { Prot_List, Prot_StrList, Prot_CopyTo, Prot_CopyFrom, Prot_Init, Prot_RmDir, Prot_Cd, Prot_Pwd, Prot_MkDir, Prot_Rename, Prot_Rm};

struct ProtocolCmd
{
	ProtocolCmd(int type, Protocol *prot, void *arg1 = 0, void *arg2 = 0, void *arg3 = 0, void *arg4 = 0);

	Protocol	*prot;
	int		code;
	bool		done;
	void	*parg1;
	void	*parg2;
	void	*parg3;
	void	*parg4;
	void	*out;
};

inline ProtocolCmd::ProtocolCmd(int type, Protocol *Prot, void *arg1, void *arg2, void *arg3, void *arg4)
	: prot(Prot), code(type), done(FALSE), parg1(arg1), parg2(arg2), parg3(arg3), parg4(arg4)
{}

#endif
