os/textandloc/fontservices/fontstore/tfs/T_RemoveInvalidFontFile.cpp
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 /*
     2 * Copyright (c) 1995-2009 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     8 *
     9 * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    11 *
    12 * Contributors:
    13 *
    14 * Description: 
    15 *
    16 */
    17 
    18 
    19 #include "T_InvalidFontFile.h"
    20 #include <e32std.h>
    21 #include <f32file.h>
    22 #include <s32file.h>
    23 
    24 /**
    25 Simple application to remove the invalid font file created by T_WriteInvalidFontFile.exe.
    26 These applications are seperate from the test code and each other so they can have the 
    27 capability Tcb in order to write to the \resource\* directory.
    28 */
    29 LOCAL_C void MainL()
    30 	{
    31 	RFs fs;
    32 	CleanupClosePushL(fs);
    33 	User::LeaveIfError(fs.Connect());
    34 
    35 	User::LeaveIfError(fs.Delete(KEclipsingFile));
    36 	
    37 	CleanupStack::PopAndDestroy(&fs);
    38 	}
    39 
    40 GLDEF_C TInt E32Main()
    41 	{
    42 	__UHEAP_MARK;
    43 	CTrapCleanup* cleanup = CTrapCleanup::New();
    44 	TRAPD(mainError, MainL());
    45 	if (mainError != KErrNone)
    46 		{
    47 		RDebug::Printf("T_RemoveInvalidFontFile.exe failed with error %i", mainError);
    48 		}
    49 	delete cleanup;
    50 	__UHEAP_MARKEND;
    51 	return KErrNone;
    52 	}
    53