messagingfw/biomsgfw/BIFUTSRC/TBIFU.CPP
changeset 62 db3f5fa34ec7
parent 0 8e480a14352b
equal deleted inserted replaced
60:9f5ae1728557 62:db3f5fa34ec7
       
     1 // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 #include <bif.h>
       
    17 
       
    18 #include <barsc.h>
       
    19 #include <barsread.h>
       
    20 
       
    21 #include <e32cons.h>
       
    22 #include <e32test.h>
       
    23 
       
    24 
       
    25 #define KBifFileName _L("out.bif")
       
    26 
       
    27 #pragma warning(disable:4238)  // nonstandard extension used : class rvalue used as lvalue
       
    28 #pragma warning(disable:4701)  // warning: local variable 'bitmap' may be used without having been initialized
       
    29 
       
    30 //
       
    31 // Test data...
       
    32 
       
    33 
       
    34 #define KMessageParserName _L("ParserName")
       
    35 
       
    36 #define KDescription _L("Description text. This is all very exciting...")
       
    37 #define KFileExtension _L("vcf")
       
    38 
       
    39 
       
    40 // Icons array
       
    41 const TFileName KIconsFilename=_L("test.mbm");
       
    42 
       
    43 // Id array
       
    44 // end of test data.
       
    45 //
       
    46 
       
    47 
       
    48 RTest test(_L("BIF Read/Write Test"));
       
    49 const TInt KTestCleanupStack=0x40;
       
    50 LOCAL_D CTrapCleanup* TheTrapCleanup;
       
    51 LOCAL_D RFs Fs;
       
    52 
       
    53 LOCAL_C void setupCleanup()
       
    54 //
       
    55 // Initialise the cleanup stack.
       
    56 //
       
    57     {
       
    58 	TheTrapCleanup=CTrapCleanup::New();
       
    59 	TRAPD(r,\
       
    60 		{\
       
    61 		for (TInt i=KTestCleanupStack;i>0;i--)\
       
    62 			CleanupStack::PushL((TAny*)1);\
       
    63 		CleanupStack::Pop(KTestCleanupStack);\
       
    64 		});
       
    65 	}
       
    66 
       
    67 
       
    68 
       
    69 
       
    70 GLDEF_C TInt E32Main()
       
    71 	{
       
    72 	__UHEAP_MARK;
       
    73 
       
    74 	setupCleanup();
       
    75 
       
    76 	test(Fs.Connect()==KErrNone);
       
    77 
       
    78 	test.Start(_L("CBioInfoFileWriter removed in Messaging API V2"));
       
    79 	
       
    80 	test.Printf(_L("Press a key to continue..."));
       
    81 	test.Getch();	// pause for user
       
    82 
       
    83 	Fs.Close();
       
    84 
       
    85 	delete TheTrapCleanup;
       
    86 	test.End();
       
    87 	test.Close();
       
    88 	
       
    89 	__UHEAP_MARKEND;
       
    90 	return KErrNone;
       
    91 	}