File: txtif.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 (64 lines) | stat: -rw-r--r-- 1,155 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
56
57
58
59
60
61
62
63
64
/*
 *  qftp
 *  Copyright (C) 1997,1998 Peter Strand
 *  Distributed under the GNU Pulic Licence
 */


#ifndef _TXTIF_H_
#define _TXTIF_H_

#include "conf.h"
#include "flist.h"
#include "ftpconn.h"

#define PAGER "/usr/bin/less"

struct options {
	char bg;	// b
	char proc;	// z
	char force;	// f
	char cont;	// c
	char longl;	// l
	char anon;	// a
	char retry;	// r
	char retrsl;	// s
	char noinf;	// n
	char rec;	// r
};

class TxtIF {
	FtpConn *ftp;
	Conf gconf;
	char user[128], pass[128], anonuser[128], anonpass[128];
	struct options opts;
	char prompt[1024];
	FileList curList;
	int Get(Conf &conf, char *p, FtpConn *nftp = NULL);
 public:
	TxtIF();
	TxtIF(FtpConn *ftp, Conf &nconf);
	void go();
	int lookup(char *s);
	int procargs(char *s, char *a[]);
	int Khelp(int n, char *a[]);
	int Open(int n, char *a[]);
	int Close(int n, char *a[]);
	int List(int n, char *a[]);
	int LongList(int n, char *a[]);
	int Cd(int n, char *a[]);
	int Put(int n, char *a[]);
	int Get(int n, char *a[]);
	int Quote(int n, char *a[]);
	int Help(int n, char *a[]);
	int LCd(int n, char *a[]);
	int Set(int n, char *a[]);
	int View(int n, char *a[]);
};


#endif