X-Git-Url: http://vcs.maemo.org/git/?a=blobdiff_plain;f=src%2Fvicar-telepathy%2Fcpp%2Fconnectionmanager.cpp;fp=src%2Fvicar-telepathy%2Fcpp%2Fconnectionmanager.cpp;h=055e0078f202d1731e52d361e4fa8b5f4d9a42e3;hb=2beca638f4ba146e25320c9c07cc1f29d0b2bba2;hp=599856fe7de4a715a0eb7965f50831c346b8935c;hpb=2b82f07726d657dff4ad091f056b8685d5ba9930;p=vicar diff --git a/src/vicar-telepathy/cpp/connectionmanager.cpp b/src/vicar-telepathy/cpp/connectionmanager.cpp index 599856f..055e007 100644 --- a/src/vicar-telepathy/cpp/connectionmanager.cpp +++ b/src/vicar-telepathy/cpp/connectionmanager.cpp @@ -43,7 +43,11 @@ class ConnectionManagerPrivate public: ConnectionManagerPrivate(ConnectionManager * parent) : adaptor(new ConnectionManagerAdaptor(parent)), +<<<<<<< HEAD logUtility(new LogUtility(parent)) +======= + logUtility(new LogUtility("/var/log/vicar/vicar.log",parent)) +>>>>>>> 74800375ecf7f41e290cf7cc7fa9ee8b230be68e { Q_ASSERT(0 != adaptor); activeConnection = 0; @@ -73,6 +77,10 @@ ConnectionManager::GetParameters(const QString &proto) Q_ASSERT(!proto.isEmpty()); Q_UNUSED(proto); strMessage = "VICAR: ConnectionManager::GetParameters(const QString &prot)"; +<<<<<<< HEAD +======= + qDebug() << strMessage; +>>>>>>> 74800375ecf7f41e290cf7cc7fa9ee8b230be68e d->logUtility->logMessage(strMessage); org::freedesktop::Telepathy::ParameterDefinitionList result; org::freedesktop::Telepathy::ParameterDefinition param; @@ -122,6 +130,10 @@ ConnectionManager::GetParameters(const QString &proto) QStringList ConnectionManager::ListProtocols() { QString strMessage = "VICaR ConnectionManager::ListProtocols()"; +<<<<<<< HEAD +======= + qDebug() << strMessage; +>>>>>>> 74800375ecf7f41e290cf7cc7fa9ee8b230be68e d->logUtility->logMessage(strMessage); return QStringList(protocol_name); } @@ -131,6 +143,10 @@ QString ConnectionManager::RequestConnection(const QString & proto, QDBusObjectPath & object_path) { QString strMessage = "VICaR CM: Connection Requested for protocol "+proto; +<<<<<<< HEAD +======= + qDebug() << strMessage; +>>>>>>> 74800375ecf7f41e290cf7cc7fa9ee8b230be68e d->logUtility->logMessage(strMessage); QString connection_service; //object_path = QDBusObjectPath(); @@ -142,6 +158,7 @@ QString ConnectionManager::RequestConnection(const QString & proto, "VICaR - Unable to create Connection. Requested protocol is not implemented."); */ strMessage = "VICaR CM::RequestConnection: proto mismatch."; +<<<<<<< HEAD d->logUtility->logMessage(strMessage); return connection_service; } @@ -154,6 +171,22 @@ QString ConnectionManager::RequestConnection(const QString & proto, //emit NewConnection(connection_service, object_path, "tel"); //Just in case, emit the NewConnection again return connection_service; } +======= + qDebug() << strMessage; + d->logUtility->logMessage(strMessage); + return connection_service; + } + if (d->activeConnection != 0){ + strMessage = "VICaR CM::RequestConnection: An active connection already exists at "+d->activeConnection->serviceName(); + qDebug() << strMessage; + d->logUtility->logMessage(strMessage); + + object_path = d->activeConnection->objectPath(); + connection_service = d->activeConnection->serviceName(); + //emit NewConnection(connection_service, object_path, "tel"); //Just in case, emit the NewConnection again + return connection_service; + } +>>>>>>> 74800375ecf7f41e290cf7cc7fa9ee8b230be68e QString imsi; QString privacy; @@ -185,29 +218,49 @@ QString ConnectionManager::RequestConnection(const QString & proto, "VICaR - Unable to create Connection. Invalid parameters specified."); */ strMessage = "VICaR CM::RequestConnection: invalid parameter" + param + "found."; +<<<<<<< HEAD +======= + qDebug() << strMessage; +>>>>>>> 74800375ecf7f41e290cf7cc7fa9ee8b230be68e d->logUtility->logMessage(strMessage); return connection_service; } } strMessage = "DEBUG CM: Trying to create new connection with account "+account; +<<<<<<< HEAD +======= + qDebug() << strMessage; +>>>>>>> 74800375ecf7f41e290cf7cc7fa9ee8b230be68e d->logUtility->logMessage(strMessage); Connection * new_connection = new Connection(account, this); Q_ASSERT(0 != new_connection); strMessage = "DEBUG CM: Trying to register new connection"; +<<<<<<< HEAD +======= + qDebug() << strMessage; +>>>>>>> 74800375ecf7f41e290cf7cc7fa9ee8b230be68e d->logUtility->logMessage(strMessage); if (!new_connection->registerObject()) { strMessage = "VICaR CM: Error while registering Connection object with DBus."; +<<<<<<< HEAD +======= + qDebug() << strMessage; +>>>>>>> 74800375ecf7f41e290cf7cc7fa9ee8b230be68e d->logUtility->logMessage(strMessage); new_connection->deleteLater(); return QString(); } strMessage = "VICaR CM: New Connection Created. Status is " + QString(new_connection->GetStatus()); +<<<<<<< HEAD +======= + qDebug() << strMessage; +>>>>>>> 74800375ecf7f41e290cf7cc7fa9ee8b230be68e d->logUtility->logMessage(strMessage); @@ -215,6 +268,10 @@ QString ConnectionManager::RequestConnection(const QString & proto, connection_service = new_connection->serviceName(); strMessage = "VICaR CM: Emitting New Connection Signal"; +<<<<<<< HEAD +======= + qDebug() << strMessage; +>>>>>>> 74800375ecf7f41e290cf7cc7fa9ee8b230be68e d->logUtility->logMessage(strMessage); emit NewConnection(connection_service, object_path, "tel");