void WsAccount::parseSet( TiXmlNode* syncNode, IMAccountList& imAccountList ) { TiXmlNode* networkNode = NULL; IMAccount imAccount; _userProfile.initImAccountParameters( &imAccount ); IMAccountXMLSerializer serializer( imAccount ); TiXmlHandle h(syncNode); serializer.unserializeWebService(h, imAccount.getIMAccountParameters() ); //VOXOX - JRT - 2009.06.02 we currently get empty node if no UserNetworks exist on server. if ( imAccount.getProtocol() != EnumIMProtocol::IMProtocolUnknown ) { //VOXOX - JRT - 2009.07.13 - HACK to remove old voxox domain accounts. if ( !imAccount.isOldVoxOxDomain() ) //Just throw this away. { imAccountList.Add( &imAccount ); } } else { int xxx = 1; //TODO: we get here is network already exists and was 'saved' with NID == 0. } }
//VOXOX CHANGE CJC ADD FRIEND FROM MYSPACE SERVER void MultiIMFactory::importContactsFromMySpaceServer(IMAccount imAccount) { if (imAccount.getProtocol() == EnumIMProtocol::IMProtocolMYSPACE) { //This only apply for myspace protocols return _purpleIMFactory.importContactsFromMySpaceServer(imAccount); } }
void MultiIMFactory::removeIMAccount(IMAccount imAccount) { if (EnumIMProtocol::isSip( imAccount.getProtocol() ) ) { return _phApiFactory.removeIMAccount(imAccount); } else { return _purpleIMFactory.removeIMAccount(imAccount); } }
void GaimPresenceMngr::UpdateIMPresence(IMAccount &account) { RecursiveMutex::ScopedLock lock(_mutex); GaimIMPresenceIterator it; for (it = _gaimIMPresenceList.begin(); it != _gaimIMPresenceList.end(); it++) { if (GaimIMFactory::equals((*it)->getIMAccount(), account.getLogin(), account.getProtocol())) { (*it)->setIMAccount(account); break; } } }
void PurpleContactListMngr::UpdateIMContactList(IMAccount &account) { RecursiveMutex::ScopedLock lock(_mutex); PurpleIMContactListIterator i; for (i = _purpleIMContactListList.begin(); i != _purpleIMContactListList.end(); i++) { if (PurpleIMFactory::equals((*i)->getIMAccount(), account.getLogin(), account.getProtocol())) { (*i)->setIMAccount(account); break; } } }
void GaimChatMngr::UpdateIMChat(IMAccount &account) { RecursiveMutex::ScopedLock lock(_mutex); GaimIMChatIterator i; for (i = _gaimIMChatList.begin(); i != _gaimIMChatList.end(); i++) { if (GaimIMFactory::equals((*i)->getIMAccount(), account.getLogin(), account.getProtocol())) { (*i)->setIMAccount(account); break; } } }
void PurpleChatMngr::RemoveIMChat(IMAccount &account) { RecursiveMutex::ScopedLock lock(_mutex); PurpleIMChatIterator i; for (i = _purpleIMChatList.begin(); i != _purpleIMChatList.end(); i++) { if (PurpleIMFactory::equals((*i)->getIMAccount(), account.getLogin(), account.getProtocol())) { _purpleIMChatList.erase(i); break; } } }
void GaimConnectMngr::RemoveIMConnect(IMAccount &account) { RecursiveMutex::ScopedLock lock(_mutex); GaimIMConnectIterator i; if (account.getLogin().empty()) return; for (i = _gaimIMConnectList.begin(); i != _gaimIMConnectList.end(); i++) { if (GaimIMFactory::equals((*i)->getIMAccount(), account.getLogin(), account.getProtocol())) { _gaimIMConnectList.erase(i); break; } } }
void ConnectHandler::connectedEventHandlerThreadSafe(std::string imAccountId, EnumPresenceState::PresenceState initialPresenceState ) { if (_userProfile && !_freeze) { IMAccount * imAccount = _userProfile->getIMAccountManager().getIMAccount(imAccountId); if (imAccount) { imAccount->setConnected(true); imAccount->setPresenceState( initialPresenceState ); //VOXOX - JRT - 2009.09.10 //VOXOX - JRT - 2009.09.14 - We now set the initialPresence before we try to connect. ////TODO: VOXOX CHANGE by Rolando - 2009.05.22 - FIX this: check if each network associated supports invisible presence //if(_userProfile->mustLoginInvisible() && imAccount->getProtocol() != EnumIMProtocol::IMProtocolWengo && imAccount->getProtocol() != EnumIMProtocol::IMProtocolSIP) //{ // //VOXOX CHANGE by Rolando - 2009.05.22 - because user can login as invisible presence we have to change here the presence to be able to do change it // //TODO: Find a way to be able to change the presence to invisible before set connected the imaccount to "true" // //this is provocating that others users can realize that user logged in and later "logged off" // imAccount->setPresenceState(EnumPresenceState::PresenceStateInvisible); // _userProfile->setPresenceState(EnumPresenceState::PresenceStateInvisible, imAccountId);//VOXOX CHANGE by Rolando - 2009.05.15 //} EnumPresenceState::PresenceState presenceState = imAccount->getPresenceState();//VOXOX CHANGE by Rolando - 2009.07.15 EnumIMProtocol::IMProtocol imProtocol = imAccount->getProtocol();//VOXOX CHANGE by Rolando - 2009.07.15 _userProfile->updateIMAccount(*imAccount); _userProfile->requestSyncData(*imAccount); //VOXOX - JRT - 2009.08.03 OWSAFE_DELETE(imAccount); connectedEvent(*this, imAccountId);//VOXOX CHANGE by Rolando - 2009.05.15 //VOXOX CHANGE by Rolando - 2009.07.15 if( QtEnumIMProtocolMap::supportsPresence( imProtocol ) ) //VOXOX - JRT - 2009.08.28 - moved logic to QtEnumIMProtocol { _userProfile->setPresenceState(presenceState, imAccountId, false, String::null );//VOXOX CHANGE by Rolando - 2009.07.15 //VOXOX - JRT - 2009.09.14 } } } }