summaryrefslogtreecommitdiff
path: root/src/CheckIntegrityMan.h
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2007-10-11 16:58:24 +0000
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2007-10-11 16:58:24 +0000
commit048a2cf59737f761876e81a77e8d064c45c752d7 (patch)
tree65c9d5498aafe6a8c8e640ddfcc43c7013504d0d /src/CheckIntegrityMan.h
parente26bbbb9eee140ba24402fe872a752b42f0077de (diff)
2007-10-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Implemented BitTorrent/http/ftp integrated download. I've rewritten lots of files and now some headers have forward class declarations to reduce compile time. The implementation is extremely alpha stage, I recommend to use this for testing purpose only.
Diffstat (limited to 'src/CheckIntegrityMan.h')
-rw-r--r--src/CheckIntegrityMan.h41
1 files changed, 12 insertions, 29 deletions
diff --git a/src/CheckIntegrityMan.h b/src/CheckIntegrityMan.h
index bc0297ae..1e07cd78 100644
--- a/src/CheckIntegrityMan.h
+++ b/src/CheckIntegrityMan.h
@@ -36,43 +36,26 @@
#define _D_CHECK_INTEGRITY_MAN_H_
#include "common.h"
-#include "CheckIntegrityEntry.h"
+
+class CheckIntegrityEntry;
+extern typedef SharedHandle<CheckIntegrityEntry> CheckIntegrityEntryHandle;
+extern typedef deque<CheckIntegrityEntryHandle> CheckIntegrityEntries;
class CheckIntegrityMan {
private:
CheckIntegrityEntries _checkIntegrityEntries;
public:
- void addCheckIntegrityEntry(const CheckIntegrityEntryHandle& entry)
- {
- _checkIntegrityEntries.push_back(entry);
- }
+ CheckIntegrityMan();
+
+ ~CheckIntegrityMan();
+
+ void addCheckIntegrityEntry(const CheckIntegrityEntryHandle& entry);
- bool removeCheckIntegrityEntry(const CheckIntegrityEntryHandle& entry)
- {
- CheckIntegrityEntries::iterator itr = find(_checkIntegrityEntries.begin(),
- _checkIntegrityEntries.end(),
- entry);
- if(itr == _checkIntegrityEntries.end()) {
- return false;
- } else {
- _checkIntegrityEntries.erase(itr);
- return true;
- }
- }
+ bool removeCheckIntegrityEntry(const CheckIntegrityEntryHandle& entry);
- CheckIntegrityEntryHandle getFirstCheckIntegrityEntry() const
- {
- if(_checkIntegrityEntries.empty()) {
- return 0;
- } else {
- return _checkIntegrityEntries.front();
- }
- }
+ CheckIntegrityEntryHandle getFirstCheckIntegrityEntry() const;
- int32_t countCheckIntegrityEntry() const
- {
- return _checkIntegrityEntries.size();
- }
+ int32_t countCheckIntegrityEntry() const;
};
typedef SharedHandle<CheckIntegrityMan> CheckIntegrityManHandle;