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. FaxIncomingJobs.h
  5. Abstract:
  6. Definition of Fax Incoming JobS Class.
  7. Author:
  8. Iv Garber (IvG) May, 2000
  9. Revision History:
  10. --*/
  11. #ifndef __FAXINCOMINGJOBS_H_
  12. #define __FAXINCOMINGJOBS_H_
  13. #include "resource.h" // main symbols
  14. #include <vector>
  15. #include "FaxIncomingJob.h"
  16. #include "FaxJobsCollection.h"
  17. namespace IncomingJobsNamespace
  18. {
  19. // Jobs stored in array, pointers to them - in vector
  20. typedef std::vector<IFaxIncomingJob*> ContainerType;
  21. // The collection interface exposes the data as Incoming Job objects
  22. typedef IFaxIncomingJob CollectionExposedType;
  23. typedef IFaxIncomingJobs 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<IFaxIncomingJob*> CollectionCopyType;
  30. typedef CComEnumOnSTL< EnumIfc, &__uuidof(EnumIfc),
  31. EnumExposedType, EnumCopyType, ContainerType > EnumType;
  32. typedef JobCollection< CollectionIfc, ContainerType, CollectionExposedType, CollectionCopyType,
  33. EnumType, CFaxIncomingJob, &IID_IFaxIncomingJobs, &CLSID_FaxIncomingJobs > CollectionType;
  34. };
  35. using namespace IncomingJobsNamespace;
  36. //
  37. //==================== CFaxIncomingJobs ==========================================
  38. //
  39. class ATL_NO_VTABLE CFaxIncomingJobs :
  40. public CComObjectRootEx<CComSingleThreadModel>,
  41. public ISupportErrorInfo,
  42. public IDispatchImpl<IncomingJobsNamespace::CollectionType, &IID_IFaxIncomingJobs, &LIBID_FAXCOMEXLib>
  43. {
  44. public:
  45. CFaxIncomingJobs()
  46. {
  47. DBG_ENTER(_T("FAX INCOMING JOBS::CREATE"));
  48. }
  49. DECLARE_REGISTRY_RESOURCEID(IDR_FAXINCOMINGJOBS)
  50. DECLARE_NOT_AGGREGATABLE(CFaxIncomingJobs)
  51. DECLARE_PROTECT_FINAL_CONSTRUCT()
  52. BEGIN_COM_MAP(CFaxIncomingJobs)
  53. COM_INTERFACE_ENTRY(IFaxIncomingJobs)
  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(IFaxIncomingJobs **ppIncomingJobs);
  61. };
  62. #endif //__FAXINCOMINGJOBS_H_