Source code of Windows XP (NT5)
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.

70 lines
1.9 KiB

  1. // ratings data class
  2. class CRatingsData : public CObject
  3. {
  4. public:
  5. CRatingsData(IMSAdminBase* pMB);
  6. ~CRatingsData();
  7. IMSAdminBase* m_pMB;
  8. // other data for/from the metabase
  9. BOOL m_fEnabled;
  10. CString m_szEmail;
  11. // start date
  12. WORD m_start_minute;
  13. WORD m_start_hour;
  14. WORD m_start_day;
  15. WORD m_start_month;
  16. WORD m_start_year;
  17. // expire date
  18. WORD m_expire_minute;
  19. WORD m_expire_hour;
  20. WORD m_expire_day;
  21. WORD m_expire_month;
  22. WORD m_expire_year;
  23. // generate the label and save it into the metabase
  24. void SaveTheLable();
  25. // initialization
  26. BOOL FInit( CString szServer, CString szMeta );
  27. // variables shared between the various pages
  28. // index of the currently selected rat parser
  29. DWORD iRat;
  30. // the list of parsed rat files
  31. CTypedPtrArray<CObArray, PicsRatingSystem*> rgbRats;
  32. protected:
  33. // load a ratings file
  34. BOOL FLoadRatingsFile( CString szFilePath );
  35. void LoadMetabaseValues();
  36. void ParseMetaRating( CString szRating );
  37. void ParseMetaPair( TCHAR chCat, TCHAR chVal );
  38. // interpret the ratings file
  39. BOOL FParseRatingsFile( LPSTR pData, CString szPath );
  40. // create the URL for the the item supplied for the metabase
  41. BOOL FCreateURL( CString &sz );
  42. // create a date string
  43. void CreateDateSz( CString &sz, WORD day, WORD month, WORD year, WORD hour, WORD minute );
  44. // read a date string
  45. void ReadDateSz( CString sz, WORD* pDay, WORD* pMonth, WORD* pYear, WORD* pHour, WORD* pMinute );
  46. // target metabase location
  47. CString m_szMeta;
  48. CString m_szServer;
  49. CString m_szMetaPartial;
  50. };