KiCad PCB EDA Suite
Loading...
Searching...
No Matches
REMOTE_LOGIN_SERVER Class Reference

#include <remote_login_server.h>

Inheritance diagram for REMOTE_LOGIN_SERVER:

Public Member Functions

 REMOTE_LOGIN_SERVER (wxEvtHandler *aOwner, const wxString &aRedirectUrl)
 
 ~REMOTE_LOGIN_SERVER () override
 
bool Start ()
 
unsigned short GetPort () const
 

Private Member Functions

void OnSocketEvent (wxSocketEvent &aEvent)
 
void OnTimeout (wxTimerEvent &aEvent)
 
void HandleClient (wxSocketBase *aClient)
 
wxString ExtractUserId (const wxString &aRequestLine) const
 
void SendHttpResponse (wxSocketBase *aClient)
 
void Finish (bool aSuccess, const wxString &aUserId)
 
void Shutdown ()
 

Private Attributes

wxEvtHandler * m_owner
 
wxString m_redirectUrl
 
std::unique_ptr< wxSocketServer > m_server
 
wxTimer m_timeout
 
unsigned short m_port
 
bool m_done
 

Detailed Description

Definition at line 33 of file remote_login_server.h.

Constructor & Destructor Documentation

◆ REMOTE_LOGIN_SERVER()

REMOTE_LOGIN_SERVER::REMOTE_LOGIN_SERVER ( wxEvtHandler * aOwner,
const wxString & aRedirectUrl )

Definition at line 31 of file remote_login_server.cpp.

References m_done, m_owner, m_port, m_redirectUrl, m_timeout, and OnTimeout().

◆ ~REMOTE_LOGIN_SERVER()

REMOTE_LOGIN_SERVER::~REMOTE_LOGIN_SERVER ( )
override

Definition at line 41 of file remote_login_server.cpp.

References m_timeout, OnSocketEvent(), OnTimeout(), and Shutdown().

Member Function Documentation

◆ ExtractUserId()

wxString REMOTE_LOGIN_SERVER::ExtractUserId ( const wxString & aRequestLine) const
private

Definition at line 136 of file remote_login_server.cpp.

References name, and path.

Referenced by HandleClient().

◆ Finish()

void REMOTE_LOGIN_SERVER::Finish ( bool aSuccess,
const wxString & aUserId )
private

Definition at line 210 of file remote_login_server.cpp.

References m_done, m_owner, m_timeout, and Shutdown().

Referenced by HandleClient(), and OnTimeout().

◆ GetPort()

unsigned short REMOTE_LOGIN_SERVER::GetPort ( ) const
inline

Definition at line 40 of file remote_login_server.h.

References m_port.

◆ HandleClient()

void REMOTE_LOGIN_SERVER::HandleClient ( wxSocketBase * aClient)
private

Definition at line 96 of file remote_login_server.cpp.

References ExtractUserId(), Finish(), and SendHttpResponse().

Referenced by OnSocketEvent().

◆ OnSocketEvent()

void REMOTE_LOGIN_SERVER::OnSocketEvent ( wxSocketEvent & aEvent)
private

Definition at line 77 of file remote_login_server.cpp.

References HandleClient(), and m_server.

Referenced by Start(), and ~REMOTE_LOGIN_SERVER().

◆ OnTimeout()

void REMOTE_LOGIN_SERVER::OnTimeout ( wxTimerEvent & aEvent)
private

Definition at line 90 of file remote_login_server.cpp.

References Finish().

Referenced by REMOTE_LOGIN_SERVER(), and ~REMOTE_LOGIN_SERVER().

◆ SendHttpResponse()

void REMOTE_LOGIN_SERVER::SendHttpResponse ( wxSocketBase * aClient)
private

Definition at line 175 of file remote_login_server.cpp.

References m_redirectUrl.

Referenced by HandleClient().

◆ Shutdown()

void REMOTE_LOGIN_SERVER::Shutdown ( )
private

Definition at line 226 of file remote_login_server.cpp.

References m_server.

Referenced by Finish(), and ~REMOTE_LOGIN_SERVER().

◆ Start()

bool REMOTE_LOGIN_SERVER::Start ( )

Definition at line 50 of file remote_login_server.cpp.

References m_port, m_server, m_timeout, and OnSocketEvent().

Member Data Documentation

◆ m_done

bool REMOTE_LOGIN_SERVER::m_done
private

Definition at line 56 of file remote_login_server.h.

Referenced by Finish(), and REMOTE_LOGIN_SERVER().

◆ m_owner

wxEvtHandler* REMOTE_LOGIN_SERVER::m_owner
private

Definition at line 51 of file remote_login_server.h.

Referenced by Finish(), and REMOTE_LOGIN_SERVER().

◆ m_port

unsigned short REMOTE_LOGIN_SERVER::m_port
private

Definition at line 55 of file remote_login_server.h.

Referenced by GetPort(), REMOTE_LOGIN_SERVER(), and Start().

◆ m_redirectUrl

wxString REMOTE_LOGIN_SERVER::m_redirectUrl
private

Definition at line 52 of file remote_login_server.h.

Referenced by REMOTE_LOGIN_SERVER(), and SendHttpResponse().

◆ m_server

std::unique_ptr<wxSocketServer> REMOTE_LOGIN_SERVER::m_server
private

Definition at line 53 of file remote_login_server.h.

Referenced by OnSocketEvent(), Shutdown(), and Start().

◆ m_timeout

wxTimer REMOTE_LOGIN_SERVER::m_timeout
private

Definition at line 54 of file remote_login_server.h.

Referenced by Finish(), REMOTE_LOGIN_SERVER(), Start(), and ~REMOTE_LOGIN_SERVER().


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