summaryrefslogtreecommitdiff
authorzecke <zecke>2005-03-03 21:01:18 (UTC)
committer zecke <zecke>2005-03-03 21:01:18 (UTC)
commit67ddc501f2a52c7f35ca4044fb0094e759a45d76 (patch) (unidiff)
tree7c863f306e6fb7c1aecfb2f8c1ff4a217bfefa1c
parent585c9fe0efbc0cf4037a79cac3b22ac38c08fec2 (diff)
downloadopie-67ddc501f2a52c7f35ca4044fb0094e759a45d76.zip
opie-67ddc501f2a52c7f35ca4044fb0094e759a45d76.tar.gz
opie-67ddc501f2a52c7f35ca4044fb0094e759a45d76.tar.bz2
Start and Restart the QSound-Server
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/server.cpp22
-rw-r--r--core/launcher/server.h7
2 files changed, 28 insertions, 1 deletions
diff --git a/core/launcher/server.cpp b/core/launcher/server.cpp
index 15cd686..921b790 100644
--- a/core/launcher/server.cpp
+++ b/core/launcher/server.cpp
@@ -41,6 +41,8 @@
41#include <opie2/odebug.h> 41#include <opie2/odebug.h>
42#include <opie2/odevicebutton.h> 42#include <opie2/odevicebutton.h>
43#include <opie2/odevice.h> 43#include <opie2/odevice.h>
44#include <opie2/oprocess.h>
45
44#include <qtopia/applnk.h> 46#include <qtopia/applnk.h>
45#include <qtopia/private/categories.h> 47#include <qtopia/private/categories.h>
46#include <qtopia/mimetype.h> 48#include <qtopia/mimetype.h>
@@ -133,7 +135,8 @@ Server::Server() :
133 qcopBridge( 0 ), 135 qcopBridge( 0 ),
134 transferServer( 0 ), 136 transferServer( 0 ),
135 packageHandler( 0 ), 137 packageHandler( 0 ),
136 syncDialog( 0 ) 138 syncDialog( 0 ),
139 process( 0 )
137{ 140{
138 Global::setBuiltinCommands(builtins); 141 Global::setBuiltinCommands(builtins);
139 142
@@ -167,6 +170,8 @@ Server::Server() :
167 this, SLOT(desktopMessage( const QCString &, const QByteArray & )) ); 170 this, SLOT(desktopMessage( const QCString &, const QByteArray & )) );
168#endif 171#endif
169 172
173 soundServerExited();
174
170 // start services 175 // start services
171 startTransferServer(); 176 startTransferServer();
172 (void) new IrServer( this ); 177 (void) new IrServer( this );
@@ -984,3 +989,18 @@ void Server::finishedQueuedRequests()
984 } 989 }
985} 990}
986 991
992void Server::startSoundServer() {
993 if ( !process ) {
994 process = new Opie::Core::OProcess( this );
995 connect(process, SIGNAL(processExited(Opie::Core::OProcess*)),
996 SLOT(soundServerExited()));
997 }
998
999 process->clearArguments();
1000 *process << QPEApplication::qpeDir() + "bin/qss";
1001 process->start();
1002}
1003
1004void Server::soundServerExited() {
1005 QTimer::singleShot(5000, this, SLOT(startSoundServer()));
1006}
diff --git a/core/launcher/server.h b/core/launcher/server.h
index d71d68a..5b2f995 100644
--- a/core/launcher/server.h
+++ b/core/launcher/server.h
@@ -41,6 +41,7 @@ class QueuedRequestRunner;
41namespace Opie { 41namespace Opie {
42namespace Core { 42namespace Core {
43 class ODeviceButton; 43 class ODeviceButton;
44 class OProcess;
44} 45}
45} 46}
46 47
@@ -63,6 +64,10 @@ public slots:
63 void pokeTimeMonitors(); 64 void pokeTimeMonitors();
64 65
65private slots: 66private slots:
67 //@{
68 void startSoundServer();
69 void soundServerExited();
70 //@}
66 void activate(const Opie::Core::ODeviceButton*,bool); 71 void activate(const Opie::Core::ODeviceButton*,bool);
67 void syncConnectionClosed( const QHostAddress & ); 72 void syncConnectionClosed( const QHostAddress & );
68 void applicationLaunched(int pid, const QString &app); 73 void applicationLaunched(int pid, const QString &app);
@@ -104,6 +109,8 @@ private:
104 int pendingFlushes; 109 int pendingFlushes;
105 bool directAccessRun; 110 bool directAccessRun;
106 QueuedRequestRunner *qrr; 111 QueuedRequestRunner *qrr;
112
113 Opie::Core::OProcess *process;
107}; 114};
108 115
109 116