X-Git-Url: http://vcs.maemo.org/git/?a=blobdiff_plain;f=tpsession-0.1%2Ftpsession%2Ftpsessionaccount.cpp;h=50509213c155b259e3d2899671c6eb197ee9c6cb;hb=79dc2c038f5cce3131df512731e3d32aeaf4d668;hp=a44be5dce89ab11b8b86bc5ce33e247592c905e3;hpb=186690bd3c929b463daa6b472c9c4adfd7384e87;p=tpsession diff --git a/tpsession-0.1/tpsession/tpsessionaccount.cpp b/tpsession-0.1/tpsession/tpsessionaccount.cpp index a44be5d..5050921 100644 --- a/tpsession-0.1/tpsession/tpsessionaccount.cpp +++ b/tpsession-0.1/tpsession/tpsessionaccount.cpp @@ -60,6 +60,7 @@ * \param peedId PeerId, as example caller telephone number * \param channeDetails needed if you would like to create a channel. For text chanels TpSession creates channel automatically. For calls, Maemo Call UI handles callcreation */ + /** * Construct a new TpSessionAccount object. This constructor is called by TpSession class when new account is created or fetched from account manager. It is not inended to be used stand alone * @@ -72,7 +73,7 @@ TpSessionAccount::TpSessionAccount(Tp::AccountManagerPtr am,const QString &objec { connect(mAcc->becomeReady(),SIGNAL(finished(Tp::PendingOperation *)),SLOT(onReady(Tp::PendingOperation *))); ready=false; - qDebug() << "TpSessionAccount::TpSessionAccount objectPath=" << objectPath; + // qDebug() << "TpSessionAccount::TpSessionAccount objectPath=" << objectPath; }; @@ -80,8 +81,8 @@ void TpSessionAccount::onReady(Tp::PendingOperation *op) { acc = mAcc.data(); - qDebug() << "TpSessionAccount::onReady cmName=" << acc->cmName() << "haveConnection=" << - (acc->haveConnection()? ( acc->connection()->isReady() ? "Ready":"notReady"):"no"); + // qDebug() << "TpSessionAccount::onReady cmName=" << acc->cmName() << "haveConnection=" << + // (acc->haveConnection()? ( acc->connection()->isReady() ? "Ready":"notReady"):"no"); if(acc->haveConnection()) { @@ -89,7 +90,7 @@ void TpSessionAccount::onReady(Tp::PendingOperation *op) SIGNAL(finished(Tp::PendingOperation *)), SLOT(onContactsConnectionReady(Tp::PendingOperation *))); if (acc->connection()->isReady() && acc->connection()->interfaces().contains(TELEPATHY_INTERFACE_CONNECTION_INTERFACE_REQUESTS)) { - qDebug() << "TpSessionAccount::onReady: connecting to Connection.Interface.NewChannels"; + // qDebug() << "TpSessionAccount::onReady: connecting to Connection.Interface.NewChannels"; connect(acc->connection()->requestsInterface(), SIGNAL(NewChannels(const Tp::ChannelDetailsList&)), SLOT(onNewChannels(const Tp::ChannelDetailsList&))); @@ -109,7 +110,7 @@ void TpSessionAccount::onContactsConnectionReady(Tp::PendingOperation *op) } if (acc->connection()->interfaces().contains(TELEPATHY_INTERFACE_CONNECTION_INTERFACE_REQUESTS)) { - qDebug() << "TpSessionAccount::onContactsConectionReady: connecting to Connection.Interface.NewChannels"; + // // qDebug() << "TpSessionAccount::onContactsConectionReady: connecting to Connection.Interface.NewChannels"; connect(acc->connection()->requestsInterface(), SIGNAL(NewChannels(const Tp::ChannelDetailsList&)), SLOT(onNewChannels(const Tp::ChannelDetailsList&))); @@ -121,12 +122,12 @@ void TpSessionAccount::onContactsConnectionReady(Tp::PendingOperation *op) SIGNAL(presencePublicationRequested(const Tp::Contacts &)), SLOT(onPresencePublicationRequested(const Tp::Contacts &))); #endif - qDebug() << "TpSessionAccount::onContactsConnectionReady "<< acc->cmName() ; + // qDebug() << "TpSessionAccount::onContactsConnectionReady "<< acc->cmName() ; // RosterItem *item; bool exists; myContacts=contactsConn->contactManager()->allKnownContacts(); foreach (const Tp::ContactPtr &contact, myContacts) { - qDebug() << "id=" <id() << " alias=" << contact->alias() << " presence=" << contact->presenceStatus() ; + // qDebug() << "id=" <id() << " alias=" << contact->alias() << " presence=" << contact->presenceStatus() ; if(contact->id()==reqContact) { addOutgoingChannel(contact); reqContact=""; @@ -195,7 +196,7 @@ void TpSessionAccount::onNewContactRetrieved(Tp::PendingOperation *op) } Tp::ContactPtr contact = contacts.first(); - qDebug() << "TpSessionAccount::onContactRetrieved" << reqContact; + // qDebug() << "TpSessionAccount::onContactRetrieved" << reqContact; if(!reqContact.isEmpty()) addOutgoingChannel(contacts.first()); } /** @@ -231,7 +232,7 @@ void TpSessionAccount::addOutgoingChannel(const Tp::ContactPtr &contact) { - qDebug() << "TpSessionAccount::addOutgoingChannel"; + // qDebug() << "TpSessionAccount::addOutgoingChannel"; TpSessionChannel* newChannel=new TpSessionChannel(contact->manager()->connection(),contact); connect(newChannel,SIGNAL(messageReceived(const Tp::ReceivedMessage &,TpSessionChannel *)), @@ -244,7 +245,7 @@ void TpSessionAccount::addOutgoingChannel(const Tp::ContactPtr &contact) void TpSessionAccount::onOutgoingChannelReady(TpSessionChannel *ch) { - qDebug() << "TpSessionAccoiunt::onOutgoingChannelReady"; + // qDebug() << "TpSessionAccoiunt::onOutgoingChannelReady"; emit channelReady(this); if(!reqMessage.isEmpty()) ch->sendMessage(reqMessage); reqMessage.clear(); @@ -253,13 +254,13 @@ void TpSessionAccount::onOutgoingChannelReady(TpSessionChannel *ch) void TpSessionAccount::onMessageSent(const Tp::Message &msg,Tp::MessageSendingFlags, const QString &flags) { - qDebug() << "TpSessionAccount::onMessageSent"; + // qDebug() << "TpSessionAccount::onMessageSent"; emit messageSent(msg,this); }; void TpSessionAccount::onMessageReceived(const Tp::ReceivedMessage &msg,TpSessionChannel *ch) { - qDebug() << "TpSessionAccount::onMessageReceived " << msg.text(); + // qDebug() << "TpSessionAccount::onMessageReceived " << msg.text(); emit messageReceived(msg,this); }; @@ -267,18 +268,18 @@ void TpSessionAccount::onNewChannels(const Tp::ChannelDetailsList &channels) { Tp::TextChannelPtr myIngoingTextChannel; - qDebug() << "TpSessionAccount::onNewChannels"; + // qDebug() << "TpSessionAccount::onNewChannels"; foreach (const Tp::ChannelDetails &details, channels) { QString channelType = details.properties.value(QLatin1String(TELEPATHY_INTERFACE_CHANNEL ".ChannelType")).toString(); QString targetId = details.properties.value(QLatin1String(TELEPATHY_INTERFACE_CHANNEL ".TargetID")).toString(); bool requested = details.properties.value(QLatin1String(TELEPATHY_INTERFACE_CHANNEL ".Requested")).toBool(); - qDebug() << " channelType:" << channelType <<" requested :" << requested << " targetId" << targetId; + // qDebug() << " channelType:" << channelType <<" requested :" << requested << " targetId" << targetId; emit newChannel(this,channelType,targetId,details); if (channelType == TELEPATHY_INTERFACE_CHANNEL_TYPE_TEXT && !requested) { myIngoingTextChannel = Tp::TextChannel::create(acc->connection(),details.channel.path(),details.properties); - qDebug() << "TpSessionAccount::onNewChannels path=" <<"path " << myIngoingTextChannel->objectPath(); + // qDebug() << "TpSessionAccount::onNewChannels path=" <<"path " << myIngoingTextChannel->objectPath(); TpSessionChannel* newChannel=new TpSessionChannel( myIngoingTextChannel); connect(newChannel,SIGNAL(messageReceived(const Tp::ReceivedMessage &,TpSessionChannel *)), @@ -286,7 +287,7 @@ void TpSessionAccount::onNewChannels(const Tp::ChannelDetailsList &channels) myChannels+=newChannel; } if (channelType == TELEPATHY_INTERFACE_CHANNEL_TYPE_STREAMED_MEDIA && !requested) { - qDebug() << "Incoming call" ; + // qDebug() << "Incoming call" ; } } }