Main Page | Namespace List | Class Hierarchy | Class List | Namespace Members | Class Members

ProtocolListener Class Reference

List of all members.

Detailed Description

The ProtocolListener is a class that collaborates with a Pop3Client or NntpClient class to process multiple line responses from the server. ProtocolListener is an abstract class that defines an interface. To process lines of a multiple line response, you must create a subclass to implement the interface.


Public Member Functions

virtual void ClearLines ()=0
 Clears any stored lines.
virtual void LineReceived (const char *line)=0
 Passes a single line for processing.


Member Function Documentation

virtual void ClearLines  )  [pure virtual]
 

Clears any stored lines. This member function is called at the beginning of a new server response.

virtual void LineReceived const char *  line  )  [pure virtual]
 

Passes a single line to the listener object for processing. This member function is called for each line of a multiple line server response.

The first line -- that is, the "status" line -- is not passed to the listener object. The final line, consisting of a single dot ("."), also is not passed.

If a line contains a dot (".") as the first character, that dot is removed before it is passed to the listener for processing. In other words, any dot-stuffing is removed before the line is passed. The end of line characters, CR LF, are not removed from the line before it is passed.

Parameters:
line the line as a NUL-terminated C string

Copyright © 2001-2005 Hunny Software, Inc. All rights reserved.