本文整理汇总了C++中INFO_PRINTF1函数的典型用法代码示例。如果您正苦于以下问题:C++ INFO_PRINTF1函数的具体用法?C++ INFO_PRINTF1怎么用?C++ INFO_PRINTF1使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了INFO_PRINTF1函数的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: INFO_PRINTF1
TVerdict CTestStepCIG711EncoderConfig::DoTestStep0046L()
{
iTestStepResult = EFail;
TInt result = KErrGeneral;
INFO_PRINTF1(_L("G711EncoderIntfc - SetEncoderMode"));
//Initialize - with the UID of our test HwDevice
#ifndef SYMBIAN_MULTIMEDIA_A3FDEVSOUND
TUid testUID = {KUidG711EncoderConfigTestDevice};
#else
TFourCC testUID('T','0','1','6');
#endif
iTestStepResult = TestInitialize(testUID, EMMFStatePlaying);
if (iTestStepResult != EPass)
{
INFO_PRINTF1(_L("DevSound failed to instantiate the test device"));
return EInconclusive;
}
// reset the value as previous test is pass
iTestStepResult = EFail;
// KUidG711EncoderIntfc
MG711EncoderIntfc* ptr = static_cast <MG711EncoderIntfc*> (iMMFDevSound->CustomInterface(KUidG711EncoderIntfc));
if (ptr)
{
MG711EncoderIntfc::TEncodeMode encodeMode = MG711EncoderIntfc::EEncULaw;
TInt setEncodeMode = MG711EncoderIntfc::EEncALaw;
result = ptr->SetEncoderMode(encodeMode) ; // call method
if (result == KErrNone)
{
// This file is created by the test stub, the plugin device
_LIT(KFileName, "c:\\temp\\g711EncoderConfig.txt");
ReadFileL(KFileName, setEncodeMode);
if (static_cast<MG711EncoderIntfc::TEncodeMode>(setEncodeMode) == encodeMode)
{
INFO_PRINTF1(_L("MG711EncoderIntfc::SetEncoderMode finished successfully"));
iTestStepResult = EPass;
}
else
{
ERR_PRINTF2(_L("MIlbcEncoderIntfc::SetEncoderMode failed with encodeMode %d"), encodeMode);
}
}
else
{
ERR_PRINTF2(_L("MG711DecoderIntfc::SetEncoderMode failed with error %d"), result);
}
}
else
{
INFO_PRINTF1(_L("MG711DecoderIntfc failed to retrieve the interface"));
iTestStepResult = EInconclusive;
}
return iTestStepResult;
}
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:66,代码来源:teststepcig711encoderconfig.cpp
示例2: process
/**
@SYMTestCaseID APPFWK-APPARC-0015
@SYMPREQ PREQ1123
@SYMTestCaseDesc The Test determines that the Child dies when its Parent is terminated.
@SYMTestPriority Critical
@SYMTestStatus Implemented
@SYMTestActions. Creates and launches a process (parent). Creates another process (child) passing the first(parent) process ID.
Launches the child process. Terminates parent and checks the existance of child process. The child should die.
API Calls:\n
RProcess::Create(const TDesC &aFileName, const TDesC &aCommand, TOwnerType aType=EOwnerProcess);\n
RProcess::Resume();
RProcess::ExitType() const;
RProcess::ExitReason() const;
RProcess::Id() const;
CApaCommandLine::SetProcessEnvironmentL(RProcess &aProcess) const;
CApaCommandLine::NewLC();
CApaCommandLine::SetParentProcessId(TProcessId);
@SYMTestExpectedResults Termination of child process automatically.\n
*/
void CT_ProcStep::testChildSetToTerminateL(void)
{
TInt ret(0);
//commandline for parent process
CApaCommandLine* parentProcCmdln=CApaCommandLine::NewLC();
INFO_PRINTF1(_L(" CommandLine for Parent Process created "));
//parent process
RProcess parentProc;
ret = parentProc.Create(KParentExe,KNullDesC);
TEST(ret == KErrNone);
User::LeaveIfError(ret);
CleanupClosePushL(parentProc);
INFO_PRINTF2(_L(" Create Parent Process returned : %d"),ret);
//attach commandline to parent process
TRAP(ret,parentProcCmdln->SetProcessEnvironmentL(parentProc));
TEST(ret == KErrNone);
User::LeaveIfError(ret);
INFO_PRINTF1(_L(" Attach CommandLine to Process "));
INFO_PRINTF1(_L(" Run Parent Process "));
parentProc.Resume();
//Time for the parent process to launch itself
User::After(500000);
//commandline for child process
//Get parent process ID here
TUint64 parentProcId = parentProc.Id();
INFO_PRINTF2(_L(" Parent Process Id = 0x%lx "),parentProcId);
CApaCommandLine* childProcCmdln=CApaCommandLine::NewLC();
INFO_PRINTF1(_L(" CommandLine for Child Process created "));
//setting the parent process ID to child
childProcCmdln->SetParentProcessId(parentProcId);
INFO_PRINTF1(_L(" Set ParentProcessId to Child "));
//child process
RProcess childProc;
ret = childProc.Create(KChildOneExe,KNullDesC);
TEST(ret == KErrNone);
User::LeaveIfError(ret);
CleanupClosePushL(childProc);
INFO_PRINTF2(_L(" Create Child Process returned : %d"),ret);
//attach commandline to child process
TRAP(ret,childProcCmdln->SetProcessEnvironmentL(childProc));
TEST(ret == KErrNone);
User::LeaveIfError(ret);
INFO_PRINTF1(_L(" Attach CommandLine to Process "));
INFO_PRINTF1(_L(" Run Child Process "));
childProc.Resume();
//Time for the child process to launch itself
User::After(500000);
//child process Id is reqd to monitor if it gets killed on its parent's termination
TUint64 childProcId = childProc.Id();
INFO_PRINTF2(_L(" Child Process Id = 0x%lx "),childProcId);
CChildProcess* childProcess=NULL;
TRAP(ret, childProcess=CChildProcess::NewL(parentProc,childProcId));
TEST(ret == KErrNone);
User::LeaveIfError(ret);
CleanupStack::PushL(childProcess);
TExitType exitType = parentProc.ExitType();
TEST(exitType == EExitTerminate);
TInt exitReason = parentProc.ExitReason();
TEST(exitReason == 0);
if(exitType==EExitTerminate && exitReason==0)
//.........这里部分代码省略.........
开发者ID:cdaffara,项目名称:symbiandump-mw1,代码行数:101,代码来源:T_ProcStep.cpp
示例3: TRAP
//.........这里部分代码省略.........
//open a new non-existing file for recording
TRAP(err, iRecorder->OpenFileL(iFileName2));
if (err != KErrNone ||
iError != KErrNone)
return EInconclusive;
CActiveScheduler::Start();
if (iError != KErrNone)
return EFail;
// check the number of supported bitrates
// just checking that there are some bitrates available
TRAP(err, iRecorder->GetSupportedBitRatesL(supBitRates));
if ( err != KErrNotSupported ) // KErrNotSupported expected
{
if (err != KErrNone ||
supBitRates.Count() <= 0 )
return EFail;
}
// set the destination bitrate to a specific one of our choice
TRAP(err, iRecorder->SetDestinationBitRateL(64000));
//NB KErrNotSupported is a valid response, the format used may not support this ability
//If it is supported, read the value to confirm it was correctly set.
if ( err != KErrNotSupported )
{
if (err != KErrNone)
return EFail;
//get the newly set type
//and check if it has been set correctly
TRAP(err, bitrate = iRecorder->DestinationBitRateL());
if ( err != KErrNotSupported )
{
if (err != KErrNone ||
bitrate != 64000)
return EFail;
}
}
TInt errorSetDestinationBitRate = err;
//get the newly set type
//and check if it has been set correctly
TRAP(err, bitrate = iRecorder->DestinationBitRateL());
if ( err != KErrNotSupported )
{
if (err != KErrNone ||
(errorSetDestinationBitRate == KErrNone && bitrate != 64000))
return EFail;
}
}
else // IsConverterTest == ETrue
{
// get source file known bitrate
// (wav file 8KHz x 16 bit = 128 Kbps)
// and check if type correct
TRAP(err, bitrate = iConvert->SourceBitRateL());
if (err != KErrNone ||
bitrate != 128000)
return EFail;
// check the number of supported bitrates
// just checking that there are some bitrates available
TRAP(err, iConvert->GetSupportedConversionBitRatesL(supBitRates));
if ( err != KErrNotSupported ) // KErrNotSupported expected
{
if (err != KErrNone ||
supBitRates.Count() <= 0 )
return EFail;
}
// set the destination bitrate to a specific one of our choice
TRAP(err, iConvert->SetDestinationBitRateL(64000));
//NB KErrNotSupported is a valid response, the format used may not support this ability
//If it is supported, read the value to confirm it was correctly set.
if ( err != KErrNotSupported )
{
if (err != KErrNone)
return EFail;
}
TInt errSetDestinationBitRate = err;
//get the newly set type
//and check if it has been set correctly
TRAP(err, bitrate = iConvert->DestinationBitRateL());
if ( err != KErrNotSupported )
{
if ((err == KErrNone && errSetDestinationBitRate == KErrNone && bitrate != 64000)
|| (err != KErrNone))
return EFail;
}
}
INFO_PRINTF1(_L("finished with this test step"));
// test steps return a result
return iTestStepResult;
}
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:101,代码来源:TestStepRecorderDestination.cpp
示例4: INFO_PRINTF1
TBool CUISisAdaptor::DisplayUpgradeL(const CAppInfo& /*aAppInfo*/,
const CAppInfo& /*aExistingAppInfo*/)
{
INFO_PRINTF1(_L("DisplayUpgradeL():"));
return ETrue;
}
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:6,代码来源:ctlbsinstallui.cpp
示例5: INFO_PRINTF1
/**
* Load and initialise an audio file.
*/
TVerdict CTestMmfAclntFileSource::DoTestStepL( void )
{
INFO_PRINTF1( _L("TestPlayerUtils : File"));
TVerdict ret = EFail;
iError = KErrTimedOut;
TBuf<KSizeBuf> filename;
TPtrC filename1;
if(!GetStringFromConfig(iSectName,iKeyName,filename1))
{
return EInconclusive;
}
GetDriveName(filename);
filename.Append(filename1);
// Create CMdaAudioPlayerUtility Object
CMdaAudioPlayerUtility* player = NULL;
player = CMdaAudioPlayerUtility::NewL(*this);
// Create TMMFileSource Object
TMMFileSource filesource(filename);
player->OpenFileL(filesource);
// Wait for initialisation callback
INFO_PRINTF1(_L("Initialise CMdaAudioPlayerUtility"));
CActiveScheduler::Start();
// Check for expected errors.
if(iError != KErrNone && (iExpectedError == iError))
{
ret = EPass; // all other tests pass
delete player;
User::After(KOneSecond); // wait for deletion to shut down devsound
ERR_PRINTF2( _L("CMdaAudioPlayerUtility failed with expected error %d"),iError );
return ret;
}
// Check for errors (after OPEN).
if (iError == KErrNone && player != NULL)
{
if(iPlay)
{
iError = KErrTimedOut;
player->Play();
// Wait for play complete callback
INFO_PRINTF1(_L("Play CMdaAudioPlayerUtility"));
CActiveScheduler::Start();
// Check for Callback errors
if(iError == KErrNone)
{
ret = EPass;
}
}
else
{
ret = EPass;
}
}
// Clean up activities.
delete player;
User::After(KOneSecond); // wait for deletion to shut down devsound
// Check for errors (final check).
if(iError != KErrNone)
{
ERR_PRINTF2( _L("CMdaAudioPlayerUtility failed with error %d"),iError );
}
return ret;
}
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:78,代码来源:TestPlayerFileSource.cpp
示例6: CleanupClosePushL
void CTestContactsPBAPExport::ExportContactsL()
{
TInt err = KErrNone;
// Retrieve the file name to which contact item is to be exported
RFs fsSession;
RFileWriteStream writeStream;
// connect to file system
User::LeaveIfError(fsSession.Connect());
CleanupClosePushL(fsSession);
GetInputFromIni();
// Makes one or more directories.
fsSession.MkDirAll(iExportTo);
// Replaces a single file with another
User::LeaveIfError(writeStream.Replace(fsSession, iExportTo, EFileWrite));
INFO_PRINTF1(_L("Exporting Contact....."));
// Existing database
TPtrC databaseFile(_L("C:contactDb.cdb"));
CContactDatabase* dBase = NULL;
CContactIdArray* idArray = NULL;
// Open the existing database
dBase = CContactDatabase::OpenL(databaseFile);
CleanupStack::PushL(dBase);
// Create Utility class object, to export the contact from database
CTestStep* self = static_cast<CTestStep*>(this);
iExportObj = new(ELeave) CContactsPBAPExportUtilityClass(self);
SetFilterL();
CCntFilter* exportFilter = CCntFilter::NewL();
CleanupStack::PushL(exportFilter);
// Get all the contacts from the database to export
exportFilter->SetContactFilterTypeCard(ETrue);
dBase->FilterDatabaseL(*exportFilter);
idArray = exportFilter->iIds;
CleanupStack::PushL(idArray);
if(iDamageDb)
{
#ifdef _DEBUG
#ifndef __SYMBIAN_CNTMODEL_USE_SQLITE__
TRAPD(err1,dBase->DamageDatabaseL(0x666));
if(err1 == KErrNone)
{
TRAPD(err,iExportObj->ExportvCardL(dBase, iStandard, idArray, writeStream, iContactFilter));
INFO_PRINTF2(_L("Err:%d"),err);
if(err == KErrNotReady)
{
SetTestStepResult(EPass);
}
else
{
SetTestStepResult(EFail);
}
if(dBase->IsDamaged())
{
dBase->RecoverL();
}
}
else
{
INFO_PRINTF2(_L("Could not damage database Err:"),err1);
}
#else
SetTestStepResult(EPass);
#endif
#endif
}
else
{
if(iInvalidFileSystem)
{
#ifdef _DEBUG
fsSession.SetErrorCondition(KErrNotReady);
TRAPD(err,iExportObj->ExportvCardL(dBase, iStandard, idArray, writeStream, iContactFilter));
if(err == KErrNotReady)
{
SetTestStepResult(EPass);
}
else
{
SetTestStepResult(EFail);
}
fsSession.SetErrorCondition(KErrNone);
#endif
}
else
{
if(!iSetOOM)
{
if(idArray->Count() > 0)
//.........这里部分代码省略.........
开发者ID:Esclapion,项目名称:qt-mobility,代码行数:101,代码来源:testcontactspbapexport.cpp
示例7: INFO_PRINTF1
/**
Function : doTestStepL
Description : Reads the Imap account name from the ini file.
It establishes connection with the IMAP server and performs
a background synchronisation.
@internalTechnology
@param :
@return : TVerdict - Test step result
*/
TVerdict CT_MsgConnectAndSyncImap4Server::doTestStepL()
{
INFO_PRINTF1(_L(" Test Step : ConnectAndSyncIMAP4Server"));
TPtrC imapAccountName;
if(!GetStringFromConfig( ConfigSection(), KImapAccountName, imapAccountName))
{
ERR_PRINTF1(_L("Imap Account Name is not specified"));
SetTestStepResult(EFail);
}
if( TestStepResult() == EPass )
{
TInt time = 0;
GetIntFromConfig( ConfigSection(),KTime,time);
// Retrieving the Imap service Id for the given Imap account
TMsvId imapServiceId = CT_MsgUtilsCentralRepository::GetImapServiceIdL((TDes&)imapAccountName);
INFO_PRINTF2(_L("Imap service id is %d"),imapServiceId );
// Change the current context
iSharedDataIMAP.iMtm->SwitchCurrentEntryL(imapServiceId);
CMsvEntrySelection* selection = new (ELeave) CMsvEntrySelection;
CleanupStack::PushL(selection);
// Appends the imapServiceId onto the end of the array
selection->AppendL(imapServiceId);
TBuf8<1> param;
// Attempts to connect and sync to the Imap4 Service
CT_MsgActive& active=Active();
iOperation = iSharedDataIMAP.iMtm->InvokeAsyncFunctionL(KIMAP4MTMConnectAndSynchronise, *selection, param, active.iStatus);
active.Activate();
CActiveScheduler::Start();
//Check result of connect and sync operation for errors
TInt errConnection=active.Result();
if (errConnection<KErrNone)
{
ERR_PRINTF2(_L("Error connecting to service,, failed with %d error"),errConnection);
SetTestStepResult(EFail);
}
//Reads Int flag to cancel from ini file if aCancelFlag is 1,
//then cancel operation, otherwise ignore
TInt aCancelFlag=0;
GetIntFromConfig(ConfigSection(),KCancelSync,aCancelFlag);
//do we want to cancel the synchronisation?
if (aCancelFlag==1)
{
delete iOperation;
iOperation=NULL;
User::After(1000000);
TBuf8<16> param2;
CT_MsgActive& active2=Active();
iOperation = iSharedDataIMAP.iMtm->InvokeAsyncFunctionL(KIMAP4MTMCancelBackgroundSynchronise, *selection, param2, active2.iStatus);
active2.Activate();
CActiveScheduler::Start();
TInt errCancel=active2.Result();
//check result of operation
//If there is a background synchronisation in progress,
//then stops it and completes with KErrCancel;
//otherwise, completes with KErrNone
if (errCancel!=KErrCancel && errCancel!=KErrNone)
{
ERR_PRINTF2(_L("Error during cancel background sync, failed with %d error"),errCancel);
SetTestStepResult(EFail);
}
delete iOperation;
iOperation=NULL;
}
else //Wait for background synchronisation to finish
{
TBuf8<16> param3;
CT_MsgActive& active3=Active();
delete iOperation;
iOperation=NULL;
//Completes (with KErrNone) only when the background synchronisation has finished.
iOperation =iSharedDataIMAP.iMtm->InvokeAsyncFunctionL(KIMAP4MTMWaitForBackground,*selection,param3,active3.iStatus);
INFO_PRINTF1(_L("we are waiting for bk sync to complete now..."));
active3.Activate();
//.........这里部分代码省略.........
开发者ID:cdaffara,项目名称:symbiandump-mw2,代码行数:101,代码来源:T_ConnectAndSyncImap4Server.cpp
示例8: INFO_PRINTF1
TVerdict CTestLtsySmsDelete::doTestStepPostambleL()
{
INFO_PRINTF1(_L("CTestLtsySmsDelete::doTestStepPostambleL called"));
return TestStepResult();
}
开发者ID:cdaffara,项目名称:symbiandump-os1,代码行数:5,代码来源:testltsysmsdelete.cpp
示例9: INFO_PRINTF1
/**
*
* Test step Preamble.
*
* @xxxx
*
*/
enum TVerdict CTestStepRecorderBitRate::DoTestStepPreambleL(void)
{
enum TVerdict verdict;
// this installs the scheduler
verdict = CTestStepUnitMMFAudClient::DoTestStepPreambleL();
// Printing to the console and log file
INFO_PRINTF1(iTestStepName);
if (!iIsConverterTest)
{
INFO_PRINTF1(_L("this is a test of CMdaAudioRecorderUtility::xxxBitRatexx() functions"));
}
else
{
INFO_PRINTF1(_L("this is a test of CMdaAudioConvertUtility::xxxBitRatexx() functions"));
}
if(!(GetStringFromConfig(_L("SectionOne"), _L("AudioPlayFName1"), iFileName) && // wav
GetStringFromConfig(_L("SectionOne"), _L("AudioFNameToRecord4"), iFileName2) && // wav
GetStringFromConfig(_L("SectionOne"), _L("AudioFNameToConvert"), iFileName3) // au
))
{
//INFO_PRINTF2(_L("file name %s not found..."), fileptr);
return EInconclusive;
}
//delete files that should not be there
iFs.Connect();
iFileMan = CFileMan::NewL(iFs);
iFileMan->Delete(iFileName2);
iFileMan->Delete(iFileName3);
iFs.Close();
delete iFileMan;
iFileMan = NULL;
if (!iIsConverterTest)
{
// create the Recorder utility
if ( (iRecorder = CMMFMdaAudioRecorderUtility::NewL(*this)) == NULL )
return EInconclusive;
TInt err;
TRAP( err, OpenAndStartSchedulerL() );
if (iRecorder == NULL ||
err != KErrNone ||
iError != KErrNone ||
iRecorder->State() != CMdaAudioRecorderUtility::EOpen)
return EInconclusive;
}
else
{
// create the Converter utility
if ( (iConvert = CMdaAudioConvertUtility::NewL(*this)) == NULL )
return EInconclusive;
TInt err;
TRAP( err, OpenAndStartSchedulerL() );
if (iConvert == NULL ||
err != KErrNone ||
iError != KErrNone ||
iConvert->State() != CMdaAudioConvertUtility::EOpen)
return EInconclusive;
}
return verdict;
}
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:75,代码来源:TestStepRecorderDestination.cpp
示例10: INFO_PRINTF1
void CT_ProcStep::testChildExistsL(void)
/**
* Calls other functions which implement the test cases.
*/
{
INFO_PRINTF1(_L("Begin - testChildSetToTerminateL ----------- "));
TRAPD(ret,testChildSetToTerminateL());
TEST(ret==KErrNone);
INFO_PRINTF1(_L("End - testChildSetToTerminateL ----------- \n"));
INFO_PRINTF1(_L("Begin - testChildSetToRemainL ----------- "));
TRAP(ret,testChildSetToRemainL());
TEST(ret==KErrNone);
INFO_PRINTF1(_L("End - testChildSetToRemainL ----------- \n"));
INFO_PRINTF1(_L("Begin - testTwoChildsOneToTerminateAndOtherToRemainL ----------- "));
TRAP(ret,testTwoChildsOneToTerminateAndOtherToRemainL());
TEST(ret==KErrNone);
INFO_PRINTF1(_L("End - testTwoChildsOneToTerminateAndOtherToRemainL ----------- \n"));
INFO_PRINTF1(_L("Begin - testParentWithoutAChildL ----------- "));
TRAP(ret,testParentWithoutAChildL());
TEST(ret==KErrNone);
INFO_PRINTF1(_L("End - testParentWithoutAChildL ----------- \n"));
INFO_PRINTF1(_L("Begin - testAllChildsSetToTerminateL ----------- "));
TRAP(ret,testAllChildsSetToTerminateL());
TEST(ret==KErrNone);
INFO_PRINTF1(_L("End - testAllChildsSetToTerminateL ----------- \n"));
INFO_PRINTF1(_L("Begin - testNoChildSetToTerminateL ----------- "));
TRAP(ret,testNoChildSetToTerminateL());
TEST(ret==KErrNone);
INFO_PRINTF1(_L("End - testNoChildSetToTerminateL ----------- \n"));
INFO_PRINTF1(_L("Begin - testIdAvailableToChildL ----------- "));
TRAP(ret,testIdAvailableToChildL());
TEST(ret==KErrNone);
INFO_PRINTF1(_L("End - testIdAvailableToChildL ----------- \n"));
INFO_PRINTF1(_L("Begin - testIdNotAvailableToChildL ----------- "));
TRAP(ret,testIdNotAvailableToChildL());
TEST(ret==KErrNone);
INFO_PRINTF1(_L("End - testIdNotAvailableToChildL ----------- \n"));
}
开发者ID:cdaffara,项目名称:symbiandump-mw1,代码行数:45,代码来源:T_ProcStep.cpp
注:本文中的INFO_PRINTF1函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论