MP3Info.h 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #ifndef NULLSOFT_IN_MP3_MP3_INFO_H
  2. #define NULLSOFT_IN_MP3_MP3_INFO_H
  3. #include "Metadata.h"
  4. #include <windows.h>
  5. class MP3Info
  6. {
  7. public:
  8. MP3Info(const wchar_t *fn);
  9. char mpeg_description[1024];
  10. bool isOld();
  11. void get_file_info();
  12. int write_id3v1();
  13. int remove_id3v1();
  14. void display_id3v1(HWND hwndDlg);
  15. void get_id3v1_values(HWND hwndDlg);
  16. void display_id3v2(HWND hwndDlg);
  17. void get_id3v2_values(HWND hwndDlg);
  18. void write_id3v2(HWND hwndDlg);
  19. void do_enable_id3v1(HWND hwndDlg, int en);
  20. void do_enable_id3v2(HWND hwndDlg, int en);
  21. BOOL CALLBACK id3Proc(HWND hwndDlg, UINT uMsg, WPARAM wParam,LPARAM lParam);
  22. int setExtendedFileInfoW(const char *data, wchar_t *val);
  23. int writeExtendedFileInfo();
  24. bool IsMe(const wchar_t *fn)
  25. {
  26. return !lstrcmpW(file, fn);
  27. }
  28. protected:
  29. // Keep track of file timestamp for file system change notification handling
  30. FILETIME last_write_time;
  31. private:
  32. void SetField(const wchar_t *value, wchar_t *&v2, char *v1, size_t v1size);
  33. Metadata metadata;
  34. wchar_t file[MAX_PATH];
  35. };
  36. #endif