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.

90 lines
2.3 KiB

  1. /*++
  2. Copyright (c) 2000 Microsoft Corporation
  3. Module Name:
  4. FaxOutgoingJobs.h
  5. Abstract:
  6. Declaration of Fax Outgoing Jobs Class
  7. Author:
  8. Iv Garber (IvG) May, 2000
  9. Revision History:
  10. --*/
  11. #ifndef __FAXOUTGOINGJOBS_H_
  12. #define __FAXOUTGOINGJOBS_H_
  13. #include "resource.h" // main symbols
  14. #include <vector>
  15. #include "FaxOutgoingJob.h"
  16. #include "FaxJobsCollection.h"
  17. namespace OutgoingJobsNamespace
  18. {
  19. // Jobs stored in array, pointers to them - in vector
  20. typedef std::vector<IFaxOutgoingJob*> ContainerType;
  21. // The collection interface exposes the data as Job objects
  22. typedef IFaxOutgoingJob CollectionExposedType;
  23. typedef IFaxOutgoingJobs CollectionIfc;
  24. // Use IEnumVARIANT as the enumerator for VB compatibility
  25. typedef VARIANT EnumExposedType;
  26. typedef IEnumVARIANT EnumIfc;
  27. // Typedef the copy classes using existing typedefs
  28. typedef VCUE::CopyIfc2Variant<ContainerType::value_type> EnumCopyType;
  29. typedef VCUE::CopyIfc<IFaxOutgoingJob*> CollectionCopyType;
  30. typedef CComEnumOnSTL< EnumIfc, &__uuidof(EnumIfc),
  31. EnumExposedType, EnumCopyType, ContainerType > EnumType;
  32. typedef JobCollection< CollectionIfc, ContainerType, CollectionExposedType, CollectionCopyType,
  33. EnumType, CFaxOutgoingJob, &IID_IFaxOutgoingJobs, &CLSID_FaxOutgoingJobs > CollectionType;
  34. };
  35. using namespace OutgoingJobsNamespace;
  36. //
  37. //=================== FAX OUTGOING JOBS =========================================
  38. //
  39. class ATL_NO_VTABLE CFaxOutgoingJobs :
  40. public CComObjectRootEx<CComSingleThreadModel>,
  41. public ISupportErrorInfo,
  42. public IDispatchImpl<OutgoingJobsNamespace::CollectionType, &IID_IFaxOutgoingJobs, &LIBID_FAXCOMEXLib>
  43. {
  44. public:
  45. CFaxOutgoingJobs()
  46. {
  47. DBG_ENTER(_T("FAX OUTGOING JOBS::CREATE"));
  48. }
  49. DECLARE_REGISTRY_RESOURCEID(IDR_FAXOUTGOINGJOBS)
  50. DECLARE_NOT_AGGREGATABLE(CFaxOutgoingJobs)
  51. DECLARE_PROTECT_FINAL_CONSTRUCT()
  52. BEGIN_COM_MAP(CFaxOutgoingJobs)
  53. COM_INTERFACE_ENTRY(IFaxOutgoingJobs)
  54. COM_INTERFACE_ENTRY(IDispatch)
  55. COM_INTERFACE_ENTRY(ISupportErrorInfo)
  56. END_COM_MAP()
  57. // Interfaces
  58. STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid);
  59. // Internal Use
  60. static HRESULT Create(IFaxOutgoingJobs **ppOutgoingJobs);
  61. };
  62. #endif //__FAXOUTGOINGJOBS_H_