20
|
1 |
/*
|
|
2 |
* Copyright (c) 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: The file contains declarations of extern methods and definitions
|
|
15 |
* of overloaded User methods.
|
|
16 |
*
|
|
17 |
*/
|
|
18 |
|
|
19 |
|
|
20 |
#include <analyzetool/customuser.h>
|
|
21 |
#include "atlog.h"
|
|
22 |
|
|
23 |
// -----------------------------------------------------------------------------
|
|
24 |
// GetInt()
|
|
25 |
// Extern function for acquiring all integer values
|
|
26 |
// -----------------------------------------------------------------------------
|
|
27 |
//
|
|
28 |
GLREF_C TInt GetInt( const TUint8 aType );
|
|
29 |
|
|
30 |
// -----------------------------------------------------------------------------
|
|
31 |
// GetString()
|
|
32 |
// Extern function for acquiring all string values
|
|
33 |
// -----------------------------------------------------------------------------
|
|
34 |
//
|
|
35 |
GLREF_C TPtrC GetString( const TUint8 aType );
|
|
36 |
|
|
37 |
// -----------------------------------------------------------------------------
|
|
38 |
// User::Exit()
|
|
39 |
// Overloaded User::Exit() function
|
|
40 |
// -----------------------------------------------------------------------------
|
|
41 |
//
|
|
42 |
void User::Exit( TInt aReason )
|
|
43 |
{
|
|
44 |
LOGSTR2( "ATMH User::Exit %i", aReason );
|
|
45 |
CustomUser::Exit( aReason );
|
|
46 |
}
|
|
47 |
|
|
48 |
// -----------------------------------------------------------------------------
|
|
49 |
// User::Panic()
|
|
50 |
// Overloaded User::Panic() function
|
|
51 |
// -----------------------------------------------------------------------------
|
|
52 |
//
|
|
53 |
void User::Panic( const TDesC& aCategory, TInt aReason )
|
|
54 |
{
|
|
55 |
LOGSTR3( "ATMH User::Panic() %S %i", &aCategory, aReason );
|
|
56 |
CustomUser::Panic( aCategory, aReason );
|
|
57 |
}
|
|
58 |
|
|
59 |
// -----------------------------------------------------------------------------
|
|
60 |
// User::SetCritical()
|
|
61 |
// Overloaded User::SetCritical() function which returns
|
|
62 |
// KErrNone, if successful; KErrArgument, if EAllThreadsCritical is
|
|
63 |
// passed - this is a state associated with a process, and you use
|
|
64 |
// User::SetProcessCritical() to set it.
|
|
65 |
// -----------------------------------------------------------------------------
|
|
66 |
//
|
|
67 |
TInt User::SetCritical( TCritical aCritical )
|
|
68 |
{
|
|
69 |
LOGSTR2( "ATMH User::SetCritical() %i", aCritical );
|
|
70 |
return CustomUser::SetCritical( aCritical );
|
|
71 |
}
|
|
72 |
|
|
73 |
// -----------------------------------------------------------------------------
|
|
74 |
// User::SetProcessCritical()
|
|
75 |
// Overloaded User::SetProcessCritical() function
|
|
76 |
// KErrNone, if successful; KErrArgument, if either EProcessCritical or
|
|
77 |
// EProcessPermanent is passed - these are states associated with a
|
|
78 |
// thread, and you use User::SetCritical() to set them.
|
|
79 |
// -----------------------------------------------------------------------------
|
|
80 |
//
|
|
81 |
TInt User::SetProcessCritical( TCritical aCritical )
|
|
82 |
{
|
|
83 |
LOGSTR2( "ATMH User::SetProcessCritical() %i", aCritical );
|
|
84 |
return CustomUser::SetProcessCritical( aCritical );
|
|
85 |
}
|
|
86 |
|
|
87 |
// -----------------------------------------------------------------------------
|
|
88 |
// UserHeap::SetupThreadHeap()
|
|
89 |
// Overloaded UserHeap::SetupThreadHeap function
|
|
90 |
// -----------------------------------------------------------------------------
|
|
91 |
//
|
|
92 |
TInt UserHeap::SetupThreadHeap( TBool aNotFirst,
|
|
93 |
SStdEpocThreadCreateInfo& aInfo )
|
|
94 |
{
|
|
95 |
LOGSTR1( "ATMH UserHeap::SetupThreadHeap()" );
|
|
96 |
|
|
97 |
// Check validity of parameters
|
|
98 |
TInt logOption( GetInt( (TUint8) CustomUser::ELogOption ) );
|
|
99 |
if ( logOption < 0 )
|
|
100 |
logOption = KATDefaultLogOption;
|
|
101 |
|
|
102 |
TInt debug( GetInt( (TUint8) CustomUser::EDebug ) );
|
|
103 |
if ( debug < 0 )
|
|
104 |
debug = KATDefaultDebug;
|
|
105 |
|
|
106 |
TInt allocCallStack( GetInt( (TUint8) CustomUser::EAllocCallStackSize ) );
|
|
107 |
if ( allocCallStack < 0 )
|
|
108 |
allocCallStack = KATDefaultAllocCallStackSize;
|
|
109 |
|
|
110 |
TInt freeCallStack( GetInt( (TUint8) CustomUser::EFreeCallStackSize ) );
|
|
111 |
if ( freeCallStack < 0 )
|
|
112 |
freeCallStack = KATDefaultFreeCallStackSize;
|
|
113 |
|
|
114 |
return CustomUser::SetupThreadHeap( aNotFirst, aInfo,
|
|
115 |
GetString( (TUint8) CustomUser::ELogFileName ),
|
|
116 |
(TUint32) logOption, (TUint32) debug,
|
|
117 |
GetString( (TUint8) CustomUser::EVersion ),
|
|
118 |
(TUint32) allocCallStack, (TUint32) freeCallStack,
|
|
119 |
KATArgumentList );
|
|
120 |
}
|
|
121 |
|
|
122 |
// End of File
|