author | Iain Williamson <iain.williamson@nokia.com> |
Tue, 02 Feb 2010 16:08:55 +0000 | |
branch | fix |
changeset 184 | 860699b2b944 |
parent 183 | 7c04ad290aca |
permissions | -rw-r--r-- |
183
7c04ad290aca
First drop of untested winscw TC code. Also adding missing testcase ID to tracecompiler_whatlog
Iain Williamson <iain.williamson@nokia.com>
parents:
diff
changeset
|
1 |
/* |
7c04ad290aca
First drop of untested winscw TC code. Also adding missing testcase ID to tracecompiler_whatlog
Iain Williamson <iain.williamson@nokia.com>
parents:
diff
changeset
|
2 |
* Copyright (c) 2000-2009 Nokia Corporation and/or its subsidiary(-ies). |
7c04ad290aca
First drop of untested winscw TC code. Also adding missing testcase ID to tracecompiler_whatlog
Iain Williamson <iain.williamson@nokia.com>
parents:
diff
changeset
|
3 |
* All rights reserved. |
7c04ad290aca
First drop of untested winscw TC code. Also adding missing testcase ID to tracecompiler_whatlog
Iain Williamson <iain.williamson@nokia.com>
parents:
diff
changeset
|
4 |
* This component and the accompanying materials are made available |
7c04ad290aca
First drop of untested winscw TC code. Also adding missing testcase ID to tracecompiler_whatlog
Iain Williamson <iain.williamson@nokia.com>
parents:
diff
changeset
|
5 |
* under the terms of the License "Eclipse Public License v1.0" |
7c04ad290aca
First drop of untested winscw TC code. Also adding missing testcase ID to tracecompiler_whatlog
Iain Williamson <iain.williamson@nokia.com>
parents:
diff
changeset
|
6 |
* which accompanies this distribution, and is available |
7c04ad290aca
First drop of untested winscw TC code. Also adding missing testcase ID to tracecompiler_whatlog
Iain Williamson <iain.williamson@nokia.com>
parents:
diff
changeset
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7c04ad290aca
First drop of untested winscw TC code. Also adding missing testcase ID to tracecompiler_whatlog
Iain Williamson <iain.williamson@nokia.com>
parents:
diff
changeset
|
8 |
* |
7c04ad290aca
First drop of untested winscw TC code. Also adding missing testcase ID to tracecompiler_whatlog
Iain Williamson <iain.williamson@nokia.com>
parents:
diff
changeset
|
9 |
* Initial Contributors: |
7c04ad290aca
First drop of untested winscw TC code. Also adding missing testcase ID to tracecompiler_whatlog
Iain Williamson <iain.williamson@nokia.com>
parents:
diff
changeset
|
10 |
* Nokia Corporation - initial contribution. |
7c04ad290aca
First drop of untested winscw TC code. Also adding missing testcase ID to tracecompiler_whatlog
Iain Williamson <iain.williamson@nokia.com>
parents:
diff
changeset
|
11 |
* |
7c04ad290aca
First drop of untested winscw TC code. Also adding missing testcase ID to tracecompiler_whatlog
Iain Williamson <iain.williamson@nokia.com>
parents:
diff
changeset
|
12 |
* Contributors: |
7c04ad290aca
First drop of untested winscw TC code. Also adding missing testcase ID to tracecompiler_whatlog
Iain Williamson <iain.williamson@nokia.com>
parents:
diff
changeset
|
13 |
* |
7c04ad290aca
First drop of untested winscw TC code. Also adding missing testcase ID to tracecompiler_whatlog
Iain Williamson <iain.williamson@nokia.com>
parents:
diff
changeset
|
14 |
* Description: |
7c04ad290aca
First drop of untested winscw TC code. Also adding missing testcase ID to tracecompiler_whatlog
Iain Williamson <iain.williamson@nokia.com>
parents:
diff
changeset
|
15 |
* This program creates a dll. |
7c04ad290aca
First drop of untested winscw TC code. Also adding missing testcase ID to tracecompiler_whatlog
Iain Williamson <iain.williamson@nokia.com>
parents:
diff
changeset
|
16 |
* |
7c04ad290aca
First drop of untested winscw TC code. Also adding missing testcase ID to tracecompiler_whatlog
Iain Williamson <iain.williamson@nokia.com>
parents:
diff
changeset
|
17 |
*/ |
7c04ad290aca
First drop of untested winscw TC code. Also adding missing testcase ID to tracecompiler_whatlog
Iain Williamson <iain.williamson@nokia.com>
parents:
diff
changeset
|
18 |
|
7c04ad290aca
First drop of untested winscw TC code. Also adding missing testcase ID to tracecompiler_whatlog
Iain Williamson <iain.williamson@nokia.com>
parents:
diff
changeset
|
19 |
|
7c04ad290aca
First drop of untested winscw TC code. Also adding missing testcase ID to tracecompiler_whatlog
Iain Williamson <iain.williamson@nokia.com>
parents:
diff
changeset
|
20 |
#include "tcwinsStaticDLL.h" |
7c04ad290aca
First drop of untested winscw TC code. Also adding missing testcase ID to tracecompiler_whatlog
Iain Williamson <iain.williamson@nokia.com>
parents:
diff
changeset
|
21 |
#include <e32uid.h> |
7c04ad290aca
First drop of untested winscw TC code. Also adding missing testcase ID to tracecompiler_whatlog
Iain Williamson <iain.williamson@nokia.com>
parents:
diff
changeset
|
22 |
#include "OstTraceDefinitions.h" |
7c04ad290aca
First drop of untested winscw TC code. Also adding missing testcase ID to tracecompiler_whatlog
Iain Williamson <iain.williamson@nokia.com>
parents:
diff
changeset
|
23 |
#ifdef OST_TRACE_COMPILER_IN_USE |
184
860699b2b944
Adding extra source file to TC winscw test code, and fixing it so it works
Iain Williamson <iain.williamson@nokia.com>
parents:
183
diff
changeset
|
24 |
#include "tcwinsStaticDLLTraces.h" |
183
7c04ad290aca
First drop of untested winscw TC code. Also adding missing testcase ID to tracecompiler_whatlog
Iain Williamson <iain.williamson@nokia.com>
parents:
diff
changeset
|
25 |
#endif |
7c04ad290aca
First drop of untested winscw TC code. Also adding missing testcase ID to tracecompiler_whatlog
Iain Williamson <iain.williamson@nokia.com>
parents:
diff
changeset
|
26 |
|
7c04ad290aca
First drop of untested winscw TC code. Also adding missing testcase ID to tracecompiler_whatlog
Iain Williamson <iain.williamson@nokia.com>
parents:
diff
changeset
|
27 |
|
7c04ad290aca
First drop of untested winscw TC code. Also adding missing testcase ID to tracecompiler_whatlog
Iain Williamson <iain.williamson@nokia.com>
parents:
diff
changeset
|
28 |
// construct/destruct |
7c04ad290aca
First drop of untested winscw TC code. Also adding missing testcase ID to tracecompiler_whatlog
Iain Williamson <iain.williamson@nokia.com>
parents:
diff
changeset
|
29 |
|
7c04ad290aca
First drop of untested winscw TC code. Also adding missing testcase ID to tracecompiler_whatlog
Iain Williamson <iain.williamson@nokia.com>
parents:
diff
changeset
|
30 |
|
7c04ad290aca
First drop of untested winscw TC code. Also adding missing testcase ID to tracecompiler_whatlog
Iain Williamson <iain.williamson@nokia.com>
parents:
diff
changeset
|
31 |
extern "C" void __ARM_switch8(); |
7c04ad290aca
First drop of untested winscw TC code. Also adding missing testcase ID to tracecompiler_whatlog
Iain Williamson <iain.williamson@nokia.com>
parents:
diff
changeset
|
32 |
|
7c04ad290aca
First drop of untested winscw TC code. Also adding missing testcase ID to tracecompiler_whatlog
Iain Williamson <iain.williamson@nokia.com>
parents:
diff
changeset
|
33 |
void sbs_test() |
7c04ad290aca
First drop of untested winscw TC code. Also adding missing testcase ID to tracecompiler_whatlog
Iain Williamson <iain.williamson@nokia.com>
parents:
diff
changeset
|
34 |
{ |
7c04ad290aca
First drop of untested winscw TC code. Also adding missing testcase ID to tracecompiler_whatlog
Iain Williamson <iain.williamson@nokia.com>
parents:
diff
changeset
|
35 |
__ARM_switch8(); |
7c04ad290aca
First drop of untested winscw TC code. Also adding missing testcase ID to tracecompiler_whatlog
Iain Williamson <iain.williamson@nokia.com>
parents:
diff
changeset
|
36 |
} |
7c04ad290aca
First drop of untested winscw TC code. Also adding missing testcase ID to tracecompiler_whatlog
Iain Williamson <iain.williamson@nokia.com>
parents:
diff
changeset
|
37 |
|
7c04ad290aca
First drop of untested winscw TC code. Also adding missing testcase ID to tracecompiler_whatlog
Iain Williamson <iain.williamson@nokia.com>
parents:
diff
changeset
|
38 |
|
7c04ad290aca
First drop of untested winscw TC code. Also adding missing testcase ID to tracecompiler_whatlog
Iain Williamson <iain.williamson@nokia.com>
parents:
diff
changeset
|
39 |
EXPORT_C CMessenger* CMessenger::NewLC(CConsoleBase& aConsole, const TDesC& aString) |
7c04ad290aca
First drop of untested winscw TC code. Also adding missing testcase ID to tracecompiler_whatlog
Iain Williamson <iain.williamson@nokia.com>
parents:
diff
changeset
|
40 |
{ |
7c04ad290aca
First drop of untested winscw TC code. Also adding missing testcase ID to tracecompiler_whatlog
Iain Williamson <iain.williamson@nokia.com>
parents:
diff
changeset
|
41 |
OstTrace0( TRACE_API, CMESSENGER_NEWL, "CMessenger::NewLC()" ); |
7c04ad290aca
First drop of untested winscw TC code. Also adding missing testcase ID to tracecompiler_whatlog
Iain Williamson <iain.williamson@nokia.com>
parents:
diff
changeset
|
42 |
OstTrace0( TRACE_NORMAL, DUP1_CMESSENGER_NEWL, "CMessenger::NewLC()" ); |
7c04ad290aca
First drop of untested winscw TC code. Also adding missing testcase ID to tracecompiler_whatlog
Iain Williamson <iain.williamson@nokia.com>
parents:
diff
changeset
|
43 |
CMessenger* self=new (ELeave) CMessenger(aConsole); |
7c04ad290aca
First drop of untested winscw TC code. Also adding missing testcase ID to tracecompiler_whatlog
Iain Williamson <iain.williamson@nokia.com>
parents:
diff
changeset
|
44 |
CleanupStack::PushL(self); |
7c04ad290aca
First drop of untested winscw TC code. Also adding missing testcase ID to tracecompiler_whatlog
Iain Williamson <iain.williamson@nokia.com>
parents:
diff
changeset
|
45 |
self->ConstructL(aString); |
7c04ad290aca
First drop of untested winscw TC code. Also adding missing testcase ID to tracecompiler_whatlog
Iain Williamson <iain.williamson@nokia.com>
parents:
diff
changeset
|
46 |
return self; |
7c04ad290aca
First drop of untested winscw TC code. Also adding missing testcase ID to tracecompiler_whatlog
Iain Williamson <iain.williamson@nokia.com>
parents:
diff
changeset
|
47 |
} |
7c04ad290aca
First drop of untested winscw TC code. Also adding missing testcase ID to tracecompiler_whatlog
Iain Williamson <iain.williamson@nokia.com>
parents:
diff
changeset
|
48 |
|
7c04ad290aca
First drop of untested winscw TC code. Also adding missing testcase ID to tracecompiler_whatlog
Iain Williamson <iain.williamson@nokia.com>
parents:
diff
changeset
|
49 |
CMessenger::~CMessenger() // destruct - virtual, so no export |
7c04ad290aca
First drop of untested winscw TC code. Also adding missing testcase ID to tracecompiler_whatlog
Iain Williamson <iain.williamson@nokia.com>
parents:
diff
changeset
|
50 |
{ |
7c04ad290aca
First drop of untested winscw TC code. Also adding missing testcase ID to tracecompiler_whatlog
Iain Williamson <iain.williamson@nokia.com>
parents:
diff
changeset
|
51 |
OstTrace0( TRACE_API, DUP1_CMESSENGER_CMESSENGER, "CMessenger::~CMessenger()" ); |
7c04ad290aca
First drop of untested winscw TC code. Also adding missing testcase ID to tracecompiler_whatlog
Iain Williamson <iain.williamson@nokia.com>
parents:
diff
changeset
|
52 |
OstTrace0( TRACE_NORMAL, DUP2_CMESSENGER_CMESSENGER, "CMessenger::~CMessenger()" ); |
7c04ad290aca
First drop of untested winscw TC code. Also adding missing testcase ID to tracecompiler_whatlog
Iain Williamson <iain.williamson@nokia.com>
parents:
diff
changeset
|
53 |
delete iString; |
7c04ad290aca
First drop of untested winscw TC code. Also adding missing testcase ID to tracecompiler_whatlog
Iain Williamson <iain.williamson@nokia.com>
parents:
diff
changeset
|
54 |
} |
7c04ad290aca
First drop of untested winscw TC code. Also adding missing testcase ID to tracecompiler_whatlog
Iain Williamson <iain.williamson@nokia.com>
parents:
diff
changeset
|
55 |
|
7c04ad290aca
First drop of untested winscw TC code. Also adding missing testcase ID to tracecompiler_whatlog
Iain Williamson <iain.williamson@nokia.com>
parents:
diff
changeset
|
56 |
EXPORT_C void CMessenger::ShowMessage() |
7c04ad290aca
First drop of untested winscw TC code. Also adding missing testcase ID to tracecompiler_whatlog
Iain Williamson <iain.williamson@nokia.com>
parents:
diff
changeset
|
57 |
{ |
7c04ad290aca
First drop of untested winscw TC code. Also adding missing testcase ID to tracecompiler_whatlog
Iain Williamson <iain.williamson@nokia.com>
parents:
diff
changeset
|
58 |
_LIT(KFormat1,"%S\n"); |
7c04ad290aca
First drop of untested winscw TC code. Also adding missing testcase ID to tracecompiler_whatlog
Iain Williamson <iain.williamson@nokia.com>
parents:
diff
changeset
|
59 |
iConsole.Printf(KFormat1, iString); // notify completion |
7c04ad290aca
First drop of untested winscw TC code. Also adding missing testcase ID to tracecompiler_whatlog
Iain Williamson <iain.williamson@nokia.com>
parents:
diff
changeset
|
60 |
} |
7c04ad290aca
First drop of untested winscw TC code. Also adding missing testcase ID to tracecompiler_whatlog
Iain Williamson <iain.williamson@nokia.com>
parents:
diff
changeset
|
61 |
|
7c04ad290aca
First drop of untested winscw TC code. Also adding missing testcase ID to tracecompiler_whatlog
Iain Williamson <iain.williamson@nokia.com>
parents:
diff
changeset
|
62 |
// constructor support |
7c04ad290aca
First drop of untested winscw TC code. Also adding missing testcase ID to tracecompiler_whatlog
Iain Williamson <iain.williamson@nokia.com>
parents:
diff
changeset
|
63 |
// don't export these, because used only by functions in this DLL, eg our NewLC() |
7c04ad290aca
First drop of untested winscw TC code. Also adding missing testcase ID to tracecompiler_whatlog
Iain Williamson <iain.williamson@nokia.com>
parents:
diff
changeset
|
64 |
|
7c04ad290aca
First drop of untested winscw TC code. Also adding missing testcase ID to tracecompiler_whatlog
Iain Williamson <iain.williamson@nokia.com>
parents:
diff
changeset
|
65 |
CMessenger::CMessenger(CConsoleBase& aConsole) // first-phase C++ constructor |
7c04ad290aca
First drop of untested winscw TC code. Also adding missing testcase ID to tracecompiler_whatlog
Iain Williamson <iain.williamson@nokia.com>
parents:
diff
changeset
|
66 |
: iConsole(aConsole) |
7c04ad290aca
First drop of untested winscw TC code. Also adding missing testcase ID to tracecompiler_whatlog
Iain Williamson <iain.williamson@nokia.com>
parents:
diff
changeset
|
67 |
{ |
7c04ad290aca
First drop of untested winscw TC code. Also adding missing testcase ID to tracecompiler_whatlog
Iain Williamson <iain.williamson@nokia.com>
parents:
diff
changeset
|
68 |
} |
7c04ad290aca
First drop of untested winscw TC code. Also adding missing testcase ID to tracecompiler_whatlog
Iain Williamson <iain.williamson@nokia.com>
parents:
diff
changeset
|
69 |
|
7c04ad290aca
First drop of untested winscw TC code. Also adding missing testcase ID to tracecompiler_whatlog
Iain Williamson <iain.williamson@nokia.com>
parents:
diff
changeset
|
70 |
void CMessenger::ConstructL(const TDesC& aString) // second-phase constructor |
7c04ad290aca
First drop of untested winscw TC code. Also adding missing testcase ID to tracecompiler_whatlog
Iain Williamson <iain.williamson@nokia.com>
parents:
diff
changeset
|
71 |
{ |
7c04ad290aca
First drop of untested winscw TC code. Also adding missing testcase ID to tracecompiler_whatlog
Iain Williamson <iain.williamson@nokia.com>
parents:
diff
changeset
|
72 |
iString=aString.AllocL(); // copy given string into own descriptor |
7c04ad290aca
First drop of untested winscw TC code. Also adding missing testcase ID to tracecompiler_whatlog
Iain Williamson <iain.williamson@nokia.com>
parents:
diff
changeset
|
73 |
} |
7c04ad290aca
First drop of untested winscw TC code. Also adding missing testcase ID to tracecompiler_whatlog
Iain Williamson <iain.williamson@nokia.com>
parents:
diff
changeset
|
74 |