예제 #1
0
void UploadManager::reserveSlot(const User::Ptr& aUser) {
	{
		Lock l(cs);
		reservedSlots.insert(aUser);
	}
	if(aUser->isOnline())
		const_cast<User::Ptr&>(aUser)->connect();
}
예제 #2
0
void UploadManager::reserveSlot(const User::Ptr& aUser) {
	{
		Lock l(cs);
		reservedSlots.insert(aUser);
	}
	if(aUser->isOnline())
		ClientManager::getInstance()->connect(aUser);
}
예제 #3
0
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);
		}
	}
}
예제 #4
0
void UploadManager::on(ClientManagerListener::UserUpdated, const User::Ptr& aUser) throw() {
	if(!aUser->isOnline()) {
		clearUserFiles(aUser);
	}
}