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.

89 lines
1.8 KiB

  1. /*++
  2. 1998 Seagate Software, Inc. All rights reserved.
  3. Module Name:
  4. hsmjobcx.cpp
  5. Abstract:
  6. This class contains properties that defines the context in which the job
  7. should be run.
  8. Author:
  9. Chuck Bardeen [cbardeen] 29-Oct-1996
  10. Revision History:
  11. --*/
  12. #include "resource.h" // main symbols
  13. #include "wsb.h"
  14. #ifndef _HSMJOBCX_
  15. #define _HSMJOBCX_
  16. /*++
  17. Class Name:
  18. CHsmJobContext
  19. Class Description:
  20. This class contains properties that defines the context in which the job
  21. should be run.
  22. --*/
  23. class CHsmJobContext :
  24. public CWsbObject,
  25. public IHsmJobContext,
  26. public CComCoClass<CHsmJobContext,&CLSID_CHsmJobContext>
  27. {
  28. public:
  29. CHsmJobContext() {}
  30. BEGIN_COM_MAP(CHsmJobContext)
  31. COM_INTERFACE_ENTRY(IHsmJobContext)
  32. COM_INTERFACE_ENTRY2(IPersist, IPersistStream)
  33. COM_INTERFACE_ENTRY(IPersistStream)
  34. COM_INTERFACE_ENTRY(IWsbCollectable)
  35. COM_INTERFACE_ENTRY(IWsbTestable)
  36. END_COM_MAP()
  37. DECLARE_REGISTRY_RESOURCEID(IDR_CHsmJobContext)
  38. // CComObjectRoot
  39. public:
  40. STDMETHOD(FinalConstruct)(void);
  41. void FinalRelease(void);
  42. // IPersist
  43. public:
  44. STDMETHOD(GetClassID)(LPCLSID pClsid);
  45. // IPersistStream
  46. public:
  47. STDMETHOD(GetSizeMax)(ULARGE_INTEGER* pSize);
  48. STDMETHOD(Load)(IStream* pStream);
  49. STDMETHOD(Save)(IStream* pStream, BOOL clearDirty);
  50. // IWsbTestable
  51. STDMETHOD(Test)(USHORT *passed, USHORT* failed);
  52. // IHsmJobContext
  53. public:
  54. STDMETHOD(Resources)(IWsbCollection** ppResources);
  55. STDMETHOD(EnumResources)(IWsbEnum** ppEnum);
  56. STDMETHOD(SetUsesAllManaged)(BOOL usesAllManaged);
  57. STDMETHOD(UsesAllManaged)(void);
  58. protected:
  59. CComPtr<IWsbCollection> m_pResources;
  60. BOOL m_usesAllManaged;
  61. };
  62. #endif // _HSMJOBCX_