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

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

#include <rpcsfactory.h>

Collaboration diagram for rpcsfactory:

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

 rpcsfactory (TCPSocket *skt)
 Constructs a rpcsfactory. More...
 
virtual rpcscreate (bool reconnect)
 Creates a new rpcs 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...
 
Enum< errserr
 

Detailed Description

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

Definition at line 32 of file rpcsfactory.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 38 of file rpcsfactory.h.

Constructor & Destructor Documentation

◆ rpcsfactory()

rpcsfactory::rpcsfactory ( TCPSocket skt)

Constructs a rpcsfactory.

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

Definition at line 41 of file rpcsfactory.cc.

Member Function Documentation

◆ create()

rpcs * rpcsfactory::create ( bool  reconnect)
virtual

Creates a new rpcs instance.

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

Definition at line 47 of file rpcsfactory.cc.

◆ getError()

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

Retrieve an error code.

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

Definition at line 72 of file rpcsfactory.h.

Member Data Documentation

◆ err

Enum<errs> rpcsfactory::err
private

Definition at line 80 of file rpcsfactory.h.

◆ skt

TCPSocket* rpcsfactory::skt
private

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

Definition at line 79 of file rpcsfactory.h.


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