summaryrefslogtreecommitdiff
path: root/core/launcher/qcopbridge.cpp
Unidiff
Diffstat (limited to 'core/launcher/qcopbridge.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/qcopbridge.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/core/launcher/qcopbridge.cpp b/core/launcher/qcopbridge.cpp
index 24f471d..53efba4 100644
--- a/core/launcher/qcopbridge.cpp
+++ b/core/launcher/qcopbridge.cpp
@@ -56,63 +56,63 @@ const int block_size = 51200;
56 56
57QCopBridge::QCopBridge( Q_UINT16 port, QObject *parent, 57QCopBridge::QCopBridge( Q_UINT16 port, QObject *parent,
58 const char* name ) 58 const char* name )
59 : QServerSocket( port, 1, parent, name ), 59 : QServerSocket( port, 1, parent, name ),
60 desktopChannel( 0 ), 60 desktopChannel( 0 ),
61 cardChannel( 0 ) 61 cardChannel( 0 )
62{ 62{
63 if ( !ok() ) 63 if ( !ok() )
64 qWarning( "Failed to bind to port %d", port ); 64 qWarning( "Failed to bind to port %d", port );
65 else { 65 else {
66#ifndef QT_NO_COP 66#ifndef QT_NO_COP
67 desktopChannel = new QCopChannel( "QPE/Desktop", this ); 67 desktopChannel = new QCopChannel( "QPE/Desktop", this );
68 connect( desktopChannel, SIGNAL(received(const QCString &, const QByteArray &)), 68 connect( desktopChannel, SIGNAL(received(const QCString&,const QByteArray&)),
69 this, SLOT(desktopMessage( const QCString &, const QByteArray &)) ); 69 this, SLOT(desktopMessage(const QCString&,const QByteArray&)) );
70 cardChannel = new QCopChannel( "QPE/Card", this ); 70 cardChannel = new QCopChannel( "QPE/Card", this );
71 connect( cardChannel, SIGNAL(received(const QCString &, const QByteArray &)), 71 connect( cardChannel, SIGNAL(received(const QCString&,const QByteArray&)),
72 this, SLOT(desktopMessage( const QCString &, const QByteArray &)) ); 72 this, SLOT(desktopMessage(const QCString&,const QByteArray&)) );
73#endif 73#endif
74 } 74 }
75 sendSync = FALSE; 75 sendSync = FALSE;
76 openConnections.setAutoDelete( TRUE ); 76 openConnections.setAutoDelete( TRUE );
77 authorizeConnections(); 77 authorizeConnections();
78} 78}
79 79
80QCopBridge::~QCopBridge() 80QCopBridge::~QCopBridge()
81{ 81{
82#ifndef QT_NO_COP 82#ifndef QT_NO_COP
83 delete desktopChannel; 83 delete desktopChannel;
84#endif 84#endif
85} 85}
86 86
87void QCopBridge::authorizeConnections() 87void QCopBridge::authorizeConnections()
88{ 88{
89 Config cfg("Security"); 89 Config cfg("Security");
90 cfg.setGroup("SyncMode"); 90 cfg.setGroup("SyncMode");
91 m_mode = Mode(cfg.readNumEntry("Mode", Sharp )); 91 m_mode = Mode(cfg.readNumEntry("Mode", Sharp ));
92 QListIterator<QCopBridgePI> it(openConnections); 92 QListIterator<QCopBridgePI> it(openConnections);
93 while ( it.current() ) { 93 while ( it.current() ) {
94 if ( !it.current()->verifyAuthorised() ) { 94 if ( !it.current()->verifyAuthorised() ) {
95 disconnect ( it.current(), SIGNAL( connectionClosed( QCopBridgePI *) ), this, SLOT( closed( QCopBridgePI *) ) ); 95 disconnect ( it.current(), SIGNAL( connectionClosed(QCopBridgePI*) ), this, SLOT( closed(QCopBridgePI*) ) );
96 openConnections.removeRef( it.current() ); 96 openConnections.removeRef( it.current() );
97 } else 97 } else
98 ++it; 98 ++it;
99 } 99 }
100} 100}
101 101
102void QCopBridge::newConnection( int socket ) 102void QCopBridge::newConnection( int socket )
103{ 103{
104 QCopBridgePI *pi = new QCopBridgePI( socket, this ); 104 QCopBridgePI *pi = new QCopBridgePI( socket, this );
105 openConnections.append( pi ); 105 openConnections.append( pi );
106 connect ( pi, SIGNAL( connectionClosed( QCopBridgePI *) ), this, SLOT( closed( QCopBridgePI *) ) ); 106 connect ( pi, SIGNAL( connectionClosed(QCopBridgePI*) ), this, SLOT( closed(QCopBridgePI*) ) );
107 107
108 /* ### libqtopia merge FIXME */ 108 /* ### libqtopia merge FIXME */
109#if 0 109#if 0
110 QPEApplication::setTempScreenSaverMode( QPEApplication::DisableSuspend ); 110 QPEApplication::setTempScreenSaverMode( QPEApplication::DisableSuspend );
111#endif 111#endif
112#ifndef QT_NO_COP 112#ifndef QT_NO_COP
113 QCopEnvelope( "QPE/System", "setScreenSaverMode(int)" ) << QPEApplication::DisableSuspend; 113 QCopEnvelope( "QPE/System", "setScreenSaverMode(int)" ) << QPEApplication::DisableSuspend;
114#endif 114#endif
115 115
116 if ( sendSync ) { 116 if ( sendSync ) {
117 pi ->startSync(); 117 pi ->startSync();
118 sendSync = FALSE; 118 sendSync = FALSE;