• Skip to content
  • Skip to link menu
KDE 4.1 API Reference
  • KDE API Reference
  • kdepim
  • Sitemap
  • Contact Us
 

knode

KNProtocolClient Class Reference

#include <knprotocolclient.h>

Inheritance diagram for KNProtocolClient:

Inheritance graph
[legend]

List of all members.


Detailed Description

Definition at line 33 of file knprotocolclient.h.


Public Types

enum  threadSignal {
  TSworkDone = 0, TSjobStarted = 1, TSconnect = 2, TSloadGrouplist = 3,
  TSwriteGrouplist = 4, TSdownloadGrouplist = 5, TSdownloadNew = 6, TSsortNew = 7,
  TSdownloadArticle = 8, TSsendArticle = 9, TSsendMail = 10, TSprogressUpdate = 11,
  TSdownloadDesc = 12, TSdownloadNewGroups = 13
}

Public Member Functions

int getByteCount () const
int getProgressValue () const
void insertJob (KNJobData *newJob)
bool isInByteCountMode () const
 KNProtocolClient (int NfdPipeIn, int NfdPipeOut)
void removeJob ()
virtual void run ()
void terminateClient ()
void updatePercentage (int percent)
 ~KNProtocolClient ()

Protected Member Functions

bool checkNextResponse (int rep)
virtual void closeConnection ()
char * getCurrentLine ()
bool getMsg (Q3StrList &msg)
bool getNextLine ()
bool getNextResponse (int &rep)
virtual void handleErrors ()
bool isConnected ()
virtual bool openConnection ()
virtual void processJob ()
virtual bool sendCommand (const QByteArray &cmd, int &rep)
bool sendCommandWCheck (const QByteArray &cmd, int rep)
bool sendMsg (const QByteArray &msg)
void sendSignal (threadSignal s)
void waitForWork ()

Protected Attributes

KNServerInfo account
bool byteCountMode
int doneLines
QString errorPrefix
KNJobData * job
int predictedLines
int progressValue

Member Enumeration Documentation

enum KNProtocolClient::threadSignal

Enumerator:
TSworkDone 
TSjobStarted 
TSconnect 
TSloadGrouplist 
TSwriteGrouplist 
TSdownloadGrouplist 
TSdownloadNew 
TSsortNew 
TSdownloadArticle 
TSsendArticle 
TSsendMail 
TSprogressUpdate 
TSdownloadDesc 
TSdownloadNewGroups 

Definition at line 36 of file knprotocolclient.h.


Constructor & Destructor Documentation

KNProtocolClient::KNProtocolClient ( int  NfdPipeIn,
int  NfdPipeOut 
)

Definition at line 37 of file knprotocolclient.cpp.

KNProtocolClient::~KNProtocolClient (  ) 

Definition at line 49 of file knprotocolclient.cpp.


Member Function Documentation

bool KNProtocolClient::checkNextResponse ( int  rep  )  [protected]

checks return code and calls handleErrors() if necessary

Definition at line 424 of file knprotocolclient.cpp.

void KNProtocolClient::closeConnection (  )  [protected, virtual]

sends QUIT-command and closes the socket

Definition at line 228 of file knprotocolclient.cpp.

int KNProtocolClient::getByteCount (  )  const [inline]

bytes in&out for the current connection

Definition at line 53 of file knprotocolclient.h.

char* KNProtocolClient::getCurrentLine (  )  [inline, protected]

returns pointer to current line of input

Definition at line 80 of file knprotocolclient.h.

bool KNProtocolClient::getMsg ( Q3StrList &  msg  )  [protected]

receives a message (multiple lines)

Definition at line 391 of file knprotocolclient.cpp.

bool KNProtocolClient::getNextLine (  )  [protected]

reads next complete line of input

Definition at line 319 of file knprotocolclient.cpp.

bool KNProtocolClient::getNextResponse ( int &  rep  )  [protected]

reads next line and returns the response code

Definition at line 413 of file knprotocolclient.cpp.

int KNProtocolClient::getProgressValue (  )  const [inline]

Definition at line 51 of file knprotocolclient.h.

void KNProtocolClient::handleErrors (  )  [protected, virtual]

interprets error code, generates error message and closes the connection

Reimplemented in KNNntpClient.

Definition at line 438 of file knprotocolclient.cpp.

void KNProtocolClient::insertJob ( KNJobData *  newJob  ) 

Definition at line 69 of file knprotocolclient.cpp.

bool KNProtocolClient::isConnected (  )  [inline, protected]

Definition at line 66 of file knprotocolclient.h.

bool KNProtocolClient::isInByteCountMode (  )  const [inline]

Definition at line 54 of file knprotocolclient.h.

bool KNProtocolClient::openConnection (  )  [protected, virtual]

connect, handshake and authorization

Reimplemented in KNNntpClient.

Definition at line 189 of file knprotocolclient.cpp.

void KNProtocolClient::processJob (  )  [protected, virtual]

examines the job and calls the suitable handling method

Reimplemented in KNNntpClient.

Definition at line 184 of file knprotocolclient.cpp.

void KNProtocolClient::removeJob (  ) 

Definition at line 75 of file knprotocolclient.cpp.

void KNProtocolClient::run (  )  [virtual]

Reimplemented from QThread.

Definition at line 57 of file knprotocolclient.cpp.

bool KNProtocolClient::sendCommand ( const QByteArray &  cmd,
int &  rep 
) [protected, virtual]

sends a command (one line), return code is written to rep

Reimplemented in KNNntpClient.

Definition at line 253 of file knprotocolclient.cpp.

bool KNProtocolClient::sendCommandWCheck ( const QByteArray &  cmd,
int  rep 
) [protected]

checks return code and calls handleErrors() if necessary

Definition at line 264 of file knprotocolclient.cpp.

bool KNProtocolClient::sendMsg ( const QByteArray &  msg  )  [protected]

sends a message (multiple lines)

Definition at line 279 of file knprotocolclient.cpp.

void KNProtocolClient::sendSignal ( threadSignal  s  )  [protected]

Definition at line 449 of file knprotocolclient.cpp.

void KNProtocolClient::terminateClient (  )  [inline]

Definition at line 56 of file knprotocolclient.h.

void KNProtocolClient::updatePercentage ( int  percent  ) 

Definition at line 81 of file knprotocolclient.cpp.

void KNProtocolClient::waitForWork (  )  [protected]

main loop, maintains connection and waits for next job

Definition at line 90 of file knprotocolclient.cpp.


Member Data Documentation

KNServerInfo KNProtocolClient::account [protected]

Definition at line 94 of file knprotocolclient.h.

bool KNProtocolClient::byteCountMode [protected]

Definition at line 98 of file knprotocolclient.h.

int KNProtocolClient::doneLines [protected]

Definition at line 97 of file knprotocolclient.h.

QString KNProtocolClient::errorPrefix [protected]

handleErrors() adds this string to the error message

Definition at line 96 of file knprotocolclient.h.

KNJobData* KNProtocolClient::job [protected]

Definition at line 93 of file knprotocolclient.h.

int KNProtocolClient::predictedLines [protected]

Definition at line 97 of file knprotocolclient.h.

int KNProtocolClient::progressValue [protected]

Definition at line 97 of file knprotocolclient.h.


The documentation for this class was generated from the following files:
  • knprotocolclient.h
  • knprotocolclient.cpp

knode

Skip menu "knode"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

kdepim

Skip menu "kdepim"
  • akonadi
  •   clients
  •   kabc
  •   kcal
  •   kcm
  • akregator
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt
  • kdgantt1
  • kjots
  • kleopatra
  • kmail
  • kmobiletools
  • knode
  • knotes
  • kontact
  • kontactinterfaces
  • korganizer
  •   korgac
  • kpilot
  • ktimetracker
  •   doc
  • libkdepim
  • libkholidays
  • libkleo
  • libkpgp
  • maildir
Generated for kdepim by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal