os/textandloc/fontservices/fontstore/tfs/T_RemoveInvalidFontFile.cpp
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/textandloc/fontservices/fontstore/tfs/T_RemoveInvalidFontFile.cpp	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,53 @@
     1.4 +/*
     1.5 +* Copyright (c) 1995-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.6 +* All rights reserved.
     1.7 +* This component and the accompanying materials are made available
     1.8 +* under the terms of "Eclipse Public License v1.0"
     1.9 +* which accompanies this distribution, and is available
    1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.11 +*
    1.12 +* Initial Contributors:
    1.13 +* Nokia Corporation - initial contribution.
    1.14 +*
    1.15 +* Contributors:
    1.16 +*
    1.17 +* Description: 
    1.18 +*
    1.19 +*/
    1.20 +
    1.21 +
    1.22 +#include "T_InvalidFontFile.h"
    1.23 +#include <e32std.h>
    1.24 +#include <f32file.h>
    1.25 +#include <s32file.h>
    1.26 +
    1.27 +/**
    1.28 +Simple application to remove the invalid font file created by T_WriteInvalidFontFile.exe.
    1.29 +These applications are seperate from the test code and each other so they can have the 
    1.30 +capability Tcb in order to write to the \resource\* directory.
    1.31 +*/
    1.32 +LOCAL_C void MainL()
    1.33 +	{
    1.34 +	RFs fs;
    1.35 +	CleanupClosePushL(fs);
    1.36 +	User::LeaveIfError(fs.Connect());
    1.37 +
    1.38 +	User::LeaveIfError(fs.Delete(KEclipsingFile));
    1.39 +	
    1.40 +	CleanupStack::PopAndDestroy(&fs);
    1.41 +	}
    1.42 +
    1.43 +GLDEF_C TInt E32Main()
    1.44 +	{
    1.45 +	__UHEAP_MARK;
    1.46 +	CTrapCleanup* cleanup = CTrapCleanup::New();
    1.47 +	TRAPD(mainError, MainL());
    1.48 +	if (mainError != KErrNone)
    1.49 +		{
    1.50 +		RDebug::Printf("T_RemoveInvalidFontFile.exe failed with error %i", mainError);
    1.51 +		}
    1.52 +	delete cleanup;
    1.53 +	__UHEAP_MARKEND;
    1.54 +	return KErrNone;
    1.55 +	}
    1.56 +