resourceIniParse.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #include <iostream>
  2. #include <vector>
  3. #include <fstream>
  4. #ifdef RVC_OS_WIN
  5. #include <windows.h>
  6. #endif // RVC_OS_WIN
  7. using namespace std;
  8. #define HEADINI_NAME "HeadquartersLocalMediaPlay.ini"
  9. #define BRANCHINI_NAME "BranchLocalMediaPlay.ini"
  10. #define NETWORKINI_NAME "NetWorkLocalMediaPlay.ini"
  11. #define SECTION_GENERAL _T("General")
  12. #define GENERAL_MEDIANUM _T("MediaNum")
  13. #define SECTION_MEDIA _T("Media")
  14. #define MEDIA_TYPE _T("Type")
  15. #define MEDIA_FULLSCREEN _T("FullScreen")
  16. #define MEDIA_PRIMMONITOR _T("PrimMonitor")
  17. #define MEDIA_SIMPLEMODE _T("SimpleMode")
  18. #define MEDIA_PLAYINTERVAL _T("PlayInterval")
  19. #define MEDIA_VIDIONAMES _T("VideoNames")
  20. #define MEDIA_VAILDTIME _T("VaildTime")
  21. #define MEDIA_PLAYTIME _T("PlayTime")
  22. #define MEDIA_PRIORITY _T("priority")
  23. #define STR_NULL _T("")
  24. typedef struct _resourceParse
  25. {
  26. char type; //Pic:P, Video:V, Mp3:M
  27. bool fullScreen;
  28. bool primMonitor;
  29. bool simpleMode;
  30. int playInterval;
  31. string videoNames;
  32. string vaildTime;
  33. string playTime;
  34. int priority;
  35. string resourcePath;
  36. }ResourceParse;
  37. bool checkInPlayTime(string playTime, bool checkCurTime = false);
  38. bool parseResourceIni(LPCTSTR filePath, vector<ResourceParse> &ret);
  39. bool checkInVaildTime(string vaildTime, bool checkCurData = false);