summaryrefslogtreecommitdiff
Unidiff
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
@@ -22,24 +22,46 @@
22 -.   .:....=;==+<; You should have received a copy of the GNU 22 -.   .:....=;==+<; You should have received a copy of the GNU
23  -_. . .   )=.  = Library General Public License along with 23  -_. . .   )=.  = Library General Public License along with
24    --        :-=` this library; see the file COPYING.LIB. 24    --        :-=` this library; see the file COPYING.LIB.
25 If not, write to the Free Software Foundation, 25 If not, write to the Free Software Foundation,
26 Inc., 59 Temple Place - Suite 330, 26 Inc., 59 Temple Place - Suite 330,
27 Boston, MA 02111-1307, USA. 27 Boston, MA 02111-1307, USA.
28*/ 28*/
29 29
30/* OPIE */ 30/* OPIE */
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}