From 2eb93cd11269dc044fdd5b0b6cbf544c5dfb3e0e Mon Sep 17 00:00:00 2001 From: Niklas Date: Thu, 1 Sep 2011 18:14:35 +0200 Subject: some comments to the LogReceiver methods --- LogReceiver/logreceiver.cpp | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/LogReceiver/logreceiver.cpp b/LogReceiver/logreceiver.cpp index f618e90..1e3f388 100644 --- a/LogReceiver/logreceiver.cpp +++ b/LogReceiver/logreceiver.cpp @@ -316,6 +316,9 @@ void LogReceiver::checkInternetConnectionViaTCP(QString ifName) { session->close(); } +/** + * + */ void LogReceiver::handleNewConnection() { qDebug() << "New Connection arrived"; @@ -327,6 +330,9 @@ void LogReceiver::handleNewConnection() { connect(client, SIGNAL(readyRead()), this, SLOT(handleNewInput())); } +/** + * + */ void LogReceiver::handleClientDisconnect() { QLocalSocket* socket = qobject_cast (QObject::sender()); @@ -337,6 +343,9 @@ void LogReceiver::handleClientDisconnect() { client->deleteLater(); } +/** + * + */ void LogReceiver::handleNewInput(QLocalSocket * client) { qDebug() << "last read before exit"; while (client->canReadLine()) { @@ -352,6 +361,9 @@ void LogReceiver::handleNewInput(QLocalSocket * client) { } } +/** + * + */ void LogReceiver::handleNewInput() { QLocalSocket* socket = qobject_cast (QObject::sender()); @@ -381,6 +393,28 @@ void LogReceiver::handleNewInput() { */ } +/** + * This Method processes the send messages. + * + * This Method processes the send messages. It splits the line + * into several components. Those components are: + * interface: interface name ==> indicates the process who send the message + * s_state: is the number representation of syslog.h LOG levels + * s_subState: is the number representation of the dhcp.c DHCP states (1 - 8) plus + * the status. h states (9 - ..) + * msg: is a message which can contain additional informations + * + * According to the s_state and s_subState we emit the changeProgressBarValue() signal + * with different values. + * + * @param client + * the client who send the message + * + * @param data + * the message. (format ;;; ) + * + * + */ void LogReceiver::handleNewInputLine(QLocalSocket * client, QString data) { QString logMsg(data); -- cgit v1.2.3-55-g7522