Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

128 lines
4.9 KiB

  1. #ifndef _INC_SYNCOP_H
  2. #define _INC_SYNCOP_H
  3. // {26FE9D30-1A8F-11d2-AABF-006097D474C4}
  4. DEFINE_GUID(CLSID_SyncOpDatabase, 0x26fe9d30, 0x1a8f, 0x11d2, 0xaa, 0xbf, 0x0, 0x60, 0x97, 0xd4, 0x74, 0xc4);
  5. //------------------------------------------------------------------
  6. // Types
  7. //------------------------------------------------------------------
  8. DECLARE_HANDLE(SYNCOPID);
  9. typedef SYNCOPID *LPSYNCOPID;
  10. //------------------------------------------------------------------
  11. // SYNCOPID Constants
  12. //------------------------------------------------------------------
  13. const SYNCOPID SYNCOPID_INVALID = (SYNCOPID)-1;
  14. //------------------------------------------------------------------
  15. // SyncOp Database Version
  16. //------------------------------------------------------------------
  17. const DWORD SYNCOP_DATABASE_VERSION = 2;
  18. //------------------------------------------------------------------
  19. // SYNCOPTABLECOLID
  20. //------------------------------------------------------------------
  21. typedef enum tagSYNCOPTABLECOLID {
  22. OPCOL_ID = 0,
  23. OPCOL_SERVER,
  24. OPCOL_FOLDER,
  25. OPCOL_MESSAGE,
  26. OPCOL_OPTYPE,
  27. OPCOL_FLAGS,
  28. OPCOL_ADD_FLAGS,
  29. OPCOL_REMOVE_FLAGS,
  30. OPCOL_FOLDER_DEST,
  31. OPCOL_MESSAGE_DEST,
  32. OPCOL_LASTID
  33. } SYNCOPTABLECOLID;
  34. //------------------------------------------------------------------
  35. // SYNCUSERDATA
  36. //------------------------------------------------------------------
  37. typedef struct tagSYNCOPUSERDATA {
  38. DWORD fInitialized; // 4 Has this folder been initialized yet
  39. BYTE rgReserved[248]; // Reserved
  40. } SYNCOPUSERDATA, *LPSYNCOPUSERDATA;
  41. typedef enum tagSYNCOPTYPE {
  42. SYNC_INVALID = 0x0000,
  43. SYNC_SETPROP_MSG = 0x0001,
  44. SYNC_CREATE_MSG = 0x0002,
  45. SYNC_COPY_MSG = 0x0004,
  46. SYNC_MOVE_MSG = 0x0008,
  47. SYNC_DELETE_MSG = 0x0010
  48. } SYNCOPTYPE;
  49. //------------------------------------------------------------------
  50. // SOF_ sync op flags
  51. //------------------------------------------------------------------
  52. typedef DWORD SYNCOPFLAGS;
  53. #define SOF_ALLFLAGS 0x00000001
  54. //------------------------------------------------------------------
  55. // SYNCOPINFO
  56. //------------------------------------------------------------------
  57. typedef struct tagSYNCOPINFO {
  58. BYTE *pAllocated;
  59. BYTE bVersion;
  60. SYNCOPID idOperation;
  61. FOLDERID idServer;
  62. FOLDERID idFolder;
  63. MESSAGEID idMessage;
  64. SYNCOPTYPE tyOperation;
  65. SYNCOPFLAGS dwFlags;
  66. MESSAGEFLAGS dwAdd;
  67. MESSAGEFLAGS dwRemove;
  68. FOLDERID idFolderDest;
  69. MESSAGEID idMessageDest;
  70. } SYNCOPINFO, *LPSYNCOPINFO;
  71. //------------------------------------------------------------------
  72. // Operation Record Members
  73. //------------------------------------------------------------------
  74. BEGIN_COLUMN_ARRAY(g_rgOpTblColumns, OPCOL_LASTID)
  75. DEFINE_COLUMN(OPCOL_ID, CDT_DWORD, SYNCOPINFO, idOperation)
  76. DEFINE_COLUMN(OPCOL_SERVER, CDT_DWORD, SYNCOPINFO, idServer)
  77. DEFINE_COLUMN(OPCOL_FOLDER, CDT_DWORD, SYNCOPINFO, idFolder)
  78. DEFINE_COLUMN(OPCOL_MESSAGE, CDT_DWORD, SYNCOPINFO, idMessage)
  79. DEFINE_COLUMN(OPCOL_OPTYPE, CDT_WORD, SYNCOPINFO, tyOperation)
  80. DEFINE_COLUMN(OPCOL_FLAGS, CDT_DWORD, SYNCOPINFO, dwFlags)
  81. DEFINE_COLUMN(OPCOL_ADD_FLAGS, CDT_DWORD, SYNCOPINFO, dwAdd)
  82. DEFINE_COLUMN(OPCOL_REMOVE_FLAGS, CDT_DWORD, SYNCOPINFO, dwRemove)
  83. DEFINE_COLUMN(OPCOL_FOLDER_DEST, CDT_DWORD, SYNCOPINFO, idFolderDest)
  84. DEFINE_COLUMN(OPCOL_MESSAGE_DEST, CDT_DWORD, SYNCOPINFO, idMessageDest)
  85. END_COLUMN_ARRAY
  86. //------------------------------------------------------------------
  87. // g_OpTblPrimaryIndex
  88. //------------------------------------------------------------------
  89. BEGIN_TABLE_INDEX(g_OpTblPrimaryIndex, 1)
  90. DEFINE_KEY(OPCOL_ID, 0, 0)
  91. END_TABLE_INDEX
  92. BEGIN_TABLE_INDEX(g_OpFolderIdIndex, 3)
  93. DEFINE_KEY(OPCOL_SERVER, 0, 0)
  94. DEFINE_KEY(OPCOL_FOLDER, 0, 0)
  95. DEFINE_KEY(OPCOL_ID, 0, 0)
  96. END_TABLE_INDEX
  97. extern const TABLEINDEX g_OpFolderIdIndex;
  98. //------------------------------------------------------------------
  99. // Operation Record Format
  100. //------------------------------------------------------------------
  101. BEGIN_TABLE_SCHEMA(g_SyncOpTableSchema, CLSID_SyncOpDatabase, SYNCOPINFO)
  102. SCHEMA_PROPERTY(SYNCOP_DATABASE_VERSION)
  103. SCHEMA_PROPERTY(TSF_RESETIFBADVERSION)
  104. SCHEMA_PROPERTY(sizeof(SYNCOPUSERDATA))
  105. SCHEMA_PROPERTY(offsetof(SYNCOPINFO, idOperation))
  106. SCHEMA_PROPERTY(OPCOL_LASTID)
  107. SCHEMA_PROPERTY(g_rgOpTblColumns)
  108. SCHEMA_PROPERTY(&g_OpTblPrimaryIndex)
  109. SCHEMA_PROPERTY(NULL)
  110. END_TABLE_SCHEMA
  111. extern const TABLESCHEMA g_SyncOpTableSchema;
  112. #endif // _INC_SYNCOP_H