void UploadManager::reserveSlot(const User::Ptr& aUser) { { Lock l(cs); reservedSlots.insert(aUser); } if(aUser->isOnline()) const_cast<User::Ptr&>(aUser)->connect(); }
void UploadManager::reserveSlot(const User::Ptr& aUser) { { Lock l(cs); reservedSlots.insert(aUser); } if(aUser->isOnline()) ClientManager::getInstance()->connect(aUser); }
void UsersFrame::updateUser(const User::Ptr& aUser) { for(int i = 0; i < ctrlUsers.GetItemCount(); ++i) { UserInfo *ui = ctrlUsers.getItemData(i); if(ui->user == aUser) { ui->columns[COLUMN_SEEN] = aUser->isOnline() ? TSTRING(ONLINE) : Text::toT(Util::formatTime("%Y-%m-%d %H:%M", FavoriteManager::getInstance()->getLastSeen(aUser))); ctrlUsers.updateItem(i); } } }
void UploadManager::on(ClientManagerListener::UserUpdated, const User::Ptr& aUser) throw() { if(!aUser->isOnline()) { clearUserFiles(aUser); } }