
#ifndef CLIENT_H
#define CLIENT_H

class Client
{
	FILE *inStream, *outStream;
	int socket, verbose;
	int totalKB, oldFreeKB, newFreeKB;
	int CDwasClosed;
	int anonymousUse, copySupport, mp3, verify;
public:
	Client();
	void blank(const char *mode);
	void burnSession(int blankTOC, int closeCD, int simulate,
		int speed, int verify);
	void client(const char *product, const char *version);
	void connect(const char *host, int port);
	int getAnonymousUse() { return anonymousUse; }
	void listSessions();
	void login(const char *id, const char *password);
	void mkdir(const char *name, int mode, int lastModified);
	void newAccount(const char *userID, const char *eMail);
	void newSession(const char *id);
	void noop();
	void openSession(const char *id);
	void putFile(const char *name,
		int length, int mode, int lastModified,
		FILE *inStream);
	void putTrack(const char *type, int length, const void *bytes);
	void quit();
	void readResult();
	void setFilesystem(int joliet, int rockRidge, int HFS);
	void setProtocol(int version);
	void setVerbose();
	static char *spaceToEsc(const char *str, char *str2);
	void system(const char *name, const char *version);
	void user(int id, const char *name);

private:
	void exec(const char *command,
		const char *arg1 = "",
		const char *arg2 = "",
		const char *arg3 = "");
};

#endif
