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.

43 lines
1.3 KiB

  1. // LogString.h: interface for the CLogString class.
  2. //
  3. //////////////////////////////////////////////////////////////////////
  4. #if !defined(AFX_LOGSTRING_H__1606B935_224D_11D2_95D3_00C04FC22ADD__INCLUDED_)
  5. #define AFX_LOGSTRING_H__1606B935_224D_11D2_95D3_00C04FC22ADD__INCLUDED_
  6. #if _MSC_VER >= 1000
  7. #pragma once
  8. #endif // _MSC_VER >= 1000
  9. #include "apgtsstr.h" // for CString, which is NOT MFC CString.
  10. #include "nodestate.h"
  11. class CLogString
  12. {
  13. private:
  14. time_t m_timeStart; // Time this CLogString object was created
  15. CString m_strCookie;
  16. CString m_strTopic;
  17. CString m_strStates; // node/state (NID/IST) pairs
  18. CString m_strCurNode; // current node
  19. bool m_bLoggedError; // true ==> there was an error logged, in which case the next two
  20. // variables are meaningful.
  21. DWORD m_dwError;
  22. DWORD m_dwSubError;
  23. public:
  24. CLogString();
  25. ~CLogString();
  26. CString GetStr() const;
  27. void AddCookie(LPCTSTR szCookie);
  28. void AddTopic(LPCTSTR szTopic);
  29. void AddNode(NID nid, IST ist);
  30. void AddCurrentNode(NID nid);
  31. void AddError(DWORD dwError=0, DWORD dwSubError=0);
  32. private:
  33. void GetStartTimeString(CString& str) const;
  34. void GetDurationString(CString& str) const;
  35. };
  36. #endif // !defined(AFX_LOGSTRING_H__1606B935_224D_11D2_95D3_00C04FC22ADD__INCLUDED_)