1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/security/cryptoservices/certificateandkeymgmt/tcertstore/tcertstore.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,61 @@
1.4 +/*
1.5 +* Copyright (c) 1997-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 the License "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 +/**
1.23 + @file
1.24 + @internalTechnology
1.25 +*/
1.26 +
1.27 +#ifndef __TNAMES_H
1.28 +#define __TNAMES_H
1.29 +
1.30 +//#include <e32test.h>
1.31 +#include <e32cons.h>
1.32 +
1.33 +// public
1.34 +LOCAL_D CConsoleBase* console; // write all your messages to this
1.35 +LOCAL_C void doExampleL(); // code this function for the real example
1.36 +// private
1.37 +LOCAL_C void callExampleL(); // initialize with cleanup stack, then do example
1.38 +
1.39 +GLDEF_C TInt E32Main() // main function called by E32
1.40 + {
1.41 + __UHEAP_MARK;
1.42 + CTrapCleanup* cleanup=CTrapCleanup::New(); // get clean-up stack
1.43 + TRAPD(error,callExampleL()); // more initialization, then do example
1.44 +
1.45 + __ASSERT_ALWAYS(!error,User::Panic(_L("CERT"),error));
1.46 + delete cleanup; // destroy clean-up stack
1.47 + __UHEAP_MARKEND;
1.48 + return 0; // and return
1.49 + }
1.50 +
1.51 +LOCAL_C void callExampleL() // initialize and call example code under cleanup stack
1.52 + {
1.53 + console=Console::NewL(_L("Test code"),
1.54 + TSize(KDefaultConsWidth,KDefaultConsHeight));
1.55 + CleanupStack::PushL(console);
1.56 + TRAPD(error,doExampleL()); // perform example function
1.57 + if (error) console->Printf(_L("failed: leave code=%d"), error);
1.58 + else console->Printf(_L("ok"));
1.59 + console->Printf(_L(" [press any key]"));
1.60 + console->Getch(); // get and ignore character
1.61 + CleanupStack::PopAndDestroy(); // close console
1.62 + }
1.63 +
1.64 +#endif