mirror of
https://github.com/yuzu-emu/discord-rpc.git
synced 2024-11-30 20:14:15 +01:00
Sync header defs with docs
This commit is contained in:
parent
d14e810be0
commit
06047d4160
@ -1,31 +1,22 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
#include <time.h>
|
||||||
|
|
||||||
struct DiscordRichPresence {
|
struct DiscordRichPresence {
|
||||||
uint64_t contextStartTimeUTC; // 0 means unspecified
|
const char* state;
|
||||||
uint64_t contextStopTimeUTC; // 0 means unspecified
|
const char* details;
|
||||||
|
time_t startTimestamp;
|
||||||
////
|
time_t endTimestamp;
|
||||||
const char* gameState; // eg. In Game
|
const char* largeImageKey;
|
||||||
const char* gameMode; // e.g. Summoner's Rift
|
const char* largeImageText;
|
||||||
const char* gameModifier; // e.g. Ranked
|
const char* smallImageKey;
|
||||||
const char* choice; // e.g. Aatrox
|
const char* smallImageText;
|
||||||
// or
|
|
||||||
const char* partyStatus[4]; // e.g. "In Game", "Summoner's Rift", "Ranked", "Aatrox"
|
|
||||||
////
|
|
||||||
|
|
||||||
const char* largeImageKey; // e.g. The map background
|
|
||||||
const char* smallImageKey; // e.g. The character's portrait icon
|
|
||||||
|
|
||||||
const char* partyId;
|
const char* partyId;
|
||||||
uint16_t partySize; // e.g. 0 means ignored
|
int partySize;
|
||||||
uint16_t partyCapacity; // e.g. 0 means no limit
|
int partyMax;
|
||||||
|
const char* matchSecret;
|
||||||
// optional
|
const char* joinSecret;
|
||||||
const char* contextSecret; // Required for the "notify me" feature
|
const char* spectateSecret;
|
||||||
uint8_t isInstance; // Together with context_secret enables the "notify me" feature
|
bool instance;
|
||||||
|
|
||||||
const char* joinSecret; // Enables the "invite to join" feature
|
|
||||||
const char* spectateSecret; // Enables the "invite to spectate" feature
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct DiscordEventHandlers {
|
struct DiscordEventHandlers {
|
||||||
@ -39,6 +30,12 @@ struct DiscordEventHandlers {
|
|||||||
void (*spectateGame)(const char* spectateSecret);
|
void (*spectateGame)(const char* spectateSecret);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
void Discord_Initialize(const char* applicationId, DiscordEventHandlers* handlers);
|
||||||
|
void Discord_Shutdown();
|
||||||
|
void Discord_UpdatePresence(const DiscordRichPresence* presence);
|
||||||
|
|
||||||
|
/* later
|
||||||
|
|
||||||
struct DiscordChannelEventHandlers {
|
struct DiscordChannelEventHandlers {
|
||||||
void (*messageCreate)(const DiscordMessage* message);
|
void (*messageCreate)(const DiscordMessage* message);
|
||||||
void (*messageUpdate)(const DiscordMessage* message);
|
void (*messageUpdate)(const DiscordMessage* message);
|
||||||
@ -47,19 +44,9 @@ struct DiscordChannelEventHandlers {
|
|||||||
void (*voiceStateDelete)(const DiscordVoiceState* state);
|
void (*voiceStateDelete)(const DiscordVoiceState* state);
|
||||||
void (*speakingStart)(const DiscordSpeakingState* state);
|
void (*speakingStart)(const DiscordSpeakingState* state);
|
||||||
void (*speakingStop)(const DiscordSpeakingState* state);
|
void (*speakingStop)(const DiscordSpeakingState* state);
|
||||||
}
|
};
|
||||||
|
|
||||||
// Call this to start up the Discord SDK
|
|
||||||
void Discord_Initialize(const char* applicationId, DiscordEventHandlers* handlers);
|
|
||||||
|
|
||||||
// Call this to subscribe to events in a specific voice or text channel
|
// Call this to subscribe to events in a specific voice or text channel
|
||||||
void Discord_Subscribe(const char* channelId, const DiscordChannelEventHandlers* handlers)
|
void Discord_Subscribe(const char* channelId, const DiscordChannelEventHandlers* handlers);
|
||||||
|
|
||||||
// Call this when you're all done so we can cleanup without timing out.
|
|
||||||
void Discord_Shutdown();
|
|
||||||
|
|
||||||
// Call this whenever any of the data in the payload changes in a material way.
|
|
||||||
void Discord_UpdatePresence(const DiscordRichPresence* presence);
|
|
||||||
|
|
||||||
// TBD RPC Requests
|
// TBD RPC Requests
|
||||||
void Discord_Authenticate();
|
void Discord_Authenticate();
|
||||||
@ -70,3 +57,5 @@ void Discord_GetChannel();
|
|||||||
void Discord_SelectVoiceChannel();
|
void Discord_SelectVoiceChannel();
|
||||||
void Discord_SelectTextChannel();
|
void Discord_SelectTextChannel();
|
||||||
void Discord_SendMessage();
|
void Discord_SendMessage();
|
||||||
|
|
||||||
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user