1 /*
2  * lftp - file transfer program
3  *
4  * Copyright (c) 1996-2016 by Alexander V. Lukyanov (lav@yars.free.net)
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
18  */
19 
20 #ifndef DUMMYPROTO_H
21 #define DUMMYPROTO_H
22 
23 #include "FileAccess.h"
24 
25 class DummyProto : public FileAccess
26 {
27 public:
28    int Do();
29    int Done();
30    const char *GetProto() const;
31    FileAccess *Clone() const;
32    int Read(Buffer *buf,int size);
33    int Write(const void *buf,int size);
34    int StoreStatus();
Reconfig(const char *)35    void Reconfig(const char *) {}
Login(const char *,const char *)36    void Login(const char *,const char *) {}
37 
38    ListInfo *MakeListInfo(const char *path);
39    DirList *MakeDirList(ArgV *);
40 
41    DummyProto();
42    ~DummyProto();
43 };
44 
45 class DummyNoProto : public DummyProto
46 {
47    xstring_c proto;
48 public:
DummyNoProto(const char * p)49    DummyNoProto(const char *p) : proto(p) {}
50 
51    const char *GetProto() const;
52    FileAccess *Clone() const;
53    const char *StrError(int err);
54 };
55 
56 #endif
57