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.

107 lines
3.1 KiB

  1. // WWUMAIN.H: Definition of CITWordWheelUpdate
  2. #ifndef __WWUMAIN_H__
  3. #define __WWUMAIN_H__
  4. #include <windows.h>
  5. #include <mvopsys.h>
  6. #include <_mvutil.h>
  7. #include <wrapstor.h>
  8. #include <common.h>
  9. #include <wwheel.h>
  10. #include <verinfo.h>
  11. #include <itcc.h> // IITBuildCollect defined
  12. class CITWordWheelUpdate :
  13. public IITBuildCollect,
  14. public IPersistStorage,
  15. public CComObjectRoot,
  16. public CComCoClass<CITWordWheelUpdate,&CLSID_IITWordWheelUpdate>
  17. {
  18. public:
  19. CITWordWheelUpdate();
  20. ~CITWordWheelUpdate();
  21. BEGIN_COM_MAP(CITWordWheelUpdate)
  22. COM_INTERFACE_ENTRY(IITBuildCollect)
  23. COM_INTERFACE_ENTRY(IPersistStorage)
  24. END_COM_MAP()
  25. DECLARE_REGISTRY (CLSID_IITWordWheelUpdate,
  26. "ITIR.WordWheelBuild.4", "ITIR.WordWheelBuild",
  27. 0, THREADFLAGS_APARTMENT)
  28. public:
  29. STDMETHOD(SetConfigInfo)(IITDatabase *piitdb, VARARG vaParams);
  30. STDMETHOD(InitHelperInstance)(DWORD dwHelperObjInstance,
  31. IITDatabase *pITDatabase, DWORD dwCodePage,
  32. LCID lcid, VARARG vaDword, VARARG vaString);
  33. STDMETHOD(SetEntry)(LPCWSTR szDest, IITPropList *pPropList);
  34. STDMETHOD(Close)(void);
  35. STDMETHOD(GetTypeString)(LPWSTR pPrefix, DWORD *pLength);
  36. STDMETHOD(SetBuildStats)(ITBuildObjectControlInfo &itboci)
  37. { return E_NOTIMPL;}
  38. STDMETHOD(GetClassID)(CLSID *pClsID);
  39. STDMETHOD(IsDirty)(void);
  40. STDMETHOD(Load)(IStorage *pStg);
  41. STDMETHOD(Save)(IStorage *pStgSave, BOOL fSameAsLoad);
  42. STDMETHOD(InitNew)(IStorage *pStg);
  43. STDMETHOD(SaveCompleted)(IStorage *pStgNew);
  44. STDMETHOD(HandsOffStorage)(void);
  45. private:
  46. STDMETHOD(BuildPermanentFiles)
  47. (IStorage *pIStorage, IStream *pHeaderStream);
  48. STDMETHOD(ResolveGlobalProperties)(IStream *pHeaderStream);
  49. BOOL m_fInitialized, m_fIsDirty;
  50. DWORD m_dwEntryCount;
  51. HANDLE m_hTempFile, m_hGlobalPropTempFile;
  52. char m_szTempFile [_MAX_PATH + 1];
  53. char m_szGlobalPropTempFile[_MAX_PATH + 1];
  54. IStorage *m_pStorage;
  55. DWORD m_dwGlobalPropSize;
  56. LPBYTE m_lpbKeyHeader, m_lpbOccHeader;
  57. DWORD m_cbKeyHeader, m_cbOccHeader;
  58. DWORD m_cbMaxKeyData, m_cbMaxOccData;
  59. IITSortKey *m_piitskSortKey;
  60. BTREE_PARAMS m_btParams;
  61. }; /* CITWordWheelUpdate */
  62. // Defines ********************************************************************
  63. #define CBKWBLOCKSIZE 2048
  64. #define CBMAX_KWENTRY 1024
  65. #define C_PROPDEST_KEY '1'
  66. #define C_PROPDEST_OCC '2'
  67. // Type Definitions ***********************************************************
  68. typedef struct tagSortInfo
  69. {
  70. int iSortFlags;
  71. LPCHARTAB *CharTabArray;
  72. } SORTINFO, FAR *PSORTINFO;
  73. typedef struct tagKeyword
  74. {
  75. LPSTR pPropData;
  76. DWORD cbPropData;
  77. char szKeyword[CBMAX_KWENTRY + 1];
  78. char bPropDest;
  79. } LKW, FAR *PLKW;
  80. // Function Prototypes ********************************************************
  81. HRESULT PASCAL ScanTempFile(LPFBI lpfbi, LPB lpbOut, LPV lpv);
  82. int PASCAL CompareKeys (LPSTR pWord1, LPSTR pWord2, LPV);
  83. HRESULT FWriteData (IStream *pStream,
  84. PLKW pKw, LPDWORD pdwWritten, LPBYTE pTempBuffer);
  85. LPSTR WINAPI ParseKeywordLine (LPSTR pBuffer, PLKW pKw);
  86. #ifdef BUILD_INDEX
  87. RC PASCAL AddToFtsIndex(LPFTSII lpftsii);
  88. #endif
  89. #endif /* __WWUMAIN_H__ */