Index: src/ch/FeedbackHandler.h =================================================================== diff -u -N -re912e0a6b456c2eed24bec7303a908d3ff0aa59a -rd5c3edd0d167db9b5d47d04248820fda49499a5e --- src/ch/FeedbackHandler.h (.../FeedbackHandler.h) (revision e912e0a6b456c2eed24bec7303a908d3ff0aa59a) +++ src/ch/FeedbackHandler.h (.../FeedbackHandler.h) (revision d5c3edd0d167db9b5d47d04248820fda49499a5e) @@ -1,94 +1,94 @@ -/*************************************************************************** - * Copyright (C) 2001-2008 by J�zef Starosczyk * - * ixen@copyhandler.com * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU Library General Public License * - * (version 2) as published by the Free Software Foundation; * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * - ***************************************************************************/ -#ifndef __FEEDBACKHANDLER_H__ -#define __FEEDBACKHANDLER_H__ - -#include "../libchcore/FeedbackHandlerBase.h" -#include "FileInfo.h" - -struct FEEDBACK_ALREADYEXISTS -{ - CFileInfo* pfiSrc; - CFileInfo* pfiDst; -}; - -struct FEEDBACK_FILEERROR -{ - const tchar_t* pszPath; - ulong_t ulError; -}; - -struct FEEDBACK_NOTENOUGHSPACE -{ - ull_t ullRequiredSize; - const tchar_t* pszSrcPath; - const tchar_t* pszDstPath; -}; - -class CFeedbackHandler : public chcore::IFeedbackHandler -{ -public: - enum EFeedbackType - { - eFT_Unknown = 0, - eFT_FileAlreadyExists, - eFT_FileError, - eFT_NotEnoughSpace, - eFT_LastType - }; - - enum EFeedbackResult - { - eResult_Unknown = 0, - eResult_Overwrite, - eResult_CopyRest, - eResult_Skip, - eResult_Cancel, - eResult_Pause, - eResult_Retry - }; - -protected: - CFeedbackHandler(); - ~CFeedbackHandler(); - -public: - virtual ull_t RequestFeedback(ull_t ullFeedbackID, ptr_t pFeedbackParam); - virtual void Delete(); - -protected: - EFeedbackResult m_aeFeedbackTypeStatus[eFT_LastType]; - - friend class CFeedbackHandlerFactory; -}; - -class CFeedbackHandlerFactory : public chcore::IFeedbackHandlerFactory -{ -protected: - CFeedbackHandlerFactory() {} - ~CFeedbackHandlerFactory() {} - -public: - chcore::IFeedbackHandler* Create(); - virtual void Delete(); - - static IFeedbackHandlerFactory* CreateFactory(); -}; - -#endif +/*************************************************************************** + * Copyright (C) 2001-2008 by J�zef Starosczyk * + * ixen@copyhandler.com * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU Library General Public License * + * (version 2) as published by the Free Software Foundation; * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU Library General Public * + * License along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ +#ifndef __FEEDBACKHANDLER_H__ +#define __FEEDBACKHANDLER_H__ + +#include "../libchcore/FeedbackHandlerBase.h" +#include "FileInfo.h" + +struct FEEDBACK_ALREADYEXISTS +{ + CFileInfo* pfiSrc; + CFileInfo* pfiDst; +}; + +struct FEEDBACK_FILEERROR +{ + const tchar_t* pszPath; + ulong_t ulError; +}; + +struct FEEDBACK_NOTENOUGHSPACE +{ + ull_t ullRequiredSize; + const tchar_t* pszSrcPath; + const tchar_t* pszDstPath; +}; + +class CFeedbackHandler : public chcore::IFeedbackHandler +{ +public: + enum EFeedbackType + { + eFT_Unknown = 0, + eFT_FileAlreadyExists, + eFT_FileError, + eFT_NotEnoughSpace, + eFT_LastType + }; + + enum EFeedbackResult + { + eResult_Unknown = 0, + eResult_Overwrite, + eResult_CopyRest, + eResult_Skip, + eResult_Cancel, + eResult_Pause, + eResult_Retry + }; + +protected: + CFeedbackHandler(); + ~CFeedbackHandler(); + +public: + virtual ull_t RequestFeedback(ull_t ullFeedbackID, ptr_t pFeedbackParam); + virtual void Delete(); + +protected: + EFeedbackResult m_aeFeedbackTypeStatus[eFT_LastType]; + + friend class CFeedbackHandlerFactory; +}; + +class CFeedbackHandlerFactory : public chcore::IFeedbackHandlerFactory +{ +protected: + CFeedbackHandlerFactory() {} + ~CFeedbackHandlerFactory() {} + +public: + chcore::IFeedbackHandler* Create(); + virtual void Delete(); + + static IFeedbackHandlerFactory* CreateFactory(); +}; + +#endif