Concord - C Discord API library
A Discord API wrapper library written in C
voice_connections.h File Reference

Generated code. More...

#include <stddef.h>
#include <stdbool.h>
#include <inttypes.h>
#include "carray.h"
#include "cog-utils.h"
#include "types.h"
#include "jsmn.h"
#include "jsmn-find.h"
#include "json-build.h"
Include dependency graph for voice_connections.h:

Go to the source code of this file.

Macros

#define DISCORD_VOICE_MICROPHONE   1 << 0
 
#define DISCORD_VOICE_SOUNDSHARE   1 << 1
 
#define DISCORD_VOICE_PRIORITY   1 << 2
 
#define JSMN_STRICT
 
#define JSMN_HEADER
 
#define JSONB_HEADER
 

Enumerations

enum  discord_voice_close_opcodes {
  DISCORD_VOICE_CLOSE_REASON_UNKNOWN_OPCODE = 4001 , DISCORD_VOICE_CLOSE_REASON_DECODE_ERROR = 4002 , DISCORD_VOICE_CLOSE_REASON_NOT_AUTHENTICATED = 4003 , DISCORD_VOICE_CLOSE_REASON_AUTHENTICATION_FAILED = 4004 ,
  DISCORD_VOICE_CLOSE_REASON_ALREADY_AUTHENTICATED = 4005 , DISCORD_VOICE_CLOSE_REASON_INVALID_SESSION = 4006 , DISCORD_VOICE_CLOSE_REASON_SESSION_TIMED_OUT = 4009 , DISCORD_VOICE_CLOSE_REASON_SERVER_NOT_FOUND = 4011 ,
  DISCORD_VOICE_CLOSE_REASON_UNKNOWN_PROTOCOL = 4012 , DISCORD_VOICE_CLOSE_REASON_DISCONNECTED = 4014 , DISCORD_VOICE_CLOSE_REASON_SERVER_CRASH = 4015 , DISCORD_VOICE_CLOSE_REASON_UNKNOWN_ENCRYPTION_MODE = 4016
}
 
enum  discord_voice_opcodes {
  DISCORD_VOICE_IDENTIFY = 0 , DISCORD_VOICE_SELECT_PROTOCOL = 1 , DISCORD_VOICE_READY = 2 , DISCORD_VOICE_HEARTBEAT = 3 ,
  DISCORD_VOICE_SESSION_DESCRIPTION = 4 , DISCORD_VOICE_SPEAKING = 5 , DISCORD_VOICE_HEARTBEAT_ACK = 6 , DISCORD_VOICE_RESUME = 7 ,
  DISCORD_VOICE_HELLO = 8 , DISCORD_VOICE_RESUMED = 9 , DISCORD_VOICE_CLIENT_DISCONNECT = 13 , DISCORD_VOICE_CODEC = 14
}
 

Detailed Description

Generated code.

Author
Cogmasters

Macro Definition Documentation

◆ JSMN_STRICT

#define JSMN_STRICT

◆ JSMN_HEADER

#define JSMN_HEADER

◆ JSONB_HEADER

#define JSONB_HEADER

Enumeration Type Documentation

◆ discord_voice_close_opcodes

Enumerator
DISCORD_VOICE_CLOSE_REASON_UNKNOWN_OPCODE 

You sent an invalid opcode

DISCORD_VOICE_CLOSE_REASON_DECODE_ERROR 

You sent a invalid payload in your identifying to the Gateway

DISCORD_VOICE_CLOSE_REASON_NOT_AUTHENTICATED 

You sent a payload before identifying with the gateway

DISCORD_VOICE_CLOSE_REASON_AUTHENTICATION_FAILED 

The token you sent in your identify payload is incorrect

DISCORD_VOICE_CLOSE_REASON_ALREADY_AUTHENTICATED 

You sent more than one identify payload

DISCORD_VOICE_CLOSE_REASON_INVALID_SESSION 

Your session is no longer validd

DISCORD_VOICE_CLOSE_REASON_SESSION_TIMED_OUT 

Your session has timed out

DISCORD_VOICE_CLOSE_REASON_SERVER_NOT_FOUND 

Discord can't find the server you're trying to connect to

DISCORD_VOICE_CLOSE_REASON_UNKNOWN_PROTOCOL 

Discord didn't recognize the protocol you sent

DISCORD_VOICE_CLOSE_REASON_DISCONNECTED 

Channel was deleted, you were kicked, voice server changed, or the main gateway session was dropped; should not reconnect

DISCORD_VOICE_CLOSE_REASON_SERVER_CRASH 

The server crashed, try resuming

DISCORD_VOICE_CLOSE_REASON_UNKNOWN_ENCRYPTION_MODE 

Discord didn't recognize the encryption

◆ discord_voice_opcodes

Enumerator
DISCORD_VOICE_IDENTIFY 

Begin a voice websocket connection

DISCORD_VOICE_SELECT_PROTOCOL 

Select the voice protocol

DISCORD_VOICE_READY 

Complete the websocket handshake

DISCORD_VOICE_HEARTBEAT 

Keep the websocket connection alive

DISCORD_VOICE_SESSION_DESCRIPTION 

Describe the session

DISCORD_VOICE_SPEAKING 

Indicate which users are speaking

DISCORD_VOICE_HEARTBEAT_ACK 

Sent to acknowledge a received client heartbeat

DISCORD_VOICE_RESUME 

Resume a connection

DISCORD_VOICE_HELLO 

Time to wait between sending heartbeats in milliseconds

DISCORD_VOICE_RESUMED 

Acknowledge a successful session resume

DISCORD_VOICE_CLIENT_DISCONNECT 

A client has disconnected from the voice channel

DISCORD_VOICE_CODEC