Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
JSONRPC::CTCPServer Class Reference

#include <TCPServer.h>

Inheritance diagram for JSONRPC::CTCPServer:
JSONRPC::ITransportLayer JSONRPC::IJSONRPCAnnouncer CThread ANNOUNCEMENT::IAnnouncer

Public Member Functions

bool PrepareDownload (const char *path, CVariant &details, std::string &protocol) override
 
bool Download (const char *path, CVariant &result) override
 
int GetCapabilities () override
 
void Announce (ANNOUNCEMENT::AnnouncementFlag flag, const std::string &sender, const std::string &message, const CVariant &data) override
 
- Public Member Functions inherited from JSONRPC::ITransportLayer
virtual ~ITransportLayer ()=default
 
- Public Member Functions inherited from JSONRPC::IJSONRPCAnnouncer
 ~IJSONRPCAnnouncer () override=default
 
- Public Member Functions inherited from ANNOUNCEMENT::IAnnouncer
 IAnnouncer ()=default
 
virtual ~IAnnouncer ()=default
 
- Public Member Functions inherited from CThread
 CThread (IRunnable *pRunnable, const char *ThreadName)
 
virtual ~CThread ()
 
void Create (bool bAutoDelete=false)
 
template<typename Rep , typename Period >
void Sleep (std::chrono::duration< Rep, Period > duration)
 
bool IsAutoDelete () const
 
virtual void StopThread (bool bWait=true)
 
bool IsRunning () const
 
bool IsCurrentThread () const
 
bool Join (std::chrono::milliseconds duration)
 
bool SetPriority (const ThreadPriority &priority)
 Set the threads priority. This uses the platforms native threading library to do so.
 
virtual void OnException ()
 

Static Public Member Functions

static bool StartServer (int port, bool nonlocal)
 
static void StopServer (bool bWait)
 
static bool IsRunning ()
 
- Static Public Member Functions inherited from CThread
static const std::thread::id GetCurrentThreadId ()
 
static CThreadGetCurrentThread ()
 

Protected Member Functions

void Process () override
 
- Protected Member Functions inherited from CThread
 CThread (const char *ThreadName)
 
virtual void OnStartup ()
 
virtual void OnExit ()
 
WaitResponse AbortableWait (CEvent &event, std::chrono::milliseconds duration=std::chrono::milliseconds(-1))
 

Additional Inherited Members

- Protected Types inherited from CThread
enum  WaitResponse { WAIT_INTERRUPTED = -1 , WAIT_SIGNALED = 0 , WAIT_TIMEDOUT = 1 }
 
- Static Protected Member Functions inherited from JSONRPC::IJSONRPCAnnouncer
static std::string AnnouncementToJSONRPC (ANNOUNCEMENT::AnnouncementFlag flag, const std::string &sender, const std::string &method, const CVariant &data, bool compactOutput)
 
- Protected Attributes inherited from CThread
std::atomic< boolm_bStop
 

Member Function Documentation

◆ Announce()

void CTCPServer::Announce ( ANNOUNCEMENT::AnnouncementFlag flag,
const std::string & sender,
const std::string & message,
const CVariant & data )
overridevirtual

◆ Download()

bool CTCPServer::Download ( const char * path,
CVariant & result )
overridevirtual

◆ GetCapabilities()

int CTCPServer::GetCapabilities ( )
overridevirtual

◆ IsRunning()

bool CTCPServer::IsRunning ( )
static

◆ PrepareDownload()

bool CTCPServer::PrepareDownload ( const char * path,
CVariant & details,
std::string & protocol )
overridevirtual

◆ Process()

void CTCPServer::Process ( void )
overrideprotectedvirtual

Reimplemented from CThread.

◆ StartServer()

bool CTCPServer::StartServer ( int port,
bool nonlocal )
static

◆ StopServer()

void CTCPServer::StopServer ( bool bWait)
static

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