D++ (DPP)  10.0.30
C++ Discord API Bot Library
presence.h File Reference
#include <dpp/export.h>
#include <dpp/snowflake.h>
#include <dpp/emoji.h>
#include <dpp/json_fwd.h>
#include <unordered_map>
#include <dpp/json_interface.h>
Include dependency graph for presence.h:
This graph shows which files directly or indirectly include this file:

Classes

class  dpp::activity
 An activity is a representation of what a user is doing. More...
 
struct  dpp::activity_assets
 An activity asset are the images and the hover text displayed in the rich presence. More...
 
struct  dpp::activity_button
 An activity button is a custom button shown in the rich presence. More...
 
struct  dpp::activity_party
 Information for the current party of the player. More...
 
struct  dpp::activity_secrets
 Secrets for Rich Presence joining and spectating. More...
 
class  dpp::presence
 Represents user presence, e.g. More...
 

Namespaces

 dpp
 The main namespace for D++ functions.
 

Macros

#define PF_CLEAR_DESKTOP   0b11111100
 Bit mask for clearing desktop status. More...
 
#define PF_CLEAR_MOBILE   0b11001111
 Bit mask for clearing mobile status. More...
 
#define PF_CLEAR_STATUS   0b00111111
 Bit mask for clearing main status. More...
 
#define PF_CLEAR_WEB   0b11110011
 Bit mask for clearing web status. More...
 
#define PF_SHIFT_DESKTOP   0
 Bit shift for desktop status. More...
 
#define PF_SHIFT_MAIN   6
 Bit shift for main status. More...
 
#define PF_SHIFT_MOBILE   4
 Bit shift for mobile status. More...
 
#define PF_SHIFT_WEB   2
 Bit shift for web status. More...
 
#define PF_STATUS_MASK   0b00000011
 Bit mask for status. More...
 

Typedefs

typedef std::unordered_map< snowflake, presence > dpp::presence_map
 A container of presences. More...
 

Enumerations

enum  dpp::activity_flags {
  dpp::af_instance = 0b000000001,
  dpp::af_join = 0b000000010,
  dpp::af_spectate = 0b000000100,
  dpp::af_join_request = 0b000001000,
  dpp::af_sync = 0b000010000,
  dpp::af_play = 0b000100000,
  dpp::af_party_privacy_friends = 0b001000000,
  dpp::af_party_privacy_voice_channel = 0b010000000,
  dpp::af_embedded = 0b100000000
}
 Activity types for rich presence. More...
 
enum  dpp::activity_type : uint8_t {
  dpp::at_game = 0,
  dpp::at_streaming = 1,
  dpp::at_listening = 2,
  dpp::at_watching = 3,
  dpp::at_custom = 4,
  dpp::at_competing = 5
}
 Game types. More...
 
enum  dpp::presence_flags {
  dpp::p_desktop_online = 0b00000001,
  dpp::p_desktop_dnd = 0b00000010,
  dpp::p_desktop_idle = 0b00000011,
  dpp::p_web_online = 0b00000100,
  dpp::p_web_dnd = 0b00001000,
  dpp::p_web_idle = 0b00001100,
  dpp::p_mobile_online = 0b00010000,
  dpp::p_mobile_dnd = 0b00100000,
  dpp::p_mobile_idle = 0b00110000,
  dpp::p_status_online = 0b01000000,
  dpp::p_status_dnd = 0b10000000,
  dpp::p_status_idle = 0b11000000
}
 Presence flags bitmask. More...
 
enum  dpp::presence_status : uint8_t {
  dpp::ps_offline = 0,
  dpp::ps_online = 1,
  dpp::ps_dnd = 2,
  dpp::ps_idle = 3,
  dpp::ps_invisible = 4
}
 Online presence status values. More...
 

Macro Definition Documentation

◆ PF_CLEAR_DESKTOP

#define PF_CLEAR_DESKTOP   0b11111100

Bit mask for clearing desktop status.

◆ PF_CLEAR_MOBILE

#define PF_CLEAR_MOBILE   0b11001111

Bit mask for clearing mobile status.

◆ PF_CLEAR_STATUS

#define PF_CLEAR_STATUS   0b00111111

Bit mask for clearing main status.

◆ PF_CLEAR_WEB

#define PF_CLEAR_WEB   0b11110011

Bit mask for clearing web status.

◆ PF_SHIFT_DESKTOP

#define PF_SHIFT_DESKTOP   0

Bit shift for desktop status.

◆ PF_SHIFT_MAIN

#define PF_SHIFT_MAIN   6

Bit shift for main status.

◆ PF_SHIFT_MOBILE

#define PF_SHIFT_MOBILE   4

Bit shift for mobile status.

◆ PF_SHIFT_WEB

#define PF_SHIFT_WEB   2

Bit shift for web status.

◆ PF_STATUS_MASK

#define PF_STATUS_MASK   0b00000011

Bit mask for status.