Index: src/ch/CustomCopyDlg.cpp =================================================================== diff -u -r10d4c73f3589c377ec0b60a2a053ff6aafeb507f -rd12e49decb8a3df3e28f6786d38542390484ac07 --- src/ch/CustomCopyDlg.cpp (.../CustomCopyDlg.cpp) (revision 10d4c73f3589c377ec0b60a2a053ff6aafeb507f) +++ src/ch/CustomCopyDlg.cpp (.../CustomCopyDlg.cpp) (revision d12e49decb8a3df3e28f6786d38542390484ac07) @@ -19,7 +19,7 @@ #include "stdafx.h" #include #include "resource.h" -#include "FileInfo.h" +#include "../libchcore/FileInfo.h" #include "CustomCopyDlg.h" #include "structs.h" #include "dialogs.h" @@ -278,7 +278,7 @@ lvc.cx=static_cast(0.1*rc.Width()); m_ctlFilters.InsertColumn(6, &lvc); - CFiltersArray afFilters; + chcore::CFiltersArray afFilters; GetTaskPropValue(m_tTaskDefinition.GetConfiguration(), afFilters); m_bFilters = !afFilters.IsEmpty(); @@ -379,11 +379,11 @@ m_ctlFilters.InsertColumn(6, &lvc); // refresh the entries in filters' list - CFiltersArray afFilters = GetTaskPropValue(m_tTaskDefinition.GetConfiguration()); + chcore::CFiltersArray afFilters = GetTaskPropValue(m_tTaskDefinition.GetConfiguration()); m_ctlFilters.DeleteAllItems(); for(size_t stIndex = 0; stIndex < afFilters.GetSize(); ++stIndex) { - const CFileFilter* pFilter = afFilters.GetAt(stIndex); + const chcore::CFileFilter* pFilter = afFilters.GetAt(stIndex); if(pFilter) AddFilter(*pFilter, boost::numeric_cast(stIndex)); } @@ -593,10 +593,10 @@ CFilterDlg dlg; chcore::TString strData; - CFiltersArray afFilters = GetTaskPropValue(m_tTaskDefinition.GetConfiguration()); + chcore::CFiltersArray afFilters = GetTaskPropValue(m_tTaskDefinition.GetConfiguration()); for (size_t i = 0; i < afFilters.GetSize(); i++) { - const CFileFilter* pFilter = afFilters.GetAt(i); + const chcore::CFileFilter* pFilter = afFilters.GetAt(i); BOOST_ASSERT(pFilter); if(pFilter) { @@ -620,7 +620,7 @@ } } -void CCustomCopyDlg::AddFilter(const CFileFilter &rFilter, int iPos) +void CCustomCopyDlg::AddFilter(const chcore::CFileFilter &rFilter, int iPos) { LVITEM lvi; TCHAR szLoaded[1024]; @@ -763,7 +763,7 @@ void CCustomCopyDlg::OnRemovefilterButton() { - CFiltersArray afFilters = GetTaskPropValue(m_tTaskDefinition.GetConfiguration()); + chcore::CFiltersArray afFilters = GetTaskPropValue(m_tTaskDefinition.GetConfiguration()); POSITION pos; int iItem; @@ -824,11 +824,11 @@ POSITION pos = m_ctlFilters.GetFirstSelectedItemPosition(); if(pos != NULL) { - CFiltersArray afFilters = GetTaskPropValue(m_tTaskDefinition.GetConfiguration()); + chcore::CFiltersArray afFilters = GetTaskPropValue(m_tTaskDefinition.GetConfiguration()); int iItem = m_ctlFilters.GetNextSelectedItem(pos); CFilterDlg dlg; - const CFileFilter* pFilter = afFilters.GetAt(iItem); + const chcore::CFileFilter* pFilter = afFilters.GetAt(iItem); BOOST_ASSERT(pFilter); if(pFilter) dlg.m_ffFilter = *pFilter; Index: src/ch/CustomCopyDlg.h =================================================================== diff -u -r6df9b4cff81dedf8c5571a98702b584b061eac09 -rd12e49decb8a3df3e28f6786d38542390484ac07 --- src/ch/CustomCopyDlg.h (.../CustomCopyDlg.h) (revision 6df9b4cff81dedf8c5571a98702b584b061eac09) +++ src/ch/CustomCopyDlg.h (.../CustomCopyDlg.h) (revision d12e49decb8a3df3e28f6786d38542390484ac07) @@ -20,7 +20,7 @@ #define __CUSTOMCOPYDLG_H__ #include "../libchcore/DataBuffer.h" -#include "FileFilter.h" +#include "../libchcore/FileFilter.h" #include "../libchcore/TTaskDefinition.h" ///////////////////////////////////////////////////////////////////////////// @@ -47,7 +47,7 @@ void UpdateComboIcon(); void SetComboPath(LPCTSTR lpszText); void EnableControls(); - void AddFilter(const CFileFilter& rFilter, int iPos=-1); + void AddFilter(const chcore::CFileFilter& rFilter, int iPos=-1); void AddPath(CString strPath); void SetBuffersizesString(); Index: src/ch/FeedbackFileErrorDlg.cpp =================================================================== diff -u -r22bbc4a87fa0b249e1e02ba385f28da9d77a4aa1 -rd12e49decb8a3df3e28f6786d38542390484ac07 --- src/ch/FeedbackFileErrorDlg.cpp (.../FeedbackFileErrorDlg.cpp) (revision 22bbc4a87fa0b249e1e02ba385f28da9d77a4aa1) +++ src/ch/FeedbackFileErrorDlg.cpp (.../FeedbackFileErrorDlg.cpp) (revision d12e49decb8a3df3e28f6786d38542390484ac07) @@ -3,7 +3,7 @@ #include "stdafx.h" #include "ch.h" -#include "FileInfo.h" +#include "../libchcore/FileInfo.h" #include "FeedbackFileErrorDlg.h" #include "FeedbackHandler.h" Index: src/ch/FeedbackHandler.cpp =================================================================== diff -u -r9ea1e103b5fa4ddfebf8028f121ce16e917eec04 -rd12e49decb8a3df3e28f6786d38542390484ac07 --- src/ch/FeedbackHandler.cpp (.../FeedbackHandler.cpp) (revision 9ea1e103b5fa4ddfebf8028f121ce16e917eec04) +++ src/ch/FeedbackHandler.cpp (.../FeedbackHandler.cpp) (revision d12e49decb8a3df3e28f6786d38542390484ac07) @@ -17,7 +17,7 @@ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ #include "stdafx.h" -#include "FileInfo.h" +#include "../libchcore/FileInfo.h" #include "FeedbackHandler.h" #include "FeedbackReplaceDlg.h" #include "FeedbackFileErrorDlg.h" Index: src/ch/FeedbackHandler.h =================================================================== diff -u -rcac4819aa32d29c9feab400cadc083d713459a82 -rd12e49decb8a3df3e28f6786d38542390484ac07 --- src/ch/FeedbackHandler.h (.../FeedbackHandler.h) (revision cac4819aa32d29c9feab400cadc083d713459a82) +++ src/ch/FeedbackHandler.h (.../FeedbackHandler.h) (revision d12e49decb8a3df3e28f6786d38542390484ac07) @@ -23,8 +23,8 @@ struct FEEDBACK_ALREADYEXISTS { - CFileInfoPtr spSrcFileInfo; - CFileInfoPtr spDstFileInfo; + chcore::CFileInfoPtr spSrcFileInfo; + chcore::CFileInfoPtr spDstFileInfo; }; struct FEEDBACK_FILEERROR Index: src/ch/FeedbackNotEnoughSpaceDlg.cpp =================================================================== diff -u -r633a533cb6e741d44fe28aa56339e1d2709b1b27 -rd12e49decb8a3df3e28f6786d38542390484ac07 --- src/ch/FeedbackNotEnoughSpaceDlg.cpp (.../FeedbackNotEnoughSpaceDlg.cpp) (revision 633a533cb6e741d44fe28aa56339e1d2709b1b27) +++ src/ch/FeedbackNotEnoughSpaceDlg.cpp (.../FeedbackNotEnoughSpaceDlg.cpp) (revision d12e49decb8a3df3e28f6786d38542390484ac07) @@ -18,7 +18,7 @@ ***************************************************************************/ #include "stdafx.h" #include "ch.h" -#include "FileInfo.h" +#include "../libchcore/FileInfo.h" #include "FeedbackNotEnoughSpaceDlg.h" #include "StringHelpers.h" #include "FeedbackHandler.h" Index: src/ch/FeedbackReplaceDlg.cpp =================================================================== diff -u -r69b48f0b4d7fad78f95854e95fca166014311474 -rd12e49decb8a3df3e28f6786d38542390484ac07 --- src/ch/FeedbackReplaceDlg.cpp (.../FeedbackReplaceDlg.cpp) (revision 69b48f0b4d7fad78f95854e95fca166014311474) +++ src/ch/FeedbackReplaceDlg.cpp (.../FeedbackReplaceDlg.cpp) (revision d12e49decb8a3df3e28f6786d38542390484ac07) @@ -3,17 +3,17 @@ #include "stdafx.h" #include "ch.h" -#include "FileInfo.h" +#include "../libchcore/FileInfo.h" #include "FeedbackReplaceDlg.h" #include "../libictranslate/ResourceManager.h" -#include "FileInfo.h" +#include "../libchcore/FileInfo.h" #include "FeedbackHandler.h" // CFeedbackReplaceDlg dialog IMPLEMENT_DYNAMIC(CFeedbackReplaceDlg, ictranslate::CLanguageDialog) -CFeedbackReplaceDlg::CFeedbackReplaceDlg(const CFileInfoPtr& spSrcFile, const CFileInfoPtr& spDstFile, CWnd* pParent /*=NULL*/) +CFeedbackReplaceDlg::CFeedbackReplaceDlg(const chcore::CFileInfoPtr& spSrcFile, const chcore::CFileInfoPtr& spDstFile, CWnd* pParent /*=NULL*/) : ictranslate::CLanguageDialog(IDD_FEEDBACK_REPLACE_DIALOG, pParent), m_spSrcFile(spSrcFile), m_spDstFile(spDstFile), Index: src/ch/FeedbackReplaceDlg.h =================================================================== diff -u -r22bbc4a87fa0b249e1e02ba385f28da9d77a4aa1 -rd12e49decb8a3df3e28f6786d38542390484ac07 --- src/ch/FeedbackReplaceDlg.h (.../FeedbackReplaceDlg.h) (revision 22bbc4a87fa0b249e1e02ba385f28da9d77a4aa1) +++ src/ch/FeedbackReplaceDlg.h (.../FeedbackReplaceDlg.h) (revision d12e49decb8a3df3e28f6786d38542390484ac07) @@ -24,7 +24,7 @@ DECLARE_DYNAMIC(CFeedbackReplaceDlg) public: - CFeedbackReplaceDlg(const CFileInfoPtr& spSrcFile, const CFileInfoPtr& spDstFile, CWnd* pParent = NULL); // standard constructor + CFeedbackReplaceDlg(const chcore::CFileInfoPtr& spSrcFile, const chcore::CFileInfoPtr& spDstFile, CWnd* pParent = NULL); // standard constructor virtual ~CFeedbackReplaceDlg(); virtual BOOL OnInitDialog(); @@ -45,8 +45,8 @@ BOOL m_bAllItems; protected: - const CFileInfoPtr m_spSrcFile; - const CFileInfoPtr m_spDstFile; + const chcore::CFileInfoPtr m_spSrcFile; + const chcore::CFileInfoPtr m_spDstFile; public: afx_msg void OnBnClickedReplaceButton(); Index: src/ch/FilterDlg.cpp =================================================================== diff -u -r10d4c73f3589c377ec0b60a2a053ff6aafeb507f -rd12e49decb8a3df3e28f6786d38542390484ac07 --- src/ch/FilterDlg.cpp (.../FilterDlg.cpp) (revision 10d4c73f3589c377ec0b60a2a053ff6aafeb507f) +++ src/ch/FilterDlg.cpp (.../FilterDlg.cpp) (revision d12e49decb8a3df3e28f6786d38542390484ac07) @@ -17,8 +17,8 @@ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ #include "stdafx.h" -#include "FileInfo.h" -#include "FileFilter.h" +#include "../libchcore/FileInfo.h" +#include "../libchcore/FileFilter.h" #include "ch.h" #include "FilterDlg.h" @@ -348,17 +348,17 @@ m_ffFilter.SetUseSize1(m_bSize != 0); m_ffFilter.SetUseSize2(m_bSize2 != 0); - m_ffFilter.SetSizeType1((CFileFilter::ESizeCompareType)m_ctlSizeType1.GetCurSel()); - m_ffFilter.SetSizeType2((CFileFilter::ESizeCompareType)m_ctlSizeType2.GetCurSel()); + m_ffFilter.SetSizeType1((chcore::CFileFilter::ESizeCompareType)m_ctlSizeType1.GetCurSel()); + m_ffFilter.SetSizeType2((chcore::CFileFilter::ESizeCompareType)m_ctlSizeType2.GetCurSel()); m_ffFilter.SetSize1(static_cast(m_uiSize1)*static_cast(GetMultiplier(m_ctlSize1Multi.GetCurSel()))); m_ffFilter.SetSize2(static_cast(m_uiSize2)*static_cast(GetMultiplier(m_ctlSize2Multi.GetCurSel()))); // date - m_ffFilter.SetDateType((CFileFilter::EDateType)m_ctlDateType.GetCurSel()); + m_ffFilter.SetDateType((chcore::CFileFilter::EDateType)m_ctlDateType.GetCurSel()); - m_ffFilter.SetDateCmpType1((CFileFilter::EDateCompareType)m_ctlDateType1.GetCurSel()); - m_ffFilter.SetDateCmpType2((CFileFilter::EDateCompareType)m_ctlDateType2.GetCurSel()); + m_ffFilter.SetDateCmpType1((chcore::CFileFilter::EDateCompareType)m_ctlDateType1.GetCurSel()); + m_ffFilter.SetDateCmpType2((chcore::CFileFilter::EDateCompareType)m_ctlDateType2.GetCurSel()); CTime tDateTime; m_ffFilter.SetUseDate1(m_ctlDate1.GetTime(tDateTime) == GDT_VALID); Index: src/ch/FilterDlg.h =================================================================== diff -u -r10d4c73f3589c377ec0b60a2a053ff6aafeb507f -rd12e49decb8a3df3e28f6786d38542390484ac07 --- src/ch/FilterDlg.h (.../FilterDlg.h) (revision 10d4c73f3589c377ec0b60a2a053ff6aafeb507f) +++ src/ch/FilterDlg.h (.../FilterDlg.h) (revision d12e49decb8a3df3e28f6786d38542390484ac07) @@ -73,9 +73,9 @@ // Implementation public: void SetSize2(unsigned __int64 ullSize); - CFileFilter m_ffFilter; - CStringArray m_astrAddMask; - CStringArray m_astrAddExcludeMask; + chcore::CFileFilter m_ffFilter; + CStringArray m_astrAddMask; + CStringArray m_astrAddExcludeMask; protected: virtual void OnLanguageChanged(); Index: src/ch/TLocalFilesystem.cpp =================================================================== diff -u -r6df9b4cff81dedf8c5571a98702b584b061eac09 -rd12e49decb8a3df3e28f6786d38542390484ac07 --- src/ch/TLocalFilesystem.cpp (.../TLocalFilesystem.cpp) (revision 6df9b4cff81dedf8c5571a98702b584b061eac09) +++ src/ch/TLocalFilesystem.cpp (.../TLocalFilesystem.cpp) (revision d12e49decb8a3df3e28f6786d38542390484ac07) @@ -24,7 +24,7 @@ #include "TLocalFilesystem.h" #include #include "TAutoHandles.h" -#include "FileInfo.h" +#include "../libchcore/FileInfo.h" #include "../libchcore/DataBuffer.h" #include @@ -133,7 +133,7 @@ return ::DeleteFile(PrependPathExtensionIfNeeded(pathFile).ToString()) != FALSE; } -bool TLocalFilesystem::GetFileInfo(const chcore::TSmartPath& pathFile, CFileInfoPtr& rFileInfo, size_t stSrcIndex, const chcore::TPathContainer* pBasePaths) +bool TLocalFilesystem::GetFileInfo(const chcore::TSmartPath& pathFile, chcore::CFileInfoPtr& rFileInfo, size_t stSrcIndex, const chcore::TPathContainer* pBasePaths) { if(!rFileInfo) THROW(_T("Invalid argument"), 0, 0, 0); @@ -313,7 +313,7 @@ Close(); } -bool TLocalFilesystemFind::FindNext(CFileInfoPtr& rspFileInfo) +bool TLocalFilesystemFind::FindNext(chcore::CFileInfoPtr& rspFileInfo) { WIN32_FIND_DATA wfd; chcore::TSmartPath pathCurrent = m_pathDir + m_pathMask; Index: src/ch/TLocalFilesystem.h =================================================================== diff -u -r6df9b4cff81dedf8c5571a98702b584b061eac09 -rd12e49decb8a3df3e28f6786d38542390484ac07 --- src/ch/TLocalFilesystem.h (.../TLocalFilesystem.h) (revision 6df9b4cff81dedf8c5571a98702b584b061eac09) +++ src/ch/TLocalFilesystem.h (.../TLocalFilesystem.h) (revision d12e49decb8a3df3e28f6786d38542390484ac07) @@ -26,8 +26,11 @@ #include "../libchcore/TPath.h" #include -class CFileInfo; -typedef boost::shared_ptr CFileInfoPtr; +namespace chcore +{ + class CFileInfo; + typedef boost::shared_ptr CFileInfoPtr; +} class TAutoFileHandle; class TLocalFilesystemFind; @@ -60,7 +63,7 @@ static bool RemoveDirectory(const chcore::TSmartPath& pathFile); static bool DeleteFile(const chcore::TSmartPath& pathFile); - static bool GetFileInfo(const chcore::TSmartPath& pathFile, CFileInfoPtr& rFileInfo, size_t stSrcIndex = std::numeric_limits::max(), const chcore::TPathContainer* pBasePaths = NULL); + static bool GetFileInfo(const chcore::TSmartPath& pathFile, chcore::CFileInfoPtr& rFileInfo, size_t stSrcIndex = std::numeric_limits::max(), const chcore::TPathContainer* pBasePaths = NULL); static bool FastMove(const chcore::TSmartPath& pathSource, const chcore::TSmartPath& pathDestination); static TLocalFilesystemFind CreateFinderObject(const chcore::TSmartPath& pathDir, const chcore::TSmartPath& pathMask); @@ -88,7 +91,7 @@ public: ~TLocalFilesystemFind(); - bool FindNext(CFileInfoPtr& rspFileInfo); + bool FindNext(chcore::CFileInfoPtr& rspFileInfo); void Close(); private: Index: src/ch/TSubTaskBase.cpp =================================================================== diff -u -rd345f15636dc88c4c40fe310ac7777bd024e12d9 -rd12e49decb8a3df3e28f6786d38542390484ac07 --- src/ch/TSubTaskBase.cpp (.../TSubTaskBase.cpp) (revision d345f15636dc88c4c40fe310ac7777bd024e12d9) +++ src/ch/TSubTaskBase.cpp (.../TSubTaskBase.cpp) (revision d12e49decb8a3df3e28f6786d38542390484ac07) @@ -40,7 +40,7 @@ { } -chcore::TSmartPath TSubTaskBase::CalculateDestinationPath(const CFileInfoPtr& spFileInfo, chcore::TSmartPath pathDst, int iFlags) const +chcore::TSmartPath TSubTaskBase::CalculateDestinationPath(const chcore::CFileInfoPtr& spFileInfo, chcore::TSmartPath pathDst, int iFlags) const { const chcore::TBasePathDataContainer& rSourcePathsInfo = GetContext().GetBasePathDataContainer(); Index: src/ch/TSubTaskBase.h =================================================================== diff -u -r9a171c5d46f2bc029d99a698d88eeff60497cd3b -rd12e49decb8a3df3e28f6786d38542390484ac07 --- src/ch/TSubTaskBase.h (.../TSubTaskBase.h) (revision 9a171c5d46f2bc029d99a698d88eeff60497cd3b) +++ src/ch/TSubTaskBase.h (.../TSubTaskBase.h) (revision d12e49decb8a3df3e28f6786d38542390484ac07) @@ -23,7 +23,7 @@ #ifndef __TSUBTASKBASE_H__ #define __TSUBTASKBASE_H__ -#include "FileInfo.h" +#include "../libchcore/FileInfo.h" class TSubTaskContext; class TBasePathDataContainer; @@ -54,7 +54,7 @@ protected: // some common operations - chcore::TSmartPath CalculateDestinationPath(const CFileInfoPtr& spFileInfo, chcore::TSmartPath strPath, int iFlags) const; + chcore::TSmartPath CalculateDestinationPath(const chcore::CFileInfoPtr& spFileInfo, chcore::TSmartPath strPath, int iFlags) const; chcore::TSmartPath FindFreeSubstituteName(chcore::TSmartPath pathSrcPath, chcore::TSmartPath pathDstPath) const; private: Index: src/ch/TSubTaskContext.cpp =================================================================== diff -u -rd345f15636dc88c4c40fe310ac7777bd024e12d9 -rd12e49decb8a3df3e28f6786d38542390484ac07 --- src/ch/TSubTaskContext.cpp (.../TSubTaskContext.cpp) (revision d345f15636dc88c4c40fe310ac7777bd024e12d9) +++ src/ch/TSubTaskContext.cpp (.../TSubTaskContext.cpp) (revision d12e49decb8a3df3e28f6786d38542390484ac07) @@ -23,7 +23,7 @@ #include "stdafx.h" #include "TSubTaskContext.h" -TSubTaskContext::TSubTaskContext(chcore::TTaskDefinition& rTaskDefinition, chcore::TBasePathDataContainer& rBasePathDataContainer, CFileInfoArray& rFilesCache, TTaskLocalStats& rTaskLocalStats, +TSubTaskContext::TSubTaskContext(chcore::TTaskDefinition& rTaskDefinition, chcore::TBasePathDataContainer& rBasePathDataContainer, chcore::CFileInfoArray& rFilesCache, TTaskLocalStats& rTaskLocalStats, TTaskBasicProgressInfo& rTaskBasicProgressInfo, TTaskConfigTracker& rCfgTracker, icpf::log_file& rLog, chcore::IFeedbackHandler* piFeedbackHandler, chcore::TWorkerThreadController& rThreadController, TLocalFilesystem& rfsLocal) : m_rTaskDefinition(rTaskDefinition), Index: src/ch/TSubTaskContext.h =================================================================== diff -u -rd345f15636dc88c4c40fe310ac7777bd024e12d9 -rd12e49decb8a3df3e28f6786d38542390484ac07 --- src/ch/TSubTaskContext.h (.../TSubTaskContext.h) (revision d345f15636dc88c4c40fe310ac7777bd024e12d9) +++ src/ch/TSubTaskContext.h (.../TSubTaskContext.h) (revision d12e49decb8a3df3e28f6786d38542390484ac07) @@ -23,7 +23,7 @@ #ifndef __TSUBTASKCONTEXT_H__ #define __TSUBTASKCONTEXT_H__ -#include "FileInfo.h" +#include "../libchcore/FileInfo.h" namespace chcore { @@ -44,7 +44,7 @@ class TSubTaskContext { public: - TSubTaskContext(chcore::TTaskDefinition& rTaskDefinition, chcore::TBasePathDataContainer& rBasePathDataContainer, CFileInfoArray& rFilesCache, TTaskLocalStats& rTaskLocalStats, + TSubTaskContext(chcore::TTaskDefinition& rTaskDefinition, chcore::TBasePathDataContainer& rBasePathDataContainer, chcore::CFileInfoArray& rFilesCache, TTaskLocalStats& rTaskLocalStats, TTaskBasicProgressInfo& rTaskBasicProgressInfo, TTaskConfigTracker& rCfgTracker, icpf::log_file& rLog, chcore::IFeedbackHandler* piFeedbackHandler, chcore::TWorkerThreadController& rThreadController, TLocalFilesystem& rfsLocal); ~TSubTaskContext(); @@ -55,8 +55,8 @@ chcore::TBasePathDataContainer& GetBasePathDataContainer() { return m_rBasePathDataContainer; } const chcore::TBasePathDataContainer& GetBasePathDataContainer() const { return m_rBasePathDataContainer; } - CFileInfoArray& GetFilesCache() { return m_rFilesCache; } - const CFileInfoArray& GetFilesCache() const { return m_rFilesCache; } + chcore::CFileInfoArray& GetFilesCache() { return m_rFilesCache; } + const chcore::CFileInfoArray& GetFilesCache() const { return m_rFilesCache; } TTaskLocalStats& GetTaskLocalStats() { return m_rTaskLocalStats; } const TTaskLocalStats& GetTaskLocalStats() const { return m_rTaskLocalStats; } @@ -86,7 +86,7 @@ chcore::TBasePathDataContainer& m_rBasePathDataContainer; // data on which to operate - CFileInfoArray& m_rFilesCache; + chcore::CFileInfoArray& m_rFilesCache; // local stats for task TTaskLocalStats& m_rTaskLocalStats; Index: src/ch/TSubTaskCopyMove.cpp =================================================================== diff -u -r6df9b4cff81dedf8c5571a98702b584b061eac09 -rd12e49decb8a3df3e28f6786d38542390484ac07 --- src/ch/TSubTaskCopyMove.cpp (.../TSubTaskCopyMove.cpp) (revision 6df9b4cff81dedf8c5571a98702b584b061eac09) +++ src/ch/TSubTaskCopyMove.cpp (.../TSubTaskCopyMove.cpp) (revision d12e49decb8a3df3e28f6786d38542390484ac07) @@ -34,7 +34,7 @@ struct CUSTOM_COPY_PARAMS { - CFileInfoPtr spSrcFile; // CFileInfo - src file + chcore::CFileInfoPtr spSrcFile; // CFileInfo - src file chcore::TSmartPath pathDstFile; // dest path with filename chcore::TDataBuffer dbBuffer; // buffer handling @@ -50,7 +50,7 @@ TSubTaskBase::ESubOperationResult TSubTaskCopyMove::Exec() { icpf::log_file& rLog = GetContext().GetLog(); - CFileInfoArray& rFilesCache = GetContext().GetFilesCache(); + chcore::CFileInfoArray& rFilesCache = GetContext().GetFilesCache(); chcore::TTaskDefinition& rTaskDefinition = GetContext().GetTaskDefinition(); TTaskConfigTracker& rCfgTracker = GetContext().GetCfgTracker(); TTaskBasicProgressInfo& rBasicProgressInfo = GetContext().GetTaskBasicProgressInfo(); @@ -128,7 +128,7 @@ } // update m_stNextIndex, getting current CFileInfo - CFileInfoPtr spFileInfo = rFilesCache.GetAt(rBasicProgressInfo.GetCurrentIndex()); + chcore::CFileInfoPtr spFileInfo = rFilesCache.GetAt(rBasicProgressInfo.GetCurrentIndex()); // set dest path with filename ccp.pathDstFile = CalculateDestinationPath(spFileInfo, rTaskDefinition.GetDestinationPath(), ((int)bForceDirectories) << 1 | (int)bIgnoreFolders); @@ -260,7 +260,7 @@ return TSubTaskBase::eSubResult_Continue; } -bool TSubTaskCopyMove::GetMove(const CFileInfoPtr& spFileInfo) +bool TSubTaskCopyMove::GetMove(const chcore::CFileInfoPtr& spFileInfo) { if(!spFileInfo) THROW(_T("Invalid pointer"), 0, 0, 0); @@ -276,7 +276,7 @@ return spPathData->GetMove(); } -int TSubTaskCopyMove::GetBufferIndex(const CFileInfoPtr& spFileInfo) +int TSubTaskCopyMove::GetBufferIndex(const chcore::CFileInfoPtr& spFileInfo) { if(!spFileInfo) THROW(_T("Invalid pointer"), 0, 0, 0); @@ -670,7 +670,7 @@ return TSubTaskBase::eSubResult_Continue; } -TSubTaskBase::ESubOperationResult TSubTaskCopyMove::OpenDestinationFileFB(TLocalFilesystemFile& fileDst, const chcore::TSmartPath& pathDstFile, bool bNoBuffering, const CFileInfoPtr& spSrcFileInfo, unsigned long long& ullSeekTo, bool& bFreshlyCreated) +TSubTaskBase::ESubOperationResult TSubTaskCopyMove::OpenDestinationFileFB(TLocalFilesystemFile& fileDst, const chcore::TSmartPath& pathDstFile, bool bNoBuffering, const chcore::CFileInfoPtr& spSrcFileInfo, unsigned long long& ullSeekTo, bool& bFreshlyCreated) { chcore::IFeedbackHandler* piFeedbackHandler = GetContext().GetFeedbackHandler(); icpf::log_file& rLog = GetContext().GetLog(); @@ -703,7 +703,7 @@ // NOTE: it is not known which one would be faster - reading file parameters // by using spDstFileInfo->Create() (which uses FindFirstFile()) or by // reading parameters using opened handle; need to be tested in the future - CFileInfoPtr spDstFileInfo(boost::make_shared()); + chcore::CFileInfoPtr spDstFileInfo(boost::make_shared()); if(!TLocalFilesystem::GetFileInfo(pathDstFile, spDstFileInfo)) THROW(_T("Cannot get information about file which has already been opened!"), 0, GetLastError(), 0); Index: src/ch/TSubTaskCopyMove.h =================================================================== diff -u -r6df9b4cff81dedf8c5571a98702b584b061eac09 -rd12e49decb8a3df3e28f6786d38542390484ac07 --- src/ch/TSubTaskCopyMove.h (.../TSubTaskCopyMove.h) (revision 6df9b4cff81dedf8c5571a98702b584b061eac09) +++ src/ch/TSubTaskCopyMove.h (.../TSubTaskCopyMove.h) (revision d12e49decb8a3df3e28f6786d38542390484ac07) @@ -28,6 +28,7 @@ namespace chcore { class TDataBuffer; + typedef boost::shared_ptr CFileInfoPtr; } struct CUSTOM_COPY_PARAMS; @@ -41,13 +42,13 @@ ESubOperationResult Exec(); private: - bool GetMove(const CFileInfoPtr& spFileInfo); - int GetBufferIndex(const CFileInfoPtr& spFileInfo); + bool GetMove(const chcore::CFileInfoPtr& spFileInfo); + int GetBufferIndex(const chcore::CFileInfoPtr& spFileInfo); ESubOperationResult CustomCopyFileFB(CUSTOM_COPY_PARAMS* pData); ESubOperationResult OpenSourceFileFB(TLocalFilesystemFile& fileSrc, const chcore::TSmartPath& spPathToOpen, bool bNoBuffering); - ESubOperationResult OpenDestinationFileFB(TLocalFilesystemFile& fileDst, const chcore::TSmartPath& pathDstFile, bool bNoBuffering, const CFileInfoPtr& spSrcFileInfo, unsigned long long& ullSeekTo, bool& bFreshlyCreated); + ESubOperationResult OpenDestinationFileFB(TLocalFilesystemFile& fileDst, const chcore::TSmartPath& pathDstFile, bool bNoBuffering, const chcore::CFileInfoPtr& spSrcFileInfo, unsigned long long& ullSeekTo, bool& bFreshlyCreated); ESubOperationResult OpenExistingDestinationFileFB(TLocalFilesystemFile& fileDst, const chcore::TSmartPath& pathDstFilePath, bool bNoBuffering); ESubOperationResult SetFilePointerFB(TLocalFilesystemFile& file, long long llDistance, const chcore::TSmartPath& pathFile, bool& bSkip); Index: src/ch/TSubTaskDelete.cpp =================================================================== diff -u -rab32897e61cc637a1e28d9dc3f0489b8d16a429c -rd12e49decb8a3df3e28f6786d38542390484ac07 --- src/ch/TSubTaskDelete.cpp (.../TSubTaskDelete.cpp) (revision ab32897e61cc637a1e28d9dc3f0489b8d16a429c) +++ src/ch/TSubTaskDelete.cpp (.../TSubTaskDelete.cpp) (revision d12e49decb8a3df3e28f6786d38542390484ac07) @@ -39,7 +39,7 @@ { // log icpf::log_file& rLog = GetContext().GetLog(); - CFileInfoArray& rFilesCache = GetContext().GetFilesCache(); + chcore::CFileInfoArray& rFilesCache = GetContext().GetFilesCache(); chcore::TTaskDefinition& rTaskDefinition = GetContext().GetTaskDefinition(); TTaskBasicProgressInfo& rBasicProgressInfo = GetContext().GetTaskBasicProgressInfo(); chcore::TWorkerThreadController& rThreadController = GetContext().GetThreadController(); @@ -50,7 +50,7 @@ // current processed path BOOL bSuccess; - CFileInfoPtr spFileInfo; + chcore::CFileInfoPtr spFileInfo; ictranslate::CFormat fmt; // index points to 0 or next item to process Index: src/ch/TSubTaskScanDirectory.cpp =================================================================== diff -u -rd345f15636dc88c4c40fe310ac7777bd024e12d9 -rd12e49decb8a3df3e28f6786d38542390484ac07 --- src/ch/TSubTaskScanDirectory.cpp (.../TSubTaskScanDirectory.cpp) (revision d345f15636dc88c4c40fe310ac7777bd024e12d9) +++ src/ch/TSubTaskScanDirectory.cpp (.../TSubTaskScanDirectory.cpp) (revision d12e49decb8a3df3e28f6786d38542390484ac07) @@ -45,7 +45,7 @@ { // log icpf::log_file& rLog = GetContext().GetLog(); - CFileInfoArray& rFilesCache = GetContext().GetFilesCache(); + chcore::CFileInfoArray& rFilesCache = GetContext().GetFilesCache(); chcore::TTaskDefinition& rTaskDefinition = GetContext().GetTaskDefinition(); chcore::IFeedbackHandler* piFeedbackHandler = GetContext().GetFeedbackHandler(); const chcore::TBasePathDataContainer& rarrSourcePathsInfo = GetContext().GetBasePathDataContainer(); @@ -62,7 +62,7 @@ rFilesCache.Clear(); // read filtering options - CFiltersArray afFilters; + chcore::CFiltersArray afFilters; GetTaskPropValue(rTaskDefinition.GetConfiguration(), afFilters); // enter some data to rFilesCache @@ -80,11 +80,11 @@ size_t stSize = rTaskDefinition.GetSourcePathCount(); for(size_t stIndex = 0; stIndex < stSize ; stIndex++) { - CFileInfoPtr spFileInfo; + chcore::CFileInfoPtr spFileInfo; bSkipInputPath = false; - spFileInfo.reset(new CFileInfo()); + spFileInfo.reset(new chcore::CFileInfo()); // try to get some info about the input path; let user know if the path does not exist. do @@ -218,14 +218,14 @@ return eSubResult_Continue; } -int TSubTaskScanDirectories::ScanDirectory(chcore::TSmartPath pathDirName, size_t stSrcIndex, bool bRecurse, bool bIncludeDirs, CFiltersArray& afFilters) +int TSubTaskScanDirectories::ScanDirectory(chcore::TSmartPath pathDirName, size_t stSrcIndex, bool bRecurse, bool bIncludeDirs, chcore::CFiltersArray& afFilters) { - CFileInfoArray& rFilesCache = GetContext().GetFilesCache(); + chcore::CFileInfoArray& rFilesCache = GetContext().GetFilesCache(); chcore::TTaskDefinition& rTaskDefinition = GetContext().GetTaskDefinition(); chcore::TWorkerThreadController& rThreadController = GetContext().GetThreadController(); TLocalFilesystemFind finder = TLocalFilesystem::CreateFinderObject(pathDirName, chcore::PathFromString(_T("*"))); - CFileInfoPtr spFileInfo(boost::make_shared()); + chcore::CFileInfoPtr spFileInfo(boost::make_shared()); while(finder.FindNext(spFileInfo)) { @@ -238,7 +238,7 @@ { spFileInfo->SetParentObject(stSrcIndex, &rTaskDefinition.GetSourcePaths()); rFilesCache.AddFileInfo(spFileInfo); - spFileInfo = boost::make_shared(); + spFileInfo = boost::make_shared(); } } else @@ -248,7 +248,7 @@ { spFileInfo->SetParentObject(stSrcIndex, &rTaskDefinition.GetSourcePaths()); rFilesCache.AddFileInfo(spFileInfo); - spFileInfo = boost::make_shared(); + spFileInfo = boost::make_shared(); } if(bRecurse) Index: src/ch/TSubTaskScanDirectory.h =================================================================== diff -u -r8c87d4185fbe5b952c49f72afcfd5f9fca338fb4 -rd12e49decb8a3df3e28f6786d38542390484ac07 --- src/ch/TSubTaskScanDirectory.h (.../TSubTaskScanDirectory.h) (revision 8c87d4185fbe5b952c49f72afcfd5f9fca338fb4) +++ src/ch/TSubTaskScanDirectory.h (.../TSubTaskScanDirectory.h) (revision d12e49decb8a3df3e28f6786d38542390484ac07) @@ -25,7 +25,7 @@ #include "TSubTaskBase.h" #include "../libchcore/TPath.h" -#include "FileFilter.h" +#include "../libchcore/FileFilter.h" /////////////////////////////////////////////////////////////////////////// // TSubTaskScanDirectories @@ -39,7 +39,7 @@ virtual ESubOperationResult Exec(); private: - int ScanDirectory(chcore::TSmartPath pathDirName, size_t stSrcIndex, bool bRecurse, bool bIncludeDirs, CFiltersArray& afFilters); + int ScanDirectory(chcore::TSmartPath pathDirName, size_t stSrcIndex, bool bRecurse, bool bIncludeDirs, chcore::CFiltersArray& afFilters); }; #endif Index: src/ch/TTaskConfiguration.h =================================================================== diff -u -rb684bec49aaaea4b89ab2e599497f4085d8698a3 -rd12e49decb8a3df3e28f6786d38542390484ac07 --- src/ch/TTaskConfiguration.h (.../TTaskConfiguration.h) (revision b684bec49aaaea4b89ab2e599497f4085d8698a3) +++ src/ch/TTaskConfiguration.h (.../TTaskConfiguration.h) (revision d12e49decb8a3df3e28f6786d38542390484ac07) @@ -24,7 +24,7 @@ #define __TTASKCONFIGURATION_H__ #include "../libchcore/TConfig.h" -#include "FileFilter.h" +#include "../libchcore/FileFilter.h" enum ETaskOptions { @@ -116,7 +116,7 @@ TASK_PROPERTY(eTO_CreateDirectoriesRelativeToRoot, bool, _T("Operation.CreateDirectoriesRelativeToRoot"), false); TASK_PROPERTY(eTO_IgnoreDirectories, bool, _T("Operation.IgnoreDirectories"), false); -TASK_PROPERTY(eTO_Filters, CFiltersArray, _T("Operation.Filtering"), CFiltersArray()); +TASK_PROPERTY(eTO_Filters, chcore::CFiltersArray, _T("Operation.Filtering"), chcore::CFiltersArray()); // Naming settings TASK_PROPERTY(eTO_AlternateFilenameFormatString_First, CString, _T("Naming.AlternateFilenameFormatFirst"), _T("Copy of %name")); Index: src/ch/ch.vc90.vcproj =================================================================== diff -u -r6df9b4cff81dedf8c5571a98702b584b061eac09 -rd12e49decb8a3df3e28f6786d38542390484ac07 --- src/ch/ch.vc90.vcproj (.../ch.vc90.vcproj) (revision 6df9b4cff81dedf8c5571a98702b584b061eac09) +++ src/ch/ch.vc90.vcproj (.../ch.vc90.vcproj) (revision d12e49decb8a3df3e28f6786d38542390484ac07) @@ -419,22 +419,6 @@ > - - - - - - - - Index: src/ch/task.h =================================================================== diff -u -r6df9b4cff81dedf8c5571a98702b584b061eac09 -rd12e49decb8a3df3e28f6786d38542390484ac07 --- src/ch/task.h (.../task.h) (revision 6df9b4cff81dedf8c5571a98702b584b061eac09) +++ src/ch/task.h (.../task.h) (revision d12e49decb8a3df3e28f6786d38542390484ac07) @@ -21,10 +21,10 @@ #include "TAutoHandles.h" #include "../libchcore/TWorkerThreadController.h" -#include "FileInfo.h" +#include "../libchcore/FileInfo.h" #include "../libchcore/DataBuffer.h" #include "../libchcore/FeedbackHandlerBase.h" -#include "FileFilter.h" +#include "../libchcore/FileFilter.h" #include "../libchcore/TTaskDefinition.h" #include "TTaskConfigTracker.h" #include "../libchcore/TBasePathData.h" @@ -64,7 +64,7 @@ size_t m_stSize; chcore::TSmartPath m_pathDstPath; - CFiltersArray* m_pafFilters; + chcore::CFiltersArray* m_pafFilters; ETaskCurrentState m_eTaskState; chcore::EOperationType m_eOperationType; @@ -214,7 +214,7 @@ // current task state (derivatives of the task initial information) // changing slowly or only partially - CFileInfoArray m_files; // list of files/directories found during operating on the task input data (filled by search for files) + chcore::CFileInfoArray m_files; // list of files/directories found during operating on the task input data (filled by search for files) // changing fast volatile ETaskCurrentState m_eCurrentState; // current state of processing this task represents @@ -225,7 +225,7 @@ TTaskLocalStats m_localStats; // local statistics // task settings - CFiltersArray m_afFilters; // filtering settings for files (will be filtered according to the rules inside when searching for files) + chcore::CFiltersArray m_afFilters; // filtering settings for files (will be filtered according to the rules inside when searching for files) bool m_bForce; // if the continuation of tasks should be independent of max concurrently running task limit bool m_bContinue; // allows task to continue Fisheye: tag 10d4c73f3589c377ec0b60a2a053ff6aafeb507f is not in file src/libchcore/FileFilter.cpp Fisheye: Tag d12e49decb8a3df3e28f6786d38542390484ac07 refers to a dead (removed) revision in file `src/ch/FileFilter.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: tag 10d4c73f3589c377ec0b60a2a053ff6aafeb507f is not in file src/libchcore/FileFilter.h Fisheye: Tag d12e49decb8a3df3e28f6786d38542390484ac07 refers to a dead (removed) revision in file `src/ch/FileFilter.h'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: tag b611128c48b4bfbc20bf2ba0ac4168ae774ed79b is not in file src/libchcore/FileInfo.cpp Fisheye: Tag d12e49decb8a3df3e28f6786d38542390484ac07 refers to a dead (removed) revision in file `src/ch/FileInfo.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: tag 5fd6beaad9f1eccb664b997d151acb59961e4827 is not in file src/libchcore/FileInfo.h Fisheye: Tag d12e49decb8a3df3e28f6786d38542390484ac07 refers to a dead (removed) revision in file `src/ch/FileInfo.h'. Fisheye: No comparison available. Pass `N' to diff? Index: src/libchcore/SerializationHelpers.h =================================================================== diff -u -r5fd6beaad9f1eccb664b997d151acb59961e4827 -rd12e49decb8a3df3e28f6786d38542390484ac07 --- src/libchcore/SerializationHelpers.h (.../SerializationHelpers.h) (revision 5fd6beaad9f1eccb664b997d151acb59961e4827) +++ src/libchcore/SerializationHelpers.h (.../SerializationHelpers.h) (revision d12e49decb8a3df3e28f6786d38542390484ac07) @@ -101,6 +101,23 @@ SerializerType::StoreValue(rSerializer, tValue); } +#ifdef _ATL_VER + template<> + inline void Serialize(TReadBinarySerializer& rSerializer, ATL::CTime& tValue) + { + long long llTime = 0; + Serialize(rSerializer, llTime); + tValue = ATL::CTime(llTime); + } + + template<> + inline void Serialize(TWriteBinarySerializer& rSerializer, const ATL::CTime& tValue) + { + long long llTime = tValue.GetTime(); + Serialize(rSerializer, llTime); + } +#endif + #ifdef _MFC_VER template<> inline void Serialize(TReadBinarySerializer& rSerializer, CString& tValue) @@ -116,6 +133,7 @@ Serialize(rSerializer, (PCTSTR)tValue); } +/* template<> inline void Serialize(TReadBinarySerializer& rSerializer, CTime& tValue) { @@ -130,6 +148,7 @@ long long llTime = tValue.GetTime(); Serialize(rSerializer, llTime); } +*/ #endif } Index: src/libchcore/libchcore.vc90.vcproj =================================================================== diff -u -r6df9b4cff81dedf8c5571a98702b584b061eac09 -rd12e49decb8a3df3e28f6786d38542390484ac07 --- src/libchcore/libchcore.vc90.vcproj (.../libchcore.vc90.vcproj) (revision 6df9b4cff81dedf8c5571a98702b584b061eac09) +++ src/libchcore/libchcore.vc90.vcproj (.../libchcore.vc90.vcproj) (revision d12e49decb8a3df3e28f6786d38542390484ac07) @@ -348,6 +348,22 @@ > + + + + + + + +