LeechCraft  0.6.70-16373-g319c272718
Modular cross-platform feature rich live environment.
LC::Util::SvcAuth::VkAuthManager Class Reference

#include "vkauthmanager.h"

+ Inheritance diagram for LC::Util::SvcAuth::VkAuthManager:
+ Collaboration diagram for LC::Util::SvcAuth::VkAuthManager:

Classes

struct  SilentMode
 

Public Types

using RequestQueue_t = QList< std::function< void(QString)> >
 
using RequestQueue_ptr = RequestQueue_t *
 
using PrioRequestQueue_t = QList< QPair< std::function< void(QString)>, QueuePriority > >
 
using PrioRequestQueue_ptr = PrioRequestQueue_t *
 
using ScheduleGuard_t = Util::DefaultScopeGuard
 
using AuthKeyError_t = std::variant< SilentMode >
 
using AuthKeyResult_t = Either< AuthKeyError_t, QString >
 

Signals

void gotAuthKey (const QString &)
 
void cookiesChanged (const QByteArray &)
 
void authCanceled ()
 
void justAuthenticated ()
 

Public Member Functions

 VkAuthManager (const QString &accountName, const QString &clientId, const QStringList &scope, const QByteArray &cookies, const ICoreProxy_ptr &, QueueManager *=nullptr, QObject *=nullptr)
 
 ~VkAuthManager () override
 
bool IsAuthenticated () const
 
bool HadAuthentication () const
 
void UpdateScope (const QStringList &)
 
void GetAuthKey ()
 
QFuture< AuthKeyResult_tGetAuthKeyFuture ()
 
ScheduleGuard_t ManageQueue (RequestQueue_ptr)
 
ScheduleGuard_t ManageQueue (PrioRequestQueue_ptr)
 
void SetSilentMode (bool)
 
void ClearAuthData ()
 
void Reauth ()
 

Detailed Description

Definition at line 37 of file vkauthmanager.h.

Member Typedef Documentation

◆ AuthKeyError_t

Definition at line 92 of file vkauthmanager.h.

◆ AuthKeyResult_t

◆ PrioRequestQueue_ptr

◆ PrioRequestQueue_t

using LC::Util::SvcAuth::VkAuthManager::PrioRequestQueue_t = QList<QPair<std::function<void (QString)>, QueuePriority> >

Definition at line 71 of file vkauthmanager.h.

◆ RequestQueue_ptr

◆ RequestQueue_t

using LC::Util::SvcAuth::VkAuthManager::RequestQueue_t = QList<std::function<void (QString)> >

Definition at line 68 of file vkauthmanager.h.

◆ ScheduleGuard_t

Constructor & Destructor Documentation

◆ VkAuthManager()

LC::Util::SvcAuth::VkAuthManager::VkAuthManager ( const QString &  accountName,
const QString &  clientId,
const QStringList &  scope,
const QByteArray &  cookies,
const ICoreProxy_ptr proxy,
QueueManager queueMgr = nullptr,
QObject *  parent = nullptr 
)

Definition at line 44 of file vkauthmanager.cpp.

References LC::Util::CustomCookieJar::Load().

+ Here is the call graph for this function:

◆ ~VkAuthManager()

LC::Util::SvcAuth::VkAuthManager::~VkAuthManager ( )
overridedefault

Member Function Documentation

◆ authCanceled

void LC::Util::SvcAuth::VkAuthManager::authCanceled ( )
signal

Referenced by Reauth().

+ Here is the caller graph for this function:

◆ ClearAuthData()

void LC::Util::SvcAuth::VkAuthManager::ClearAuthData ( )

Definition at line 283 of file vkauthmanager.cpp.

References LC::Util::CustomCookieJar::Load().

+ Here is the call graph for this function:

◆ cookiesChanged

void LC::Util::SvcAuth::VkAuthManager::cookiesChanged ( const QByteArray &  )
signal

◆ GetAuthKey()

void LC::Util::SvcAuth::VkAuthManager::GetAuthKey ( )

Definition at line 97 of file vkauthmanager.cpp.

References gotAuthKey(), and IsAuthenticated().

Referenced by GetAuthKeyFuture().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetAuthKeyFuture()

QFuture< VkAuthManager::AuthKeyResult_t > LC::Util::SvcAuth::VkAuthManager::GetAuthKeyFuture ( )

Definition at line 118 of file vkauthmanager.cpp.

References GetAuthKey(), gotAuthKey(), and IsAuthenticated().

+ Here is the call graph for this function:

◆ gotAuthKey

void LC::Util::SvcAuth::VkAuthManager::gotAuthKey ( const QString &  )
signal

Referenced by GetAuthKey(), and GetAuthKeyFuture().

+ Here is the caller graph for this function:

◆ HadAuthentication()

bool LC::Util::SvcAuth::VkAuthManager::HadAuthentication ( ) const

Definition at line 80 of file vkauthmanager.cpp.

◆ IsAuthenticated()

bool LC::Util::SvcAuth::VkAuthManager::IsAuthenticated ( ) const

Definition at line 74 of file vkauthmanager.cpp.

Referenced by GetAuthKey(), and GetAuthKeyFuture().

+ Here is the caller graph for this function:

◆ justAuthenticated

void LC::Util::SvcAuth::VkAuthManager::justAuthenticated ( )
signal

◆ ManageQueue() [1/2]

auto LC::Util::SvcAuth::VkAuthManager::ManageQueue ( VkAuthManager::RequestQueue_ptr  queue)

Definition at line 136 of file vkauthmanager.cpp.

References LC::Util::MakeScopeGuard().

+ Here is the call graph for this function:

◆ ManageQueue() [2/2]

auto LC::Util::SvcAuth::VkAuthManager::ManageQueue ( VkAuthManager::PrioRequestQueue_ptr  queue)

Definition at line 150 of file vkauthmanager.cpp.

References LC::Util::MakeScopeGuard().

+ Here is the call graph for this function:

◆ Reauth()

void LC::Util::SvcAuth::VkAuthManager::Reauth ( )

Definition at line 314 of file vkauthmanager.cpp.

References authCanceled(), LC::Critical, and LC::Util::MakeNotification().

+ Here is the call graph for this function:

◆ SetSilentMode()

void LC::Util::SvcAuth::VkAuthManager::SetSilentMode ( bool  silent)

Definition at line 164 of file vkauthmanager.cpp.

◆ UpdateScope()

void LC::Util::SvcAuth::VkAuthManager::UpdateScope ( const QStringList &  scope)

Definition at line 85 of file vkauthmanager.cpp.


The documentation for this class was generated from the following files: