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.

47 lines
2.0 KiB

  1. #ifndef _INC_SYNC_H
  2. #define _INC_SYNC_H
  3. #include <syncop.h>
  4. class COfflineSync : public IUnknown
  5. {
  6. public:
  7. //----------------------------------------------------------------------
  8. // Construction
  9. //----------------------------------------------------------------------
  10. COfflineSync(void);
  11. ~COfflineSync(void);
  12. //----------------------------------------------------------------------
  13. // IUnknown Members
  14. //----------------------------------------------------------------------
  15. STDMETHODIMP QueryInterface(REFIID riid, LPVOID *ppv);
  16. STDMETHODIMP_(ULONG) AddRef(void);
  17. STDMETHODIMP_(ULONG) Release(void);
  18. HRESULT Initialize(void);
  19. HRESULT SetMessageFlags(IMessageFolder *pFolder, LPMESSAGEIDLIST pList, LPADJUSTFLAGS pFlags);
  20. HRESULT CreateMessage(IMessageFolder *pFolder, LPMESSAGEID pidMessage, SAVEMESSAGEFLAGS dwOptions, MESSAGEFLAGS dwFlags, IStream *pStream, IMimeMessage *pMessage);
  21. HRESULT DeleteMessages(IMessageFolder *pFolder, DELETEMESSAGEFLAGS dwFlags, LPMESSAGEIDLIST pList);
  22. HRESULT CopyMessages(IMessageFolder *pFolder, IMessageFolder *pFolderDest, COPYMESSAGEFLAGS dwFlags, LPMESSAGEIDLIST pList, LPADJUSTFLAGS pFlags);
  23. HRESULT DoPlayback(HWND hwnd, FOLDERID *pId, DWORD cId, FOLDERID idFolderSel);
  24. HRESULT GetRecordCount(LPDWORD pcRecords) {
  25. *pcRecords = 0;
  26. if (m_pDB)
  27. return(m_pDB->GetRecordCount(IINDEX_PRIMARY, pcRecords));
  28. return(TraceResult(E_FAIL));
  29. }
  30. private:
  31. HRESULT _FindExistingOperation(FOLDERID idServer, FOLDERID idFolder, MESSAGEID idMessage, DWORD typeSrc, DWORD typeDest, LPSYNCOPINFO pInfo);
  32. HRESULT _PlaybackServer(HWND hwnd, FOLDERID idServer);
  33. HRESULT _SetMessageFlags(IMessageFolder *pFolder, FOLDERID idServer, FOLDERID idFolder, MESSAGEID idMessage, MESSAGEFLAGS dwFlags, LPADJUSTFLAGS pFlags);
  34. LONG m_cRef;
  35. IDatabase *m_pDB;
  36. };
  37. extern COfflineSync *g_pSync;
  38. #endif // _INC_SYNC_H