summaryrefslogtreecommitdiff
path: root/core/tools
authormickeyl <mickeyl>2005-04-27 17:58:40 (UTC)
committer mickeyl <mickeyl>2005-04-27 17:58:40 (UTC)
commitd80fe3c758c34c03b8d99e7a51101933f178d7e6 (patch) (side-by-side diff)
tree86bcea545cd4fc9d046301162be191a9e416e94a /core/tools
parentde20c0fd9df84ec55408fceb3df416e45e1df7d5 (diff)
downloadopie-d80fe3c758c34c03b8d99e7a51101933f178d7e6.zip
opie-d80fe3c758c34c03b8d99e7a51101933f178d7e6.tar.gz
opie-d80fe3c758c34c03b8d99e7a51101933f178d7e6.tar.bz2
first sketch at implementation
Diffstat (limited to 'core/tools') (more/less context) (ignore whitespace changes)
-rw-r--r--core/tools/hotplug-qcop/main.cpp24
1 files changed, 23 insertions, 1 deletions
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 <qpe/qcopenvelope_qws.h>
/* QT */
+#include <qapplication.h>
#include <qstring.h>
+#include <qstringlist.h>
/* STD */
#include <stdlib.h>
+#include <unistd.h>
+
+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;
}