aboutsummaryrefslogtreecommitdiff
path: root/Src/gracenote/GracenoteApi.h
diff options
context:
space:
mode:
authorJean-Francois Mauguit <jfmauguit@mac.com>2024-09-24 09:03:25 -0400
committerGitHub <noreply@github.com>2024-09-24 09:03:25 -0400
commitbab614c421ed7ae329d26bf028c4a3b1d2450f5a (patch)
tree12f17f78986871dd2cfb0a56e5e93b545c1ae0d0 /Src/gracenote/GracenoteApi.h
parent4bde6044fddf053f31795b9eaccdd2a5a527d21f (diff)
parent20d28e80a5c861a9d5f449ea911ab75b4f37ad0d (diff)
downloadwinamp-bab614c421ed7ae329d26bf028c4a3b1d2450f5a.tar.gz
Merge pull request #5 from WinampDesktop/community
Merge to main
Diffstat (limited to 'Src/gracenote/GracenoteApi.h')
-rw-r--r--Src/gracenote/GracenoteApi.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/Src/gracenote/GracenoteApi.h b/Src/gracenote/GracenoteApi.h
new file mode 100644
index 00000000..b36ecf16
--- /dev/null
+++ b/Src/gracenote/GracenoteApi.h
@@ -0,0 +1,33 @@
+#ifndef NULLSOFT_GRACENOTE_GRACENOTEAPI_H
+#define NULLSOFT_GRACENOTE_GRACENOTEAPI_H
+
+#include "api_gracenote.h"
+#include "../nu/AutoLock.h"
+
+class GracenoteApi : public api_gracenote
+{
+public:
+ GracenoteApi();
+ ~GracenoteApi();
+ ICDDBControl2 *GetCDDB();
+ ICDDBMusicIDManager3 *GetMusicID(); // TODO: might need to instantiate separate objects because each manager can only have 1 event handler
+ //ICddbPlaylist25Mgr *GetPlaylistManager();
+ //int GetPlaylistManagerWithMLDBManager(ICddbPlaylist25Mgr **playlistMg, ICddbMLDBManager **mldbMgr);
+ int GetPlaylistManager(ICddbPlaylist25Mgr **playlistMg, ICddbMLDBManager **mldbMgr);
+ ICddbMLDBManager *GetMLDBManager();
+ void Close();
+
+ /* Some utility functions */
+ HRESULT CreateFingerprint(ICDDBMusicIDManager *musicID, api_decodefile *decodeApi, ICddbFileInfo *info, const wchar_t *filename, long *killswitch);
+private:
+ bool cddbInitialized, playlistInitialized;
+
+ ICDDBControl2 *pCDDBControl;
+
+ Nullsoft::Utility::LockGuard cddbGuard;
+protected:
+ RECVS_DISPATCH;
+};
+
+extern GracenoteApi gracenoteApi;
+#endif \ No newline at end of file