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.

75 lines
3.2 KiB

  1. #ifndef _INC_PLAYBACK_H
  2. #define _INC_PLAYBACK_H
  3. class COfflinePlayback : public IStoreCallback, public ITimeoutCallback
  4. {
  5. public:
  6. // IUnknown
  7. HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void **ppvObject);
  8. ULONG STDMETHODCALLTYPE AddRef(void);
  9. ULONG STDMETHODCALLTYPE Release(void);
  10. // IStoreCallback
  11. HRESULT STDMETHODCALLTYPE OnBegin(STOREOPERATIONTYPE tyOperation, STOREOPERATIONINFO *pOpInfo, IOperationCancel *pCancel);
  12. HRESULT STDMETHODCALLTYPE OnProgress(STOREOPERATIONTYPE tyOperation, DWORD dwCurrent, DWORD dwMax, LPCSTR pszStatus);
  13. HRESULT STDMETHODCALLTYPE OnTimeout(LPINETSERVER pServer, LPDWORD pdwTimeout, IXPTYPE ixpServerType);
  14. HRESULT STDMETHODCALLTYPE CanConnect(LPCSTR pszAccountId, DWORD dwFlags);
  15. HRESULT STDMETHODCALLTYPE OnLogonPrompt(LPINETSERVER pServer, IXPTYPE );
  16. HRESULT STDMETHODCALLTYPE OnComplete(STOREOPERATIONTYPE tyOperation, HRESULT hrComplete, LPSTOREOPERATIONINFO pOpInfo, LPSTOREERROR pErrorInfo);
  17. HRESULT STDMETHODCALLTYPE OnPrompt(HRESULT hrError, LPCTSTR pszText, LPCTSTR pszCaption, UINT uType, INT *piUserResponse);
  18. HRESULT STDMETHODCALLTYPE GetParentWindow(DWORD dwReserved, HWND *phwndParent);
  19. // ITimeoutCallback
  20. HRESULT STDMETHODCALLTYPE OnTimeoutResponse(TIMEOUTRESPONSE eResponse);
  21. COfflinePlayback(void);
  22. ~COfflinePlayback(void);
  23. HRESULT DoPlayback(HWND hwnd, IDatabase *pDB, FOLDERID *pid, DWORD cid, FOLDERID idFolderSel);
  24. static INT_PTR CALLBACK PlaybackDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
  25. private:
  26. HRESULT _DoNextOperation(void);
  27. HRESULT _DoSetPropOp(SYNCOPINFO *pInfo);
  28. HRESULT _DoCreateOp(SYNCOPINFO *pInfo);
  29. HRESULT _DoDeleteOp(SYNCOPINFO *pInfo);
  30. HRESULT _DoCopyOp(SYNCOPINFO *pInfo);
  31. HRESULT _HandleSetPropComplete(HRESULT hrOperation, SYNCOPINFO *pInfo);
  32. HRESULT _HandleCreateComplete(HRESULT hrOperation, SYNCOPINFO *pInfo);
  33. HRESULT _HandleDeleteComplete(HRESULT hrOperation, SYNCOPINFO *pInfo);
  34. HRESULT _HandleCopyComplete(HRESULT hrOperation, SYNCOPINFO *pInfo);
  35. ULONG m_cRef;
  36. HRESULT m_hr;
  37. HWND m_hwndDlg;
  38. BOOL m_fComplete;
  39. STOREOPERATIONTYPE m_type;
  40. IOperationCancel *m_pCancel;
  41. HTIMEOUT m_hTimeout;
  42. DWORD m_cMovedToErrors;
  43. DWORD m_cFailures;
  44. IDatabase *m_pDB;
  45. FOLDERID *m_pid;
  46. DWORD m_iid;
  47. DWORD m_cid;
  48. FOLDERID m_idFolderSel;
  49. BOOL m_fSyncSel;
  50. FOLDERID m_idServer;
  51. FOLDERID m_idFolder;
  52. IMessageServer *m_pServer;
  53. IMessageFolder *m_pLocalFolder;
  54. DWORD m_iOps;
  55. DWORD m_cOps;
  56. CEnumerateSyncOps *m_pEnum;
  57. SYNCOPID m_idOperation;
  58. IMessageFolder *m_pFolderDest; // for copy and move
  59. };
  60. #endif // _INC_PLAYBACK_H