void AsyncOpTracker::Kill(AsyncOp *theOp) { AutoCrit aCrit(mDataCrit); AsyncOpPtr anOp = theOp; if(Untrack(theOp)) anOp->Kill(); }
void GameSpySupport::PumpTimerCompletion(AsyncOpPtr theOp, RefCountPtr theParam) { if (theOp.get() == NULL) return; if (theOp->Killed()) return; GameSpySupport *pThat = (GameSpySupport*)theParam.get(); pThat->Pump(); }
void AsyncOpTracker::KillAll() { AutoCrit aCrit(mDataCrit); OpMap::iterator anItr = mOpMap.begin(); while(anItr!=mOpMap.end()) { AsyncOpPtr anOp = anItr->second->val; mOpMap.erase(anItr++); anOp->Kill(); } }
void AsyncOpTracker::Kill(DWORD theId) { AutoCrit aCrit(mDataCrit); OpMap::iterator anItr = mOpMap.find(theId); while(anItr!=mOpMap.end() && anItr->first==theId) { AsyncOpPtr anOp = anItr->second->val; mOpMap.erase(anItr++); anOp->Kill(); } }
void AuthContext::StaticGetCertCallback(AsyncOpPtr theOp, RefCountPtr theParam) { GetCertOp *anOp = (GetCertOp*)theOp.get(); AuthContext *aContext = (AuthContext*)theParam.get(); aContext->GetCertCallback(anOp); }
void ServerConnection::StaticConnectCallback(AsyncOpPtr theOp, RefCountPtr theParam) { PeerAuthOp *anOp = (PeerAuthOp*)theOp.get(); ServerConnection *thisConnection = (ServerConnection*)theParam.get(); thisConnection->ConnectCallback(anOp); }
void ServerConnection::StaticMsgCallback(AsyncOpPtr theOp, RefCountPtr theParam) { RecvMsgOp *anOp = (RecvMsgOp*)theOp.get(); ServerConnection *thisConnection = (ServerConnection*)theParam.get(); if(anOp->GetStatus()==WS_Success) thisConnection->MsgCallback(anOp->GetMsg()); }
bool StagingLogic::VerifyPing(LobbyGame *theGame) { if(theGame->GetGameType()!=LobbyGameType_Internet) // don't need to verify pings for non-internet games return true; if(theGame->GetHadSuccessfulPing()) return true; LobbyConfig *aConfig = LobbyConfig::GetLobbyConfig(); if(aConfig==NULL || aConfig->mAllowJoinGameWithoutPing) { // Warn that we haven't been able to ping the game yet if(LobbyPersistentData::GetShowConfirmations()) return LobbyDialog::DoOkCancelDialog(GameStagingLogic_ConnectWarningTitle3_String,GameStagingLogic_ConnectWarningDetails3_String)==ControlId_Ok; else return true; } LobbyMisc::QueuePing(theGame,true); LobbyEvent::BroadcastEvent(new GameChangedEvent(theGame,LobbyChangeType_Modify)); while(theGame->IsPinging()) { AsyncOpPtr anOp = new AsyncOp; LobbyDialog::DoStatusOp(anOp,GameStagingLogic_VerifyingPingTitle_String,GameStagingLogic_VerifyingPingDetails_String,CloseStatusDialogType_Any,500); if(anOp->Killed()) return false; } if(!theGame->GetHadSuccessfulPing()) { LobbyDialog::DoErrorDialog(GameStagingLogic_JoinGameErrorTitle_String,GameStagingLogic_NoPingReplyError_String); return false; } return true; }
void GameSpySupport::StaticGetServiceOpCompletion(AsyncOpPtr theOp, RefCountPtr theGameSpy) { GameSpySupport *aGameSpy = (GameSpySupport*)theGameSpy.get(); GetServiceOp *anOp = (GetServiceOp*)theOp.get(); aGameSpy->GetServiceOpCompletion(anOp); }
void MultiPingOp::StaticTimeoutCallback(AsyncOpPtr theOp, RefCountPtr theParam) { MultiPingOp *thisOp = (MultiPingOp*)theParam.get(); thisOp->TimeoutCallback((AsyncOp*)theOp.get()); }
void MultiPingOp::StaticRecvCallback(AsyncOpPtr theOp, RefCountPtr theParam) { MultiPingOp *thisOp = (MultiPingOp*)theParam.get(); RecvBytesFromOp *aRecvOp = (RecvBytesFromOp*)theOp.get(); thisOp->RecvCallback(aRecvOp); }