instanceidmapper.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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. #ifndef instanceidmapper_INCLUDED
  18. #define instanceidmapper_INCLUDED
  19. #include <memory>
  20. #include <kopano/zcdefs.h>
  21. #include "instanceidmapper_fwd.h"
  22. #include <mapidefs.h>
  23. namespace KC {
  24. class ECConfig;
  25. class ECLogger;
  26. class KCMDatabaseMySQL;
  27. typedef std::shared_ptr<KCMDatabaseMySQL> DatabasePtr;
  28. namespace operations {
  29. class _kc_export InstanceIdMapper _kc_final {
  30. public:
  31. static HRESULT Create(ECLogger *lpLogger, ECConfig *lpConfig, InstanceIdMapperPtr *lpptrMapper);
  32. _kc_hidden HRESULT GetMappedInstanceId(const SBinary &src_server_uid, ULONG src_instance_id_size, LPENTRYID src_instance_id, const SBinary &dst_server_uid, ULONG *dst_instance_id_size, LPENTRYID *dst_instance_id);
  33. _kc_hidden HRESULT SetMappedInstances(ULONG prop_id, const SBinary &src_server_uid, ULONG src_instance_id_size, LPENTRYID src_instance_id, const SBinary &dst_server_uid, ULONG dst_instance_id_size, LPENTRYID dst_instance_id);
  34. private:
  35. _kc_hidden InstanceIdMapper(ECLogger *);
  36. _kc_hidden HRESULT Init(ECConfig *);
  37. DatabasePtr m_ptrDatabase;
  38. };
  39. }} /* namespace */
  40. #endif // ndef instanceidmapper_INCLUDED