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.

57 lines
1.5 KiB

  1. // LinkFile.h: interface for the CLinkFile class.
  2. //
  3. //////////////////////////////////////////////////////////////////////
  4. #if !defined(AFX_LINKFILE_H__253413CE_E71F_11D0_8A84_00C0F00910F9__INCLUDED_)
  5. #define AFX_LINKFILE_H__253413CE_E71F_11D0_8A84_00C0F00910F9__INCLUDED_
  6. #if _MSC_VER >= 1000
  7. #pragma once
  8. #endif // _MSC_VER >= 1000
  9. #include "RefCount.h"
  10. #include "RefPtr.h"
  11. #include "Link.h"
  12. #include "Monitor.h"
  13. #include "RdWrt.h"
  14. class CLinkNotify : public CMonitorNotify
  15. {
  16. public:
  17. CLinkNotify();
  18. virtual void Notify();
  19. bool IsNotified();
  20. private:
  21. long m_isNotified;
  22. };
  23. DECLARE_REFPTR( CLinkNotify,CMonitorNotify )
  24. class CLinkFile : public CRefCounter, public CReadWrite
  25. {
  26. public:
  27. CLinkFile( const String& strFile );
  28. int LinkIndex( const String& strPage );
  29. CLinkPtr Link( int nIndex );
  30. CLinkPtr NextLink( const String& strPage );
  31. CLinkPtr PreviousLink( const String& strPage );
  32. int NumLinks(){ return m_links.size(); }
  33. bool Refresh();
  34. bool IsOkay() const { return m_bIsOkay; }
  35. bool fUTF8() const { return m_fUTF8; }
  36. private:
  37. bool LoadFile();
  38. virtual ~CLinkFile();
  39. TVector< CLinkPtr > m_links;
  40. String m_strFile;
  41. CLinkNotifyPtr m_pNotify;
  42. bool m_bIsOkay;
  43. bool m_fUTF8;
  44. };
  45. typedef TRefPtr< CLinkFile > CLinkFilePtr;
  46. #endif // !defined(AFX_LINKFILE_H__253413CE_E71F_11D0_8A84_00C0F00910F9__INCLUDED_)