File: ftpconn.h

package info (click to toggle)
qftp 0.97-1.1
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 204 kB
  • ctags: 168
  • sloc: cpp: 1,336; makefile: 61
file content (55 lines) | stat: -rw-r--r-- 835 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/*
 *  qftp
 *  Copyright (C) 1997,1998 Peter Strand
 *  Distributed under the GNU Pulic Licence
 */

#include "flist.h"
#include "net.h"

#ifndef _FTPCONN_H_
#define _FTPCONN_H_


class FtpConn {
	Socket *ctrl, *data;
	char cwd[256];
	int cwdch, conn;
	
	int Port();
	int GetReply();
	
	char retmsg[16000];
	int retval;
public:
	
	FtpConn();
	~FtpConn();
	
	char *GetHost();
	char *GetCwd();
	char *GetMsg();
	const char *GetError();
	
	int Connect(char *host);
	void Close();
	int Login(char *user, char *pass);
	int Cmd(char *cmd, char *arg = NULL);
	int Quote(char *s);
	int List(FileList &fl, char *s = NULL);
	int LongList(FileList &fl, char *s = NULL);
	int Cd(char *s = NULL);
	int Size(char *s = NULL);
	int Get(char *s, int fd, void (*cbf)(int) = NULL);
	int Put(char *s, int fd, void (*cbf)(int) = NULL);

};





#endif