plptools
Loading...
Searching...
No Matches
rfsvfactory Class Reference

A factory for automatically instantiating the correct rfsv protocol variant depending on the connected Psion. More...

#include <rfsvfactory.h>

Collaboration diagram for rfsvfactory:

Public Types

enum  errs {
  FACERR_NONE = 0 , FACERR_COULD_NOT_SEND = 1 , FACERR_AGAIN = 2 , FACERR_NOPSION = 3 ,
  FACERR_PROTVERSION = 4 , FACERR_NORESPONSE = 5
}
 The known errors which can happen during create . More...
 

Public Member Functions

 rfsvfactory (TCPSocket *skt)
 Constructs a rfsvfactory. More...
 
virtual ~rfsvfactory ()
 Delete the rfsvfactory, cleaning up any resources. More...
 
virtual rfsvcreate (bool)
 Creates a new rfsv instance. More...
 
virtual Enum< errsgetError ()
 Retrieve an error code. More...
 

Private Attributes

TCPSocketskt
 The socket to be used for connecting to the ncpd daemon. More...
 
int serNum
 
Enum< errserr
 

Detailed Description

A factory for automatically instantiating the correct rfsv protocol variant depending on the connected Psion.

Definition at line 33 of file rfsvfactory.h.

Member Enumeration Documentation

◆ errs

The known errors which can happen during create .

Enumerator
FACERR_NONE 
FACERR_COULD_NOT_SEND 
FACERR_AGAIN 
FACERR_NOPSION 
FACERR_PROTVERSION 
FACERR_NORESPONSE 

Definition at line 39 of file rfsvfactory.h.

Constructor & Destructor Documentation

◆ rfsvfactory()

rfsvfactory::rfsvfactory ( TCPSocket skt)

Constructs a rfsvfactory.

Does not take ownership of the socket.

Parameters
sktThe socket to be used for connecting to the ncpd daemon.

Definition at line 44 of file rfsvfactory.cc.

◆ ~rfsvfactory()

rfsvfactory::~rfsvfactory ( )
virtual

Delete the rfsvfactory, cleaning up any resources.

Definition at line 50 of file rfsvfactory.cc.

Member Function Documentation

◆ create()

rfsv * rfsvfactory::create ( bool  reconnect)
virtual

Creates a new rfsv instance.

Parameters
reconnectSet to true, if automatic reconnect should be performed on failure.
Returns
A pointer to a newly created rfsv instance or NULL on failure.

Definition at line 54 of file rfsvfactory.cc.

◆ getError()

virtual Enum< errs > rfsvfactory::getError ( )
inlinevirtual

Retrieve an error code.

Returns
The error code, in case create has failed, 0 otherwise.

Definition at line 80 of file rfsvfactory.h.

Member Data Documentation

◆ err

Enum<errs> rfsvfactory::err
private

Definition at line 89 of file rfsvfactory.h.

◆ serNum

int rfsvfactory::serNum
private

Definition at line 88 of file rfsvfactory.h.

◆ skt

TCPSocket* rfsvfactory::skt
private

The socket to be used for connecting to the ncpd daemon.

Definition at line 87 of file rfsvfactory.h.


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