1
0

GracenoteApi.h 1.0 KB

123456789101112131415161718192021222324252627282930313233
  1. #ifndef NULLSOFT_GRACENOTE_GRACENOTEAPI_H
  2. #define NULLSOFT_GRACENOTE_GRACENOTEAPI_H
  3. #include "api_gracenote.h"
  4. #include "../nu/AutoLock.h"
  5. class GracenoteApi : public api_gracenote
  6. {
  7. public:
  8. GracenoteApi();
  9. ~GracenoteApi();
  10. ICDDBControl2 *GetCDDB();
  11. ICDDBMusicIDManager3 *GetMusicID(); // TODO: might need to instantiate separate objects because each manager can only have 1 event handler
  12. //ICddbPlaylist25Mgr *GetPlaylistManager();
  13. //int GetPlaylistManagerWithMLDBManager(ICddbPlaylist25Mgr **playlistMg, ICddbMLDBManager **mldbMgr);
  14. int GetPlaylistManager(ICddbPlaylist25Mgr **playlistMg, ICddbMLDBManager **mldbMgr);
  15. ICddbMLDBManager *GetMLDBManager();
  16. void Close();
  17. /* Some utility functions */
  18. HRESULT CreateFingerprint(ICDDBMusicIDManager *musicID, api_decodefile *decodeApi, ICddbFileInfo *info, const wchar_t *filename, long *killswitch);
  19. private:
  20. bool cddbInitialized, playlistInitialized;
  21. ICDDBControl2 *pCDDBControl;
  22. Nullsoft::Utility::LockGuard cddbGuard;
  23. protected:
  24. RECVS_DISPATCH;
  25. };
  26. extern GracenoteApi gracenoteApi;
  27. #endif