9
|
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 dll header file.
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
#ifndef SEARCH_GLOBAL_H
|
|
20 |
#define SEARCH_GLOBAL_H
|
|
21 |
|
|
22 |
#include <qdebug.h>
|
|
23 |
|
|
24 |
#ifdef NFT
|
|
25 |
#ifdef Q_OS_SYMBIAN
|
|
26 |
#include <e32hal.h>
|
|
27 |
#endif
|
|
28 |
#endif
|
15
|
29 |
//settings file
|
|
30 |
const QString SETTINGS_INI_PATH("C:\\private\\2002c377\\searchsettings.ini");
|
9
|
31 |
//#define OST_TRACE_COMPILER_IN_USE //Uncomment to enable performance measurements.
|
|
32 |
|
|
33 |
#ifdef OST_TRACE_COMPILER_IN_USE
|
|
34 |
#define PERF_APP_LAUNCH_END(str) qDebug() << "Search_App_Launch :"<<str<<"at:"<<QTime::currentTime().second()<<":"<<QTime::currentTime().msec();
|
|
35 |
#else
|
|
36 |
#define PERF_APP_LAUNCH_END(str)
|
|
37 |
#endif
|
|
38 |
|
|
39 |
#ifndef SEARCH_UNITTESTING
|
|
40 |
#define SEARCH_CLASS(aClassName)
|
|
41 |
#else
|
|
42 |
#define SEARCH_CLASS(aClassName) class aClassName;
|
|
43 |
#endif
|
|
44 |
|
|
45 |
#ifndef SEARCH_UNITTESTING
|
|
46 |
#define SEARCH_FRIEND_CLASS(aClassName)
|
|
47 |
#else
|
|
48 |
#define SEARCH_FRIEND_CLASS(aClassName) friend class aClassName;
|
|
49 |
#endif
|
|
50 |
|
|
51 |
#define SEARCHCATCHDEBUG qDebug("Catched in: %s on line: %d",__FILE__,__LINE__);
|
|
52 |
#define SEARCHDEBUG(a) qDebug("%s in: %s on line: %d", (a), __FILE__,__LINE__);
|
|
53 |
|
|
54 |
#ifdef NFT
|
|
55 |
#define SEARCHTEST(aText) qDebug() << QString(aText)
|
|
56 |
#ifdef Q_OS_SYMBIAN
|
|
57 |
inline void SEARCHFreeRam(const QString &aFunction)
|
|
58 |
{
|
|
59 |
TMemoryInfoV1Buf meminfo;
|
|
60 |
UserHal::MemoryInfo(meminfo);
|
|
61 |
int memSize = meminfo().iTotalRamInBytes >> 10;
|
|
62 |
int memFree = meminfo().iFreeRamInBytes >> 10;
|
|
63 |
|
|
64 |
RHeap& ownHeap = User::Heap();
|
|
65 |
TInt biggestBlock = 0;
|
|
66 |
int heapFree = ownHeap.Available(biggestBlock) >> 10;
|
|
67 |
int heapSize = ownHeap.Size() >> 10;
|
|
68 |
qDebug()<< aFunction << "memFree" << memFree << "kb memSize" << memSize << "kb heapFree" << heapFree << "kb heapSize" << heapSize;
|
|
69 |
}
|
|
70 |
|
|
71 |
#define SEARCH_FUNC_ENTRY(aFunction) SEARCHFreeRam(QString(aFunction)+" entry")
|
|
72 |
#define SEARCH_FUNC_EXIT(aFunction) SEARCHFreeRam(QString(aFunction)+" exit")
|
|
73 |
#else
|
|
74 |
#define SEARCH_FUNC_ENTRY(aFunction) qDebug()<< aFunction << " entry";
|
|
75 |
#define SEARCH_FUNC_EXIT(aFunction) qDebug()<< aFunction << " exit";
|
|
76 |
#endif
|
|
77 |
|
|
78 |
#else
|
|
79 |
#define SEARCHTEST(aText)
|
|
80 |
#define SEARCH_FUNC_ENTRY(aFunction)
|
|
81 |
#define SEARCH_FUNC_EXIT(aFunction)
|
|
82 |
#endif
|
|
83 |
|
|
84 |
#endif // SEARCH_GLOBAL_H
|
|
85 |
|