[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: =?utf-8?q?=5Blibdebconf-kde=5D_src=3A_Add_support_for_the_X=5FPI?=
From: Modestas Vainius <modax () debian ! org>
Date: 2011-06-29 16:29:28
Message-ID: 20110629162928.EF2CEA60CB () git ! kde ! org
[Download RAW message or body]
Git commit e02645b025546fed287a88ed4449847d57562623 by Modestas Vainius.
Committed on 27/06/2011 at 00:08.
Pushed by modax into branch 'master'.
Add support for the X_PING command to DebconfFrontend.
As soon as DebconfFrontend receives this command, it sends back success reply.
The purpose of this command is to provide a way for remote end (Debconf) to
check if the frontend is ready to accept commands or if it/the connection is
still alive.
M +7 -0 src/debconf.cpp
M +1 -0 src/debconf.h
http://commits.kde.org/libdebconf-kde/e02645b025546fed287a88ed4449847d57562623
diff --git a/src/debconf.cpp b/src/debconf.cpp
index b16ad30..2559e9d 100644
--- a/src/debconf.cpp
+++ b/src/debconf.cpp
@@ -74,6 +74,7 @@ const DebconfFrontend::Cmd DebconfFrontend::commands[] = {
{ "GET", &DebconfFrontend::cmd_get },
{ "CAPB", &DebconfFrontend::cmd_capb },
{ "PROGRESS", &DebconfFrontend::cmd_progress },
+ { "X_PING", &DebconfFrontend::cmd_x_ping },
{ 0, 0 } };
DebconfFrontend::DebconfFrontend(QObject *parent)
@@ -280,6 +281,12 @@ void DebconfFrontend::cmd_subst(const QString ¶m)
say(QLatin1String( "0 ok" ));
}
+void DebconfFrontend::cmd_x_ping(const QString ¶m)
+{
+ Q_UNUSED(param);
+ say(QLatin1String( "0 pong" ));
+}
+
bool DebconfFrontend::process()
{
QTextStream in(getReadDevice());
diff --git a/src/debconf.h b/src/debconf.h
index 7a08e43..b81afaf 100644
--- a/src/debconf.h
+++ b/src/debconf.h
@@ -170,6 +170,7 @@ private:
void cmd_data(const QString ¶m);
void cmd_subst(const QString ¶m);
void cmd_progress(const QString ¶m);
+ void cmd_x_ping(const QString ¶m);
struct Cmd {
const char *cmd;
void (DebconfFrontend::*run)(const QString &);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic