File: fgfilegrab.h

package info (click to toggle)
ftpgrab 0.1.5-5
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 444 kB
  • ctags: 358
  • sloc: cpp: 2,906; makefile: 102
file content (46 lines) | stat: -rw-r--r-- 1,079 bytes parent folder | download | duplicates (9)
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 _FGFILEGRAB_H
#define _FGFILEGRAB_H

// fgfilegrab.h
//
// Definition of in-memory structure describing a single "fetch" operation.
// A fetch operation may fetch one file, or many files if it is for example
// based on a wildcard rule

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

class FGConnectionInterface;
class FGFilePickerInterface;

class FGFileGrab {
public:
  // Constructors
  FGFileGrab(const FGString& ruleName,
             const FGString& host, const FGString& remDir,
             const FGString& localDir, const FGString& file);

  // The all important "go get it" method
  void GrabIt(void) const;

  // Getters
  const FGString& GetRuleName(void) const;

  void FreeResources(void);

private:
  // Implementation details
  FGString mRuleName;
  FGString mRemoteHost;
  FGString mRemoteDir;
  FGString mLocalDir;

  // Interface to the connection protocol this fetch uses
  FGConnectionInterface* mpConInterface;

  // Interface to the method of selecting files this fetch uses
  FGFilePickerInterface* mpPickInterface;
};

#endif // _FGFILEGRAB_H