ics.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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 KC_ICS_H
  18. #define KC_ICS_H 1
  19. // Flags for ns__getChanges and ns__setSyncStatus
  20. #define ICS_SYNC_CONTENTS 1
  21. #define ICS_SYNC_HIERARCHY 2
  22. #define ICS_SYNC_AB 3
  23. #define ICS_MESSAGE 0x1000
  24. #define ICS_FOLDER 0x2000
  25. #define ICS_AB 0x4000
  26. #define ICS_ACTION_MASK 0x000F
  27. #define ICS_NEW 0x0001
  28. #define ICS_CHANGE 0x0002
  29. #define ICS_FLAG 0x0003
  30. #define ICS_SOFT_DELETE 0x0004
  31. #define ICS_HARD_DELETE 0x0005
  32. #define ICS_MOVED 0x0006 //not used
  33. #define ICS_CHANGE_FLAG_NEW (1 << (ICS_NEW))
  34. #define ICS_CHANGE_FLAG_CHANGE (1 << (ICS_CHANGE))
  35. #define ICS_CHANGE_FLAG_FLAG (1 << (ICS_FLAG))
  36. #define ICS_CHANGE_FLAG_SOFT_DELETE (1 << (ICS_SOFT_DELETE))
  37. #define ICS_CHANGE_FLAG_HARD_DELETE (1 << (ICS_HARD_DELETE))
  38. #define ICS_CHANGE_FLAG_MOVED (1 << (ICS_MOVED))
  39. #define ICS_MESSAGE_CHANGE (ICS_MESSAGE | ICS_CHANGE)
  40. #define ICS_MESSAGE_FLAG (ICS_MESSAGE | ICS_FLAG)
  41. #define ICS_MESSAGE_SOFT_DELETE (ICS_MESSAGE | ICS_SOFT_DELETE)
  42. #define ICS_MESSAGE_HARD_DELETE (ICS_MESSAGE | ICS_HARD_DELETE)
  43. #define ICS_MESSAGE_NEW (ICS_MESSAGE | ICS_NEW)
  44. #define ICS_FOLDER_CHANGE (ICS_FOLDER | ICS_CHANGE)
  45. #define ICS_FOLDER_SOFT_DELETE (ICS_FOLDER | ICS_SOFT_DELETE)
  46. #define ICS_FOLDER_HARD_DELETE (ICS_FOLDER | ICS_HARD_DELETE)
  47. #define ICS_FOLDER_NEW (ICS_FOLDER | ICS_NEW)
  48. #define ICS_AB_CHANGE (ICS_AB | ICS_CHANGE)
  49. #define ICS_AB_NEW (ICS_AB | ICS_NEW)
  50. #define ICS_AB_DELETE (ICS_AB | ICS_HARD_DELETE)
  51. #define ICS_ACTION(x) ((x) & ICS_ACTION_MASK)
  52. #endif /* KC_ICS_H */