void CSdlAppUi::DoExit(TInt aErr)
{
	if (aErr != KErrNone)
	{
		CAknErrorNote* err = new (ELeave) CAknErrorNote(ETrue);
		TBuf<64> buf;
		if (aErr == 1)
		{
			buf.Copy(_L("Python run-time error."));
		}
		else
		{
			buf.Format(_L("SDL Error %d"), aErr);
		}
		err->ExecuteLD(buf);
	}
	else
	{
		/*
		 CAknInformationNote* info = new (ELeave) CAknInformationNote(ETrue);
		 info->SetTimeout(CAknNoteDialog::ENoTimeout);
		 TBuf<64> buf;
		 const TReal ticks = TReal(Ticks) / 1000.0;
		 const TReal fps = TReal(Frames) / ticks;
		 buf.Format(_L("Fps %f, %dms %d frames"), fps, Ticks, Frames);
		 info->ExecuteLD(buf);
		 */
	}
	delete iSdl;
	iSdl = NULL;

	// Exits after main script has completed
	Exit();
}
// ---------------------------------------------------------------------------
// 
// ---------------------------------------------------------------------------
//
void CAiwPrintingProvider::ShowNoteL()
    {
    FLOG(_L("[CAiwPrintingProvider]>>> App launch error "));
    HBufC* str = StringLoader::LoadLC( R_USB_INFO_APP_IN_USE  );
    CAknErrorNote* note = new ( ELeave ) CAknErrorNote;
    note->ExecuteLD( *str );
    CleanupStack::PopAndDestroy( str );  // str	
    }
// -----------------------------------------------------------------------------
// CLandmarksEditDialog::NotifyErrorToUserL
// 
// (other items were commented in a header).
// -----------------------------------------------------------------------------
//
void CLandmarksEditDialog::NotifyErrorToUserL(TInt aResourceId)
    {
    HBufC* msg = iCoeEnv->AllocReadResourceLC(aResourceId);
    CAknErrorNote* errorNote = new (ELeave) CAknErrorNote(ETrue);
    errorNote->ExecuteLD(*msg);
    CleanupStack::PopAndDestroy(msg);

    // Leave to interrupt saving of data. Other error codes than KErrNone 
    // results in an additional error dialog.
    User::Leave(KErrNone);
    }
// -----------------------------------------------------------------------------
// CTestSDKNotes::TestNENCAknErrorNoteL
// -----------------------------------------------------------------------------
TInt CTestSDKNotes::TestNENCAknErrorNoteL( CStifItemParser& /*aItem*/ )
    {
    CAknErrorNote* errorNote = new (ELeave) CAknErrorNote;
    CleanupStack::PushL( errorNote );
    STIF_ASSERT_NOT_NULL( errorNote );
    CleanupStack::Pop( errorNote );
    
    errorNote->ExecuteLD();
    
    return KErrNone;
    
    }
// --------------------------------------------------------------------------
// CUPnPAppFileSharingList::HandleSharingStatus
// Function informs when file sharing was enabled or disabled
// --------------------------------------------------------------------------
//
void CUPnPAppFileSharingList::HandleSharingStatus( 
        CUPnPFileSharingEngine& /*aEngine*/, 
        TInt aError, 
        TBool aPhase )
    {
    __LOG("CUPnPAppFileSharingList::HandleSharingStatus begin");

    if ( aPhase )
        {
        __LOG("start sharing");

        if ( aError )
            {
            // change state back to off
            iVisibility = EFalse;

            // If there domtree wasn't able to be written due to disk full
            // situation, send leave to kernel to inform user
            if( aError == KErrDiskFull ||
                aError == KErrNoMemory ||
                aError == KErrInUse )
                {
                // stop the wait note
                iStartingSharing = EPhaseCompleted;
                //show some critical errors using
                //default symbian error notes
                CActiveScheduler::Current()->Error( aError );
                }
            else
                {
                // show error note
                TRAP_IGNORE(
                    HBufC* errorNote = StringLoader::LoadLC(
                        R_SETTINGS_START_SHARING_ERROR_TEXT);
                    CAknErrorNote* note = new (ELeave) CAknErrorNote(ETrue);
                    note->ExecuteLD(*errorNote);
                    CleanupStack::PopAndDestroy() ); //errorNote
                }

            }
        else
            {
            // change secondary text
            iVisibility = ETrue;
            }
        }
// -----------------------------------------------------------------------------
// CTestSDKNotes::TestNENHandlePointerEventL
// -----------------------------------------------------------------------------
TInt CTestSDKNotes::TestNENHandlePointerEventL( CStifItemParser& /*aItem*/ )
    {
    CAknErrorNote* note = new (ELeave) CAknErrorNote;
    CleanupStack::PushL( note );
    STIF_ASSERT_NOT_NULL( note );
    
    TPointerEvent event;
    event.iType = TPointerEvent::EButton1Down;
    event.iModifiers = 0;
    TPoint eventPos( KPoint1, KPoint2 );
    event.iPosition = eventPos;
    event.iParentPosition = eventPos;
    
    note->HandlePointerEventL( event );
    
    CleanupStack::PopAndDestroy( note );
    
    return KErrNone;
    
    }
TBool TAzenqosEngineUtils::AskTestDescription(TInt rscid, TDes& descr)
	{
							//descr.Zero();
							CAknTextQueryDialog* cldlg;
					        cldlg = new (ELeave) CAknTextQueryDialog(descr);
					        cldlg->PrepareLC( rscid );
					        if(!(cldlg->RunLD()))
					        {
					        	return EFalse;
					        }

					        descr.TrimAll();
					        if(descr.Length()==0)
					        {
			       				_LIT(emsg,"Test description not entered");
							    CAknErrorNote* informationNote = new (ELeave) CAknErrorNote(ETrue);
							   	informationNote->ExecuteLD(emsg);
							   	return EFalse;
					        }

					        return ETrue;

	}