Inheritance diagram for ippSimpleClient:
Public Types | |
enum | STATE { disconnected, trying_to_connect, connected } |
Public Member Functions | |
ippSimpleClient () | |
void | Connect (const char *hostname, int port=1294) |
connects the client to the server | |
STATE | GetState () const |
returns the state of the client ( connection-wise) | |
void | Disconnect () |
disconnect | |
virtual void | HeartBeat () |
perform a heart-beat on the client | |
bool | ReadyToSend () const |
bool | NeedToSendClearAllErrors () const |
virtual void | OnConnectionLost () |
called when the connection with the server is lost | |
virtual void | OnResponse (ippResponsePtr response) |
called when a response has been received from the server | |
virtual void | OnDaemonResponse (ippResponsePtr response) |
virtual void | OnErrorResponse (ippResponsePtr response) |
virtual void | OnUnsollicitedEvent (ippResponsePtr response) |
called when a unsolicited event has been received | |
virtual void | OnComnmandCompleted (int tagNumber) |
called when a complete response has been received from the server | |
void | ClearAllErrors () |
send a ClearAllError command | |
bool | InErrorState () const |
bool | SendCommand (ippCommandConstPtr command) |
send a command object | |
void | SendCommand (const char *command_string) |
send a command string. | |
int | NumberOfUncompletedCommandsInQueue () |
returns the number of uncompleted command in queue | |
Protected Member Functions | |
void | PerformWrite () |
virtual void | ProcessLine (const char *inputline) |
virtual void | ProcessMisformedLine (const char *inputline) |
Friends | |
class | ippSimpleServerTestCase |
|
Definition at line 21 of file ippSimpleClient.h. |
|
Definition at line 15 of file ippSimpleClient.cpp. |
|
send a ClearAllError command
Definition at line 303 of file ippSimpleClient.cpp. References IPP_ASSERT, ippCommand, NeedToSendClearAllErrors(), and SendCommand(). Referenced by ippSimpleServerTestCase::testSimpleServer2(), ippSimpleServerTestCase::testSimpleServerStartSessionEndSession(), and ippClientServerSpyTestCase::testSpy(). |
|
|
disconnect
Definition at line 73 of file ippSimpleClient.cpp. References ippSocket::Close(), disconnected, ippEngine::LogMessage(), and ippEngine::ProbeConnection(). Referenced by HeartBeat(), OnConnectionLost(), ProcessMisformedLine(), ippSimpleServerTestCase::testSimpleServer1(), and ippClientServerSpyTestCase::testSpy(). |
|
returns the state of the client ( connection-wise)
Definition at line 58 of file ippSimpleClient.cpp. Referenced by ippSimpleServerTestCase::testSimpleServer1(), ippSimpleServerTestCase::testSimpleServer3(), ippSimpleServerTestCase::testSimpleServer4(), ippSimpleServerTestCase::testSimpleServer5(), ippSimpleServerTestCase::testSimpleServerReceivingAbortE(), ippSimpleServerTestCase::testSimpleServerReceivingInvalidCommand(), ippSimpleServerTestCase::testSimpleServerStartSessionEndSession(), and ippClientServerSpyTestCase::testSpy(). |
|
perform a heart-beat on the client
Implements ippEngine. Definition at line 85 of file ippSimpleClient.cpp. References ippSocket::CanSendData(), ippSocket::Close(), connected, Disconnect(), disconnected, ippSleep(), ippEngine::PerformRead(), and trying_to_connect. Referenced by ippSimpleServerTestCase::testSimpleServer1(), ippSimpleServerTestCase::testSimpleServer2(), ippSimpleServerTestCase::testSimpleServer3(), ippSimpleServerTestCase::testSimpleServer4(), ippSimpleServerTestCase::testSimpleServer5(), ippSimpleServerTestCase::testSimpleServerReceivingAbortE(), ippSimpleServerTestCase::testSimpleServerReceivingInvalidCommand(), and ippSimpleServerTestCase::testSimpleServerStartSessionEndSession(). |
|
returns true if the client is in ErrorState. When a client is in error state . it need to call ClearAllErrors before resuming the normal communication with the server. Definition at line 75 of file ippSimpleClient.h. Referenced by ippSimpleServerTestCase::testSimpleServerReceivingAbortE(), ippSimpleServerTestCase::testSimpleServerReceivingInvalidCommand(), and ippSimpleServerTestCase::testSimpleServerStartSessionEndSession(). |
|
one of the last command sent has caused an error, or the Server has raised a error and a ClearAllErrors is required Definition at line 68 of file ippSimpleClient.cpp. Referenced by ClearAllErrors(), ippSimpleServerTestCase::testSimpleServer2(), and ippClientServerSpyTestCase::testSpy(). |
|
returns the number of uncompleted command in queue
Definition at line 311 of file ippSimpleClient.cpp. Referenced by ippSimpleServerTestCase::testSimpleServerReceivingAbortE(). |
|
called when a complete response has been received from the server
Definition at line 336 of file ippSimpleClient.cpp. Referenced by ProcessLine(). |
|
called when the connection with the server is lost
Reimplemented from ippEngine. Definition at line 274 of file ippSimpleClient.cpp. References Disconnect(), and ippEngine::LogMessage(). |
|
Definition at line 320 of file ippSimpleClient.cpp. Referenced by ProcessLine(). |
|
Definition at line 316 of file ippSimpleClient.cpp. Referenced by ProcessLine(). |
|
called when a response has been received from the server
Definition at line 325 of file ippSimpleClient.cpp. Referenced by ProcessLine(). |
|
called when a unsolicited event has been received
Definition at line 331 of file ippSimpleClient.cpp. Referenced by ProcessLine(). |
|
|
|
|
Implements ippEngine. Definition at line 260 of file ippSimpleClient.cpp. References Disconnect(), and ippEngine::LogMessage(). |
|
returns true if the client is ready to send a command to the server. or false if the client is waiting for a acknowledge from a previous command Definition at line 63 of file ippSimpleClient.cpp. References connected. Referenced by ippSimpleServerTestCase::testSimpleServer1(), ippSimpleServerTestCase::testSimpleServer2(), ippSimpleServerTestCase::testSimpleServerReceivingInvalidCommand(), ippSimpleServerTestCase::testSimpleServerStartSessionEndSession(), and ippClientServerSpyTestCase::testSpy(). |
|
send a command string.
Definition at line 280 of file ippSimpleClient.cpp. References IPP_ASSERT, ippEngine::LogMessage(), and ippSocket::Write(). |
|
|
Definition at line 91 of file ippSimpleClient.h. |