SrcpVirtualClient Class Reference

Implement a pure virtual class for SRCP clients. More...

#include <srcp_virtual_client.h>

Inherits VirtualClient.

Inherited by Srcp083Client.

List of all members.

Public Slots

void setConnection (const bool &c)

Public Member Functions

 SrcpVirtualClient (QObject *parent)
 Create the info and command client, and connect signals and slots.
 ~SrcpVirtualClient ()
 Destructor, ensure that the connection is closed.
SrcpSocketcommandClient ()

Private Slots

virtual void parseInfo (QString info)=0
virtual void srcpHandshake ()=0
 The SRCP handshake.

Private Attributes

SrcpSocket_infoClient
 The info client. It contains a thread reading the infos send by the server.
SrcpSocket_commandClient
 The command client.


Detailed Description

Implement a pure virtual class for SRCP clients.

This class contain two private members storing the info and the command client which need to be separatly connected.

Definition at line 24 of file srcp_virtual_client.h.


Constructor & Destructor Documentation

SrcpVirtualClient::SrcpVirtualClient ( QObject *  parent  ) 

Create the info and command client, and connect signals and slots.

Definition at line 4 of file srcp_virtual_client.cpp.

References _commandClient, _infoClient, VirtualClient::errorOccured(), VirtualClient::infoReceived(), parseInfo(), and srcpHandshake().

SrcpVirtualClient::~SrcpVirtualClient (  ) 

Destructor, ensure that the connection is closed.

Definition at line 21 of file srcp_virtual_client.cpp.

References setConnection().


Member Function Documentation

SrcpSocket * SrcpVirtualClient::commandClient (  ) 

Returns:
The command client

Definition at line 26 of file srcp_virtual_client.cpp.

References _commandClient.

Referenced by Srcp083Client::sendCommand().

void SrcpVirtualClient::setConnection ( const bool &  c  )  [virtual, slot]

Connect or disconnect form host

Parameters:
c The connection state to set

Implements VirtualClient.

Definition at line 31 of file srcp_virtual_client.cpp.

References _commandClient, _infoClient, VirtualClient::_serverAddress, VirtualClient::_serverPort, and SrcpSocket::threadSafeDisconnectFromHost().

Referenced by Srcp083Client::srcpHandshake(), and ~SrcpVirtualClient().

virtual void SrcpVirtualClient::parseInfo ( QString  info  )  [private, pure virtual, slot]

Parse the info received from the SRCP server, need to be implemented in a concrete SRCP client class.

Parameters:
info The info received

Implemented in Srcp083Client.

Referenced by SrcpVirtualClient().

virtual void SrcpVirtualClient::srcpHandshake (  )  [private, pure virtual, slot]

The SRCP handshake.

Need to be implemented in a concrete SRCP client class. It does an handshake with the SRCP server, sets the right protocol and checks if it is supported, then it set the right connection mode (i.e command or info). After that it send the GO to the server.

See also:
http://srcpd.sourceforge.net/srcp

Implemented in Srcp083Client.

Referenced by SrcpVirtualClient().


Member Data Documentation

The info client. It contains a thread reading the infos send by the server.

Definition at line 66 of file srcp_virtual_client.h.

Referenced by setConnection(), and SrcpVirtualClient().

The command client.

Definition at line 69 of file srcp_virtual_client.h.

Referenced by commandClient(), setConnection(), and SrcpVirtualClient().


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