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.

100 lines
2.2 KiB

  1. /*++
  2. Copyright (C) 1996-1999 Microsoft Corporation
  3. Module Name:
  4. PINFO.H
  5. History:
  6. --*/
  7. #ifndef PINFO_H
  8. #define PINFO_H
  9. class CLocParserManager;
  10. class CLocParserInfo;
  11. typedef CTypedPtrList<CPtrList, CLocParserInfo *> CLocParserList;
  12. #pragma warning(disable : 4251)
  13. interface ILocParser;
  14. interface ILocStringValidation;
  15. class LTAPIENTRY CLocParserInfo : public CLObject
  16. {
  17. public:
  18. void AssertValid(void) const;
  19. const CLString &GetParserName(void) const;
  20. const CLString &GetParserDescription(void) const;
  21. const CLString &GetParserHelp(void) const;
  22. ParserId GetParserId(void) const;
  23. BOOL GetDllVersion(CLString &) const;
  24. const CLocExtensionList &GetExtensionList() const;
  25. const CLocParserList &GetSubParserList(void) const;
  26. ~CLocParserInfo();
  27. protected:
  28. friend CLocParserManager;
  29. CLocParserInfo();
  30. HINSTANCE GetParserHandle(void) const;
  31. ILocParser * GetParserPointer(void) const;
  32. ILocStringValidation *GetValidationPointer(void);
  33. BOOL LoadParserDll(void);
  34. BOOL InitSubParsers(ILocParser *);
  35. BOOL FreeParserDll(void);
  36. BOOL AttemptUnload(void);
  37. BOOL IsLoaded(void) const;
  38. void SetParserName(const CLString &);
  39. void SetParserDescription(const CLString &);
  40. void SetParserHelp(const CLString &);
  41. void SetParserId(ParserId);
  42. BOOL SetExtensionList(const CLString &);
  43. void AddSubParser(CLocParserInfo *);
  44. void AddExtensions(const CLocExtensionList &);
  45. CLocParserList &GetSubParserList(void);
  46. clock_t GetLastAccessTime(void) const;
  47. static BOOL LoadParserDll(const CLString &strFileName,
  48. CReporter *pReporter, HMODULE &hDll, ILocParser *&pLocParser);
  49. static BOOL GetParserObjects(CReporter *, CLoadLibrary &, ILocParser *&);
  50. private:
  51. CLString m_strParserName;
  52. CLString m_strParserDescription;
  53. CLString m_strParserHelp;
  54. CLocExtensionList m_elExtList;
  55. ParserId m_pidParserId;
  56. HINSTANCE m_hParserDll;
  57. ILocParser *m_pParserObject;
  58. ILocStringValidation *m_pValidationObject;
  59. BOOL m_fLoadAttempted;
  60. BOOL m_fValidationTried;
  61. UINT m_uiSubParserUsageCount;
  62. mutable clock_t m_tLastAccess;
  63. CLocParserList m_pSubParsers;
  64. };
  65. #pragma warning(default : 4251)
  66. #endif // PINFO_H