Initial community commit

This commit is contained in:
Jef
2024-09-24 14:54:57 +02:00
parent 537bcbc862
commit 20d28e80a5
16810 changed files with 4640254 additions and 2 deletions

Binary file not shown.

View File

@ -0,0 +1,50 @@
#ifndef CDDB_PLUGIN_BASE_H
#define CDDB_PLUGIN_BASE_H
// Version of module interface
#define CDDBMODULE_VERSION 1
// Module Categories
// modules need to set this approprately to tell the manager what services it provides
#define CDDBMODULE_DECODER 0x10
#define CDDBMODULE_DECODERINFO 0x20
#define CDDBMODULE_ENCODER 0x40
#define CDDBMODULE_SIGNATURE 0x80
#define CDDBMODULE_FILEINFO 0x100
#define CDDBMODULE_SECURITY 0x200
//
// base module type
// all modules derive from this type
//
#ifndef CDDBMODULEINTERFACE
#define CDDBMODULEINTERFACE
typedef struct
{
void *handle;
char *moduleID;
int version;
int categories;
int initialized;
int (__stdcall *Init)(void*);
int (__stdcall *Deinit)();
} CDDBModuleInterface;
#endif
// entry point function type
typedef CDDBModuleInterface* (__cdecl *CDDBModuleQueryInterfaceFunc)(const char* lpszInterface);
//
// internal module handle
//
typedef struct
{
void *handle;
int initialized;
CDDBModuleInterface *baseInterface;
} CDDBModule;
#endif /* CDDB_PLUGIN_BASE_H */

View File

@ -0,0 +1,90 @@
#ifndef CDDBPLUGIN_WORKORDERMGR_H
#define CDDBPLUGIN_WORKORDERMGR_H
// sig gen headers
#include "CDDBPlugInBase.h"
#define CDDBMODULE_WORKORDERMGR_IF_NAME "workordermanagerModuleID"
#define CDDBMODULE_WORKORDERMGR 0x10000
#define CDDBMODULE_QUERY_INTERFACE_NAME "CDDBModuleQueryInterface"
// supported interfaces
#define WORK_ORDER_MANAGER_BASE_INTERFACE "CDDBModuleInterface"
#define WORK_ORDER_MANAGER_INTERFACE "workordermanager"
#define WORK_ORDER_MANAGER_INTERFACE2 "workordermanager2"
#ifndef CDDB_PLUGIN_SIGGEN_H
typedef enum
{
SG_NoError = 0,
SG_SignatureAcquired = 1,
SG_SignatureNotAcquired = 2,
SG_UnsupportedFormat = 3,
SG_ProcessingError = 4,
SG_InitializationError = 5,
SG_DeinitializationError = 6,
SG_InvalidParamError = 7,
SG_InternalError = 8,
SG_NotInitializedError = 9,
SG_OutOfMemory = 10,
SG_NotImplementedError = 11
}
SigGenResultCode;
#endif //#ifndef CDDB_PLUGIN_SIGGEN_H
//
//
//
#ifndef CDDBMODULEWORKORDERMGR
#define CDDBMODULEWORKORDERMGR
#define CDDBMODULE_WORKORDER_MGR_VERSION 1
typedef struct WorkOrderInstance* WorkOrderHandle;
typedef struct
{
CDDBModuleInterface base;
unsigned int version; /* current version is defined by CDDBMODULE_WORKORDER_MGR_VERSION */
unsigned int size; /* sizeof(CDDBModuleWorkOrder) */
unsigned int flags; /* nothing defined yet */
int (__stdcall *Initialize)(void* cddbcontrol, char* path);
int (__stdcall *Shutdown)(void);
int (__stdcall *GetSigHandle)(void** handle, void* disc, long track_num);
int (__stdcall *WriteSigData)(void* handle, void* data, long size);
int (__stdcall *CloseSig)(void* handle);
int (__stdcall *AbortSig)(void* handle);
} CDDBModuleWorkOrderManagerInterface;
typedef struct
{
CDDBModuleInterface base;
/* SetAlwaysGenerate
* Description: Enables/disables a Work Order Plugin DLL to always generate
* a signature, regardless of work orders.
*
* Args: dll_filepath - full path and filename of the plugin DLL
* for example: (C:\App\Cddb12Tone.dll)
* b_always_generate - enable/disable ignoring work orders
* for example: (0 or 1)
*
* Returns: 0 for success or an error.
* Failure conditions include:
* Invalid argument
*/
int (__stdcall *SetAlwaysGenerate)(char* dll_filepath,long b_always_generate);
} CDDBModuleWorkOrderManagerInterface2;
#endif /* CDDBMODULEWORKORDERMGR */
#endif /* CDDBPLUGIN_WORKORDERMGR_H */

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
Src/gracenote/Cddbx1.dll Normal file

Binary file not shown.

BIN
Src/gracenote/Cddbx2.dll Normal file

Binary file not shown.

BIN
Src/gracenote/Cddbx3.dll Normal file

Binary file not shown.

BIN
Src/gracenote/Cddbx4.dll Normal file

Binary file not shown.

BIN
Src/gracenote/Cddbx5.dll Normal file

Binary file not shown.

View File

@ -0,0 +1,472 @@
#include "GracenoteApi.h"
#include "api.h"
#include "../winamp/api_decodefile.h"
#include <bfc/error.h>
#include <limits.h>
#include <shlwapi.h>
#include <strsafe.h>
GracenoteApi::GracenoteApi()
{
cddbInitialized = false;
playlistInitialized = false;
pCDDBControl=0;
}
GracenoteApi::~GracenoteApi()
{
}
void GracenoteApi::Close()
{
if (pCDDBControl)
{
pCDDBControl->Shutdown();
pCDDBControl->Release();
pCDDBControl=0;
}
}
static void SetProxy(const wchar_t *proxy, ICddbOptions *options)
{
wchar_t user[1024]=L"";
wchar_t pass[1024]=L"";
wchar_t server[1024]=L"";
int port=80;
if (!_wcsnicmp(proxy,L"https:",6))
port = 443;
const wchar_t *skip = wcsstr(proxy, L"://");
if (skip)
proxy = skip+3;
skip = wcsstr(proxy, L"@");
if (skip)
{
const wchar_t *delimiter = wcsstr(proxy, L":");
if (delimiter < skip) // make sure there's really a password (and we didn't end up finding the port number)
{
StringCchCopyNW(user, 1024, proxy, delimiter-proxy);
StringCchCopyNW(pass, 1024, delimiter+1, skip-(delimiter+1));
proxy=skip+1;
}
else
{
StringCchCopyNW(user, 1024, proxy, skip-proxy);
proxy=skip+1;
}
}
skip = wcsstr(proxy, L":"); // look for port
if (skip)
{
StringCchCopyNW(server, 1024, proxy, skip-proxy);
port = _wtoi(skip+1);
}
else
StringCchCopyW(server, 1024, proxy);
if (server[0])
options->put_ProxyServer(server);
if (port)
options->put_ProxyServerPort(port);
if (user[0])
options->put_ProxyUserName(user);
if (pass[0])
options->put_ProxyPassword(pass);
}
// {C0A565DC-0CFE-405a-A27C-468B0C8A3A5C}
static const GUID internetConfigGroupGUID =
{ 0xc0a565dc, 0xcfe, 0x405a, { 0xa2, 0x7c, 0x46, 0x8b, 0xc, 0x8a, 0x3a, 0x5c } };
ICDDBControl2 *GracenoteApi::GetCDDB()
{
Nullsoft::Utility::AutoLock lock(cddbGuard);
if (!cddbInitialized)
{
CoCreateInstance(__uuidof(CDDBNSWinampControl), 0, CLSCTX_INPROC_SERVER, IID_IUnknown, (void **)&pCDDBControl);
if (pCDDBControl == NULL)
return 0;
#if 1 // TODO: benski> put back in once we can match winamp lang pack to a gracenote language ID
// translate if necessary
if (WASABI_API_LNG)
{
const wchar_t *langFolder = WASABI_API_LNG->GetLanguageFolder();
if (langFolder)
{
WIN32_FIND_DATAW find;
wchar_t mask[MAX_PATH] = {0}, maskLoc[16] = {0};
// attempt to get the language code to help better guess the CDDB dll needed
if(WASABI_API_LNG->GetLanguageIdentifier(LANG_IDENT_STR))
StringCchPrintfW(maskLoc, 16, L"CddbLang%s.dll", WASABI_API_LNG->GetLanguageIdentifier(LANG_LANG_CODE));
PathCombineW(mask, langFolder, maskLoc);
HANDLE hFind = FindFirstFileW(mask, &find);
// if the the guess provides nothing then scan for any valid dll (not ideal)
if (hFind == INVALID_HANDLE_VALUE)
{
PathCombineW(mask, langFolder, L"CddbLang*.dll");
hFind = FindFirstFileW(mask, &find);
}
if (hFind != INVALID_HANDLE_VALUE)
{
ICddbUIPtr ui;
ui.CreateInstance(__uuidof(CddbNSWinampUI));
if (ui)
{
long val = 0;
wchar_t cddb_lang_fn[MAX_PATH] = {0};
PathCombineW(cddb_lang_fn, langFolder, find.cFileName);
// TODO: benski> gracenote wants a "language ID" but we don't have a good way of knowing it :(
ui->SetUILanguage(0, cddb_lang_fn, &val);
// TODO: benski> also need to set ICddbOptions language ID
}
}
FindClose(hFind);
}
}
#endif
// winamp browser id
//HRESULT hr = pCDDBControl->SetClientInfo(L"7944448", L"F8DE207FBA826F136FF2C7EFE0AAB181", L"1", L"regstring");
//wa5's id
const wchar_t *appVersion = WASABI_API_APP->main_getVersionNumString();
/* development client ID */
//HRESULT hr = pCDDBControl->SetClientInfo(L"3714048", L"B49286AE14F73CCD73C23B371A56DB00", const_cast<BSTR>(appVersion), L"regstring");
/* Beta Client ID */
//HRESULT hr = pCDDBControl->SetClientInfo(L"8337664", L"A222F2FA8B3E047291DFDBF465FD3C95", const_cast<BSTR>(appVersion), L"regstring");
/* Production Client ID */
BSTR appVersionBSTR = SysAllocString(appVersion);
HRESULT hr = pCDDBControl->SetClientInfo(L"4896768", L"C1519CAE91489E405BCA93531837F2BE", appVersionBSTR, L"regstring");
SysFreeString(appVersionBSTR);
if (FAILED(hr))
return 0;
long flags = CACHE_UPDATE_FUZZY | CACHE_DONT_WRITE_ANY | CACHE_NO_LOOKUP_MEDIA; //CACHE_SUBMIT_ALL | CACHE_SUBMIT_OFFLINE | CACHE_SUBMIT_NEW | CACHE_NO_LOOKUP_MEDIA;
// set cache path for cddb control
ICddbOptionsPtr pOptions;
hr = pCDDBControl->GetOptions(&pOptions);
if (SUCCEEDED(hr))
{
wchar_t dataPath[MAX_PATH] = {0};
PathCombineW(dataPath, WASABI_API_APP->path_getUserSettingsPath(), L"Plugins");
CreateDirectoryW(dataPath, 0);
PathAppendW(dataPath, L"Gracenote");
CreateDirectoryW(dataPath, 0);
hr = pOptions->put_LocalCachePath(dataPath);
// initial cache flags
//BOOL bOnline = SendMessage(line.hMainWindow, WM_USER, 0, 242);
//if (!bOnline)
//flags |= CACHE_DONT_CONNECT;
// other needed settings
hr = pOptions->put_ProgressEvents(FALSE);
//hr = pOptions->put_LocalCacheFlags(CACHE_DONT_CREATE | CACHE_UPDATE_FUZZY | CACHE_SUBMIT_ALL);
hr = pOptions->put_LocalCacheFlags(flags);
hr = pOptions->put_LocalCacheSize(128 * 1024); // 128 megabyte limit on local cache size
hr = pOptions->put_LocalCacheTimeout(5 * 365); // 5 years (e.g. when Gracenote contract runs out)
hr = pOptions->put_TestSubmitMode(FALSE);
//hr = pOptions->put_TestSubmitMode(TRUE); //CT> for BETA cycle...
// this is supposed to turn off the spinning logo in the upper-left-hand corner
hr = pOptions->put_ResourceModule(-1);
// get n set proxy settings
const wchar_t *proxy = AGAVE_API_CONFIG->GetString(internetConfigGroupGUID, L"proxy", L"");
if (proxy && proxy[0])
SetProxy(proxy, pOptions);
// save settings
hr = pCDDBControl->SetOptions(pOptions);
}
hr = pCDDBControl->Initialize(0/*(long)line.hMainWindow*/, (CDDBCacheFlags)flags);
// checks for user registration
long pVal=0;
// this must be called when control is first initialized
// this will load existing registration into control
hr = pCDDBControl->IsRegistered(FALSE, &pVal);
// if not reg'd, bring up reg UI (param1 = TRUE)
if (!pVal)
{
// do headless registration
ICddbUserInfoPtr pUser;
hr = pCDDBControl->GetUserInfo(&pUser);
if (pUser != NULL)
{
do
{
wchar_t strdata[129] = {0};
size_t size = sizeof(strdata)/sizeof(*strdata);
wchar_t *str = strdata;
GUID uid = GUID_NULL;
int x;
unsigned char *p;
CoCreateGuid(&uid);
p = (unsigned char *) & uid;
//lstrcpynW(str, L"WA2_", 129);
StringCchCopyExW(str, size, L"WA5_", &str, &size, 0);
for (x = 0; x < sizeof(uid); x ++)
{
StringCchPrintfExW(str, size, &str, &size, 0, L"%02X", p[x]);
//wsprintfW(str + wcslen(str), L"%02X", p[x]);
}
// user name will have to be unique per install
hr = pUser->put_UserHandle(strdata);
hr = pUser->put_Password(strdata);
hr = pCDDBControl->SetUserInfo(pUser);
}
while (hr == CDDBSVCHandleUsed);
}
// this is just to check again that the user is now registered
hr = pCDDBControl->IsRegistered(FALSE, &pVal);
}
cddbInitialized = true;
}
if (pCDDBControl)
pCDDBControl->AddRef();
return pCDDBControl;
}
#if 0
/// This is the deprecated version of GetPlaylistManager that is no longer used without the MLDB manager
ICddbPlaylist25Mgr *GracenoteApi::GetPlaylistManager()
{
ICddbPlaylist25Mgr *playlistMgr;
ICDDBControl2 *cddb = GetCDDB();
if (!cddb)
return 0;
CoCreateInstance(__uuidof(CddbNSWinampPlaylist2Mgr), 0, CLSCTX_INPROC_SERVER, IID_IUnknown, (void **)&playlistMgr);
if (playlistMgr)
{
playlistMgr->AddRef();
wchar_t dataPath[MAX_PATH] = {0};
PathCombineW(dataPath, WASABI_API_APP->path_getUserSettingsPath(), L"Plugins");
CreateDirectoryW(dataPath, 0);
PathAppendW(dataPath, L"Gracenote");
CreateDirectoryW(dataPath, 0);
if (SUCCEEDED(playlistMgr->Initialize(cddb, dataPath)))
{
playlistMgr->DownloadCorrelates(0);
playlistInitialized = true;
}
else
{
playlistMgr->Release();
playlistMgr=0;
}
}
cddb->Release();
return playlistMgr;
}
#endif
/// Caller is responsible for freeing the returned BSTR !!!
BSTR SetAndCreatePath(const wchar_t *node)
{
wchar_t path_to_create[MAX_PATH] = {0};
BSTR bPath = 0;
PathCombineW(path_to_create, WASABI_API_APP->path_getUserSettingsPath(), L"Plugins");
CreateDirectoryW(path_to_create, 0);
PathAppendW(path_to_create, node);
CreateDirectoryW(path_to_create, 0);
bPath = SysAllocString(path_to_create);
// modified path as return value
return bPath;
}
/// This has superceded the old GetPlaylistManager
/// Returns both a playlist manager in 'playlistMgr' and an mldb manager in 'mldbMgr'
//int GracenoteApi::GetPlaylistManagerWithMLDBManager(ICddbPlaylist25Mgr **playlistMgr, ICddbMLDBManager **mldbMgr)
int GracenoteApi::GetPlaylistManager(ICddbPlaylist25Mgr **playlistMgr, ICddbMLDBManager **mldbMgr)
{
ICddbPlaylist25Mgr *playlistMgrCreated;
ICddbMLDBManager *mldbMgrCreated;
ICDDBControl2 *cddb = GetCDDB();
if (!cddb)
return 0;
// Create the mldb manager
CoCreateInstance(__uuidof(CddbMLDBManager), 0, CLSCTX_INPROC_SERVER, IID_IUnknown, (void **)&mldbMgrCreated);
if (mldbMgrCreated)
{
//PL_MLDB_FLAGS_ZERO 0x00000000 Used for initialization.
//PL_MLDB_CHECK_BASE 0x00000001 Causes CheckDB to verify the consistency of the MLDB data file.
//PL_MLDB_CHECK_INDEX 0x00000002 Causes CheckDB to verify the consistency of the MLDB index file.
//PL_MLDB_CHECK_DEEP 0x00000004 Causes CheckDB to perform a thorough check of the MLDB file(s).
//PL_MLDB_CHECK_DEFAULT 0x00000007 Default operation of CheckDB.
//PL_MLDB_CLEAR_INIT_FLAG 0x00000010 Causes ModifyInitFlag to remove the file indicating Playlist is initialized.
//PL_MLDB_SET_INIT_FLAG 0x00000020 Causes ModifyInitFlag to create the file indicating Playlist is initialized.
//PL_MLDB_BACKUP_BASE 0x00000100 Causes BackupDB to create a backup copy of the MLDB data file.
//PL_MLDB_BACKUP_INDEX 0x00000200 Causes BackupDB to create a backup copy of the MLDB index file.
//PL_MLDB_RESTORE_BASE 0x00000400 Causes RestoreDB to restore the MLDB data file from the backup copy.
//PL_MLDB_RESTORE_INDEX 0x00000800 Causes RestoreDB to restore the MLDB index file from the backup copy.
//PL_MLDB_DELETE_INDEX 0x00001000 Causes DeleteDBFiles to remove the MLDB index file.
//PL_MLDB_DELETE_BASE 0x00002000 Causes DeleteDBFiles to remove the MLDB data file.
//PL_MLDB_DELETE_BACKUPS 0x00004000 Causes DeleteDBFiles to remove the MLDBbackup files.
//PL_MLDB_DELETE_OTHER 0x00008000 Causes DeleteDBFiles to remove the other (non-MLDB) files used by Playlist.
//PL_MLDB_AUTO_REINDEX 0x00010000 When specified in SetOptions, will cause theindex file to be automatically rebuilt atinitialization if it is corrupt.
//PL_MLDB_AUTO_BACKUP 0x00020000 When specified in SetOptions, will cause the MLDB files to be automatically backed up at shutdown (if they have been modified). PL_MLDB_AUTO_MANAGE_INIT_FLAG 0x00040000 When specified in SetOptions, will cause the <20>init file<6C> to be managed automatically (created at initialization, deleted at shut down).
//PL_MLDB_AUTO_CHECK_IF_INIT_SET 0x00080000 When specified in SetOptions, will cause the MLDB files to be check at initialization if the <20>init file<6C> exists (meaning shut down wasn<73>t called).
//PL_MLDB_AUTO_CHECK_AT_INIT 0x00100000 When specified in SetOptions, will cause the MLDB files to be checked always at initialization.
//PL_MLDB_AUTO_DEFAULT 0x000C0000 The default automatic behavior if no flags are specified with SetOptions.
//PL_MLDB_DEVICE_MLDB_42 0x01000000 Enable Gracenote Device SDK 4.2 compatibility for MLDB, list, and correlates files
//long autoFlags = PL_MLDB_AUTO_DEFAULT;
//long autoFlags = PL_MLDB_AUTO_REINDEX | PL_MLDB_AUTO_BACKUP | PL_MLDB_AUTO_MANAGE_INIT_FLAG | PL_MLDB_AUTO_CHECK_IF_INIT_SET | PL_MLDB_AUTO_CHECK_AT_INIT;
long autoFlags = PL_MLDB_AUTO_REINDEX | PL_MLDB_AUTO_BACKUP | PL_MLDB_AUTO_MANAGE_INIT_FLAG | PL_MLDB_AUTO_CHECK_IF_INIT_SET;
BSTR bDataPath = SetAndCreatePath(L"Gracenote");
BSTR bBackupPath = SetAndCreatePath(L"Gracenote/Backup");
mldbMgrCreated->AddRef();
mldbMgrCreated->SetOptions(autoFlags, bBackupPath);
CoCreateInstance(__uuidof(CddbNSWinampPlaylist2Mgr), 0, CLSCTX_INPROC_SERVER, IID_IUnknown, (void **)&playlistMgrCreated);
if (playlistMgrCreated)
{
playlistMgrCreated->AddRef();
mldbMgrCreated->Attach(playlistMgrCreated); // Attach the MLDB manager to the playlistMgr
if (SUCCEEDED(playlistMgrCreated->Initialize(cddb, bDataPath)))
{
playlistMgrCreated->DownloadCorrelates(0);
playlistInitialized = true;
}
else
{
playlistMgrCreated->Release();
playlistMgrCreated=0;
}
}
SysFreeString(bDataPath);
SysFreeString(bBackupPath);
}
cddb->Release();
*mldbMgr = mldbMgrCreated;
*playlistMgr = playlistMgrCreated;
if (mldbMgr && playlistMgr)
return NErr_Success;
else
return NErr_FailedCreate;
}
/// Dont really have to use this, get the MLDB manager when creating the playlist manager
ICddbMLDBManager *GracenoteApi::GetMLDBManager()
{
ICddbMLDBManager *mldbMgr;
ICDDBControl2 *cddb = GetCDDB();
if (!cddb)
return 0;
CoCreateInstance(__uuidof(CddbMLDBManager), 0, CLSCTX_INPROC_SERVER, IID_IUnknown, (void **)&mldbMgr);
if (mldbMgr)
{
mldbMgr->AddRef();
}
cddb->Release();
return mldbMgr;
}
HRESULT GracenoteApi::CreateFingerprint(ICDDBMusicIDManager *musicID, api_decodefile *decodeApi, ICddbFileInfo *info, const wchar_t *filename, long *killswitch)
{
if (!musicID || !decodeApi)
return E_FAIL;
ICddbMusicIDFingerprinterPtr fingerprinter;
musicID->CreateFingerprinter(NULL, &fingerprinter);
AudioParameters parameters;
parameters.bitsPerSample = 16;
parameters.channels = 2;
parameters.sampleRate = 44100;
ifc_audiostream *decoder = decodeApi->OpenAudioBackground(filename, &parameters);
if (decoder)
{
HRESULT hr = fingerprinter->BeginAudioStream((long)parameters.sampleRate, (long)parameters.bitsPerSample, (long)parameters.channels);
char data[65536] = {0};
size_t decodeSize;
int decode_killswitch=0, decode_error;
while (decodeSize = decoder->ReadAudio((void *)data, sizeof(data), &decode_killswitch, &decode_error))
{
if (decodeSize > LONG_MAX) // I _really_ doubt this is going to happen, but just in case, since we cast down to a long
break;
if (*killswitch)
break;
hr = fingerprinter->WriteAudioData(data, (long)decodeSize);
if (hr == CDDBMusicID_FPAcquired)
break;
}
ICddbMusicIDFingerprintPtr fingerprint;
fingerprinter->EndAudioStream(&fingerprint);
decodeApi->CloseAudio(decoder);
hr=info->put_Fingerprint(fingerprint);
return S_OK;
}
return E_FAIL;
}
ICDDBMusicIDManager3 *GracenoteApi::GetMusicID()
{
ICDDBControl2 *cddb = GetCDDB();
if (!cddb)
return 0;
ICDDBMusicIDManager3 *musicID;
CoCreateInstance(__uuidof(CDDBNSWinampMusicIDManager), 0, CLSCTX_INPROC_SERVER, IID_IUnknown, (void **)&musicID);
if (musicID)
musicID->Initialize(cddb);
cddb->Release();
return musicID;
}
#define CBCLASS GracenoteApi
START_DISPATCH;
CB(API_GRACENOTE_GETCDDB, GetCDDB)
CB(API_GRACENOTE_GETMUSICID, GetMusicID)
CB(API_GRACENOTE_GETPLAYLISTMGR, GetPlaylistManager)
//CB(API_GRACENOTE_GETPLAYLISTMGRWITHMLDBMGR, GetPlaylistManagerWithMLDBManager)
CB(API_GRACENOTE_GETMLDBMGR, GetMLDBManager)
CB(API_GRACENOTE_CREATEFINGERPRINT, CreateFingerprint)
END_DISPATCH;
#undef CBCLASS

View File

@ -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

View File

@ -0,0 +1,61 @@
#include "api.h"
#include "GracenoteFactory.h"
#include "GracenoteApi.h"
GracenoteApi gracenoteApi;
static const char serviceName[] = "Gracenote API";
FOURCC GracenoteFactory::GetServiceType()
{
return WaSvc::UNIQUE;
}
const char *GracenoteFactory::GetServiceName()
{
return serviceName;
}
GUID GracenoteFactory::GetGUID()
{
return gracenoteApiGUID;
}
void *GracenoteFactory::GetInterface(int global_lock)
{
return &gracenoteApi;
// if (global_lock)
// WASABI_API_SVC->service_lock(this, (void *)ifc);
}
int GracenoteFactory::SupportNonLockingInterface()
{
return 1;
}
int GracenoteFactory::ReleaseInterface(void *ifc)
{
//WASABI_API_SVC->service_unlock(ifc);
return 1;
}
const char *GracenoteFactory::GetTestString()
{
return NULL;
}
int GracenoteFactory::ServiceNotify(int msg, int param1, int param2)
{
return 1;
}
#define CBCLASS GracenoteFactory
START_DISPATCH;
CB(WASERVICEFACTORY_GETSERVICETYPE, GetServiceType)
CB(WASERVICEFACTORY_GETSERVICENAME, GetServiceName)
CB(WASERVICEFACTORY_GETGUID, GetGUID)
CB(WASERVICEFACTORY_GETINTERFACE, GetInterface)
CB(WASERVICEFACTORY_SUPPORTNONLOCKINGGETINTERFACE, SupportNonLockingInterface)
CB(WASERVICEFACTORY_RELEASEINTERFACE, ReleaseInterface)
CB(WASERVICEFACTORY_GETTESTSTRING, GetTestString)
CB(WASERVICEFACTORY_SERVICENOTIFY, ServiceNotify)
END_DISPATCH;
#undef CBCLASS

View File

@ -0,0 +1,23 @@
#ifndef NULLSOFT_GRACENOTEFACTORY_H
#define NULLSOFT_GRACENOTEFACTORY_H
#include <api/service/waservicefactory.h>
#include <api/service/services.h>
class GracenoteFactory : public waServiceFactory
{
public:
FOURCC GetServiceType();
const char *GetServiceName();
GUID GetGUID();
void *GetInterface(int global_lock);
int SupportNonLockingInterface();
int ReleaseInterface(void *ifc);
const char *GetTestString();
int ServiceNotify(int msg, int param1, int param2);
protected:
RECVS_DISPATCH;
};
#endif

13
Src/gracenote/api.h Normal file
View File

@ -0,0 +1,13 @@
#ifndef NULLSOFT_GRACENOTE_API_H
#define NULLSOFT_GRACENOTE_API_H
#include <api/application/api_application.h>
#define WASABI_API_APP applicationApi
#include "../Agave/Config/api_config.h"
extern api_config *agaveConfigApi;
#define AGAVE_API_CONFIG agaveConfigApi
#include "../Agave/Language/api_language.h"
#endif

View File

@ -0,0 +1,3 @@
#include "api_gracenote.h"
// Just an empty file to ensure that api_gracenote.h is #includable by itself

View File

@ -0,0 +1,92 @@
#ifndef NULLSOFT_GRACENOTE_API_GRACENOTE_H
#define NULLSOFT_GRACENOTE_API_GRACENOTE_H
/* benski>
* This API is facilitate initialization of Gracenote objects
* as well as a few common functions
*
* It is _NOT_ meant to be a wrapper around the Gracenote API
* It simply ensure that all plugins create objects with the same
* configuration, which improves code maintainability and reduces
* compiled file sizes.
*/
#include <bfc/dispatch.h>
#include "gracenote.h"
class api_decodefile;
class api_gracenote : public Dispatchable
{
protected:
api_gracenote() {}
~api_gracenote() {}
public:
/* These return Gracenote COM objects. Since COM handles referencing counting,
* you can simply call their Release() method when you are done.
*/
ICDDBControl2 *GetCDDB();
ICDDBMusicIDManager3 *GetMusicID(); // makes a new instance, always
//ICddbPlaylist25Mgr *GetPlaylistManager(); // makes a new instance, always
//int GetPlaylistManagerWithMLDBManager(ICddbPlaylist25Mgr **playlistMgr, ICddbMLDBManager **mldbMgr); // makes a new instance, always
int GetPlaylistManager(ICddbPlaylist25Mgr **playlistMgr, ICddbMLDBManager **mldbMgr); // makes a new instance, always
ICddbMLDBManager *GetMLDBManager();
void ReleasePlaylistManager();
/* Some utility functions */
HRESULT CreateFingerprint(ICDDBMusicIDManager *musicID, api_decodefile *decodeApi, ICddbFileInfo *info, const wchar_t *filename, long *killswitch);
DISPATCH_CODES
{
API_GRACENOTE_GETCDDB = 10,
API_GRACENOTE_GETMUSICID=20,
//API_GRACENOTE_GETPLAYLISTMGR=30, // Older codes can be removed
//API_GRACENOTE_GETPLAYLISTMGRWITHMLDBMGR=40, // ""
API_GRACENOTE_GETPLAYLISTMGR=40,
API_GRACENOTE_GETMLDBMGR=50,
API_GRACENOTE_CREATEFINGERPRINT=1000,
};
};
inline ICDDBControl2 *api_gracenote::GetCDDB()
{
return _call(API_GRACENOTE_GETCDDB, (ICDDBControl2 *)0);
}
inline ICDDBMusicIDManager3 *api_gracenote::GetMusicID()
{
return _call(API_GRACENOTE_GETMUSICID, (ICDDBMusicIDManager3 *)0);
}
/*inline ICddbPlaylist25Mgr *api_gracenote::GetPlaylistManager()
{
return _call(API_GRACENOTE_GETPLAYLISTMGR, (ICddbPlaylist25Mgr *)0);
}
inline int api_gracenote::GetPlaylistManagerWithMLDBManager(ICddbPlaylist25Mgr **playlistMgr, ICddbMLDBManager **mldbMgr)
{
return _call(API_GRACENOTE_GETPLAYLISTMGRWITHMLDBMGR, 0, playlistMgr, mldbMgr);
}*/
inline int api_gracenote::GetPlaylistManager(ICddbPlaylist25Mgr **playlistMgr, ICddbMLDBManager **mldbMgr)
{
return _call(API_GRACENOTE_GETPLAYLISTMGR, 0, playlistMgr, mldbMgr);
}
inline ICddbMLDBManager *api_gracenote::GetMLDBManager()
{
return _call(API_GRACENOTE_GETMLDBMGR, (ICddbMLDBManager *)0);
}
inline HRESULT api_gracenote::CreateFingerprint(ICDDBMusicIDManager *musicID, api_decodefile *decodeApi, ICddbFileInfo *info, const wchar_t *filename, long *killswitch)
{
return _call(API_GRACENOTE_CREATEFINGERPRINT, E_FAIL, musicID, decodeApi, info, filename, killswitch);
}
// {877D90AB-FAC1-4366-B3B0-EB177F42CFCE}
static const GUID gracenoteApiGUID =
{ 0x877d90ab, 0xfac1, 0x4366, { 0xb3, 0xb0, 0xeb, 0x17, 0x7f, 0x42, 0xcf, 0xce } };
#endif

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,633 @@
// Created by Microsoft (R) C/C++ Compiler Version 15.00.30729.01 (dfa22718).
//
// f:\sandbox\20131028_225933\winamp\release\cddbmusicidwinamp.tlh
//
// C++ source equivalent of Win32 type library ../gracenote/CddbMusicIDWinamp.dll
// compiler-generated file created 10/28/13 at 23:18:29 - DO NOT EDIT!
//
// Cross-referenced type libraries:
//
//
#pragma once
#pragma pack(push, 8)
#include <comdef.h>
//
// Forward references and typedefs
//
struct __declspec(uuid("05d652c1-7997-40f9-982d-347b8e29f8fb"))
/* LIBID */ __CDDBMUSICIDLibNSWinamp;
enum CddbMusicIDOptions;
enum CddbMusicIDMatchCode;
enum FileInfoListMatchCode;
enum CddbMusicIDStatus;
enum CDDBMusicID_LookupMode;
enum MusicIDThreadPriority;
enum CDDBMusicID_Results;
enum MusicIDMatchType;
struct __declspec(uuid("46ac5819-1fa8-44a1-9954-270ea2cf0dca"))
/* dispinterface */ _ICDDBMusicIDManagerEvents;
struct __declspec(uuid("0aa9fdfb-80d5-41bf-b383-7aab869e6b0e"))
/* dual interface */ ICddbFileInfo;
struct __declspec(uuid("cca2a70a-bcbc-49e9-8ef4-04dabcd68b81"))
/* dual interface */ ICddbMusicIDFingerprint;
struct __declspec(uuid("db104e47-62bb-4933-8f37-8984228e6938"))
/* dual interface */ IFingerprintImpl;
struct __declspec(uuid("099a10ed-517b-4387-a12e-af3fe90b5856"))
/* dual interface */ ICddbFileInfoList;
struct __declspec(uuid("5000f09e-8483-4deb-8345-4e778a9fe804"))
/* dual interface */ ICddbFileInfoLists;
struct __declspec(uuid("6131c03d-97d0-49ca-8eb1-5fa0d10ec072"))
/* dual interface */ ICDDBMusicIDManager;
struct __declspec(uuid("ec0e5dd3-8bab-4671-85a1-68bf93cb35e4"))
/* dual interface */ ICddbMusicIDFingerprinter;
struct __declspec(uuid("26b263b3-57cd-42fd-aa48-e505b4780055"))
/* dual interface */ ICddbMusicIDFingerprinter2;
struct __declspec(uuid("dc6da11f-ca85-4658-9216-2ad353cfc33b"))
/* dual interface */ ICddbFileInfo2;
struct __declspec(uuid("3b4a2b07-aafe-4931-a7f9-4c37729633ca"))
/* dual interface */ ICddbFileInfo2_6;
struct __declspec(uuid("18d6bc7c-4cbc-4b6a-9550-2b176438b87c"))
/* dual interface */ ICddbFileInfoList2_6;
struct __declspec(uuid("281bfe03-1503-4c60-9678-173c8b4138cc"))
/* dual interface */ ICDDBMusicIDManager2;
struct __declspec(uuid("5797bf13-a4e7-4170-ae22-5f06b2823e04"))
/* dual interface */ ICDDBMusicIDManager3;
struct __declspec(uuid("43b1b346-2394-46e7-b1ac-ea8d93124f68"))
/* dual interface */ ICddbMusicIDSettings;
struct /* coclass */ CDDBNSWinampMusicIDManager;
struct /* coclass */ CddbMusicIDFingerprinter;
struct /* coclass */ CddbMusicIDFingerprint;
struct /* coclass */ CddbFileInfo;
struct /* coclass */ CddbFileInfoList;
struct /* coclass */ CddbFileInfoLists;
struct /* coclass */ CddbMusicIDSettings;
//
// Smart pointer typedef declarations
//
_COM_SMARTPTR_TYPEDEF(_ICDDBMusicIDManagerEvents, __uuidof(_ICDDBMusicIDManagerEvents));
_COM_SMARTPTR_TYPEDEF(IFingerprintImpl, __uuidof(IFingerprintImpl));
_COM_SMARTPTR_TYPEDEF(ICddbMusicIDFingerprint, __uuidof(ICddbMusicIDFingerprint));
_COM_SMARTPTR_TYPEDEF(ICddbFileInfo, __uuidof(ICddbFileInfo));
_COM_SMARTPTR_TYPEDEF(ICddbFileInfoList, __uuidof(ICddbFileInfoList));
_COM_SMARTPTR_TYPEDEF(ICddbFileInfoLists, __uuidof(ICddbFileInfoLists));
_COM_SMARTPTR_TYPEDEF(ICddbMusicIDFingerprinter, __uuidof(ICddbMusicIDFingerprinter));
_COM_SMARTPTR_TYPEDEF(ICDDBMusicIDManager, __uuidof(ICDDBMusicIDManager));
_COM_SMARTPTR_TYPEDEF(ICddbMusicIDFingerprinter2, __uuidof(ICddbMusicIDFingerprinter2));
_COM_SMARTPTR_TYPEDEF(ICddbFileInfo2, __uuidof(ICddbFileInfo2));
_COM_SMARTPTR_TYPEDEF(ICddbFileInfo2_6, __uuidof(ICddbFileInfo2_6));
_COM_SMARTPTR_TYPEDEF(ICddbFileInfoList2_6, __uuidof(ICddbFileInfoList2_6));
_COM_SMARTPTR_TYPEDEF(ICDDBMusicIDManager2, __uuidof(ICDDBMusicIDManager2));
_COM_SMARTPTR_TYPEDEF(ICddbMusicIDSettings, __uuidof(ICddbMusicIDSettings));
_COM_SMARTPTR_TYPEDEF(ICDDBMusicIDManager3, __uuidof(ICDDBMusicIDManager3));
//
// Type library items
//
enum CddbMusicIDOptions
{
MUSICID_DEFAULT = 0,
MUSICID_LOOKUP_ASYNC = 1,
MUSICID_RETURN_SINGLE = 16,
MUSICID_RETURN_EXACT_ONLY = 16,
MUSICID_RETURN_ALL = 32,
MUSICID_GET_FP_FROM_APP = 256,
MUSICID_GET_FP_INTERNAL = 512,
MUSICID_GET_TAG_FROM_APP = 4096,
MUSICID_GET_TAG_INTERNAL = 8192,
MUSICID_PREFER_WF_MATCHES = 16384,
MUSICID_DISABLE_TEXT_LOOKUPS = 32768,
MUSICID_DISABLE_WF_QUERIES = 65536,
MUSICID_DISABLE_TEXT_QUERIES = 131072,
MUSICID_PREFER_WF_QUERIES = 262144,
MUSICID_EXTRA_TEXT_QUERIES = 524288,
MUSICID_DISABLE_FILENAME_PARSING = 1048576,
MUSICID_HIGH_CONFIDENCE_RESULTS = 2097152
};
enum CddbMusicIDMatchCode
{
MUSICID_MATCH_NONE = 0,
MUSICID_MATCH_EXACT = 1,
MUSICID_MATCH_FUZZY = 2,
MUSICID_MATCH_ALL = 3,
MUSICID_MATCH_USER = 4,
MUSICID_MATCH_ERROR = 5,
MUSICID_MATCH_ALBUM_ASSOCIATED = 6
};
enum FileInfoListMatchCode
{
LIST_MATCH_ERROR = 1,
LIST_MATCH_NONE = 2,
LIST_MATCH_ALBUM_SINGLE = 3,
LIST_MATCH_ALBUM_EXACT = 3,
LIST_MATCH_ALBUM_MULTIPLE = 4,
LIST_MATCH_TRACK_SINGLE = 5,
LIST_MATCH_TRACK_EXACT = 5,
LIST_MATCH_TRACK_MULTIPLE = 6,
LIST_MATCH_LIBRARY_SINGLE = 7,
LIST_MATCH_ALBUM_SINGLE_ASSOCIATED = 8
};
enum CddbMusicIDStatus
{
STATUS_MUSICID_Error = 1,
STATUS_MUSICID_ProcessingFile = 2,
STATUS_MUSICID_LookingUpWaveForm = 3,
STATUS_MUSICID_LookingUpText = 4,
STATUS_MUSICID_CheckForAbort = 5,
STATUS_ALBUMID_Querying = 6,
STATUS_ALBUMID_Queried = 7,
STATUS_ALBUMID_Processing = 8,
STATUS_ALBUMID_Processed = 9,
STATUS_MUSICID_AnalyzingWaveForm = 10,
STATUS_ALBUMID_QueryingWF = 11
};
enum CDDBMusicID_LookupMode
{
WAVEFORM_LOOKUP = 1,
TEXT_LOOKUP = 2,
TEXT_LOCAL = 4,
TEXT_HINT_MULTI_EXACT = 16,
TEXT_HINT_MULTI_FUZZY = 32,
TEXT_HINT_FUZZY = 64,
TEXT_HINT_ALL = 240
};
enum MusicIDThreadPriority
{
MUSICID_THREAD_PRIORITY_HIGHEST = 1,
MUSICID_THREAD_PRIORITY_ABOVE_NORMAL = 2,
MUSICID_THREAD_PRIORITY_NORMAL = 3,
MUSICID_THREAD_PRIORITY_BELOW_NORMAL = 4,
MUSICID_THREAD_PRIORITY_LOWEST = 5,
MUSICID_THREAD_PRIORITY_IDLE = 6
};
enum CDDBMusicID_Results
{
ERR_DomainMusicID = 766,
CDDBMusicID_FPAcquired = 1,
CDDBMusicID_FPNotAcquired = 2,
CDDBMusicID_UnsupportedFileFormat = -1023541247,
CDDBMusicID_UnsupportedAudioFormat = -1023541246,
CDDBMusicID_UnknownAlgorithm = -1023541245,
CDDBMusicID_UnknownSetting = -1023541244,
CDDBMusicID_CDDBControlVersion = -1023541243,
CDDBMusicID_TextHintsFailed = -1023541242,
CDDBMusicID_NoTextAvailable = -1023541241
};
enum MusicIDMatchType
{
MATCH_TYPE_TAGID = 1,
MATCH_TYPE_ITUNESID = 2,
MATCH_TYPE_ALBUM_ASSOCIATED = 3,
MATCH_TYPE_WF_HINT = 4,
MATCH_TYPE_WF = 5,
MATCH_TYPE_TXT_ON_WF = 6,
MATCH_TYPE_TXT_HINT = 7,
MATCH_TYPE_TXT = 8,
MATCH_TYPE_WF_TXT_HINT = 9,
MATCH_TYPE_WF_TXT = 10,
MATCH_TYPE_ALBUM_AND_TITLE = 11,
MATCH_TYPE_TXT_ALBUM_LEVEL = 12,
MATCH_TYPE_UNKNOWN = 13,
MATCH_TYPE_NONE = 14
};
struct __declspec(uuid("46ac5819-1fa8-44a1-9954-270ea2cf0dca"))
_ICDDBMusicIDManagerEvents : IDispatch
{};
struct __declspec(uuid("db104e47-62bb-4933-8f37-8984228e6938"))
IFingerprintImpl : IDispatch
{
//
// Raw methods provided by interface
//
virtual HRESULT __stdcall SetFPData (
/*[in]*/ char * data,
/*[in]*/ long length ) = 0;
virtual HRESULT __stdcall get_Type (
/*[out,retval]*/ BSTR * pVal ) = 0;
virtual HRESULT __stdcall get_Version (
/*[out,retval]*/ BSTR * pVal ) = 0;
virtual HRESULT __stdcall get_Signature (
/*[out,retval]*/ BSTR * pVal ) = 0;
virtual HRESULT __stdcall get_Channels (
/*[out,retval]*/ BSTR * pVal ) = 0;
virtual HRESULT __stdcall get_SampleRate (
/*[out,retval]*/ BSTR * pVal ) = 0;
virtual HRESULT __stdcall get_SampleSize (
/*[out,retval]*/ BSTR * pVal ) = 0;
virtual HRESULT __stdcall get_Offset (
/*[out,retval]*/ BSTR * pVal ) = 0;
virtual HRESULT __stdcall get_Duration (
/*[out,retval]*/ BSTR * pVal ) = 0;
virtual HRESULT __stdcall get_Units (
/*[out,retval]*/ BSTR * pVal ) = 0;
};
struct __declspec(uuid("cca2a70a-bcbc-49e9-8ef4-04dabcd68b81"))
ICddbMusicIDFingerprint : IFingerprintImpl
{};
struct __declspec(uuid("0aa9fdfb-80d5-41bf-b383-7aab869e6b0e"))
ICddbFileInfo : IDispatch
{
//
// Raw methods provided by interface
//
virtual HRESULT __stdcall get_Filename (
/*[out,retval]*/ BSTR * pVal ) = 0;
virtual HRESULT __stdcall put_Filename (
/*[in]*/ BSTR pVal ) = 0;
virtual HRESULT __stdcall get_Fingerprint (
/*[out,retval]*/ struct ICddbMusicIDFingerprint * * pVal ) = 0;
virtual HRESULT __stdcall put_Fingerprint (
/*[in]*/ struct ICddbMusicIDFingerprint * pVal ) = 0;
virtual HRESULT __stdcall get_TrackNum (
/*[out,retval]*/ long * pVal ) = 0;
virtual HRESULT __stdcall put_TrackNum (
/*[in]*/ long pVal ) = 0;
virtual HRESULT __stdcall get_TrackCount (
/*[out,retval]*/ long * pVal ) = 0;
virtual HRESULT __stdcall put_TrackCount (
/*[in]*/ long pVal ) = 0;
virtual HRESULT __stdcall get_Tag (
/*[out,retval]*/ struct ICddbFileTag * * pVal ) = 0;
virtual HRESULT __stdcall put_Tag (
/*[in]*/ struct ICddbFileTag * pVal ) = 0;
virtual HRESULT __stdcall get_Disc (
/*[out,retval]*/ struct ICddbDisc2 * * pVal ) = 0;
virtual HRESULT __stdcall put_Disc (
/*[in]*/ struct ICddbDisc2 * pVal ) = 0;
virtual HRESULT __stdcall get_MusicIDMatchCode (
/*[out,retval]*/ enum CddbMusicIDMatchCode * pVal ) = 0;
virtual HRESULT __stdcall put_MusicIDMatchCode (
/*[in]*/ enum CddbMusicIDMatchCode pVal ) = 0;
};
struct __declspec(uuid("099a10ed-517b-4387-a12e-af3fe90b5856"))
ICddbFileInfoList : IDispatch
{
//
// Raw methods provided by interface
//
virtual HRESULT __stdcall GetFileInfo (
/*[in]*/ long Index,
/*[out,retval]*/ struct ICddbFileInfo * * pVal ) = 0;
virtual HRESULT __stdcall AddFileInfo (
/*[in]*/ struct ICddbFileInfo * pFileInfo ) = 0;
virtual HRESULT __stdcall get_Count (
/*[out,retval]*/ long * pVal ) = 0;
virtual HRESULT __stdcall AddFileInfoFields (
/*[in]*/ BSTR Filename,
/*[in]*/ struct ICddbMusicIDFingerprint * pFingerprint,
/*[in]*/ long TrackCount,
/*[in]*/ long TrackNum,
/*[in]*/ struct ICddbFileTag * pTag,
/*[in]*/ struct ICddbDisc2 * pDisc,
/*[in]*/ long matchCode ) = 0;
virtual HRESULT __stdcall GetFileInfoFields (
/*[in]*/ long Index,
/*[out]*/ BSTR * Filename,
/*[out]*/ struct ICddbMusicIDFingerprint * * ppFingerprint,
/*[out]*/ long * pTrackCount,
/*[out]*/ long * pTrackNum,
/*[out]*/ struct ICddbFileTag * * ppTag,
/*[out]*/ struct ICddbDisc2 * * ppDisc,
/*[out]*/ long * pMatchCode ) = 0;
virtual HRESULT __stdcall GetListMatchCode (
/*[out]*/ long * listMatchCode ) = 0;
virtual HRESULT __stdcall SetListMatchCode (
/*[in]*/ long match_code ) = 0;
virtual HRESULT __stdcall RemoveFileInfo (
/*[in]*/ struct ICddbFileInfo * pInfo ) = 0;
virtual HRESULT __stdcall RemoveFile (
/*[in]*/ BSTR Filename ) = 0;
};
struct __declspec(uuid("5000f09e-8483-4deb-8345-4e778a9fe804"))
ICddbFileInfoLists : IDispatch
{
//
// Raw methods provided by interface
//
virtual HRESULT __stdcall GetFileInfoList (
/*[in]*/ long Index,
/*[out,retval]*/ struct ICddbFileInfoList * * ppFileInfoListOut ) = 0;
virtual HRESULT __stdcall get_Count (
/*[out,retval]*/ long * pVal ) = 0;
virtual HRESULT __stdcall RemoveMatchAndFiles (
/*[in]*/ long Index ) = 0;
virtual HRESULT __stdcall RemoveFileInfoList (
/*[in]*/ struct ICddbFileInfoList * pList ) = 0;
virtual HRESULT __stdcall AddFileInfoList (
/*[in]*/ struct ICddbFileInfoList * pFileInfoList ) = 0;
};
struct __declspec(uuid("ec0e5dd3-8bab-4671-85a1-68bf93cb35e4"))
ICddbMusicIDFingerprinter : IDispatch
{
//
// Raw methods provided by interface
//
virtual HRESULT __stdcall GetSetting (
/*[in]*/ BSTR name,
/*[out,retval]*/ BSTR * pVal ) = 0;
virtual HRESULT __stdcall SetSetting (
/*[in]*/ BSTR name,
/*[in]*/ BSTR value ) = 0;
virtual HRESULT __stdcall GetFileFingerprint (
/*[in]*/ BSTR Filename,
/*[out,retval]*/ struct ICddbMusicIDFingerprint * * pVal ) = 0;
virtual HRESULT __stdcall BeginAudioStream (
/*[in]*/ long sample_rate,
/*[in]*/ long sample_bits,
/*[in]*/ long channel_count ) = 0;
virtual HRESULT __stdcall WriteAudioData (
/*[in]*/ void * buffer,
/*[in]*/ long length ) = 0;
virtual HRESULT __stdcall EndAudioStream (
/*[out,retval]*/ struct ICddbMusicIDFingerprint * * pVal ) = 0;
};
struct __declspec(uuid("6131c03d-97d0-49ca-8eb1-5fa0d10ec072"))
ICDDBMusicIDManager : IDispatch
{
//
// Raw methods provided by interface
//
virtual HRESULT __stdcall get_Version (
/*[out,retval]*/ BSTR * pVal ) = 0;
virtual HRESULT __stdcall Initialize (
/*[in]*/ struct ICDDBControl2 * control ) = 0;
virtual HRESULT __stdcall Shutdown ( ) = 0;
virtual HRESULT __stdcall CreateFingerprinter (
/*[in]*/ BSTR alg_name,
/*[out,retval]*/ struct ICddbMusicIDFingerprinter * * pVal ) = 0;
virtual HRESULT __stdcall LookupFile (
/*[in]*/ struct ICddbMusicIDFingerprint * fp,
/*[in]*/ BSTR Filename,
/*[in]*/ struct ICddbFileTag * Tag,
/*[in]*/ long lookup_mode,
/*[in]*/ long event_on_completion,
/*[out,retval]*/ long * match_code ) = 0;
virtual HRESULT __stdcall ResolveLookup (
/*[in]*/ struct ICddbDiscs * discs,
/*[in]*/ long track_count,
/*[in]*/ long missing_files,
/*[in]*/ long extra_files,
/*[in]*/ long lookup_mode,
/*[in]*/ BSTR Filename,
/*[in]*/ struct ICddbFileTag * Tag,
/*[in]*/ long match_code,
/*[out,retval]*/ struct ICddbDisc * * pVal ) = 0;
virtual HRESULT __stdcall CompareTrackToFile (
/*[in]*/ BSTR Filename,
/*[in]*/ struct ICddbFileTag * Tag,
/*[in]*/ struct ICddbDisc * Disc,
/*[in]*/ long TrackNum,
/*[out,retval]*/ long * pVal ) = 0;
};
struct __declspec(uuid("26b263b3-57cd-42fd-aa48-e505b4780055"))
ICddbMusicIDFingerprinter2 : ICddbMusicIDFingerprinter
{
//
// Raw methods provided by interface
//
virtual HRESULT __stdcall WriteAudioData2 (
/*[in]*/ void * buffer,
/*[in]*/ long length,
/*[out]*/ long * b_complete ) = 0;
virtual HRESULT __stdcall FingerprintSerialize (
/*[in]*/ struct ICddbMusicIDFingerprint * pFingerprint,
/*[out,retval]*/ BSTR * pSerialized ) = 0;
virtual HRESULT __stdcall FingerprintDeserialize (
/*[in]*/ BSTR serialized,
/*[out,retval]*/ struct ICddbMusicIDFingerprint * * ppFingerprint ) = 0;
};
struct __declspec(uuid("dc6da11f-ca85-4658-9216-2ad353cfc33b"))
ICddbFileInfo2 : ICddbFileInfo
{
//
// Raw methods provided by interface
//
virtual HRESULT __stdcall GetExtData (
/*[out,retval]*/ struct ICddbExtData * * pVal ) = 0;
virtual HRESULT __stdcall PutExtData (
/*[in]*/ struct ICddbExtData * newVal ) = 0;
virtual HRESULT __stdcall GetDataListElement (
/*[in]*/ long ListId,
/*[in]*/ long Level,
/*[out,retval]*/ struct ICddbDataListElement * * pVal ) = 0;
virtual HRESULT __stdcall GetExtDataSerialized (
/*[out,retval]*/ BSTR * pVal ) = 0;
virtual HRESULT __stdcall PutExtDataSerialized (
/*[in]*/ BSTR newVal ) = 0;
};
struct __declspec(uuid("3b4a2b07-aafe-4931-a7f9-4c37729633ca"))
ICddbFileInfo2_6 : ICddbFileInfo2
{
//
// Raw methods provided by interface
//
virtual HRESULT __stdcall get_MatchType (
/*[out,retval]*/ enum MusicIDMatchType * pVal ) = 0;
virtual HRESULT __stdcall RetrieveData (
/*[in]*/ long cddbDataOptions ) = 0;
};
struct __declspec(uuid("18d6bc7c-4cbc-4b6a-9550-2b176438b87c"))
ICddbFileInfoList2_6 : ICddbFileInfoList
{
//
// Raw methods provided by interface
//
virtual HRESULT __stdcall RetrieveData (
/*[in]*/ long cddbDataOptions ) = 0;
};
struct __declspec(uuid("281bfe03-1503-4c60-9678-173c8b4138cc"))
ICDDBMusicIDManager2 : ICDDBMusicIDManager
{
//
// Raw methods provided by interface
//
virtual HRESULT __stdcall TrackID (
/*[in]*/ struct ICddbFileInfo * pInfoIn,
/*[in]*/ long options,
long * match_code,
/*[out]*/ struct ICddbFileInfoList * * pListOut ) = 0;
virtual HRESULT __stdcall AlbumID (
/*[in]*/ struct ICddbFileInfoList * pListIn,
/*[in]*/ long options,
long * match_code,
/*[out]*/ struct ICddbFileInfoLists * * pListsOut ) = 0;
virtual HRESULT __stdcall GetTagInternal (
/*[in]*/ BSTR Filename,
/*[out]*/ struct ICddbFileTag * * Tag ) = 0;
virtual HRESULT __stdcall GetFingerprintInternal (
/*[in]*/ BSTR Filename,
/*[out]*/ struct ICddbMusicIDFingerprint * * Fingerprint ) = 0;
};
struct __declspec(uuid("43b1b346-2394-46e7-b1ac-ea8d93124f68"))
ICddbMusicIDSettings : IDispatch
{
//
// Raw methods provided by interface
//
virtual HRESULT __stdcall get_ThreadPriority (
/*[out,retval]*/ long * pVal ) = 0;
virtual HRESULT __stdcall put_ThreadPriority (
/*[in]*/ long pVal ) = 0;
virtual HRESULT __stdcall get_LibraryIDBatchSize (
/*[out,retval]*/ long * pVal ) = 0;
virtual HRESULT __stdcall put_LibraryIDBatchSize (
/*[in]*/ long pVal ) = 0;
};
struct __declspec(uuid("5797bf13-a4e7-4170-ae22-5f06b2823e04"))
ICDDBMusicIDManager3 : ICDDBMusicIDManager2
{
//
// Raw methods provided by interface
//
virtual HRESULT __stdcall LibraryID (
/*[in]*/ struct ICddbFileInfoList * pListIn,
/*[in]*/ long options ) = 0;
virtual HRESULT __stdcall LibraryIDAdd (
/*[in]*/ BSTR bstrFilename ) = 0;
virtual HRESULT __stdcall LibraryIDAddFileInfo (
/*[in]*/ struct ICddbFileInfo * pInfo ) = 0;
virtual HRESULT __stdcall LibraryIDRemove (
/*[in]*/ BSTR bstrFilename ) = 0;
virtual HRESULT __stdcall LibraryIDStart (
/*[in]*/ long options ) = 0;
virtual HRESULT __stdcall LibraryIDStop (
/*[in]*/ long bWait ) = 0;
virtual HRESULT __stdcall LibraryIDClear ( ) = 0;
virtual HRESULT __stdcall LibraryIDStatus (
/*[out]*/ long * bIsRunning,
/*[out]*/ long * lFilesInQueue ) = 0;
virtual HRESULT __stdcall GetFullDisc (
/*[in]*/ struct ICddbDisc2 * pDisc,
/*[out]*/ struct ICddbDisc2 * * ppFullDisc ) = 0;
virtual HRESULT __stdcall GetSettings (
/*[out]*/ struct ICddbMusicIDSettings * * ppSettings ) = 0;
virtual HRESULT __stdcall PutSettings (
/*[in]*/ struct ICddbMusicIDSettings * pSettings ) = 0;
};
struct __declspec(uuid("28041299-f00d-4156-88c7-4c663cd47b00"))
CDDBNSWinampMusicIDManager;
// [ default ] interface ICDDBMusicIDManager
// interface ICDDBMusicIDManager2
// interface ICDDBMusicIDManager3
// [ default, source ] dispinterface _ICDDBMusicIDManagerEvents
struct __declspec(uuid("b6d10e75-e02c-4f26-98c3-72450019942b"))
CddbMusicIDFingerprinter;
// [ default ] interface ICddbMusicIDFingerprinter
struct __declspec(uuid("e0ff4f0f-b53b-41d5-b1c9-3890ac403fe5"))
CddbMusicIDFingerprint;
// interface IFingerprintImpl
// [ default ] interface ICddbMusicIDFingerprint
struct __declspec(uuid("80a8f856-eda2-44db-a9ae-fafaaa2f5798"))
CddbFileInfo;
// [ default ] interface ICddbFileInfo
struct __declspec(uuid("93c676b4-2ded-461c-abd6-33736f951840"))
CddbFileInfoList;
// [ default ] interface ICddbFileInfoList
struct __declspec(uuid("d00f2f00-f910-43af-99d6-591ac5f1b560"))
CddbFileInfoLists;
// [ default ] interface ICddbFileInfoLists
struct __declspec(uuid("c7538f11-8d14-439b-ad2d-30c2cd8d0e68"))
CddbMusicIDSettings;
// [ default ] interface ICddbMusicIDSettings
//
// Named GUID constants initializations
//
extern "C" const GUID __declspec(selectany) LIBID_CDDBMUSICIDLibNSWinamp =
{0x05d652c1,0x7997,0x40f9,{0x98,0x2d,0x34,0x7b,0x8e,0x29,0xf8,0xfb}};
extern "C" const GUID __declspec(selectany) DIID__ICDDBMusicIDManagerEvents =
{0x46ac5819,0x1fa8,0x44a1,{0x99,0x54,0x27,0x0e,0xa2,0xcf,0x0d,0xca}};
extern "C" const GUID __declspec(selectany) IID_IFingerprintImpl =
{0xdb104e47,0x62bb,0x4933,{0x8f,0x37,0x89,0x84,0x22,0x8e,0x69,0x38}};
extern "C" const GUID __declspec(selectany) IID_ICddbMusicIDFingerprint =
{0xcca2a70a,0xbcbc,0x49e9,{0x8e,0xf4,0x04,0xda,0xbc,0xd6,0x8b,0x81}};
extern "C" const GUID __declspec(selectany) IID_ICddbFileInfo =
{0x0aa9fdfb,0x80d5,0x41bf,{0xb3,0x83,0x7a,0xab,0x86,0x9e,0x6b,0x0e}};
extern "C" const GUID __declspec(selectany) IID_ICddbFileInfoList =
{0x099a10ed,0x517b,0x4387,{0xa1,0x2e,0xaf,0x3f,0xe9,0x0b,0x58,0x56}};
extern "C" const GUID __declspec(selectany) IID_ICddbFileInfoLists =
{0x5000f09e,0x8483,0x4deb,{0x83,0x45,0x4e,0x77,0x8a,0x9f,0xe8,0x04}};
extern "C" const GUID __declspec(selectany) IID_ICddbMusicIDFingerprinter =
{0xec0e5dd3,0x8bab,0x4671,{0x85,0xa1,0x68,0xbf,0x93,0xcb,0x35,0xe4}};
extern "C" const GUID __declspec(selectany) IID_ICDDBMusicIDManager =
{0x6131c03d,0x97d0,0x49ca,{0x8e,0xb1,0x5f,0xa0,0xd1,0x0e,0xc0,0x72}};
extern "C" const GUID __declspec(selectany) IID_ICddbMusicIDFingerprinter2 =
{0x26b263b3,0x57cd,0x42fd,{0xaa,0x48,0xe5,0x05,0xb4,0x78,0x00,0x55}};
extern "C" const GUID __declspec(selectany) IID_ICddbFileInfo2 =
{0xdc6da11f,0xca85,0x4658,{0x92,0x16,0x2a,0xd3,0x53,0xcf,0xc3,0x3b}};
extern "C" const GUID __declspec(selectany) IID_ICddbFileInfo2_6 =
{0x3b4a2b07,0xaafe,0x4931,{0xa7,0xf9,0x4c,0x37,0x72,0x96,0x33,0xca}};
extern "C" const GUID __declspec(selectany) IID_ICddbFileInfoList2_6 =
{0x18d6bc7c,0x4cbc,0x4b6a,{0x95,0x50,0x2b,0x17,0x64,0x38,0xb8,0x7c}};
extern "C" const GUID __declspec(selectany) IID_ICDDBMusicIDManager2 =
{0x281bfe03,0x1503,0x4c60,{0x96,0x78,0x17,0x3c,0x8b,0x41,0x38,0xcc}};
extern "C" const GUID __declspec(selectany) IID_ICddbMusicIDSettings =
{0x43b1b346,0x2394,0x46e7,{0xb1,0xac,0xea,0x8d,0x93,0x12,0x4f,0x68}};
extern "C" const GUID __declspec(selectany) IID_ICDDBMusicIDManager3 =
{0x5797bf13,0xa4e7,0x4170,{0xae,0x22,0x5f,0x06,0xb2,0x82,0x3e,0x04}};
extern "C" const GUID __declspec(selectany) CLSID_CDDBNSWinampMusicIDManager =
{0x28041299,0xf00d,0x4156,{0x88,0xc7,0x4c,0x66,0x3c,0xd4,0x7b,0x00}};
extern "C" const GUID __declspec(selectany) CLSID_CddbMusicIDFingerprinter =
{0xb6d10e75,0xe02c,0x4f26,{0x98,0xc3,0x72,0x45,0x00,0x19,0x94,0x2b}};
extern "C" const GUID __declspec(selectany) CLSID_CddbMusicIDFingerprint =
{0xe0ff4f0f,0xb53b,0x41d5,{0xb1,0xc9,0x38,0x90,0xac,0x40,0x3f,0xe5}};
extern "C" const GUID __declspec(selectany) CLSID_CddbFileInfo =
{0x80a8f856,0xeda2,0x44db,{0xa9,0xae,0xfa,0xfa,0xaa,0x2f,0x57,0x98}};
extern "C" const GUID __declspec(selectany) CLSID_CddbFileInfoList =
{0x93c676b4,0x2ded,0x461c,{0xab,0xd6,0x33,0x73,0x6f,0x95,0x18,0x40}};
extern "C" const GUID __declspec(selectany) CLSID_CddbFileInfoLists =
{0xd00f2f00,0xf910,0x43af,{0x99,0xd6,0x59,0x1a,0xc5,0xf1,0xb5,0x60}};
extern "C" const GUID __declspec(selectany) CLSID_CddbMusicIDSettings =
{0xc7538f11,0x8d14,0x439b,{0xad,0x2d,0x30,0xc2,0xcd,0x8d,0x0e,0x68}};
#pragma pack(pop)

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,268 @@
// Created by Microsoft (R) C/C++ Compiler Version 15.00.30729.01 (1a958924).
//
// f:\sandbox\20131028_225933\winamp\release\cddbuiwinamp.tlh
//
// C++ source equivalent of Win32 type library ../gracenote/CDDBUIWinamp.dll
// compiler-generated file created 10/28/13 at 23:18:29 - DO NOT EDIT!
#pragma once
#pragma pack(push, 8)
#include <comdef.h>
//
// Forward references and typedefs
//
struct __declspec(uuid("49f3ccb6-3ba4-4b64-9451-ccf4d42581b1"))
/* LIBID */ __CDDBUICONTROLLibNSWinamp;
struct __declspec(uuid("92892c0b-8da6-49df-b484-d5571c7e48cd"))
/* dual interface */ ICddbUI;
struct __declspec(uuid("03396e62-5abb-4e75-af96-5cc6171354ba"))
/* dual interface */ ICddbInfoWindow2;
struct __declspec(uuid("c50aaf00-4954-405f-abf8-1ff32be762bb"))
/* dual interface */ ICddbUIOptions2;
struct __declspec(uuid("038841ae-24d2-4a27-a69d-21a58e4b1077"))
/* dual interface */ ICddbUI2;
struct /* coclass */ CddbNSWinampUI;
struct /* coclass */ CddbInfoWindow2;
struct /* coclass */ CddbUIOptions2;
struct /* coclass */ CddbUI2;
//
// Smart pointer typedef declarations
//
_COM_SMARTPTR_TYPEDEF(ICddbUI, __uuidof(ICddbUI));
_COM_SMARTPTR_TYPEDEF(ICddbInfoWindow2, __uuidof(ICddbInfoWindow2));
_COM_SMARTPTR_TYPEDEF(ICddbUIOptions2, __uuidof(ICddbUIOptions2));
_COM_SMARTPTR_TYPEDEF(ICddbUI2, __uuidof(ICddbUI2));
//
// Type library items
//
struct __declspec(uuid("92892c0b-8da6-49df-b484-d5571c7e48cd"))
ICddbUI : IDispatch
{
//
// Raw methods provided by interface
//
virtual HRESULT __stdcall Initialize (
/*[in]*/ IUnknown * Control,
/*[in]*/ long hWND,
/*[in]*/ long Flags ) = 0;
virtual HRESULT __stdcall SetParent (
/*[in]*/ long hWND ) = 0;
virtual HRESULT __stdcall Shutdown ( ) = 0;
virtual HRESULT __stdcall InvokeInfoBrowser (
/*[in]*/ IUnknown * Disc,
/*[in]*/ IUnknown * URL,
/*[in]*/ long Flags,
/*[in,out]*/ long * pHWND ) = 0;
virtual HRESULT __stdcall InvokeSubmitDisc (
/*[in]*/ BSTR MediaToc,
/*[in]*/ long MciDeviceId,
/*[in]*/ long Flags,
/*[in,out]*/ long * pHWND,
/*[out,retval]*/ long * pVal ) = 0;
virtual HRESULT __stdcall DisplayDiscInfo (
/*[in]*/ IUnknown * Disc,
/*[in]*/ long Flags,
/*[in,out]*/ long * pHWND,
/*[out,retval]*/ long * pVal ) = 0;
virtual HRESULT __stdcall InvokeDiscInfo (
/*[in]*/ BSTR MediaToc,
/*[in]*/ BSTR MediaId,
/*[in]*/ BSTR MuiId,
/*[in]*/ long MciDeviceId,
/*[in]*/ long Flags,
/*[in,out]*/ long * pHWND,
/*[out,retval]*/ long * pVal ) = 0;
virtual HRESULT __stdcall InvokeNoMatchDialog (
/*[in]*/ long Flags,
/*[in,out]*/ long * pHWND,
/*[out,retval]*/ long * pVal ) = 0;
virtual HRESULT __stdcall InvokeFuzzyMatchDialog (
/*[in]*/ IUnknown * Discs,
/*[in]*/ BSTR Toc,
/*[in]*/ long Flags,
/*[in,out]*/ long * pHWND,
/*[out,retval]*/ IUnknown * * pVal ) = 0;
virtual HRESULT __stdcall InvokeOptionsDialog (
/*[in]*/ IUnknown * Options,
/*[in]*/ long Flags,
/*[in,out]*/ long * pHWND,
/*[out,retval]*/ long * pVal ) = 0;
virtual HRESULT __stdcall InvokeUserRegDialog (
/*[in]*/ IUnknown * UserInfo,
/*[in]*/ long Flags,
/*[in,out]*/ long * pHWND,
/*[out,retval]*/ long * pVal ) = 0;
virtual HRESULT __stdcall InvokePopupMenu (
/*[in]*/ long Flags,
/*[in]*/ IUnknown * URLList,
/*[in]*/ IUnknown * DiscURLList,
/*[in,out]*/ long * pHWND ) = 0;
virtual HRESULT __stdcall InvokeAboutCddbDialog (
/*[in]*/ long Flags,
/*[in,out]*/ long * pHWND ) = 0;
virtual HRESULT __stdcall DrawLogo (
/*[in]*/ void * DrawInfo ) = 0;
virtual HRESULT __stdcall GetUrlFromMenu (
/*[in]*/ long MenuId,
/*[out,retval]*/ IUnknown * * pVal ) = 0;
virtual HRESULT __stdcall StartConnectDlg (
/*[in]*/ long Flags,
/*[in,out]*/ long * hWND ) = 0;
virtual HRESULT __stdcall StopConnectDlg (
/*[in]*/ long Flags ) = 0;
virtual HRESULT __stdcall SetUILanguage (
/*[in]*/ BSTR Id,
/*[in]*/ BSTR DllName,
/*[out,retval]*/ long * pVal ) = 0;
virtual HRESULT __stdcall GetUIResourceInstance (
/*[out,retval]*/ long * pVal ) = 0;
virtual HRESULT __stdcall SetInfoDisc (
/*[in]*/ IUnknown * Disc ) = 0;
virtual HRESULT __stdcall GetUIObject (
/*[in]*/ long Id,
/*[out,retval]*/ void * * pVal ) = 0;
};
struct __declspec(uuid("03396e62-5abb-4e75-af96-5cc6171354ba"))
ICddbInfoWindow2 : IDispatch
{
//
// Raw methods provided by interface
//
virtual HRESULT __stdcall Init (
/*[in]*/ long hWND,
/*[in]*/ long Left,
/*[in]*/ long Top,
/*[in]*/ long Right,
/*[in]*/ long Bottom ) = 0;
virtual HRESULT __stdcall SetRawURL (
/*[in]*/ BSTR RawURL ) = 0;
virtual HRESULT __stdcall GetHwnd (
/*[out]*/ long * pHWND ) = 0;
virtual HRESULT __stdcall SetDisc (
/*[in]*/ IUnknown * Disc ) = 0;
virtual HRESULT __stdcall SetURL (
/*[in]*/ IUnknown * URL ) = 0;
virtual HRESULT __stdcall Refresh ( ) = 0;
virtual HRESULT __stdcall Shutdown ( ) = 0;
virtual HRESULT __stdcall SetAdPosition (
/*[in]*/ BSTR Position ) = 0;
};
struct __declspec(uuid("c50aaf00-4954-405f-abf8-1ff32be762bb"))
ICddbUIOptions2 : IDispatch
{
//
// Raw methods provided by interface
//
virtual HRESULT __stdcall GetCurrent (
/*[in]*/ long Flags ) = 0;
virtual HRESULT __stdcall SetCurrent (
/*[in]*/ long Flags ) = 0;
virtual HRESULT __stdcall get_ParentHWND (
/*[out,retval]*/ long * pVal ) = 0;
virtual HRESULT __stdcall put_ParentHWND (
/*[in]*/ long pVal ) = 0;
virtual HRESULT __stdcall get_Left (
/*[out,retval]*/ long * pVal ) = 0;
virtual HRESULT __stdcall put_Left (
/*[in]*/ long pVal ) = 0;
virtual HRESULT __stdcall get_Top (
/*[out,retval]*/ long * pVal ) = 0;
virtual HRESULT __stdcall put_Top (
/*[in]*/ long pVal ) = 0;
virtual HRESULT __stdcall get_Right (
/*[out,retval]*/ long * pVal ) = 0;
virtual HRESULT __stdcall put_Right (
/*[in]*/ long pVal ) = 0;
virtual HRESULT __stdcall get_Bottom (
/*[out,retval]*/ long * pVal ) = 0;
virtual HRESULT __stdcall put_Bottom (
/*[in]*/ long pVal ) = 0;
virtual HRESULT __stdcall get_ResourceHINSTANCE (
/*[out,retval]*/ long * pVal ) = 0;
virtual HRESULT __stdcall put_ResourceHINSTANCE (
/*[in]*/ long pVal ) = 0;
virtual HRESULT __stdcall get_ProgressResourceID (
/*[out,retval]*/ long * pVal ) = 0;
virtual HRESULT __stdcall put_ProgressResourceID (
/*[in]*/ long pVal ) = 0;
virtual HRESULT __stdcall get_StaticResourceID (
/*[out,retval]*/ long * pVal ) = 0;
virtual HRESULT __stdcall put_StaticResourceID (
/*[in]*/ long pVal ) = 0;
virtual HRESULT __stdcall get_Frames (
/*[out,retval]*/ long * pVal ) = 0;
virtual HRESULT __stdcall put_Frames (
/*[in]*/ long pVal ) = 0;
virtual HRESULT __stdcall get_BonusResourceID (
/*[out,retval]*/ long * pVal ) = 0;
virtual HRESULT __stdcall put_BonusResourceID (
/*[in]*/ long pVal ) = 0;
};
struct __declspec(uuid("038841ae-24d2-4a27-a69d-21a58e4b1077"))
ICddbUI2 : ICddbUI
{
//
// Raw methods provided by interface
//
virtual HRESULT __stdcall InvokeFuzzyMatchDialog2 (
/*[in]*/ IUnknown * Discs,
/*[in,out]*/ long * Flags,
/*[in,out]*/ long * pHWND,
/*[out]*/ long * Selection ) = 0;
};
struct __declspec(uuid("75ae99c2-fe58-4aa4-8135-11d794adfd48"))
CddbNSWinampUI;
// [ default ] interface ICddbUI
struct __declspec(uuid("4274782f-e631-487b-bc58-34f36a2b9203"))
CddbInfoWindow2;
// [ default ] interface ICddbInfoWindow2
struct __declspec(uuid("a68d109d-ab8e-4476-8ba8-bce0879c4f8f"))
CddbUIOptions2;
// [ default ] interface ICddbUIOptions2
struct __declspec(uuid("4d60fc87-14b0-48b3-93c2-5967b0fb6f96"))
CddbUI2;
// [ default ] interface ICddbUI2
// interface ICddbUI
//
// Named GUID constants initializations
//
extern "C" const GUID __declspec(selectany) LIBID_CDDBUICONTROLLibNSWinamp =
{0x49f3ccb6,0x3ba4,0x4b64,{0x94,0x51,0xcc,0xf4,0xd4,0x25,0x81,0xb1}};
extern "C" const GUID __declspec(selectany) IID_ICddbUI =
{0x92892c0b,0x8da6,0x49df,{0xb4,0x84,0xd5,0x57,0x1c,0x7e,0x48,0xcd}};
extern "C" const GUID __declspec(selectany) IID_ICddbInfoWindow2 =
{0x03396e62,0x5abb,0x4e75,{0xaf,0x96,0x5c,0xc6,0x17,0x13,0x54,0xba}};
extern "C" const GUID __declspec(selectany) IID_ICddbUIOptions2 =
{0xc50aaf00,0x4954,0x405f,{0xab,0xf8,0x1f,0xf3,0x2b,0xe7,0x62,0xbb}};
extern "C" const GUID __declspec(selectany) IID_ICddbUI2 =
{0x038841ae,0x24d2,0x4a27,{0xa6,0x9d,0x21,0xa5,0x8e,0x4b,0x10,0x77}};
extern "C" const GUID __declspec(selectany) CLSID_CddbNSWinampUI =
{0x75ae99c2,0xfe58,0x4aa4,{0x81,0x35,0x11,0xd7,0x94,0xad,0xfd,0x48}};
extern "C" const GUID __declspec(selectany) CLSID_CddbInfoWindow2 =
{0x4274782f,0xe631,0x487b,{0xbc,0x58,0x34,0xf3,0x6a,0x2b,0x92,0x03}};
extern "C" const GUID __declspec(selectany) CLSID_CddbUIOptions2 =
{0xa68d109d,0xab8e,0x4476,{0x8b,0xa8,0xbc,0xe0,0x87,0x9c,0x4f,0x8f}};
extern "C" const GUID __declspec(selectany) CLSID_CddbUI2 =
{0x4d60fc87,0x14b0,0x48b3,{0x93,0xc2,0x59,0x67,0xb0,0xfb,0x6f,0x96}};
#pragma pack(pop)

24
Src/gracenote/gracenote.h Normal file
View File

@ -0,0 +1,24 @@
#ifndef NULLSOFT_GRACENOTE_H
#define NULLSOFT_GRACENOTE_H
//#pragma warning(disable: 4278)
#ifdef DeleteFile
#undef DeleteFile
#endif
#ifndef IGNORE_API_GRACENOTE
#include "cddbcontrolwinamp.tlh"
#include "cddbmusicidwinamp.tlh"
#include "cddbplaylist2winamp.tlh"
#include "cddbuiwinamp.tlh"
#endif
/*#import "../gracenote/CDDBUIWinamp.dll" no_namespace, named_guids, raw_interfaces_only
#import "../gracenote/CDDBControlWinamp.dll" no_namespace, named_guids, raw_interfaces_only
#import "../gracenote/CddbPlaylist2Winamp.dll" no_namespace, named_guids, raw_interfaces_only
#import "../gracenote/CddbMusicIDWinamp.dll" no_namespace, named_guids, raw_interfaces_only*/
//#import "../gracenote/CddbLinkWinamp.dll" no_namespace, named_guids, raw_interfaces_only
//#pragma warning(default: 4278)
#endif

114
Src/gracenote/gracenote.rc Normal file
View File

@ -0,0 +1,114 @@
// Microsoft Visual C++ generated resource script.
//
#include "resource.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "afxres.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// English (U.S.) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
#endif //_WIN32
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 5,6,4,0
PRODUCTVERSION 5,6,4,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x4L
FILETYPE 0x2L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904e4"
BEGIN
VALUE "CompanyName", "Nullsoft, Inc."
VALUE "FileDescription", "Winamp 5.x System Component"
VALUE "FileVersion", "5, 6, 4, 0"
VALUE "InternalName", "gracenote.w5s"
VALUE "LegalCopyright", "Copyright <20> 2005-2013 Nullsoft, Inc."
VALUE "OriginalFilename", "gracenote.w5s"
VALUE "ProductName", "Winamp Gracenote Support Service"
VALUE "ProductVersion", "5, 6, 4, 0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1252
END
END
#endif // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// English (U.K.) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENG)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_UK
#pragma code_page(1252)
#endif //_WIN32
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE
BEGIN
"resource.h\0"
END
2 TEXTINCLUDE
BEGIN
"#include ""afxres.h""\r\n"
"\0"
END
3 TEXTINCLUDE
BEGIN
"\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
#endif // English (U.K.) resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED

View File

@ -0,0 +1,30 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29613.14
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gracenote", "gracenote.vcxproj", "{7EF5B87B-0298-492A-B3BB-FAA8102A2274}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
Release|Win32 = Release|Win32
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{7EF5B87B-0298-492A-B3BB-FAA8102A2274}.Debug|Win32.ActiveCfg = Debug|Win32
{7EF5B87B-0298-492A-B3BB-FAA8102A2274}.Debug|Win32.Build.0 = Debug|Win32
{7EF5B87B-0298-492A-B3BB-FAA8102A2274}.Debug|x64.ActiveCfg = Debug|x64
{7EF5B87B-0298-492A-B3BB-FAA8102A2274}.Debug|x64.Build.0 = Debug|x64
{7EF5B87B-0298-492A-B3BB-FAA8102A2274}.Release|Win32.ActiveCfg = Release|Win32
{7EF5B87B-0298-492A-B3BB-FAA8102A2274}.Release|Win32.Build.0 = Release|Win32
{7EF5B87B-0298-492A-B3BB-FAA8102A2274}.Release|x64.ActiveCfg = Release|x64
{7EF5B87B-0298-492A-B3BB-FAA8102A2274}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {6E4A6169-962E-436A-A498-F1A575FD4A3D}
EndGlobalSection
EndGlobal

View File

@ -0,0 +1,313 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{7EF5B87B-0298-492A-B3BB-FAA8102A2274}</ProjectGuid>
<RootNamespace>gracenote</RootNamespace>
<WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>false</LinkIncremental>
<OutDir>$(PlatformShortName)_$(Configuration)\</OutDir>
<IntDir>$(PlatformShortName)_$(Configuration)\</IntDir>
<TargetExt>.w5s</TargetExt>
<IncludePath>$(IncludePath)</IncludePath>
<LibraryPath>$(LibraryPath)</LibraryPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>false</LinkIncremental>
<OutDir>$(PlatformShortName)_$(Configuration)\</OutDir>
<IntDir>$(PlatformShortName)_$(Configuration)\</IntDir>
<TargetExt>.w5s</TargetExt>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<OutDir>$(PlatformShortName)_$(Configuration)\</OutDir>
<IntDir>$(PlatformShortName)_$(Configuration)\</IntDir>
<TargetExt>.w5s</TargetExt>
<IncludePath>$(IncludePath)</IncludePath>
<LibraryPath>$(LibraryPath)</LibraryPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<OutDir>$(PlatformShortName)_$(Configuration)\</OutDir>
<IntDir>$(PlatformShortName)_$(Configuration)\</IntDir>
<TargetExt>.w5s</TargetExt>
</PropertyGroup>
<PropertyGroup Label="Vcpkg">
<VcpkgEnableManifest>false</VcpkgEnableManifest>
</PropertyGroup>
<PropertyGroup Label="Vcpkg" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<VcpkgInstalledDir>
</VcpkgInstalledDir>
<VcpkgUseStatic>false</VcpkgUseStatic>
<VcpkgConfiguration>Debug</VcpkgConfiguration>
<VcpkgTriplet>x86-windows-static-md</VcpkgTriplet>
</PropertyGroup>
<PropertyGroup Label="Vcpkg" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<VcpkgInstalledDir>
</VcpkgInstalledDir>
<VcpkgUseStatic>false</VcpkgUseStatic>
<VcpkgTriplet>x86-windows-static-md</VcpkgTriplet>
</PropertyGroup>
<PropertyGroup Label="Vcpkg" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<VcpkgInstalledDir>
</VcpkgInstalledDir>
<VcpkgUseStatic>false</VcpkgUseStatic>
<VcpkgTriplet>x86-windows-static-md</VcpkgTriplet>
<VcpkgConfiguration>Debug</VcpkgConfiguration>
</PropertyGroup>
<PropertyGroup Label="Vcpkg" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<VcpkgInstalledDir>
</VcpkgInstalledDir>
<VcpkgUseStatic>false</VcpkgUseStatic>
<VcpkgTriplet>x86-windows-static-md</VcpkgTriplet>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>../Wasabi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;GRACENOTE_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>false</MinimalRebuild>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
</ClCompile>
<Link>
<AdditionalDependencies>shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<ImportLibrary>$(ProjectDir)x86_Debug\$(ProjectName).lib</ImportLibrary>
<TargetMachine>MachineX86</TargetMachine>
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
<PostBuildEvent>
<Command>xcopy /Y /D $(OutDir)$(TargetName)$(TargetExt) ..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\System\
xcopy /Y /D $(ProjectDir)Cddbx1.dll ..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\plugins\Gracenote\
xcopy /Y /D $(ProjectDir)Cddbx2.dll ..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\plugins\Gracenote\
xcopy /Y /D $(ProjectDir)Cddbx3.dll ..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\plugins\Gracenote\
xcopy /Y /D $(ProjectDir)Cddbx4.dll ..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\plugins\Gracenote\
xcopy /Y /D $(ProjectDir)Cddbx5.dll ..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\plugins\Gracenote\
xcopy /Y /D $(ProjectDir)CddbWOManagerWinamp.dll ..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\plugins\Gracenote\
xcopy /Y /D $(ProjectDir)CDDBUIWinamp.dll ..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\plugins\Gracenote\
xcopy /Y /D $(ProjectDir)CddbPlaylist2Winamp.dll ..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\plugins\Gracenote\
xcopy /Y /D $(ProjectDir)CddbMusicIDWinamp.dll ..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\plugins\Gracenote\
xcopy /Y /D $(ProjectDir)CddbMusicIDUIWinamp.dll ..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\plugins\Gracenote\
xcopy /Y /D $(ProjectDir)CddbLinkWinamp.dll ..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\plugins\Gracenote\
xcopy /Y /D $(ProjectDir)CDDBControlWinamp.dll ..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\plugins\Gracenote\
</Command>
<Message>Post build event: 'xcopy /Y /D $(OutDir)$(TargetName)$(TargetExt) ..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\System\'</Message>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>../Wasabi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN64;_DEBUG;_WINDOWS;_USRDLL;GRACENOTE_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>false</MinimalRebuild>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
</ClCompile>
<Link>
<AdditionalDependencies>shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<ImportLibrary>$(ProjectDir)x64_Debug\$(ProjectName).lib</ImportLibrary>
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
<PostBuildEvent>
<Command>xcopy /Y /D $(OutDir)$(TargetName)$(TargetExt) ..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\System\
xcopy /Y /D $(ProjectDir)Cddbx1.dll ..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\plugins\Gracenote\
xcopy /Y /D $(ProjectDir)Cddbx2.dll ..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\plugins\Gracenote\
xcopy /Y /D $(ProjectDir)Cddbx3.dll ..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\plugins\Gracenote\
xcopy /Y /D $(ProjectDir)Cddbx4.dll ..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\plugins\Gracenote\
xcopy /Y /D $(ProjectDir)Cddbx5.dll ..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\plugins\Gracenote\
xcopy /Y /D $(ProjectDir)CddbWOManagerWinamp.dll ..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\plugins\Gracenote\
xcopy /Y /D $(ProjectDir)CDDBUIWinamp.dll ..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\plugins\Gracenote\
xcopy /Y /D $(ProjectDir)CddbPlaylist2Winamp.dll ..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\plugins\Gracenote\
xcopy /Y /D $(ProjectDir)CddbMusicIDWinamp.dll ..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\plugins\Gracenote\
xcopy /Y /D $(ProjectDir)CddbMusicIDUIWinamp.dll ..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\plugins\Gracenote\
xcopy /Y /D $(ProjectDir)CddbLinkWinamp.dll ..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\plugins\Gracenote\
xcopy /Y /D $(ProjectDir)CDDBControlWinamp.dll ..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\plugins\Gracenote\
</Command>
<Message>Post build event: 'xcopy /Y /D $(OutDir)$(TargetName)$(TargetExt) ..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\System\'</Message>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<Optimization>MinSpace</Optimization>
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<AdditionalIncludeDirectories>../Wasabi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;GRACENOTE_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<BufferSecurityCheck>true</BufferSecurityCheck>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>None</DebugInformationFormat>
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
</ClCompile>
<Link>
<AdditionalDependencies>shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
<DelayLoadDLLs>ole32.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
<GenerateDebugInformation>false</GenerateDebugInformation>
<ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<ImportLibrary>$(ProjectDir)x86_Release\$(ProjectName).lib</ImportLibrary>
<TargetMachine>MachineX86</TargetMachine>
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
<PostBuildEvent>
<Command>
</Command>
<Message>
</Message>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<Optimization>MinSpace</Optimization>
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<AdditionalIncludeDirectories>../Wasabi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN64;NDEBUG;_WINDOWS;_USRDLL;GRACENOTE_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<BufferSecurityCheck>true</BufferSecurityCheck>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>None</DebugInformationFormat>
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
</ClCompile>
<Link>
<AdditionalDependencies>shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
<DelayLoadDLLs>ole32.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
<GenerateDebugInformation>false</GenerateDebugInformation>
<ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<ImportLibrary>$(ProjectDir)x64_Release\$(ProjectName).lib</ImportLibrary>
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
<PostBuildEvent>
<Command>xcopy /Y /D $(OutDir)*.w5s ..\..\..\Winamp_$(PlatformShortName)_$(Configuration)\System\
xcopy /Y /D $(ProjectDir)Cddbx1.dll ..\..\..\Winamp_$(PlatformShortName)_$(Configuration)\plugins\Gracenote\
xcopy /Y /D $(ProjectDir)Cddbx2.dll ..\..\..\Winamp_$(PlatformShortName)_$(Configuration)\plugins\Gracenote\
xcopy /Y /D $(ProjectDir)Cddbx3.dll ..\..\..\Winamp_$(PlatformShortName)_$(Configuration)\plugins\Gracenote\
xcopy /Y /D $(ProjectDir)Cddbx4.dll ..\..\..\Winamp_$(PlatformShortName)_$(Configuration)\plugins\Gracenote\
xcopy /Y /D $(ProjectDir)Cddbx5.dll ..\..\..\Winamp_$(PlatformShortName)_$(Configuration)\plugins\Gracenote\
xcopy /Y /D $(ProjectDir)CddbWOManagerWinamp.dll ..\..\..\Winamp_$(PlatformShortName)_$(Configuration)\plugins\Gracenote\
xcopy /Y /D $(ProjectDir)CDDBUIWinamp.dll ..\..\..\Winamp_$(PlatformShortName)_$(Configuration)\plugins\Gracenote\
xcopy /Y /D $(ProjectDir)CddbPlaylist2Winamp.dll ..\..\..\Winamp_$(PlatformShortName)_$(Configuration)\plugins\Gracenote\
xcopy /Y /D $(ProjectDir)CddbMusicIDWinamp.dll ..\..\..\Winamp_$(PlatformShortName)_$(Configuration)\plugins\Gracenote\
xcopy /Y /D $(ProjectDir)CddbMusicIDUIWinamp.dll ..\..\..\Winamp_$(PlatformShortName)_$(Configuration)\plugins\Gracenote\
xcopy /Y /D $(ProjectDir)CddbLinkWinamp.dll ..\..\..\Winamp_$(PlatformShortName)_$(Configuration)\plugins\Gracenote\
xcopy /Y /D $(ProjectDir)CDDBControlWinamp.dll ..\..\..\Winamp_$(PlatformShortName)_$(Configuration)\plugins\Gracenote\
</Command>
<Message>Post build event: 'xcopy /Y /D $(OutDir)*.w5s ..\..\..\Winamp_$(PlatformShortName)_$(Configuration)\System\'</Message>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="api.h" />
<ClInclude Include="api_gracenote.h" />
<ClInclude Include="gracenote.h" />
<ClInclude Include="GracenoteApi.h" />
<ClInclude Include="GracenoteFactory.h" />
<ClInclude Include="resource.h" />
<ClInclude Include="w5s.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="api_gracenote.cpp" />
<ClCompile Include="GracenoteApi.cpp" />
<ClCompile Include="GracenoteFactory.cpp" />
<ClCompile Include="w5s.cpp" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="gracenote.rc" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Wasabi\Wasabi.vcxproj">
<Project>{3e0bfa8a-b86a-42e9-a33f-ec294f823f7f}</Project>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,56 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<ClCompile Include="GracenoteApi.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="api_gracenote.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="w5s.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="GracenoteFactory.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="api.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="api_gracenote.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="gracenote.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="GracenoteApi.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="GracenoteFactory.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="resource.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="w5s.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<Filter Include="Header Files">
<UniqueIdentifier>{a4cb6f02-fd13-416b-a55e-2b940de4df0a}</UniqueIdentifier>
</Filter>
<Filter Include="Ressource Files">
<UniqueIdentifier>{8b36e9e3-e90b-46a0-8833-0e2e16fc937a}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files">
<UniqueIdentifier>{1bd96244-031a-47d3-87a2-5a97f1aaca68}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="gracenote.rc">
<Filter>Ressource Files</Filter>
</ResourceCompile>
</ItemGroup>
</Project>

14
Src/gracenote/resource.h Normal file
View File

@ -0,0 +1,14 @@
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
// Used by gracenote.rc
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 101
#define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 1001
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif

74
Src/gracenote/w5s.cpp Normal file
View File

@ -0,0 +1,74 @@
#include "api.h"
#include "w5s.h"
#include "GracenoteFactory.h"
#include <bfc/platform/export.h>
#include <api/service/waservicefactory.h>
#include "GracenoteApi.h"
template <class api_T>
void ServiceBuild(api_T *&api_t, GUID factoryGUID_t)
{
if (WASABI_API_SVC)
{
waServiceFactory *factory = WASABI_API_SVC->service_getServiceByGuid(factoryGUID_t);
if (factory)
api_t = reinterpret_cast<api_T *>( factory->getInterface() );
}
}
template <class api_T>
void ServiceRelease(api_T *api_t, GUID factoryGUID_t)
{
if (WASABI_API_SVC && api_t)
{
waServiceFactory *factory = WASABI_API_SVC->service_getServiceByGuid(factoryGUID_t);
if (factory)
factory->releaseInterface(api_t);
}
api_t = NULL;
}
api_application *WASABI_API_APP = 0;
api_service *WASABI_API_SVC = 0;
api_config *AGAVE_API_CONFIG=0;
api_language *WASABI_API_LNG = 0;
GracenoteFactory gracenoteFactory;
void WA5_Gracenote::RegisterServices(api_service *service)
{
WASABI_API_SVC = service;
ServiceBuild(AGAVE_API_CONFIG, AgaveConfigGUID);
ServiceBuild(WASABI_API_APP, applicationApiServiceGuid);
ServiceBuild(WASABI_API_LNG, languageApiGUID);
WASABI_API_SVC->service_register(&gracenoteFactory);
}
int WA5_Gracenote::RegisterServicesSafeModeOk()
{
return 1;
}
void WA5_Gracenote::DeregisterServices(api_service *service)
{
gracenoteApi.Close();
WASABI_API_SVC->service_deregister(&gracenoteFactory);
ServiceRelease(AGAVE_API_CONFIG, AgaveConfigGUID);
ServiceRelease(WASABI_API_APP, applicationApiServiceGuid);
ServiceRelease(WASABI_API_LNG, languageApiGUID);
}
static WA5_Gracenote wa5_gracenote;
extern "C" DLLEXPORT ifc_wa5component *GetWinamp5SystemComponent()
{
return &wa5_gracenote;
}
#define CBCLASS WA5_Gracenote
START_DISPATCH;
VCB(API_WA5COMPONENT_REGISTERSERVICES, RegisterServices)
CB(15, RegisterServicesSafeModeOk)
VCB(API_WA5COMPONENT_DEREEGISTERSERVICES, DeregisterServices)
END_DISPATCH;
#undef CBCLASS

16
Src/gracenote/w5s.h Normal file
View File

@ -0,0 +1,16 @@
#ifndef __WASABI_WA5_GRACENOTE_H_
#define __WASABI_WA5_GRACENOTE_H_
#include "../Agave/Component/ifc_wa5component.h"
class WA5_Gracenote : public ifc_wa5component
{
public:
void RegisterServices(api_service *service);
int RegisterServicesSafeModeOk();
void DeregisterServices(api_service *service);
protected:
RECVS_DISPATCH;
};
#endif