From d80fe3c758c34c03b8d99e7a51101933f178d7e6 Mon Sep 17 00:00:00 2001 From: mickeyl Date: Wed, 27 Apr 2005 17:58:40 +0000 Subject: first sketch at implementation --- (limited to 'core/tools') diff --git a/core/tools/hotplug-qcop/main.cpp b/core/tools/hotplug-qcop/main.cpp index bd5431d..9c585ce 100644 --- a/core/tools/hotplug-qcop/main.cpp +++ b/core/tools/hotplug-qcop/main.cpp @@ -31,15 +31,37 @@ #include /* QT */ +#include #include +#include /* STD */ #include +#include + +extern char **environ; int main( int argc, char** argv ) { qDebug( "NOTE: hotplug-qcop started" ); - qDebug( "... now doing something meaningful ..." ); + QString event( argc > 1 ? QString( argv[1] ) : QString::null ); + + QStringList list; + int i = 0; + while( environ[i] ) + { + qDebug( "NOTE: hotplug-qcop adding '%s'", environ[i] ); + list += environ[i++]; + } + + QApplication app( argc, argv ); + + if ( 1 ) + { + QCopEnvelope e( "QPE/System", "HotPlugEvent(QString, QStringList)" ); + e << event << list; + } + qDebug( "NOTE: hotplug-qcop ended" ); return 0; } -- cgit v0.9.0.2