diff options
author | Benjamin Jemlich <pcgod@users.sourceforge.net> | 2012-07-10 09:42:07 +0400 |
---|---|---|
committer | Benjamin Jemlich <pcgod@users.sourceforge.net> | 2012-07-10 09:42:07 +0400 |
commit | d2fb4e3461b47ad6cfd089768cd0024366828466 (patch) | |
tree | 08024e9a4d0255b6e48dbecb4cb1708e61d5bfeb /src/murmur/MurmurIce.cpp | |
parent | 08f0d249df2b0d19f2c2541b7940018bc5870521 (diff) |
Fix code style
Diffstat (limited to 'src/murmur/MurmurIce.cpp')
-rw-r--r-- | src/murmur/MurmurIce.cpp | 77 |
1 files changed, 39 insertions, 38 deletions
diff --git a/src/murmur/MurmurIce.cpp b/src/murmur/MurmurIce.cpp index 557a3dcc0..a9f1bd840 100644 --- a/src/murmur/MurmurIce.cpp +++ b/src/murmur/MurmurIce.cpp @@ -284,46 +284,47 @@ void MurmurIce::badAuthenticator(::Server *server) { } void MurmurIce::addMetaCallback(const ::Murmur::MetaCallbackPrx& prx) { - if (!qlMetaCallbacks.contains(prx)) { + if (!qlMetaCallbacks.contains(prx)) { + qWarning("Added Ice MetaCallback %s", qPrintable(QString::fromStdString(communicator->proxyToString(prx)))); qlMetaCallbacks.append(prx); - qWarning("Added Ice MetaCallback %s", qPrintable(QString::fromStdString(communicator->proxyToString(prx)))); - } + } } void MurmurIce::removeMetaCallback(const ::Murmur::MetaCallbackPrx& prx) { - if(qlMetaCallbacks.removeAll(prx)) { - qWarning("Removed Ice MetaCallback %s", qPrintable(QString::fromStdString(communicator->proxyToString(prx)))); - } + if (qlMetaCallbacks.removeAll(prx)) { + qWarning("Removed Ice MetaCallback %s", qPrintable(QString::fromStdString(communicator->proxyToString(prx)))); + } } void MurmurIce::addServerCallback(const ::Server* server, const ::Murmur::ServerCallbackPrx& prx) { QList< ::Murmur::ServerCallbackPrx >& cbList = qmServerCallbacks[server->iServerNum]; - if (!cbList.contains(prx)) { + if (!cbList.contains(prx)) { + server->log(QString("Added Ice ServerCallback %1").arg(QString::fromStdString(communicator->proxyToString(prx)))); cbList.append(prx); - server->log(QString("Added Ice ServerCallback %1").arg(QString::fromStdString(communicator->proxyToString(prx)))); - } + } } void MurmurIce::removeServerCallback(const ::Server* server, const ::Murmur::ServerCallbackPrx& prx) { - if (qmServerCallbacks[server->iServerNum].removeAll(prx)) { - server->log(QString("Removed Ice ServerCallback %1").arg(QString::fromStdString(communicator->proxyToString(prx)))); - } + if (qmServerCallbacks[server->iServerNum].removeAll(prx)) { + server->log(QString("Removed Ice ServerCallback %1").arg(QString::fromStdString(communicator->proxyToString(prx)))); + } } void MurmurIce::removeServerCallbacks(const ::Server* server) { - qmServerCallbacks.remove(server->iServerNum); - server->log(QString("Removed all Ice ServerCallbacks")); + if (qmServerCallbacks.contains(server->iServerNum)) { + server->log(QString("Removed all Ice ServerCallbacks")); + qmServerCallbacks.remove(server->iServerNum); + } } void MurmurIce::addServerContextCallback(const ::Server* server, int session_id, const QString& action, const ::Murmur::ServerContextCallbackPrx& prx) { - QMap<QString, ::Murmur::ServerContextCallbackPrx>& callbacks = qmServerContextCallbacks[server->iServerNum][session_id]; - - if (!callbacks.contains(action) || callbacks[action] != prx) { - callbacks.insert(action, prx); - server->log(QString("Added Ice ServerContextCallback %1 for session %2, action %3").arg(QString::fromStdString(communicator->proxyToString(prx))).arg(session_id).arg(action)); - } + QMap<QString, ::Murmur::ServerContextCallbackPrx>& callbacks = qmServerContextCallbacks[server->iServerNum][session_id]; + if (!callbacks.contains(action) || callbacks[action] != prx) { + server->log(QString("Added Ice ServerContextCallback %1 for session %2, action %3").arg(QString::fromStdString(communicator->proxyToString(prx))).arg(session_id).arg(action)); + callbacks.insert(action, prx); + } } const QMap< int, QMap<QString, ::Murmur::ServerContextCallbackPrx> > MurmurIce::getServerContextCallbacks(const ::Server* server) const { @@ -331,16 +332,16 @@ const QMap< int, QMap<QString, ::Murmur::ServerContextCallbackPrx> > MurmurIce:: } void MurmurIce::removeServerContextCallback(const ::Server* server, int session_id, const QString& action) { - if (qmServerContextCallbacks[server->iServerNum][session_id].remove(action)) { - server->log(QString("Removed Ice ServerContextCallback for session %1, action %2").arg(session_id).arg(action)); - } + if (qmServerContextCallbacks[server->iServerNum][session_id].remove(action)) { + server->log(QString("Removed Ice ServerContextCallback for session %1, action %2").arg(session_id).arg(action)); + } } void MurmurIce::setServerAuthenticator(const ::Server* server, const ::Murmur::ServerAuthenticatorPrx& prx) { - if (prx != qmServerAuthenticator[server->iServerNum]) { - server->log(QString("Set Ice Authenticator to %1").arg(QString::fromStdString(communicator->proxyToString(prx)))); - qmServerAuthenticator[server->iServerNum] = prx; - } + if (prx != qmServerAuthenticator[server->iServerNum]) { + server->log(QString("Set Ice Authenticator to %1").arg(QString::fromStdString(communicator->proxyToString(prx)))); + qmServerAuthenticator[server->iServerNum] = prx; + } } const ::Murmur::ServerAuthenticatorPrx MurmurIce::getServerAuthenticator(const ::Server* server) const { @@ -348,16 +349,16 @@ const ::Murmur::ServerAuthenticatorPrx MurmurIce::getServerAuthenticator(const : } void MurmurIce::removeServerAuthenticator(const ::Server* server) { - if (qmServerAuthenticator.remove(server->iServerNum)) { - server->log(QString("Removed Ice Authenticator %1").arg(QString::fromStdString(communicator->proxyToString(getServerAuthenticator(server))))); - } + if (qmServerAuthenticator.remove(server->iServerNum)) { + server->log(QString("Removed Ice Authenticator %1").arg(QString::fromStdString(communicator->proxyToString(getServerAuthenticator(server))))); + } } void MurmurIce::setServerUpdatingAuthenticator(const ::Server* server, const ::Murmur::ServerUpdatingAuthenticatorPrx& prx) { - if (prx != qmServerUpdatingAuthenticator[server->iServerNum]) { - server->log(QString("Set Ice UpdatingAuthenticator to %1").arg(QString::fromStdString(communicator->proxyToString(prx)))); - qmServerUpdatingAuthenticator[server->iServerNum] = prx; - } + if (prx != qmServerUpdatingAuthenticator[server->iServerNum]) { + server->log(QString("Set Ice UpdatingAuthenticator to %1").arg(QString::fromStdString(communicator->proxyToString(prx)))); + qmServerUpdatingAuthenticator[server->iServerNum] = prx; + } } const ::Murmur::ServerUpdatingAuthenticatorPrx MurmurIce::getServerUpdatingAuthenticator(const ::Server* server) const { @@ -365,10 +366,10 @@ const ::Murmur::ServerUpdatingAuthenticatorPrx MurmurIce::getServerUpdatingAuthe } void MurmurIce::removeServerUpdatingAuthenticator(const ::Server* server) { - if (qmServerUpdatingAuthenticator.contains(server->iServerNum)) { - server->log(QString("Removed Ice UpdatingAuthenticator %1").arg(QString::fromStdString(communicator->proxyToString(getServerUpdatingAuthenticator(server))))); - qmServerUpdatingAuthenticator.remove(server->iServerNum); - } + if (qmServerUpdatingAuthenticator.contains(server->iServerNum)) { + server->log(QString("Removed Ice UpdatingAuthenticator %1").arg(QString::fromStdString(communicator->proxyToString(getServerUpdatingAuthenticator(server))))); + qmServerUpdatingAuthenticator.remove(server->iServerNum); + } } static ServerPrx idToProxy(int id, const Ice::ObjectAdapterPtr &adapter) { |