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.

81 lines
1.8 KiB

  1. /*++
  2. Copyright (c) 1997-2001 Microsoft Corporation
  3. Module Name :
  4. ratdata.h
  5. Abstract:
  6. Ratings data class
  7. Author:
  8. Sergei Antonov (sergeia)
  9. Project:
  10. Internet Services Manager
  11. Revision History:
  12. --*/
  13. class CRatingsData : public CObject
  14. {
  15. public:
  16. CRatingsData();
  17. ~CRatingsData();
  18. // other data for/from the metabase
  19. BOOL m_fEnabled;
  20. CString m_szEmail;
  21. // start date
  22. WORD m_start_minute;
  23. WORD m_start_hour;
  24. WORD m_start_day;
  25. WORD m_start_month;
  26. WORD m_start_year;
  27. // expire date
  28. WORD m_expire_minute;
  29. WORD m_expire_hour;
  30. WORD m_expire_day;
  31. WORD m_expire_month;
  32. WORD m_expire_year;
  33. void SaveTheLabel();
  34. void SetUser(LPCTSTR name, LPCTSTR password)
  35. {
  36. m_username = name;
  37. m_password = password;
  38. }
  39. void SetServer(LPCTSTR name, LPCTSTR metapath)
  40. {
  41. m_szServer = name;
  42. m_szMeta = metapath;
  43. }
  44. void SetURL(LPCTSTR url)
  45. {
  46. m_szURL = url;
  47. }
  48. BOOL Init();
  49. DWORD iRat;
  50. CTypedPtrArray<CObArray, PicsRatingSystem*> rgbRats;
  51. protected:
  52. BOOL LoadRatingsFile(CString szFilePath);
  53. void LoadMetabaseValues();
  54. void ParseMetaRating(CString szRating);
  55. void ParseMetaPair( TCHAR chCat, TCHAR chVal );
  56. BOOL ParseRatingsFile(LPSTR pData);
  57. void CreateDateSz( CString &sz, WORD day, WORD month, WORD year, WORD hour, WORD minute );
  58. void ReadDateSz( CString sz, WORD* pDay, WORD* pMonth, WORD* pYear, WORD* pHour, WORD* pMinute );
  59. CString m_szMeta;
  60. CString m_szServer;
  61. CString m_szMetaPartial;
  62. CString m_username;
  63. CStrPassword m_password;
  64. CString m_szURL;
  65. };