File: fgpickregexpsync.h

package info (click to toggle)
ftpgrab 0.1.5-6
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 444 kB
  • sloc: cpp: 2,906; makefile: 103
file content (39 lines) | stat: -rw-r--r-- 1,116 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
#ifndef _FGPICKREGEXPSYNC_H
#define _FGPICKREGEXPSYNC_H

// fgpickregexpsync.h
//
// Implementation of a file picker that selects all remote files matching
// a given regular expression for which we do not have remote copies.
// Also, all local files matching the regexp which are not on the remote
// site, are removed

#ifndef _FGFPICKI_H
#include "fgfpicki.h"
#endif

class FGConnectionInterface;
class FGString;
struct re_pattern_buffer;
typedef struct re_pattern_buffer regex_t;

class FGPickRegexpSync : public FGFilePickerInterface {
public:
  // Must be constructed with connection interface and regexp match string
  FGPickRegexpSync(FGConnectionInterface* pConnIf,
                   const FGString& regexp);
  virtual ~FGPickRegexpSync();

  virtual FGActionList DecideActions(const FGDirListing& localDir,
                                     const FGDirListing& remoteDir);

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

  // Internal representation of a regexp
  regex_t* mpRegExp;
};

#endif // _FGPICKREGEXP_H