favoritesutil.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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 FAVORITESUTIL_H
  18. #define FAVORITESUTIL_H
  19. #include <kopano/zcdefs.h>
  20. #include <mapix.h>
  21. namespace KC {
  22. #define FAVO_FOLDER_LEVEL_BASE 0x00000
  23. #define FAVO_FOLDER_LEVEL_ONE 0x00001
  24. #define FAVO_FOLDER_LEVEL_SUB 0x00002
  25. #define FAVO_FOLDER_INHERIT_AUTO 0x10000 //unused
  26. // Default column set for shortcut folder (favorites)
  27. enum {
  28. SC_INSTANCE_KEY,
  29. SC_FAV_PUBLIC_SOURCE_KEY,
  30. SC_FAV_PARENT_SOURCE_KEY,
  31. SC_FAV_DISPLAY_NAME,
  32. SC_FAV_DISPLAY_ALIAS,
  33. SC_FAV_LEVEL_MASK,
  34. SC_FAV_CONTAINER_CLASS,
  35. SHORTCUT_NUM
  36. };
  37. extern _kc_export const SPropTagArray *GetShortCutTagArray(void);
  38. HRESULT AddToFavorite(IMAPIFolder *lpShortcutFolder, ULONG ulLevel, LPCTSTR lpszAliasName, ULONG ulFlags, ULONG cValues, LPSPropValue lpPropArray);
  39. extern _kc_export HRESULT GetShortcutFolder(LPMAPISESSION, LPTSTR folder_name, LPTSTR folder_comment, ULONG flags, LPMAPIFOLDER *scfolder);
  40. HRESULT CreateShortcutFolder(IMsgStore *lpMsgStore, LPTSTR lpszFolderName, LPTSTR lpszFolderComment, ULONG ulFlags, LPMAPIFOLDER* lppShortcutFolder);
  41. extern _kc_export HRESULT DelFavoriteFolder(IMAPIFolder *scfolder, LPSPropValue source_key);
  42. extern _kc_export HRESULT AddFavoriteFolder(IMAPIFolder *scfolder, LPMAPIFOLDER folder, LPCTSTR alias_name, ULONG flags);
  43. } /* namespace */
  44. #endif //#ifndef FAVORITESUTIL_H