virtual void ResponseReceived(const VolumeCommand* aCommand) { switch (ResponseCode()) { case ::ResponseCode::VolumeListResult: { // Each line will look something like: // // sdcard /mnt/sdcard 1 // // So for each volume that we get back, we update any volumes that // we have of the same name, or add new ones if they don't exist. nsCWhitespaceTokenizer tokenizer(ResponseStr()); nsDependentCSubstring volName(tokenizer.nextToken()); RefPtr<Volume> vol = VolumeManager::FindAddVolumeByName(volName); vol->HandleVoldResponse(ResponseCode(), tokenizer); break; } case ::ResponseCode::CommandOkay: { // We've received the list of volumes. Now read the Volume.cfg // file to perform customizations, and then tell everybody // that we're ready for business. VolumeManager::DefaultConfig(); VolumeManager::InitConfig(); VolumeManager::Dump("READY"); VolumeManager::SetState(VolumeManager::VOLUMES_READY); break; } } }
virtual void ResponseReceived(const VolumeCommand *aCommand) { switch (ResponseCode()) { case ResponseCode::VolumeListResult: { // Each line will look something like: // // sdcard /mnt/sdcard 1 // // So for each volume that we get back, we update any volumes that // we have of the same name, or add new ones if they don't exist. nsCWhitespaceTokenizer tokenizer(ResponseStr()); nsDependentCSubstring volName(tokenizer.nextToken()); RefPtr<Volume> vol = VolumeManager::FindAddVolumeByName(volName); vol->HandleVoldResponse(ResponseCode(), tokenizer); break; } case ResponseCode::CommandOkay: { // We've received the list of volumes. Tell anybody who // is listening that we're open for business. VolumeManager::SetState(VolumeManager::VOLUMES_READY); break; } } }
// ----------------------------------------------------------------------------- // MceSip::ResponseType // ----------------------------------------------------------------------------- // TMceSipResponseType MceSip::ResponseType( CSIPClientTransaction& aResponse ) { TUint responseCode = ResponseCode( aResponse ); return ResponseType( responseCode ); }
void AutoMounterResponseCallback::ResponseReceived(const VolumeCommand* aCommand) { if (WasSuccessful()) { DBG("Calling UpdateState due to Volume::OnSuccess"); mErrorCount = 0; sAutoMounter->UpdateState(); return; } ERR("Command '%s' failed: %d '%s'", aCommand->CmdStr(), ResponseCode(), ResponseStr().get()); if (++mErrorCount < kMaxErrorCount) { DBG("Calling UpdateState due to VolumeResponseCallback::OnError"); sAutoMounter->UpdateState(); } }