File: fgdlaction.h

package info (click to toggle)
ftpgrab 0.1.2r-8
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, sarge
  • size: 376 kB
  • ctags: 335
  • sloc: cpp: 2,790; makefile: 26
file content (46 lines) | stat: -rw-r--r-- 1,002 bytes parent folder | download | duplicates (8)
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
#ifndef _FGDLACTION_H
#define _FGDLACTION_H

// fgdlaction.h
//
// Implementation class of the download action

#include "fgactioni.h"

#ifndef _FGSTRING_H
#include "fgstring.h"
#endif

class FGConnectionInterface;

class FGDownloadAction : public FGActionInterface {
public:
  // Construct with filename to download
  FGDownloadAction(const FGString& fname, FGConnectionInterface* pConnIf,
                   const FGString& localDir, int size = -1);

  ~FGDownloadAction();

  // Overridden virtual Do method
  virtual void VirtualDo(void) const;

  // And Abort()
  virtual void Abort(void) const;

private:
  // Banned!!
  FGDownloadAction(const FGDownloadAction& other);
  FGDownloadAction& operator=(const FGDownloadAction& other);

  FGConnectionInterface* mpConnIf;
  FGString mFileName;
  FGString mLocalDir;

  // File descriptor pointing to the local file copy we are downloading
  int mDestFD;

  // Expected size of the file we are downloading
  int mFileSize;
};

#endif // _FGDLACTION_H