MythTV  0.28pre
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Groups Pages
Public Slots | Public Member Functions | Private Member Functions | Private Attributes | List of all members
MythSocketManager Class Reference

#include <mythsocketmanager.h>

Inheritance diagram for MythSocketManager:
Inheritance graph
[legend]
Collaboration diagram for MythSocketManager:
Collaboration graph
[legend]

Public Slots

void newConnection (qt_socket_fd_t sd)
 

Public Member Functions

 MythSocketManager ()
 
 ~MythSocketManager ()
 
void readyRead (MythSocket *socket)
 
void connectionClosed (MythSocket *socket)
 
void connectionFailed (MythSocket *socket)
 
void connected (MythSocket *socket)
 
void SetThreadCount (uint count)
 
void AddSocketHandler (SocketHandler *socket)
 
SocketHandlerGetConnectionBySocket (MythSocket *socket)
 
void ProcessRequest (MythSocket *socket)
 
void RegisterHandler (SocketRequestHandler *handler)
 
bool Listen (int port)
 
- Public Member Functions inherited from MythSocketCBs
virtual ~MythSocketCBs ()
 
virtual void error (MythSocket *, int)
 

Private Member Functions

void ProcessRequestWork (MythSocket *socket)
 
void HandleVersion (MythSocket *socket, const QStringList &slist)
 
void HandleDone (MythSocket *socket)
 

Private Attributes

QMap< MythSocket
*, SocketHandler * > 
m_socketMap
 
QReadWriteLock m_socketLock
 
QMap< QString,
SocketRequestHandler * > 
m_handlerMap
 
QReadWriteLock m_handlerLock
 
MythServerm_server
 
MThreadPool m_threadPool
 
QMutex m_socketListLock
 
QSet< MythSocket * > m_socketList
 

Detailed Description

Definition at line 34 of file mythsocketmanager.h.

Constructor & Destructor Documentation

MythSocketManager::MythSocketManager ( )

Definition at line 58 of file mythsocketmanager.cpp.

MythSocketManager::~MythSocketManager ( )

Definition at line 63 of file mythsocketmanager.cpp.

Member Function Documentation

void MythSocketManager::readyRead ( MythSocket socket)
virtual

Implements MythSocketCBs.

Definition at line 157 of file mythsocketmanager.cpp.

void MythSocketManager::connectionClosed ( MythSocket socket)
virtual

Implements MythSocketCBs.

Definition at line 164 of file mythsocketmanager.cpp.

void MythSocketManager::connectionFailed ( MythSocket socket)
inlinevirtual

Implements MythSocketCBs.

Definition at line 43 of file mythsocketmanager.h.

void MythSocketManager::connected ( MythSocket socket)
inlinevirtual

Implements MythSocketCBs.

Definition at line 44 of file mythsocketmanager.h.

void MythSocketManager::SetThreadCount ( uint  count)
void MythSocketManager::AddSocketHandler ( SocketHandler socket)
SocketHandler * MythSocketManager::GetConnectionBySocket ( MythSocket socket)
void MythSocketManager::ProcessRequest ( MythSocket socket)

Definition at line 187 of file mythsocketmanager.cpp.

Referenced by ProcessRequestRunnable::run().

void MythSocketManager::RegisterHandler ( SocketRequestHandler handler)

Definition at line 116 of file mythsocketmanager.cpp.

Referenced by main().

bool MythSocketManager::Listen ( int  port)

Definition at line 83 of file mythsocketmanager.cpp.

Referenced by main().

void MythSocketManager::newConnection ( qt_socket_fd_t  sd)
slot

Definition at line 110 of file mythsocketmanager.cpp.

Referenced by Listen().

void MythSocketManager::ProcessRequestWork ( MythSocket socket)
private

Definition at line 198 of file mythsocketmanager.cpp.

Referenced by ProcessRequest().

void MythSocketManager::HandleVersion ( MythSocket socket,
const QStringList &  slist 
)
private

Definition at line 338 of file mythsocketmanager.cpp.

Referenced by ProcessRequestWork().

void MythSocketManager::HandleDone ( MythSocket socket)
private

Definition at line 381 of file mythsocketmanager.cpp.

Referenced by HandleVersion(), and ProcessRequestWork().

Member Data Documentation

QMap<MythSocket*, SocketHandler*> MythSocketManager::m_socketMap
private
QReadWriteLock MythSocketManager::m_socketLock
private
QMap<QString, SocketRequestHandler*> MythSocketManager::m_handlerMap
private
QReadWriteLock MythSocketManager::m_handlerLock
private
MythServer* MythSocketManager::m_server
private

Definition at line 70 of file mythsocketmanager.h.

Referenced by Listen().

MThreadPool MythSocketManager::m_threadPool
private

Definition at line 71 of file mythsocketmanager.h.

Referenced by readyRead(), and ~MythSocketManager().

QMutex MythSocketManager::m_socketListLock
private

Definition at line 73 of file mythsocketmanager.h.

Referenced by newConnection(), and ~MythSocketManager().

QSet<MythSocket*> MythSocketManager::m_socketList
private

Definition at line 74 of file mythsocketmanager.h.

Referenced by newConnection(), and ~MythSocketManager().


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