author | mickeyl <mickeyl> | 2005-04-27 17:58:40 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2005-04-27 17:58:40 (UTC) |
commit | d80fe3c758c34c03b8d99e7a51101933f178d7e6 (patch) (unidiff) | |
tree | 86bcea545cd4fc9d046301162be191a9e416e94a | |
parent | de20c0fd9df84ec55408fceb3df416e45e1df7d5 (diff) | |
download | opie-d80fe3c758c34c03b8d99e7a51101933f178d7e6.zip opie-d80fe3c758c34c03b8d99e7a51101933f178d7e6.tar.gz opie-d80fe3c758c34c03b8d99e7a51101933f178d7e6.tar.bz2 |
first sketch at implementation
-rw-r--r-- | core/tools/hotplug-qcop/main.cpp | 24 |
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 | |||
42 | extern char **environ; | ||
38 | 43 | ||
39 | int main( int argc, char** argv ) | 44 | int 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 | } |