-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
256 additions
and
349 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,46 @@ | ||
#pragma once | ||
|
||
#include <apiPlugin.h> | ||
#include "IUnknownInterfaceImpl.h" | ||
#include "aimpSettings.h" | ||
#include "IUnknownInterface.h" | ||
|
||
#include "aimpRemote.h" | ||
#include "discord_rpc.h" | ||
|
||
class AIMPPlugin : public IUnknownInterfaceImpl<IAIMPPlugin> | ||
class Plugin : | ||
public IUnknownInterface<IAIMPPlugin> | ||
{ | ||
public: | ||
AIMPPlugin(); | ||
~AIMPPlugin(); | ||
Plugin(){ AddRef(); } | ||
|
||
static VOID UpdatePlayerState(INT AIMPRemote_State); | ||
static VOID UpdateTrackInfo(PAIMPTrackInfo AIMPRemote_TrackInfo); | ||
static VOID UpdateTrackPosition(PAIMPPosition AIMPRemote_Position); | ||
|
||
PWCHAR WINAPI InfoGet(INT Index); | ||
DWORD WINAPI InfoGetCategories(); | ||
~Plugin() { Finalize(); } | ||
|
||
HRESULT WINAPI Initialize(IAIMPCore* Core); | ||
HRESULT WINAPI Finalize(); | ||
|
||
VOID WINAPI SystemNotification(INT NotifyID, IUnknown* Data); | ||
PWCHAR WINAPI InfoGet(INT Index) | ||
{ | ||
switch (Index) | ||
{ | ||
case AIMP_PLUGIN_INFO_NAME: return const_cast<PWCHAR>(AIMPPLUGIN_NAME); | ||
case AIMP_PLUGIN_INFO_AUTHOR: return const_cast<PWCHAR>(AIMPPLUGIN_AUTHOR); | ||
case AIMP_PLUGIN_INFO_SHORT_DESCRIPTION: return const_cast<PWCHAR>(AIMPPLUGIN_SHORT_DESC); | ||
case AIMP_PLUGIN_INFO_FULL_DESCRIPTION: return const_cast<PWCHAR>(AIMPPLUGIN_FULL_DESC); | ||
} | ||
|
||
return nullptr; | ||
} | ||
|
||
static VOID DiscordReady(VOID); | ||
private: | ||
bool bFinalised; | ||
DWORD WINAPI InfoGetCategories() | ||
{ | ||
return AIMPPLUGIN_CATEGORY; | ||
} | ||
|
||
VOID WINAPI SystemNotification(INT NotifyID, IUnknown* Data) {} | ||
public: | ||
static VOID DiscordReady(const DiscordUser* connectedUser); | ||
public: | ||
static VOID UpdatePlayerState(INT AIMPRemote_State); | ||
static VOID UpdateTrackInfo(PAIMPTrackInfo AIMPRemote_TrackInfo); | ||
static VOID UpdateTrackPosition(PAIMPPosition AIMPRemote_Position); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.