diff --git a/ChangeLog b/ChangeLog index 05ebebbd..4a68b7c1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2010-06-12 Tatsuhiro Tsujikawa + + Made protected member variable private. Added accessor funcs. + * src/BtPostDownloadHandler.cc + * src/DownloadHandler.h + * src/MetalinkPostDownloadHandler.cc + 2010-06-12 Tatsuhiro Tsujikawa Renamed member variables. diff --git a/src/BtPostDownloadHandler.cc b/src/BtPostDownloadHandler.cc index 2398d7f7..21219257 100644 --- a/src/BtPostDownloadHandler.cc +++ b/src/BtPostDownloadHandler.cc @@ -66,8 +66,8 @@ void BtPostDownloadHandler::getNextRequestGroups (std::vector >& 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(); diff --git a/src/DownloadHandler.h b/src/DownloadHandler.h index 0f508d7a..37e762bd 100644 --- a/src/DownloadHandler.h +++ b/src/DownloadHandler.h @@ -49,10 +49,15 @@ class RequestGroupCriteria; class DownloadHandler { -protected: +private: SharedHandle _criteria; Logger* _logger; +protected: + Logger* getLogger() const + { + return _logger; + } public: DownloadHandler(); diff --git a/src/MetalinkPostDownloadHandler.cc b/src/MetalinkPostDownloadHandler.cc index 8806aabc..2b65e988 100644 --- a/src/MetalinkPostDownloadHandler.cc +++ b/src/MetalinkPostDownloadHandler.cc @@ -65,9 +65,9 @@ void MetalinkPostDownloadHandler::getNextRequestGroups (std::vector >& 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 = requestGroup->getPieceStorage()->getDiskAdaptor();