Add the defines for the NNTP/NNTPS strings and ports;, implement the
basic conversation to get the capabilities of the server (if supported),
to know whether TLS is supported, and which authentication methods are
available.
Details
- Reviewers
mlaurent - Group Reviewers
KDE PIM - Commits
- R84:1aaa0e813051: servertest: add NNTP support
Run the servertest with some NNTP server, e.g. news.gmane.org,
nntp.perl.org, news.mozilla.org.
Diff Detail
- Repository
- R84 PIM: KMail Transport
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
src/kmailtransport/servertest.cpp | ||
---|---|---|
422 | Why use normalStage as reference ? > it avoids to add an extra test |
src/kmailtransport/servertest.cpp | ||
---|---|---|
422 |
Because every time there is a new line of data read from the socket, the stage is increased (see few lines above this). Since:
then we need to reset the stage to be still 1 -- see the comment at the end of handleNntpConversation. |
src/kmailtransport/servertest.cpp | ||
---|---|---|
422 | So we can use a reference not necessary a pointer where we need to check with Q_ASSERT if it's empty or not |
src/kmailtransport/servertest.cpp | ||
---|---|---|
422 | The pointer instead of the reference makes it more clear it is subject to change, which is not when using a reference. This is also the case for the shouldStartTLS parameter, in both the handlePopConversation function (already existing), and the handleNntpConversation which I added. |