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
|
26
|
29 |
|
|
30 |
//settings storage path
|
15
|
31 |
const QString SETTINGS_INI_PATH("C:\\private\\2002c377\\searchsettings.ini");
|
26
|
32 |
|
|
33 |
|
|
34 |
#define SEARCHAIWDECLINDEVICE "SearchDeviceQueryView"
|
|
35 |
#define SEARCHAIWDECLONLINE "SearchWebQueryView"
|
|
36 |
#define SEARCHAIWDECLMAINVIEW "SearchView"
|
|
37 |
|
|
38 |
#define SEARCHAIWQUERY "query"
|
|
39 |
|
|
40 |
#define SEARCHAPPUID "2002C377"
|
|
41 |
|
|
42 |
#define DEFAULT_SEARCH_FIELD "_aggregate"
|
|
43 |
|
|
44 |
|
|
45 |
#define SUGGESTIONLINKS "links"
|
|
46 |
|
|
47 |
#define FIRSTLINEFIELD "_hlexcerpt"
|
|
48 |
#define MAILBOXFIELD "MailBoxId"
|
|
49 |
#define FOLDERFIELD "FolderId"
|
|
50 |
#define NAMEFIELD "Name"
|
|
51 |
#define EXTENSIONFIELD "Extension"
|
|
52 |
#define ISFOLDERFIELD "IsFolder"
|
|
53 |
#define MEDIAIDFIELD "MediaId"
|
|
54 |
|
|
55 |
#define MEDIACATEGORY "media"
|
|
56 |
#define AUDIOCATEGORY "audio"
|
|
57 |
#define VIDEOCATEGORY "video"
|
|
58 |
#define IMAGECATEGORY "image"
|
|
59 |
#define EMAILCATEGORY "email"
|
|
60 |
#define CONTACTCATEGORY "contact"
|
|
61 |
#define CALENDARCATEGORY "calendar"
|
|
62 |
#define BOOKMARKCATEGORY "bookmark"
|
|
63 |
#define APPLICATIONCATEGORY "applications"
|
|
64 |
#define NOTESCATEGORY "notes"
|
|
65 |
#define FILECATEGORY "file"
|
|
66 |
#define MESSAGECATEGORY "msg"
|
|
67 |
#define FILEFOLDERCATEGORY "file folder"
|
|
68 |
|
9
|
69 |
//#define OST_TRACE_COMPILER_IN_USE //Uncomment to enable performance measurements.
|
|
70 |
|
|
71 |
#ifdef OST_TRACE_COMPILER_IN_USE
|
|
72 |
#define PERF_APP_LAUNCH_END(str) qDebug() << "Search_App_Launch :"<<str<<"at:"<<QTime::currentTime().second()<<":"<<QTime::currentTime().msec();
|
|
73 |
#else
|
|
74 |
#define PERF_APP_LAUNCH_END(str)
|
|
75 |
#endif
|
|
76 |
|
|
77 |
#ifndef SEARCH_UNITTESTING
|
|
78 |
#define SEARCH_CLASS(aClassName)
|
|
79 |
#else
|
|
80 |
#define SEARCH_CLASS(aClassName) class aClassName;
|
|
81 |
#endif
|
|
82 |
|
|
83 |
#ifndef SEARCH_UNITTESTING
|
|
84 |
#define SEARCH_FRIEND_CLASS(aClassName)
|
|
85 |
#else
|
|
86 |
#define SEARCH_FRIEND_CLASS(aClassName) friend class aClassName;
|
|
87 |
#endif
|
|
88 |
|
|
89 |
#define SEARCHCATCHDEBUG qDebug("Catched in: %s on line: %d",__FILE__,__LINE__);
|
|
90 |
#define SEARCHDEBUG(a) qDebug("%s in: %s on line: %d", (a), __FILE__,__LINE__);
|
|
91 |
|
|
92 |
#ifdef NFT
|
|
93 |
#define SEARCHTEST(aText) qDebug() << QString(aText)
|
|
94 |
#ifdef Q_OS_SYMBIAN
|
|
95 |
inline void SEARCHFreeRam(const QString &aFunction)
|
|
96 |
{
|
|
97 |
TMemoryInfoV1Buf meminfo;
|
|
98 |
UserHal::MemoryInfo(meminfo);
|
|
99 |
int memSize = meminfo().iTotalRamInBytes >> 10;
|
|
100 |
int memFree = meminfo().iFreeRamInBytes >> 10;
|
|
101 |
|
|
102 |
RHeap& ownHeap = User::Heap();
|
|
103 |
TInt biggestBlock = 0;
|
|
104 |
int heapFree = ownHeap.Available(biggestBlock) >> 10;
|
|
105 |
int heapSize = ownHeap.Size() >> 10;
|
|
106 |
qDebug()<< aFunction << "memFree" << memFree << "kb memSize" << memSize << "kb heapFree" << heapFree << "kb heapSize" << heapSize;
|
|
107 |
}
|
|
108 |
|
|
109 |
#define SEARCH_FUNC_ENTRY(aFunction) SEARCHFreeRam(QString(aFunction)+" entry")
|
|
110 |
#define SEARCH_FUNC_EXIT(aFunction) SEARCHFreeRam(QString(aFunction)+" exit")
|
|
111 |
#else
|
|
112 |
#define SEARCH_FUNC_ENTRY(aFunction) qDebug()<< aFunction << " entry";
|
|
113 |
#define SEARCH_FUNC_EXIT(aFunction) qDebug()<< aFunction << " exit";
|
|
114 |
#endif
|
|
115 |
|
|
116 |
#else
|
|
117 |
#define SEARCHTEST(aText)
|
|
118 |
#define SEARCH_FUNC_ENTRY(aFunction)
|
|
119 |
#define SEARCH_FUNC_EXIT(aFunction)
|
|
120 |
#endif
|
|
121 |
|
|
122 |
#endif // SEARCH_GLOBAL_H
|
|
123 |
|