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.

59 lines
1.4 KiB

  1. // CapMap.h: interface for the CCapMap class.
  2. //
  3. //////////////////////////////////////////////////////////////////////
  4. #if !defined(AFX_CAPMAP_H__2AE59261_E295_11D0_8A81_00C0F00910F9__INCLUDED_)
  5. #define AFX_CAPMAP_H__2AE59261_E295_11D0_8A81_00C0F00910F9__INCLUDED_
  6. #if _MSC_VER >= 1000
  7. #pragma once
  8. #endif // _MSC_VER >= 1000
  9. #include "Monitor.h"
  10. #include "RdWrt.h"
  11. #include "StrMap.h"
  12. #include "BrowCap.h"
  13. class CCapNotify : public CMonitorNotify
  14. {
  15. public:
  16. CCapNotify();
  17. virtual void Notify();
  18. bool IsNotified();
  19. private:
  20. long m_isNotified;
  21. };
  22. DECLARE_REFPTR( CCapNotify,CMonitorNotify )
  23. // The capabilites map is a singleton object (only one instance will exist).
  24. // It provides each BrowserCap object with access to the stored capabilites
  25. // while storing it in a central location (increasing the benifit of caching
  26. // and decreasing memory requirements)
  27. typedef TVector< String > StringVecT;
  28. class CCapMap
  29. {
  30. public:
  31. CCapMap();
  32. CBrowserCap * LookUp(const String& szBrowser);
  33. void StartMonitor();
  34. void StopMonitor();
  35. private:
  36. enum {
  37. DWSectionBufSize = 16384 // max size of an entire BrowsCap.INI section that we allow
  38. };
  39. bool Refresh();
  40. String m_strIniFile;
  41. CCapNotifyPtr m_pSink;
  42. };
  43. #endif // !defined(AFX_CAPMAP_H__2AE59261_E295_11D0_8A81_00C0F00910F9__INCLUDED_)