usbmgmt/usbmgrtest/ObexClassController/test/src/simpleObexApp.cpp
branchRCL_3
changeset 43 012cc2ee6408
parent 42 f92a4f87e424
equal deleted inserted replaced
42:f92a4f87e424 43:012cc2ee6408
   453 
   453 
   454 	CActiveScheduler *myScheduler = new (ELeave) CActiveScheduler();
   454 	CActiveScheduler *myScheduler = new (ELeave) CActiveScheduler();
   455 	CleanupStack::PushL(myScheduler);
   455 	CleanupStack::PushL(myScheduler);
   456 	CActiveScheduler::Install(myScheduler); 
   456 	CActiveScheduler::Install(myScheduler); 
   457 
   457 
   458 	CConsoleBase* console = 	
   458 	CConsoleBase* aConsole = 	
   459 	Console::NewL(_L("Obex Program"),TSize(KConsFullScreen, KConsFullScreen));
   459 	Console::NewL(_L("Obex Program"),TSize(KConsFullScreen, KConsFullScreen));
   460 	
   460 	
   461 	// Load Device drivers
   461 	// Load Device drivers
   462 	
   462 	
   463 	TInt err;
   463 	TInt err;
   464 	// Start C32 now
   464 	// Start C32 now
   465 	console->Printf(_L("Loading C32...\n"));
   465 	aConsole->Printf(_L("Loading C32...\n"));
   466 	err=StartC32();
   466 	err=StartC32();
   467 	if (err!=KErrNone && err!=KErrAlreadyExists)
   467 	if (err!=KErrNone && err!=KErrAlreadyExists)
   468 		console->Printf(_L("	Failed %d\n"), err);
   468 		aConsole->Printf(_L("	Failed %d\n"), err);
   469 	else
   469 	else
   470 		console->Printf(_L("	Sucess\n"));
   470 		aConsole->Printf(_L("	Sucess\n"));
   471 	// If running on PC emulator
   471 	// If running on PC emulator
   472 	
   472 	
   473 	// Load drivers for using Serial communication
   473 	// Load drivers for using Serial communication
   474 	#ifdef __WINS__
   474 	#ifdef __WINS__
   475 		TInt load =	User::LoadLogicalDevice(KWinsLddName);
   475 		TInt load =	User::LoadLogicalDevice(KWinsLddName);
   476 		console->Printf(_L("Load LDD : %d\n"), load);
   476 		aConsole->Printf(_L("Load LDD : %d\n"), load);
   477 		load =	User::LoadPhysicalDevice(KWinsPddName);
   477 		load =	User::LoadPhysicalDevice(KWinsPddName);
   478 		console->Printf(_L("Load PDD : %d\n"), load);
   478 		aConsole->Printf(_L("Load PDD : %d\n"), load);
   479 	#endif //__WINS__
   479 	#endif //__WINS__
   480 
   480 
   481 
   481 
   482 
   482 
   483 	CleanupStack::PushL(console);
   483 	CleanupStack::PushL(aConsole);
   484 	CActiveConsole* my_console = CActiveConsole::NewLC(console);// New active console
   484 	CActiveConsole* my_console = CActiveConsole::NewLC(aConsole);// New active console
   485 	my_console->RequestCharacter();
   485 	my_console->RequestCharacter();
   486 	CActiveScheduler::Start();
   486 	CActiveScheduler::Start();
   487 	CleanupStack::PopAndDestroy(3); 
   487 	CleanupStack::PopAndDestroy(3); 
   488 	
   488 	
   489 	}
   489 	}