Metadata.h 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. #ifndef NULLSOFT_WINAMP_METADATA_H
  2. #define NULLSOFT_WINAMP_METADATA_H
  3. /**
  4. ** Author: Ben Allison
  5. ** original date: April 10, 2006
  6. */
  7. #include "../Agave/Metadata/api_metadata.h"
  8. #include <vector>
  9. #include "../nu/AutoLock.h"
  10. class Metadata : public api_metadata
  11. {
  12. public:
  13. static const char *getServiceName() { return "Metadata API"; }
  14. static const GUID getServiceGuid() { return api_metadataGUID; }
  15. public:
  16. ~Metadata();
  17. int GetExtendedFileInfo(const wchar_t *filename, const wchar_t *tag, wchar_t *data, size_t dataLength);
  18. int SetExtendedFileInfo(const wchar_t *filename, const wchar_t *tag, const wchar_t *data);
  19. int WriteExtendedFileInfo(const wchar_t *filename);
  20. svc_metaTag *GetMetaTagObject(const wchar_t *filename, int flags, GUID *exclude, int numExcludes);
  21. svc_metaTag *GetMetaTagObjectByGUID(const GUID metaTagGuid);
  22. uint32_t GenerateKey(const wchar_t *field);
  23. protected:
  24. RECVS_DISPATCH;
  25. private:
  26. // this is hella slow but it'll get the ball rolling on implementing this
  27. std::vector<wchar_t*> keys;
  28. Nullsoft::Utility::LockGuard keyGuard;
  29. };
  30. extern Metadata *metadata;
  31. #endif