inline TInt DMemSamplerImpl::EncodeChunkData(DThread& t) { LOGTEXT("MemSamplerImpl::EncodeChunkData - entry"); //LOGSTRING2("MemSamplerImpl::EncodeChunkData - processing thread 0x%x ",&t); // the size of the following name is in the first byte TUint8* size = &sample[0]; *size = 0; this->sampleDescriptor.Zero(); LOGTEXT("MemSamplerImpl::EncodeChunkData - cleared"); this->sampleDescriptor.Append((TUint8*)&(t.iId),sizeof(TUint)); *size += sizeof(TUint); // copy the total amount of memory allocated for user side stack this->sampleDescriptor.Append((TUint8*)&(t.iUserStackSize),sizeof(TInt)); *size += sizeof(TInt); TInt zero(0); // append the cell amount allocated (zero, not in use here) this->sampleDescriptor.Append((TUint8*)&zero,sizeof(TInt)); *size += sizeof(TInt); // append the chunk size (this is not a chunk) this->sampleDescriptor.Append((TUint8*)&(zero),sizeof(TUint)); *size += sizeof(TUint); // append user stack (max) size this->sampleDescriptor.Append((TUint8*)&(t.iUserStackSize),sizeof(TInt)); *size += sizeof(TInt); LOGSTRING2("Data -> %d",*size); return ((TInt)(*size))+1; }
TInt CATBase::ValidateExpectString() /** * New version ValidateExpectStringL which returns an error code * as opposed to leaving. * Use of this new code should hopefully remove alot of * unesseccary TRAP harness in the TSY. */ { TInt ret(KErrNone); if(iIo->FoundChatString()!=iOKExpectString) { if(iIo->FoundChatString()==iErrorExpectString) { LOGTEXT(_L8("Modem returned ERROR in response to command")); ret=KErrGeneral; } else { LOGTEXT(_L8("Modem returned unexpected response to command")); ret=KErrUnknown; } } return ret; }
void CLogServBackupManager::RunL() // // This method does two things // // 1) Keeps trying to create a backup object - which may fail on device // bootup until the ui framework starts the backup server. // // 2) Handles the case where the server fails to restart correctly after a backup - it keeps trying // { LOGTEXT2("CLogServBackupManager::RunL(%d)", iStatus.Int()); if (!iBackup) { LOGTEXT("CLogServBackupManager::RunL() - trying to create backup object"); // Keep trying to create backup object iBackup = CreateBackupL(*iDatabaseName); LOGTEXT("CLogServBackupManager::RunL() - backup object created okay"); } else { // This branch is executed if we failed to create the backup object on our first // attempt in BISetDatabaseNameL LOGTEXT("CLogServBackupManager::RunL() - notifying observers about dummy backup ended event"); NotifyObservers(MLogServBackupObserver::EBackupEnded); } LOGTEXT("CLogServBackupManager::RunL() - end"); }
void CATCommands::Complete(TInt aError,TEventSource /*aSource*/) // // Should be called by all Complete()'s before ReqCompleted() // { LOGTEXT(_L8("CATCommands::Complete called")); if (aError==KErrTimedOut) { LOGTEXT(_L8("CATCommands::Complete KErrTimedOut error, setting EPhoneNotIntialised")); iPhoneGlobals->iPhoneStatus.iInitStatus = EPhoneNotInitialised; } // Clear the flow control flag to show no AT commands are writing to the // serial port. iPhoneGlobals->iEventSignalActive = EFalse; // Allow the CReceiveSmsQueue object to read PDUs from the phones memory, if needed if(iPhoneGlobals->iReceiveSmsQueuePtr) iPhoneGlobals->iReceiveSmsQueuePtr->ReadPDUFromPhone(); // Check the flow control flag, as the previous lines may have started off a // AT command. // If the flow control is clear then allow the Check ForChangeOfNetwork to have // a go at updating its status and writing to the serial port. if (!(iPhoneGlobals->iEventSignalActive)) iPhoneGlobals->CheckForChangeOfNetwork(); }
// --------------------------------------------------------------------------- // CUnsolicitedEventMonitor::NotifyEveryObserver // other items were commented in a header // --------------------------------------------------------------------------- void CUnsolicitedEventMonitor::NotifyEveryObserver() { LOGTEXT(_L8("[Ltsy] Starting CUnsolicitedEventMonitor::NotifyEveryObserver()")); CAtCommandBase *cAtBase(NULL); TRAPD(err, cAtBase = &GetAtCommandByAtTypeL(ELtsyAT_General_WIND)); if (err == KErrNoMemory) { return; } CATUnsolicited* unsolicited = dynamic_cast<CATUnsolicited*>(cAtBase); if (unsolicited == NULL) { LOGTEXT(_L8("[Ltsy] Dynamic cast class CAtCommandBase to class CATUnsolicited failing")); return; } if (unsolicited->GetParserResult() != KErrNone) { LOGTEXT(_L8("[Ltsy] parse unsolicited command error")); return; } TUnsolicitedParams::TUnsolicitedParamsPckgBuf* pckg = (TUnsolicitedParams::TUnsolicitedParamsPckgBuf*)(&(unsolicited->GetUnsolicitedParams())); TInt nEvent = (*pckg)().iEvent; TInt count = iArray.Count(); for (TInt n = 0; n < count; n++) { MLtsyUnsolicitedCommandObserver* observer = iArray[n]; observer->UnsolicitedCommandArriving(nEvent, (*pckg)); } }
int CDirectXRenderLayer::initDevice(unsigned int adapter, TRasterizationType rasterization, const TDisplayMode& displayMode) { if (mD3DInterface) { D3DDEVTYPE devType; releaseResources(); devType = convertRasterizationTypeToDevType(rasterization); // Filling present parameters... memcpy(&mDeviceDisplayMode, &displayMode, sizeof(TDisplayMode)); mCurrentFormat = convertTFormatToD3DFormat(displayMode.mFormat); ZeroMemory(&mPresentParams, sizeof(mPresentParams)); mPresentParams.Windowed = FALSE; mPresentParams.BackBufferWidth = displayMode.mWidth; mPresentParams.BackBufferHeight = displayMode.mHeight; mPresentParams.BackBufferCount = 1; mPresentParams.FullScreen_RefreshRateInHz = displayMode.mRefreshRate; mPresentParams.PresentationInterval = D3DPRESENT_INTERVAL_DEFAULT; mPresentParams.BackBufferFormat = mCurrentFormat; /* TODO: Try to use D3DSWAPEFFECT_FLIP for better performance. Maybe store pointers to two back buffers and then swap them right after presentScene(). */ mPresentParams.SwapEffect = D3DSWAPEFFECT_COPY; mPresentParams.Flags = 0; // Creating device... if (FAILED(mD3DInterface->CreateDevice(adapter, devType, mHwnd, D3DCREATE_HARDWARE_VERTEXPROCESSING, &mPresentParams, &mD3DDevice))) { LOGTEXT("CDirectXRenderLayer: CreateDevice() with hardware vertex processing failed"); if (FAILED(mD3DInterface->CreateDevice(adapter, devType, mHwnd, D3DCREATE_SOFTWARE_VERTEXPROCESSING, &mPresentParams, &mD3DDevice))) { LOGTEXT("CDirectXRenderLayer: CreateDevice() with software vertex processing failed"); releaseResources(); return E_FAILED; } } // Retrieving device capabilities... if (FAILED(mD3DInterface->GetDeviceCaps(adapter, devType, &mDeviceCaps))) { LOGTEXT("CDirectXRenderLayer: GetDeviceCaps() failed"); releaseResources(); return E_FAILED; } mMaxPrimitiveCount = XMATH_MIN(mDeviceCaps.MaxPrimitiveCount, MAX_SPRITES_PER_TEXTURE * 2); // Creating font sprite... if (FAILED(D3DXCreateSprite(mD3DDevice, &mD3DFontSprite))) { LOGTEXT("CDirectXRenderLayer: D3DXCreateSprite() for font failed"); releaseResources(); return E_FAILED; } return resetDevice(); } LOGTEXT("CDirectXRenderLayer: initDevice() failed"); return E_FAILED; }
void CATBase::ParseBufferLC() // // Parses buffer // /** * This function is currently not used by the Etel regression test harness. */ { LOGTEXT(_S8("CATBase Parse the Buffer List")); iBuffer.Set(iIo->GetRxBufferLC(iBufferMarker)); TInt pos=iBuffer.FindF(KOKString); if(pos==KErrNotFound) { LOGTEXT(_S8("CATBase Error - Cannot find OK'")); User::Leave(pos); } // Place everything before the OK into buffer iBuffer.Set(iBuffer.Left(pos)); TLex8 yyLex(iBuffer); TChar peek; // Look for '=' sign and move seeker cursor to the right of it if it exists pos=iBuffer.Find(_L8("=")); if (pos!=KErrNotFound) { yyLex.Inc(pos+1); } // Move cursor past any spaces or open brackets yyLex.SkipSpace(); peek=yyLex.Peek(); if ((TUint)peek=='(' || (TUint)peek=='[' || (TUint)peek=='{') yyLex.Inc(); yyLex.SkipSpace(); peek = yyLex.Peek(); do { // Search for the next character that is not a comma, and mark it. Keep looking at // subsequent characters until it is a space,comma,closing bracket or end of string. // Store the string (between marked character and current character) as an item in // an array of CATParamListEntry object pointers. if (peek!=',') { yyLex.Mark(); do { yyLex.Inc(); peek=yyLex.Peek(); } while (peek!=',' && !peek.IsSpace() && peek!=')'&& peek!=']'&& peek!='}' && !yyLex.Eos()); CATParamListEntry* aParamListEntry = new (ELeave) CATParamListEntry(yyLex.MarkedToken()); iRxResults.AddLast(*aParamListEntry); } // Move cursor to the next non-space character, and end the loop if it is a closing // bracket or the end of the buffer. yyLex.Inc(); yyLex.SkipSpace(); peek = yyLex.Peek(); } while (!yyLex.Eos() && peek!=')'&& peek!=']'&& peek!='}'); }
// --------------------------------------------------------------------------- // CCommEngine::CommReadComplete // other items were commented in a header // --------------------------------------------------------------------------- void CCommEngine::CommReadComplete(TInt aStatus) { LOGTEXT(_L8("[Ltsy] Starting CCommEngine::CommReadComplete()")); LOGTEXT2(_L8("[Ltsy] aStatus = %d"), aStatus); LOGTEXT2(_L8("Received %d"),iRxBuf.Length()); LOGTEXTREL2(_L8("Rx:\t%S"),&iRxBuf); if (KErrNone == aStatus) { if (NULL != iStringParse) { iStringParse->ProcessReadString(iRxBuf); } CommReadOneOrMore(); } else { if (NULL != iEngineObserver) { iEngineObserver->ReadOrWriteComplete(EReadCompletion, aStatus); } } LOGTEXT(_L8("[Ltsy] End CCommEngine::CommReadComplete()")); }
void CATSubscriberId::Stop(TTsyReqHandle aTsyReqHandle) { __ASSERT_ALWAYS(aTsyReqHandle == iReqHandle, Panic(EIllegalTsyReqHandle)); LOGTEXT(_L8("MmTsy:\tCATSubscriberId:\tCancel called.")); switch(iState) { case EATNotInProgress: case EATImsiWaitForWriteComplete: { LOGTEXT2(_L8("Current state TSY is cancelling from %d"), iState); Complete(KErrCancel, EReadCompletion); } break; default: { LOGTEXT(_L8("MmTsy:\tCATSubscriberId:\tStop, now waiting for expected modem response")); AddStdExpectStrings(); iIo->SetTimeOut(this); iState = EATWaitForStopState; } break; } }
void CProfilerPowerListener::Sample() { LOGTEXT(_L("CProfilerPowerListener::Sample() - entry")); TRequestStatus status; CHWRMPower::TBatteryConsumptionData consumptionData; iPowerAPI->GetBatteryInfo(status, consumptionData); User::WaitForRequest(status); // Data is valid only if status == KErrNone if (status.Int() != KErrNone) { LOGSTRING2("CProfilerPowerListener::Sample() - Getting battery info failed with code: ", status.Int()); iNominalCapa = 0; } else { iNominalCapa = consumptionData.iNominalCapacity; } // Space for GPP sample time //TUint32 sampleTime = iSampler->iStream->iSampler->GetSampleTime(); TUint32 sampleTime = User::NTickCount() - iSampleStartTime; LOGSTRING2("CProfilerPowerListener::Sample() - Sample time: %d", sampleTime); LOGSTRING2("CProfilerPowerListener::Sample() - Nominal capacitance: %d", iNominalCapa); LOGSTRING2("CProfilerPowerListener::Sample() - Voltage: %d", iVoltage); LOGSTRING2("CProfilerPowerListener::Sample() - Current: %d", iCurrent); #ifdef PWR_SAMPLER_BACKLIGHT LOGSTRING2("CProfilerPowerListener::Sample() - Backlight status: %d", (TUint8)iBackLightStatus); #endif iSample[0] = iNominalCapa; iSample[1] = iNominalCapa >> 8; iSample[2] = iVoltage; iSample[3] = iVoltage >> 8; iSample[4] = iCurrent; iSample[5] = iCurrent >> 8; iSample[6] = iCurrent >> 16; iSample[7] = iCurrent >> 24; #ifdef PWR_SAMPLER_BACKLIGHT iSample[8] = (TUint8)iBackLightStatus; iSample[9] = sampleTime; iSample[10] = sampleTime >> 8; iSample[11] = sampleTime >> 16; iSample[12] = sampleTime >> 24; iSampler->AddSample(iSample, 13, 0); #else iSample[8] = sampleTime; iSample[9] = sampleTime >> 8; iSample[10] = sampleTime >> 16; iSample[11] = sampleTime >> 24; iSampler->AddSample(iSample, 12, 0); #endif LOGTEXT(_L("CProfilerPowerListener::Sample() - exit")); }
TInt CPwrPlugin::CreateFirstSample() { LOGTEXT(_L("CPwrPlugin::CreateFirstSample - entry")); this->iVersionDescriptor.Zero(); this->iVersionDescriptor.Append(_L8("Bappea_PWR_V")); this->iVersionDescriptor.Append(PROFILER_PWR_SAMPLER_VERSION); LOGTEXT(_L("CPwrPlugin::CreateFirstSample - exit")); return (TInt)(this->iVersionDescriptor.Length()); }
TInt CMobilePhonebookStore::Read(TTsyReqHandle aTsyReqHandle, RMobilePhoneBookStore::TPBIndexAndNumEntries* aIndexAndEntries, TDes8* aPBData) /** Read one or a number of Phone Book Enties * * This function reads the phone book entries from the current * phone book store. * @param aTsyReqHandle Handle to the request ID. * @param aIndexAndEntries is a pointer to an index and a number of entries. * @param aPBData is a pointer to a packet. * @return error code. */ { LOGTEXT(_L8("CMobilePhonebookStore::Read called")); if (!(iReadWriteAccess&RMobilePhoneStore::KCapsReadAccess)) { LOGTEXT(_L8("CMobilePhonebookStore::Read Completing with KErrAccessDenied as read access is not allowed")); ReqCompleted(aTsyReqHandle,KErrAccessDenied); return KErrNone; } iRead->SetPBData(aPBData); // Store index & number of entries so we can modify/truncate it if required iIndexAndEntries=*aIndexAndEntries; // If we already have information about this phonebook // Check client has supplied valid locations - otherwise send command anyway if (iInfo->Completed()) { // Allow CATPhoneBookInfo to map our clients index value (1..x) // the this specific phone store index values (1+y..x+y) // For the Motorola T260 SM phone book store y will be 100 LOGTEXT(_L8("CMobilePhonebookStore::Read Mapping clients index to phone index")); iInfo->MapClientIndexToPhoneIndex(iIndexAndEntries.iIndex); if (iInfo->IsValidPhoneIndex(iIndexAndEntries.iIndex)) { if (!iInfo->IsValidPhoneIndex(iIndexAndEntries.iIndex+iIndexAndEntries.iNumSlots-1)) { // Invalid finishing index - truncate to last valid one iIndexAndEntries.iNumSlots = iInfo->TotalEntries()-iIndexAndEntries.iIndex+1 ; } } else { // Invalid starting index - complete request with error LOGTEXT(_L8("CMobilePhonebookStore::Read\t Index out of range")); ReqCompleted(aTsyReqHandle,KErrArgument); // The Index is out of range. return KErrNone; } } // We either have valid index or entries - or are trying anyway iRead->ExecuteCommand(aTsyReqHandle, &iIndexAndEntries); return KErrNone; }
CProfilerPowerListener* CProfilerPowerListener::NewL(CPwrPlugin* aSampler) { LOGTEXT(_L("CProfilerPowerListener::NewL() - entry")); CProfilerPowerListener* self = new (ELeave) CProfilerPowerListener(aSampler); CleanupStack::PushL( self ); self->ConstructL(); CleanupStack::Pop(); LOGTEXT(_L("CProfilerPowerListener::NewL() - exit")); return self; }
CPwrPlugin* CPwrPlugin::NewL(const TUid /*aImplementationUid*/, TAny* aInitParams) { LOGTEXT(_L("CPwrPlugin::NewL() - entry")); CPwrPlugin* self = new (ELeave) CPwrPlugin(); CleanupStack::PushL( self ); self->ConstructL(); CleanupStack::Pop(); LOGTEXT(_L("CPwrPlugin::NewL() - exit")); return self; }
// --------------------------------------------------------------------------- // CCommEngine::DropDtr // other items were commented in a header // --------------------------------------------------------------------------- void CCommEngine::DropDtr() { LOGTEXT(_L8("[Ltsy] Starting CCommEngine::DropDtr()")); if (iPortAccess == EPortAccessAllowed) { LOGTEXT(_L8("[Ltsy] CCommEngine::DropDtr Dropping DTR")); iCommPort.SetSignals(0,KSignalDTR); } }
// --------------------------------------------------------------------------- // CCommEngine::RaiseRTS // other items were commented in a header // --------------------------------------------------------------------------- void CCommEngine::RaiseRTS() { LOGTEXT(_L8("[Ltsy] Starting CCommEngine::RaiseRTS()")); if (iPortAccess == EPortAccessAllowed) { LOGTEXT(_L8("[Ltsy] Raising RTS")); iCommPort.SetSignals(KSignalRTS,0); } }
/** Creates config and string LogEng caches. Finishes the initialization of the event types cache. @leave KErrNoMemory, an out of memory condition has occurred; Note that the function may leave with database specific errors or other system-wide error codes. */ void CLogServDatabaseMarshall::CreateCachesL() { // Create other cache objects (these require the database to be already opened) LOGTEXT("CLogServDatabaseMarshall::DatabaseOpenL() - creating config cache"); iCacheConfig = CLogServCacheConfig::NewL(*this); LOGTEXT("CLogServDatabaseMarshall::DatabaseOpenL() - creating string cache"); iCacheStrings = CLogServCacheStrings::NewL(*this); // Finish the type cache initialization LOGTEXT("CLogServDatabaseMarshall::DatabaseOpenL() - initializing type cache"); iCacheTypes->InitializeL(); }
// --------------------------------------------------------------------------- // CCommEngine::DropRTS // other items were commented in a header // --------------------------------------------------------------------------- void CCommEngine::DropRTS() { LOGTEXT(_L8("[Ltsy] Starting CCommEngine::DropRTS()")); if (iPortAccess == EPortAccessAllowed) { LOGTEXT(_L8("[Ltsy] Dropping RTS")); iCommPort.SetSignals(0,KSignalRTS); } }
// --------------------------------------------------------------------------- // CCommEngine::RaiseDTR // other items were commented in a header // --------------------------------------------------------------------------- void CCommEngine::RaiseDTR() { LOGTEXT(_L8("[Ltsy] Starting CCommEngine::RaiseDTR()")); if (iPortAccess == EPortAccessAllowed) { LOGTEXT(_L8("[Ltsy] CCommEngine::RaiseDTR Raising DTR")); iCommPort.SetSignals(KSignalDTR,0); } }
void CStringParser::ProcessReadString(const TDesC8& aReadString) { LOGTEXT(_L8("[Ltsy] Starting CStringParse::ProcessReadString()")); LOGTEXT2(_L8("[Ltsy] Read String = %S"), &aReadString); for (TInt nBufferOffset = 0; nBufferOffset < aReadString.Length(); nBufferOffset++) { TText8 tChar = aReadString[nBufferOffset]; // we have already found a char which is a delimiter of the Line // so would dismiss any of delimiter following this one already found if (iInDelimiter && (tChar == '\r' || tChar == '\n')) { continue; } // move on lastchar *iLastChar++ = tChar; // Diacarding characters if our buffer was overflowed if (iLastChar >= iBufferEnd) { iLastChar = iBufferEnd; } // we anyway to find out the delimiter and notify the obser the line was found if (tChar == '\r' || tChar == '\n') { iInDelimiter = ETrue; TPtrC8 tLine(CurrentLine()); LOGTEXT2(_L8("[Ltsy] Line Content = %S"), &tLine); TRAPD(err, iReadLineNotify->NotifyOneLineFoundL(KErrNone, tLine)); if (err != KErrNone) { ClearCurrentLine(); } } else { if(iInDelimiter) // the last char is a delimiter { iInDelimiter=EFalse; iLineStart=iLastChar-1; if(tChar == '>') { TPtrC8 tLine(CurrentLine()); TRAPD(err, iReadLineNotify->NotifyOneLineFoundL(KErrNone, tLine)); if (err != KErrNone) { ClearCurrentLine(); } } } } } LOGTEXT(_L8("[Ltsy] End CStringParse::ProcessReadString()")); }
void CPwrPlugin::ConstructL() { LOGTEXT(_L("CPwrPlugin::ConstructL() - entry")); // initiate sampler attributes array iSamplerAttributes = new(ELeave) CArrayFixFlat<TSamplerAttributes>(1); // only one sampler // insert default attributes to array InitiateSamplerAttributesL(); LOGTEXT(_L("CPwrPlugin::ConstructL() - exit")); }
void CATGprsDetach::Stop(TTsyReqHandle aTsyReqHandle) /** * This function attempts to cancel the AT state machine */ { LOGTEXT(_L8("CATGprsDetach::Stop called")); if(iState!=EATNotInProgress && aTsyReqHandle==iReqHandle) { LOGTEXT(_L8("CATGprsDetach::Stop Completing client request with KErrCancel")); Complete(KErrCancel,ETimeOutCompletion); } }
// --------------------------------------------------------------------------- // CCommEngine::Read // other items were commented in a header // --------------------------------------------------------------------------- void CCommEngine::Read() { LOGTEXT(_L8("[Ltsy] Starting CCommEngine::Read()")); iCommCancel = EFalse; if (iPortAccess == EPortAccessAllowed) { CommReadOneOrMore(); } else { LOGTEXT(_L8("[Ltsy] Port Not Allow Access")); } }
// --------------------------------------------------------------------------- // CAtPhbkEnGetInfo::EventSignal // other items were commented in a header // --------------------------------------------------------------------------- void CAtPhbkEnGetInfo::EventSignal(TAtEventSource aEventSource, TInt aStatus) { LOGTEXT3(_L8("CAtPhbkEnGetInfo::EventSignal aStatus=%D iSource=%D"),aStatus,aEventSource); if(aStatus != KErrNone) { Complete(); iPhoneGlobals.iEventSignalActive = EFalse; iCtsyDispatcherCallback.CallbackPhonebookEnStoreGetInfoComp(aStatus,iUsed); } else { if( aEventSource == EWriteCompletion ) { LOGTEXT(_L8("CAtPhbkEnGetInfo::EventSignal,EWriteCompletion!")); if( iState==ESetEnStore ) { iState = ESetEnStoreComplete; } else if( iState==EGetEnStoreInfo ) { iState = EGetEnStoreInfoComplete; } } else { LOGTEXT(_L8("CAtPhbkEnGetInfo::EventSignal,EReadCompletion!")); if( iState == ESetEnStoreComplete ) { Complete(); iPhoneGlobals.iEventSignalActive = EFalse; if(iError == KErrNone) { iState = EGetEnStoreInfo; GetEnStoreInfo(); } else { iCtsyDispatcherCallback.CallbackPhonebookEnStoreGetInfoComp(iError,iUsed); } } else if( iState == EGetEnStoreInfoComplete ) { Complete(); iPhoneGlobals.iEventSignalActive = EFalse; iCtsyDispatcherCallback.CallbackPhonebookEnStoreGetInfoComp(iError,iUsed); } } } }
void CLogServBackupManager::BISetDatabaseNameL(const TDesC& aDatabaseName) { #ifdef LOGGING_ENABLED LOGTEXT3("CLogServBackupManager::BISetDatabaseNameL(%S, isActive: %d)", &aDatabaseName, IsActive()); if (iDatabaseName) { LOGTEXT2("CLogServBackupManager::BISetDatabaseNameL() - currently registered database filename is: %S", iDatabaseName); } else { LOGTEXT("CLogServBackupManager::BISetDatabaseNameL() - no file registered with backup interface yet"); } #endif Cancel(); HBufC* databaseName = aDatabaseName.AllocLC(); // If we haven't already created a backup observer, then we need // to kick the object back into life again. if (!iBackup) { LOGTEXT("CLogServBackupManager::BISetDatabaseNameL() - no backup session created"); // Try and create backup interface synchronously first of all, if that fails // then construct as an idle operation TRAPD(err, iBackup = CreateBackupL(*databaseName)); LOGTEXT2("CLogServBackupManager::BISetDatabaseNameL() - backup session creation error: %d", err); if (err != KErrNone) After(0); } else if (iDatabaseName->Compare(aDatabaseName) != KErrNone) { LOGTEXT3("CLogServBackupManager::BISetDatabaseNameL() - database filename changed from %S to %S", &iDatabaseName, &aDatabaseName); // De register the old, register the new iBackup->DeregisterFile(*iDatabaseName); iBackup->RegisterFileL(aDatabaseName, *this); LOGTEXT("CLogServBackupManager::BISetDatabaseNameL() - database re-registration complete"); } delete iDatabaseName; iDatabaseName = databaseName; CleanupStack::Pop(databaseName); LOGTEXT("CLogServBackupManager::BISetDatabaseNameL() - end"); }
int CDirectXInputLayer::init() { releaseResources(); if (mDInputInterface) { // Creating keyboard... if (FAILED(mDInputInterface->CreateDevice(GUID_SysKeyboard, &mDInputKeyBoard, NULL))) { LOGTEXT("CDirectXInputLayer: CreateDevice() for KeyBoard failed"); return E_FAILED; } if (FAILED(mDInputKeyBoard->SetCooperativeLevel(mHwnd, DISCL_NONEXCLUSIVE | DISCL_BACKGROUND))) { LOGTEXT("CDirectXInputLayer: SetCooperativeLevel() for KeyBoard failed"); releaseResources(); return E_FAILED; } if (FAILED(mDInputKeyBoard->SetDataFormat(&c_dfDIKeyboard))) { LOGTEXT("CDirectXInputLayer: SetDataFormat() for KeyBoard failed"); releaseResources(); return E_FAILED; } if (FAILED(mDInputKeyBoard->Acquire())) { LOGTEXT("CDirectXInputLayer: Acquire() for KeyBoard failed"); releaseResources(); return E_FAILED; } // Creating mouse... if (FAILED(mDInputInterface->CreateDevice(GUID_SysMouse, &mDInputMouse, NULL))) { LOGTEXT("CDirectXInputLayer: CreateDevice() for Mouse failed"); releaseResources(); return E_FAILED; } if (FAILED(mDInputMouse->SetCooperativeLevel(mHwnd, DISCL_NONEXCLUSIVE | DISCL_BACKGROUND))) { LOGTEXT("CDirectXInputLayer: SetCooperativeLevel() for Mouse failed"); releaseResources(); return E_FAILED; } if (FAILED(mDInputMouse->SetDataFormat(&c_dfDIMouse))) { LOGTEXT("CDirectXInputLayer: SetDataFormat() for Mouse failed"); releaseResources(); return E_FAILED; } if (FAILED(mDInputMouse->Acquire())) { LOGTEXT("CDirectXInputLayer: Acquire() for Mouse failed"); releaseResources(); return E_FAILED; } return E_SUCCESS; } return E_FAILED; }
TInt DPriSamplerImpl::CreateFirstSample() { LOGTEXT("PriSamplerImpl::CreateFirstSample - entry"); this->sampleDescriptor.Zero(); this->sampleDescriptor.Append(_L8("Bappea_V")); this->sampleDescriptor.Append(PROFILER_PRI_SAMPLER_VERSION); this->sampleDescriptor.Append(_L8("_PRI")); sample[0] = this->sampleDescriptor.Size(); LOGTEXT("PriSamplerImpl::CreateFirstSample - exit"); return (TInt)(sample[0]+1); }
void CATBase::ValidateExpectStringL() /** * This function is currently not used by the Etel regression test harness. */ { if(iIo->FoundChatString()==iErrorExpectString) { LOGTEXT(_S8("CATBase Modem returned ERROR in response to command")); User::Leave(KErrGeneral); } if(iIo->FoundChatString()==iOKExpectString) return; LOGTEXT(_S8("CATBase Modem returned unexpected response to command")); User::Leave(KErrUnknown); }
void CProfilerPowerListener::LightStatusChanged(TInt aTarget, CHWRMLight::TLightStatus aStatus) { LOGTEXT(_L("CProfilerPowerListener::LightStatusChanged - entry")); LOGSTRING3("CProfilerPowerListener::LightStatusChanged - Target: %d Status: %d", aTarget, aStatus); if (aTarget == CHWRMLight::EPrimaryDisplay) { LOGSTRING2("CProfilerPowerListener::LightStatusChanged - Previous light status: %d", iBackLightStatus); iBackLightStatus = aStatus; LOGSTRING2("CProfilerPowerListener::LightStatusChanged - New light status: %d", iBackLightStatus); this->Sample(); } LOGTEXT(_L("CProfilerPowerListener::LightStatusChanged - exit")); }
TInt CMobilePhonebookStore::Write(TTsyReqHandle aTsyReqHandle, TDes8* aPBData, TInt* aIndex) /** Write a Phone Book Entry * * This function checks to see if the current phone book has Write Access; if it * does, an entry is written to the phone book store. * The function first creates the entry, then ensures there is space in the data * object, before writing the entry. * @param aTsyReqHandle Handle to the request ID. * @param aPBData is a pointer to a packet. * @param aIndex is a pointer to an entry in the phone book. * @return error code. */ { LOGTEXT(_L8("CMobilePhonebookStore::Write called")); if(!(iReadWriteAccess&RMobilePhoneStore::KCapsWriteAccess)) { ReqCompleted(aTsyReqHandle,KErrAccessDenied); return KErrNone; } // Take copy of clients data, as we do not want changes that we make here // to be reflected in the clients space. iIndex=*aIndex; iWrite->SetPBData(aPBData); // If we already have information about this phonebook // Check client has supplied valid location - otherwise send command anyway if (iInfo->Completed()) { // Allow CATPhoneBookInfo to map our clients index value (1..x) // the this specific phone store index values (1+y..x+y) // For the Motorola T260 SM phone book store y will be 100 LOGTEXT(_L8("CMobilePhonebookStore::Write Mapping clients index to phone index")); iInfo->MapClientIndexToPhoneIndex(iIndex); if(!iInfo->IsValidPhoneIndex(iIndex)) { LOGTEXT(_L8("CMobilePhonebookStore::Write\t Index out of range")); ReqCompleted(aTsyReqHandle,KErrArgument); // The Index is out of range. return KErrNone; } } iWrite->ExecuteCommand(aTsyReqHandle, &iIndex); return KErrNone; }