Source code of Windows XP (NT5)
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.

84 lines
2.0 KiB

  1. #ifndef __ITSVMGR_H__
  2. #define __ITSVMGR_H__
  3. #include <atlinc.h>
  4. #include <itcc.h>
  5. #include <itww.h>
  6. #include <itwbrk.h>
  7. #include <verinfo.h>
  8. #include "svdoc.h"
  9. typedef struct
  10. {
  11. LPVOID pNext;
  12. CLSID clsid;
  13. IClassFactory *pCf;
  14. } CLSIDENTRY, *PCLSIDENTRY;
  15. typedef struct
  16. {
  17. LPVOID pNext;
  18. WCHAR wszObjName[80];
  19. IITBuildCollect *piitbc;
  20. IStorage *piistg;
  21. IStream *piistm;
  22. LPWSTR wszStorage;
  23. } OBJENTRY, *POBJENTRY;
  24. // Service manager class
  25. class CITSvMgr :
  26. public IITSvMgr,
  27. public CComObjectRoot,
  28. public CComCoClass<CITSvMgr,&CLSID_IITSvMgr>
  29. {
  30. public:
  31. BEGIN_COM_MAP(CITSvMgr)
  32. COM_INTERFACE_ENTRY(IITSvMgr)
  33. END_COM_MAP()
  34. DECLARE_REGISTRY (CLSID_IITSvMgr,
  35. "ITIR.SvMgr.4", "ITIR.SvMgr", 0, THREADFLAGS_APARTMENT)
  36. public:
  37. CITSvMgr(void);
  38. ~CITSvMgr(void);
  39. STDMETHOD(Initiate)(IStorage *pistgStorage, IStream *piistmLog);
  40. STDMETHOD(Dispose)(void);
  41. STDMETHOD(Build)(void);
  42. STDMETHOD(SetPropDest)
  43. (LPCWSTR szObjectName, LPCWSTR szDestination, IITPropList *pPL);
  44. STDMETHOD(CreateBuildObject)(LPCWSTR szObjectName, REFCLSID refclsid);
  45. STDMETHOD(GetBuildObject)
  46. (LPCWSTR pwstrObjectName, REFIID refiid, void **ppInterface);
  47. STDMETHOD(CreateDocTemplate)(CSvDoc **ppDoc);
  48. STDMETHOD(FreeDocTemplate)(CSvDoc *pDoc);
  49. STDMETHOD(AddDocument)(CSvDoc *pDoc);
  50. STDMETHOD(HashString)(LPCWSTR lpwstr, DWORD *pdwHash);
  51. private:
  52. STDMETHOD(CatalogSetEntry)(IITPropList *pPropList, DWORD dwFlags);
  53. STDMETHOD(CatalogCompleteUpdate)(void);
  54. STDMETHOD(LogMessage)(DWORD dwResourceId, ...);
  55. DL m_dlCLSID;
  56. DL m_dlObjList;
  57. IITCmdInt *m_pCmdInt;
  58. BOOL m_fInitialized;
  59. IITDatabase *m_piitdb;
  60. IPersistStorage *m_pipstgDatabase;
  61. IStorage *m_piistgRoot;
  62. IStream *m_piistmLog;
  63. // Document catalog members
  64. HANDLE m_hCatFile;
  65. char m_szCatFile[_MAX_PATH + 1];
  66. LPBYTE m_pCatHeader;
  67. DWORD m_dwMaxPropSize, m_dwMaxUID;
  68. IITPropList *m_pPLDocunent;
  69. }; /* CITSvMgr */
  70. #endif // __ITSVMGR_H__