#include <string.h>

const int ENTRIES=40;

class download {
	private:
		char file[ENTRIES] [60];
		char pct[ENTRIES] [5];
		char size[ENTRIES] [10];
		char done_size[ENTRIES] [10];
		char rate[ENTRIES] [10];
		int count;
	public:
		download() {count=0;}
		void add(char *f,char *p,char *s,char *d, char *r) {
				count++;
				strcpy(file[count],f);
				strcpy(pct[count],p);
				strcpy(size[count],s);
				strcpy(done_size[count],d);
				strcpy(rate[count],r);
			}
		int getcount() {return count;}
		char *getfile(int i) {return file[i];}
		char *getpct(int i) {return pct[i];}
		char *getsize(int i) {return size[i];}
		char *getdone(int i) {return done_size[i];}
		char *getrate(int i) {return rate[i];}
};


class connect_donkey {
	private:
		char server[250];
		int  port;
		download down;
		char error[250];	
		
	public:
		int get(char *s,int p, char *u, char *pass);
		int getcount() {return down.getcount();}
                char *getfile(int i) {return down.getfile(i);}
                char *getpct(int i) {return down.getpct(i);}
                char *getsize(int i) {return down.getsize(i);}
                char *getdone(int i) {return down.getdone(i);}
                char *getrate(int i) {return down.getrate(i);}
		char *geterror() {return error;}
};

