diff options
Diffstat (limited to 'kitchensync/opensyncdbus/dbusclient.cpp')
-rw-r--r-- | kitchensync/opensyncdbus/dbusclient.cpp | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/kitchensync/opensyncdbus/dbusclient.cpp b/kitchensync/opensyncdbus/dbusclient.cpp index f992350cf..f53ee74e3 100644 --- a/kitchensync/opensyncdbus/dbusclient.cpp +++ b/kitchensync/opensyncdbus/dbusclient.cpp @@ -39,13 +39,13 @@ OpenSyncService::OpenSyncService() { } -void OpenSyncService::setConnection( QDBusConnection *connection ) +void OpenSyncService::setConnection( TQDBusConnection *connection ) { mConnection = connection; mConnection->registerObject( "/ABC", this ); } -bool OpenSyncService::handleMethodCall( const QDBusMessage &message ) +bool OpenSyncService::handleMethodCall( const TQDBusMessage &message ) { qDebug( "OpenSyncService::handleMethodCall()" ); @@ -56,7 +56,7 @@ bool OpenSyncService::handleMethodCall( const QDBusMessage &message ) if ( message.interface() != "org.opensync.SyncEngine" ) return false; - QDBusMessage reply; + TQDBusMessage reply; TQString function = message.member(); if ( function == "hello" ) { @@ -80,7 +80,7 @@ bool OpenSyncService::handleMethodCall( const QDBusMessage &message ) return true; } -QDBusMessage OpenSyncService::showMember( const QDBusMessage &message ) +TQDBusMessage OpenSyncService::showMember( const TQDBusMessage &message ) { if ( message.count() != 2 ) { return error( message, "arg_count", @@ -99,14 +99,14 @@ QDBusMessage OpenSyncService::showMember( const QDBusMessage &message ) return error( message, "missing_arg", "Missing argument: member id." ); } - QDBusMessage reply; + TQDBusMessage reply; QSync::Environment env; QSync::Result result = env.initialize(); if ( result.isError() ) { return error( message, result.name(), result.message() ); } else { - reply = QDBusMessage::methodReply( message ); + reply = TQDBusMessage::methodReply( message ); QSync::Group group = env.groupByName( groupName ); if ( !group.isValid() ) { @@ -131,7 +131,7 @@ QDBusMessage OpenSyncService::showMember( const QDBusMessage &message ) } -QDBusMessage OpenSyncService::showGroup( const QDBusMessage &message ) +TQDBusMessage OpenSyncService::showGroup( const TQDBusMessage &message ) { if ( message.count() != 1 ) { return error( message, "arg_count", @@ -144,14 +144,14 @@ QDBusMessage OpenSyncService::showGroup( const QDBusMessage &message ) return error( message, "missing_arg", "Missing argument group name." ); } - QDBusMessage reply; + TQDBusMessage reply; QSync::Environment env; QSync::Result result = env.initialize(); if ( result.isError() ) { return error( message, result.name(), result.message() ); } else { - reply = QDBusMessage::methodReply( message ); + reply = TQDBusMessage::methodReply( message ); QSync::Group group = env.groupByName( groupName ); if ( !group.isValid() ) { @@ -171,25 +171,25 @@ QDBusMessage OpenSyncService::showGroup( const QDBusMessage &message ) return reply; } -QDBusMessage OpenSyncService::error( const QDBusMessage &message, +TQDBusMessage OpenSyncService::error( const TQDBusMessage &message, const TQString &errorCode, const TQString &errorMessage ) { - QDBusError error( "org.opensync." + errorCode, errorMessage ); - return QDBusMessage::methodError( message, error ); + TQDBusError error( "org.opensync." + errorCode, errorMessage ); + return TQDBusMessage::methodError( message, error ); } -QDBusMessage OpenSyncService::listPlugins( const QDBusMessage &message ) +TQDBusMessage OpenSyncService::listPlugins( const TQDBusMessage &message ) { - QDBusMessage reply; + TQDBusMessage reply; QSync::Environment env; QSync::Result result = env.initialize(); if ( result.isError() ) { - QDBusError error( result.name(), result.message() ); - reply = QDBusMessage::methodError( message, error ); + TQDBusError error( result.name(), result.message() ); + reply = TQDBusMessage::methodError( message, error ); } else { - reply = QDBusMessage::methodReply( message ); + reply = TQDBusMessage::methodReply( message ); QSync::Environment::PluginIterator it( env.pluginBegin() ); for ( ; it != env.pluginEnd(); ++it ) { @@ -202,17 +202,17 @@ QDBusMessage OpenSyncService::listPlugins( const QDBusMessage &message ) return reply; } -QDBusMessage OpenSyncService::listGroups( const QDBusMessage &message ) +TQDBusMessage OpenSyncService::listGroups( const TQDBusMessage &message ) { - QDBusMessage reply; + TQDBusMessage reply; QSync::Environment env; QSync::Result result = env.initialize(); if ( result.isError() ) { - QDBusError error( result.name(), result.message() ); - reply = QDBusMessage::methodError( message, error ); + TQDBusError error( result.name(), result.message() ); + reply = TQDBusMessage::methodError( message, error ); } else { - reply = QDBusMessage::methodReply( message ); + reply = TQDBusMessage::methodReply( message ); QSync::Environment::GroupIterator it( env.groupBegin() ); for ( ; it != env.groupEnd(); ++it ) { @@ -225,21 +225,21 @@ QDBusMessage OpenSyncService::listGroups( const QDBusMessage &message ) return reply; } -QDBusMessage OpenSyncService::hello( const QDBusMessage &message ) +TQDBusMessage OpenSyncService::hello( const TQDBusMessage &message ) { - QDBusMessage reply = QDBusMessage::methodReply( message ); + TQDBusMessage reply = TQDBusMessage::methodReply( message ); -// QDBusError error; -// reply = QDBusMessage::methodError( message, error ); +// TQDBusError error; +// reply = TQDBusMessage::methodError( message, error ); reply.append( TQVariant( TQString( "Hello!" ) ) ); return reply; } -QDBusMessage OpenSyncService::randomNumber( const QDBusMessage &message ) +TQDBusMessage OpenSyncService::randomNumber( const TQDBusMessage &message ) { - QDBusMessage reply = QDBusMessage::methodReply( message ); + TQDBusMessage reply = TQDBusMessage::methodReply( message ); int number = rand(); @@ -254,15 +254,15 @@ int main( int argc, char *argv[] ) std::cout << "Hello" << std::endl; - QDBusConnection connection = QDBusConnection::addConnection( - QDBusConnection::SessionBus ); + TQDBusConnection connection = TQDBusConnection::addConnection( + TQDBusConnection::SessionBus ); if ( !connection.isConnected() ) { qFatal("Cannot connect to session bus"); } connection.requestName( "org.opensync.SyncEngine", - QDBusConnection::NoReplace ); + TQDBusConnection::NoReplace ); OpenSyncService service; service.setConnection( &connection ); |