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.

72 lines
2.2 KiB

  1. // UploadEventsWrapper.h : Declaration of the CUploadEventsWrapper
  2. #ifndef __UPLOADEVENTSWRAPPER_H_
  3. #define __UPLOADEVENTSWRAPPER_H_
  4. #include "resource.h" // main symbols
  5. #include "EventWrapperCP.h"
  6. typedef IDispatchImpl<IUploadEventsWrapper, &IID_IUploadEventsWrapper, &LIBID_EVENTWRAPPERLib> IIDisp1;
  7. typedef IDispatchImpl<IMPCUploadEvents, &IID_IMPCUploadEvents, &LIBID_UPLOADMANAGERLib> IIDisp2;
  8. /////////////////////////////////////////////////////////////////////////////
  9. // CUploadEventsWrapper
  10. class ATL_NO_VTABLE CUploadEventsWrapper :
  11. public CComObjectRootEx<CComMultiThreadModel>,
  12. public CComCoClass<CUploadEventsWrapper, &CLSID_UploadEventsWrapper>,
  13. public IIDisp1,
  14. public IIDisp2,
  15. public IConnectionPointContainerImpl<CUploadEventsWrapper>,
  16. public CProxy_IUploadEventsWrapperEvents< CUploadEventsWrapper >
  17. {
  18. IMPCUploadJob* m_mpcujJob;
  19. DWORD m_dwUploadEventsCookie;
  20. CComPtr<IUnknown> m_pUnkMarshaler;
  21. public:
  22. CUploadEventsWrapper()
  23. {
  24. m_mpcujJob = NULL;
  25. m_dwUploadEventsCookie = 0;
  26. m_pUnkMarshaler = NULL;
  27. }
  28. HRESULT FinalConstruct();
  29. void FinalRelease();
  30. void UnregisterForEvents();
  31. DECLARE_REGISTRY_RESOURCEID(IDR_UPLOADEVENTSWRAPPER)
  32. DECLARE_NOT_AGGREGATABLE(CUploadEventsWrapper)
  33. DECLARE_GET_CONTROLLING_UNKNOWN()
  34. DECLARE_PROTECT_FINAL_CONSTRUCT()
  35. BEGIN_COM_MAP(CUploadEventsWrapper)
  36. COM_INTERFACE_ENTRY2(IDispatch, IIDisp1)
  37. COM_INTERFACE_ENTRY2(IMPCUploadEvents, IIDisp2)
  38. COM_INTERFACE_ENTRY(IUploadEventsWrapper)
  39. COM_INTERFACE_ENTRY(IConnectionPointContainer)
  40. COM_INTERFACE_ENTRY_IMPL(IConnectionPointContainer)
  41. COM_INTERFACE_ENTRY_AGGREGATE(IID_IMarshal, m_pUnkMarshaler.p)
  42. END_COM_MAP()
  43. BEGIN_CONNECTION_POINT_MAP(CUploadEventsWrapper)
  44. CONNECTION_POINT_ENTRY(DIID__IUploadEventsWrapperEvents)
  45. END_CONNECTION_POINT_MAP()
  46. public:
  47. // IMPCUploadEvents
  48. STDMETHOD(onStatusChange )( IMPCUploadJob* mpcujJob, UL_STATUS fStatus );
  49. STDMETHOD(onProgressChange)( IMPCUploadJob* mpcujJob, long lCurrentSize, long lTotalSize );
  50. // IUploadEventsWrapper
  51. STDMETHOD(Register)( IMPCUploadJob* mpcujJob );
  52. };
  53. #endif //__UPLOADEVENTSWRAPPER_H_