summaryrefslogtreecommitdiff
authormickeyl <mickeyl>2005-04-27 17:58:40 (UTC)
committer mickeyl <mickeyl>2005-04-27 17:58:40 (UTC)
commitd80fe3c758c34c03b8d99e7a51101933f178d7e6 (patch) (unidiff)
tree86bcea545cd4fc9d046301162be191a9e416e94a
parentde20c0fd9df84ec55408fceb3df416e45e1df7d5 (diff)
downloadopie-d80fe3c758c34c03b8d99e7a51101933f178d7e6.zip
opie-d80fe3c758c34c03b8d99e7a51101933f178d7e6.tar.gz
opie-d80fe3c758c34c03b8d99e7a51101933f178d7e6.tar.bz2
first sketch at implementation
Diffstat (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 @@
31#include <qpe/qcopenvelope_qws.h> 31#include <qpe/qcopenvelope_qws.h>
32 32
33/* QT */ 33/* QT */
34#include <qapplication.h>
34#include <qstring.h> 35#include <qstring.h>
36#include <qstringlist.h>
35 37
36/* STD */ 38/* STD */
37#include <stdlib.h> 39#include <stdlib.h>
40#include <unistd.h>
41
42extern char **environ;
38 43
39int main( int argc, char** argv ) 44int main( int argc, char** argv )
40{ 45{
41 qDebug( "NOTE: hotplug-qcop started" ); 46 qDebug( "NOTE: hotplug-qcop started" );
42 qDebug( "... now doing something meaningful ..." ); 47 QString event( argc > 1 ? QString( argv[1] ) : QString::null );
48
49 QStringList list;
50 int i = 0;
51 while( environ[i] )
52 {
53 qDebug( "NOTE: hotplug-qcop adding '%s'", environ[i] );
54 list += environ[i++];
55 }
56
57 QApplication app( argc, argv );
58
59 if ( 1 )
60 {
61 QCopEnvelope e( "QPE/System", "HotPlugEvent(QString, QStringList)" );
62 e << event << list;
63 }
64
43 qDebug( "NOTE: hotplug-qcop ended" ); 65 qDebug( "NOTE: hotplug-qcop ended" );
44 return 0; 66 return 0;
45} 67}