跳转至

Class qqmusic::utils::SessionManager

ClassList > qqmusic > utils > SessionManager

全局单例的Session管理器, 负责维护全局上下文栈, 并负责 session 实例的生成

  • #include <session.h>

Public Functions

Type Name
SessionManager (const SessionManager &) = delete
Session get_session ()
获取一个 session 实例
SessionManager operator= (const SessionManager &) = delete
void pop_context ()
上下文栈弹出栈顶元素
void push_context (qqmusic::details::NetworkContext && context)
将指定的上下文压栈
void set_context (const qqmusic::details::NetworkContext & context)
替换上下文栈栈顶的上下文

Public Static Functions

Type Name
SessionManager & get_instance ()
获取Session管理器实例

Public Functions Documentation

function SessionManager [1/2]

qqmusic::utils::SessionManager::SessionManager (
    const SessionManager &
) = delete

function get_session

获取一个 session 实例

Session qqmusic::utils::SessionManager::get_session () 


function operator=

SessionManager qqmusic::utils::SessionManager::operator= (
    const SessionManager &
) = delete

function pop_context

上下文栈弹出栈顶元素

void qqmusic::utils::SessionManager::pop_context () 


function push_context

将指定的上下文压栈

void qqmusic::utils::SessionManager::push_context (
    qqmusic::details::NetworkContext && context
) 


function set_context

替换上下文栈栈顶的上下文

void qqmusic::utils::SessionManager::set_context (
    const qqmusic::details::NetworkContext & context
) 


Public Static Functions Documentation

function get_instance

获取Session管理器实例

static SessionManager & qqmusic::utils::SessionManager::get_instance () 



The documentation for this class was generated from the following file include/qqmusic/utils/session.h