~ubuntu-branches/ubuntu/precise/nordugrid-arc/precise

« back to all changes in this revision

Viewing changes to src/services/a-rex/FileChunks.h

  • Committer: Package Import Robot
  • Author(s): Mattias Ellert
  • Date: 2012-03-01 19:48:16 UTC
  • mfrom: (3.1.5 sid)
  • Revision ID: package-import@ubuntu.com-20120301194816-m1ezrwnwt2qgnc2e
Tags: 1.1.1-1
* 1.1.1 Bugfix Release
* Fixes FTBFS (Closes: #661774) (LP: #935007)
* Fix typo in package description (Closes: #646979)
* Split binary rule in debian/rules for arch and indep

Show diffs side-by-side

added added

removed removed

Lines of Context:
56
56
  files_t files;
57
57
  int timeout;
58
58
  time_t last_timeout;
 
59
  /// Returns pointer to first stuck file.
 
60
  /// File is considred stuck if its Add method was last called more
 
61
  /// timeout seconds ago.
 
62
  FileChunks* GetStuck(void);
 
63
  void RemoveStuck(void);
59
64
 public:
60
65
  FileChunksList(void);
61
66
  ~FileChunksList(void);
66
71
  FileChunks& Get(std::string path);
67
72
  /// Assign timeout value (seconds) for file transfers
68
73
  void Timeout(int t) { timeout=t; };
69
 
  /// Returns pointer to first stuck file.
70
 
  /// File is considred stuck if its Add method was last called more
71
 
  /// timeout seconds ago.
72
 
  FileChunks* GetStuck(void);
73
74
  /// Returns pointer to first in a list created FileChunks instance.
74
 
  FileChunks* GetFirst(void);
 
75
  //FileChunks* GetFirst(void);
75
76
};
76
77
 
 
78
class FileChunksRef {
 
79
 private:
 
80
  FileChunks& obj;
 
81
 public:
 
82
  FileChunksRef(FileChunks& o):obj(o) { };
 
83
  ~FileChunksRef(void) { obj.Release(); };
 
84
  FileChunks* operator->(void) { return &obj; };
 
85
};
77
86
 
78
87
} // namespace ARex
79
88