ArchiverImpl.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /*
  2. * Copyright 2005 - 2016 Zarafa and its licensors
  3. *
  4. * This program is free software: you can redistribute it and/or modify
  5. * it under the terms of the GNU Affero General Public License, version 3,
  6. * as published by the Free Software Foundation.
  7. *
  8. * This program is distributed in the hope that it will be useful,
  9. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. * GNU Affero General Public License for more details.
  12. *
  13. * You should have received a copy of the GNU Affero General Public License
  14. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  15. *
  16. */
  17. /* ArchiverImpl.h
  18. * Declaration of class ArchiverImpl
  19. */
  20. #ifndef ARCHIVERIMPL_H_INCLUDED
  21. #define ARCHIVERIMPL_H_INCLUDED
  22. #include <kopano/zcdefs.h>
  23. #include <kopano/automapi.hpp>
  24. #include "Archiver.h" // for declaration of class Archiver
  25. #include "ArchiverSessionPtr.h" // For ArchiverSessionPtr
  26. namespace KC {
  27. class ArchiverImpl _kc_final : public Archiver {
  28. public:
  29. ArchiverImpl(void) = default;
  30. ArchiverImpl(const ArchiverImpl &) = delete;
  31. ~ArchiverImpl();
  32. eResult Init(const char *lpszAppName, const char *lpszConfig, const configsetting_t *lpExtraSettings, unsigned int ulFlags) _kc_override;
  33. eResult GetControl(ArchiveControlPtr *lpptrControl, bool bForceCleanup) _kc_override;
  34. eResult GetManage(const TCHAR *lpszUser, ArchiveManagePtr *lpptrManage) _kc_override;
  35. eResult AutoAttach(unsigned int ulFlags) _kc_override;
  36. ECConfig *GetConfig(void) const _kc_override { return m_lpsConfig; }
  37. ECLogger *GetLogger(eLogType which) const _kc_override; // Inherits default (which = DefaultLog) from Archiver::GetLogger
  38. private:
  39. configsetting_t* ConcatSettings(const configsetting_t *lpSettings1, const configsetting_t *lpSettings2);
  40. unsigned CountSettings(const configsetting_t *lpSettings);
  41. KCHL::AutoMAPI m_MAPI;
  42. ECConfig *m_lpsConfig = nullptr;
  43. ECLogger *m_lpLogger = nullptr;
  44. ECLogger *m_lpLogLogger = nullptr; // Logs only to the log specified in the config
  45. ArchiverSessionPtr m_ptrSession;
  46. configsetting_t *m_lpDefaults = nullptr;
  47. };
  48. } /* namespace */
  49. #endif // !defined ARCHIVERIMPL_H_INCLUDED