Sophie

Sophie

distrib > Mandriva > cooker > i586 > by-pkgid > 0a6e7da7c1280f0f9d531d0d9573351f > files > 188

d4x-debug-2.5.7.1-7mdv2011.0.i586.rpm

/*	WebDownloader for X-Window
 *	Copyright (C) 1999-2002 Koshelev Maxim
 *	This Program is free but not GPL!!! You can't modify it
 *	without agreement with author. You can't distribute modified
 *	program but you can distribute unmodified program.
 *
 *	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.
 */
#ifndef __DOWNLOADER_MEM_WL_HEADER__
#define __DOWNLOADER_MEM_WL_HEADER__

#include "log.h"
#include "socket.h"
#include "client.h"

class tMemoryWL:public tWriterLoger{
	tLog *LOG;
	fsize_t cur,bufsize,filesize;
	char *buf;
	void grow();
 public:
	tMemoryWL();
	virtual fsize_t write(const void *buf,fsize_t len);
	virtual fsize_t shift(fsize_t len,int mode);
	virtual fsize_t read(void *dst,fsize_t len);
	virtual void log(int type,const char *str);
	virtual void truncate();
	void set_log(tLog *log);
	virtual ~tMemoryWL();
};

#endif