forked from Exle/aimp-discord-presence
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAIMPPlugin.h
46 lines (37 loc) · 1.14 KB
/
AIMPPlugin.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#pragma once
#include <apiPlugin.h>
#include "aimpSettings.h"
#include "IUnknownInterface.h"
#include "aimpRemote.h"
#include "discord_rpc.h"
class Plugin :
public IUnknownInterface<IAIMPPlugin>
{
public:
Plugin(){ AddRef(); }
~Plugin() { Finalize(); }
HRESULT WINAPI Initialize(IAIMPCore* Core);
HRESULT WINAPI Finalize();
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;
}
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);
};