1
0

metadata.cpp 1.0 KB

12345678910111213141516171819202122232425262728
  1. #include "main.h"
  2. LRESULT SetFileInfo(const wchar_t *filename, const wchar_t *metadata, const wchar_t *data)
  3. {
  4. extendedFileInfoStructW efis = {
  5. filename,
  6. metadata,
  7. data ? data : L"",
  8. data ? (size_t)lstrlenW(data) : 0,
  9. };
  10. return SendMessage(plugin.hwndWinampParent, WM_WA_IPC, (WPARAM)&efis, IPC_SET_EXTENDED_FILE_INFOW);
  11. }
  12. void WriteFileInfo()
  13. {
  14. SendMessage(plugin.hwndWinampParent, WM_WA_IPC, 0, IPC_WRITE_EXTENDED_FILE_INFO);
  15. }
  16. int GetFileInfo(const wchar_t *filename, const wchar_t *metadata, wchar_t *dest, int len)
  17. {
  18. extendedFileInfoStructW efis = { filename, metadata, dest, (size_t)len, };
  19. return (int)(INT_PTR)SendMessage(plugin.hwndWinampParent, WM_WA_IPC, (WPARAM)&efis, IPC_GET_EXTENDED_FILE_INFOW_HOOKABLE); //will return 1 if wa2 supports this IPC call
  20. }
  21. void TagUpdated(const wchar_t *filename)
  22. {
  23. SendMessage(plugin.hwndWinampParent, WM_WA_IPC, (WPARAM)filename, IPC_FILE_TAG_MAY_HAVE_UPDATEDW);
  24. }