2010-06-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>

Made protected member variable private. Added accessor funcs.
	* src/BtPostDownloadHandler.cc
	* src/DownloadHandler.h
	* src/MetalinkPostDownloadHandler.cc
pull/1/head
Tatsuhiro Tsujikawa 2010-06-12 09:12:39 +00:00
parent 6d8d84e0f4
commit 09e2a7d39c
4 changed files with 18 additions and 6 deletions

View File

@ -1,3 +1,10 @@
2010-06-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Made protected member variable private. Added accessor funcs.
* src/BtPostDownloadHandler.cc
* src/DownloadHandler.h
* src/MetalinkPostDownloadHandler.cc
2010-06-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Renamed member variables.

View File

@ -66,8 +66,8 @@ void BtPostDownloadHandler::getNextRequestGroups
(std::vector<SharedHandle<RequestGroup> >& groups,
RequestGroup* requestGroup)
{
_logger->info("Generating RequestGroups for Torrent file %s",
requestGroup->getFirstFilePath().c_str());
getLogger()->info("Generating RequestGroups for Torrent file %s",
requestGroup->getFirstFilePath().c_str());
std::string content;
try {
requestGroup->getPieceStorage()->getDiskAdaptor()->openExistingFile();

View File

@ -49,10 +49,15 @@ class RequestGroupCriteria;
class DownloadHandler
{
protected:
private:
SharedHandle<RequestGroupCriteria> _criteria;
Logger* _logger;
protected:
Logger* getLogger() const
{
return _logger;
}
public:
DownloadHandler();

View File

@ -65,9 +65,9 @@ void MetalinkPostDownloadHandler::getNextRequestGroups
(std::vector<SharedHandle<RequestGroup> >& groups,
RequestGroup* requestGroup)
{
if(_logger->debug()) {
_logger->debug("Generating RequestGroups for Metalink file %s",
requestGroup->getFirstFilePath().c_str());
if(getLogger()->debug()) {
getLogger()->debug("Generating RequestGroups for Metalink file %s",
requestGroup->getFirstFilePath().c_str());
}
SharedHandle<DiskAdaptor> diskAdaptor =
requestGroup->getPieceStorage()->getDiskAdaptor();