SrcpSocket Class Reference

Implement a special TCP socket for the srcp client. More...

#include <srcp_socket.h>

List of all members.

Public Slots

void start ()
 Start an internal thread for the info client.
void threadSafeDisconnectFromHost ()
 Threadfriendly disconnect from host.
bool sendMsg (QString msg)
QString srcpReadLine ()

Signals

void errorOccured (QString)
 Emitted if a connection or an SRCP error occured.
void infoReceived (QString)
 Transmitt the received info to the SRCP client.

Public Member Functions

 SrcpSocket (const QString &type="", QObject *parent=0)
 ~SrcpSocket ()
 Destructor, ensure that the thread are correctly stopped.
QString type ()

Private Attributes

SrcpThread_internThread
 Internal thread for the info client.
QString _type
 The client type (i.e INFO, or COMMAND).


Detailed Description

Implement a special TCP socket for the srcp client.

Definition at line 68 of file srcp_socket.h.


Constructor & Destructor Documentation

SrcpSocket::SrcpSocket ( const QString &  type = "",
QObject *  parent = 0 
)

Constructor

Parameters:
type Is the type of SRCP client (i.e INFO, or COMMAND)
See also:
http://srcpd.sourceforge.net/srcp

Definition at line 44 of file srcp_socket.cpp.

References _internThread, and _type.

SrcpSocket::~SrcpSocket (  ) 

Destructor, ensure that the thread are correctly stopped.

Definition at line 50 of file srcp_socket.cpp.

References threadSafeDisconnectFromHost().


Member Function Documentation

QString SrcpSocket::type (  ) 

Returns:
The type of client
See also:
SrcpSocket()

Definition at line 55 of file srcp_socket.cpp.

References _type.

Referenced by sendMsg(), Srcp083Client::srcpHandshake(), and srcpReadLine().

void SrcpSocket::errorOccured ( QString   )  [signal]

Emitted if a connection or an SRCP error occured.

Referenced by sendMsg(), and srcpReadLine().

void SrcpSocket::infoReceived ( QString   )  [signal]

Transmitt the received info to the SRCP client.

Referenced by start().

void SrcpSocket::start (  )  [slot]

Start an internal thread for the info client.

Definition at line 60 of file srcp_socket.cpp.

References _internThread, and infoReceived().

Referenced by Srcp083Client::srcpHandshake().

void SrcpSocket::threadSafeDisconnectFromHost (  )  [slot]

Threadfriendly disconnect from host.

Definition at line 71 of file srcp_socket.cpp.

References _internThread, and SrcpThread::stop().

Referenced by SrcpVirtualClient::setConnection(), and ~SrcpSocket().

bool SrcpSocket::sendMsg ( QString  msg  )  [slot]

Send the SRCP message to the server

Returns:
True if no error occured, and false if the message was not send

Definition at line 79 of file srcp_socket.cpp.

References errorOccured(), and type().

Referenced by Srcp083Client::sendCommand(), and Srcp083Client::srcpHandshake().

QString SrcpSocket::srcpReadLine (  )  [slot]

Read the message send by the SRCP server

Returns:
A string containing the message received

Definition at line 97 of file srcp_socket.cpp.

References errorOccured(), and type().

Referenced by SrcpThread::run(), and Srcp083Client::srcpHandshake().


Member Data Documentation

Internal thread for the info client.

Definition at line 116 of file srcp_socket.h.

Referenced by SrcpSocket(), start(), and threadSafeDisconnectFromHost().

QString SrcpSocket::_type [private]

The client type (i.e INFO, or COMMAND).

Definition at line 119 of file srcp_socket.h.

Referenced by SrcpSocket(), and type().


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

Generated on Sun Jun 22 23:46:29 2008 for OrK by  doxygen 1.5.6