--- a/searcher/searchclient/bwins/cpixsearchclientu.def Wed Aug 25 13:17:41 2010 +0530
+++ b/searcher/searchclient/bwins/cpixsearchclientu.def Tue Aug 31 17:30:16 2010 +0530
@@ -99,4 +99,5 @@
?UnDefineVolume@RSearchServerSession@@QAEHABVTDesC16@@@Z @ 98 NONAME ; int RSearchServerSession::UnDefineVolume(class TDesC16 const &)
?ExternalizeL@CDocumentField@@QBEXAAVRWriteStream@@@Z @ 99 NONAME ; void CDocumentField::ExternalizeL(class RWriteStream &) const
?AddL@RSearchServerSubSession@@QAEXABVTDesC8@@@Z @ 100 NONAME ; void RSearchServerSubSession::AddL(class TDesC8 const &)
+ ?AddHLDisplayFieldL@CSearchDocument@@QAEXABVTDesC16@@@Z @ 101 NONAME ; void CSearchDocument::AddHLDisplayFieldL(class TDesC16 const &)
--- a/searcher/searchclient/eabi/cpixsearchclientu.def Wed Aug 25 13:17:41 2010 +0530
+++ b/searcher/searchclient/eabi/cpixsearchclientu.def Tue Aug 31 17:30:16 2010 +0530
@@ -116,4 +116,5 @@
_ZTV13CCPixSearcher @ 115 NONAME
_ZTV14CDocumentField @ 116 NONAME
_ZTV15CSearchDocument @ 117 NONAME
+ _ZN15CSearchDocument18AddHLDisplayFieldLERK7TDesC16 @ 118 NONAME
--- a/searcher/searchclient/group/searchclient.mmp Wed Aug 25 13:17:41 2010 +0530
+++ b/searcher/searchclient/group/searchclient.mmp Tue Aug 31 17:30:16 2010 +0530
@@ -40,10 +40,10 @@
LIBRARY estor.lib
LIBRARY flogger.lib
+LIBRARY centralrepository.lib
CAPABILITY CAP_GENERAL_DLL
-//Used to enable highlighter
-//MACRO USE_HIGHLIGHTER
-
+//Useto enable highlighter
+MACRO USE_HIGHLIGHTER
// End of File
--- a/searcher/searchclient/src/csearchdocument.cpp Wed Aug 25 13:17:41 2010 +0530
+++ b/searcher/searchclient/src/csearchdocument.cpp Tue Aug 31 17:30:16 2010 +0530
@@ -246,10 +246,10 @@
return iBoost;
}
-//#ifdef USE_HIGHLIGHTER
-//EXPORT_C void CSearchDocument::AddHLDisplayFieldL(const TDesC& aField)
-// {
-// // Needs to be tokenised to rewrite the query, but should not be searchable so EAggregateNo.
-// AddFieldL( _L( CPIX_HL_EXCERPT_FIELD ), aField, CDocumentField::EStoreYes | CDocumentField::EIndexTokenized | CDocumentField::EAggregateNo );
-// }
-//#endif
+#ifdef USE_HIGHLIGHTER
+EXPORT_C void CSearchDocument::AddHLDisplayFieldL(const TDesC& aField)
+ {
+ // Needs to be tokenised to rewrite the query, but should not be searchable so EAggregateNo.
+ AddFieldL( _L( CPIX_HL_EXCERPT_FIELD ), aField, CDocumentField::EStoreYes | CDocumentField::EIndexTokenized | CDocumentField::EAggregateNo );
+ }
+#endif
--- a/searcher/searchclient/src/rsearchserversession.cpp Wed Aug 25 13:17:41 2010 +0530
+++ b/searcher/searchclient/src/rsearchserversession.cpp Tue Aug 31 17:30:16 2010 +0530
@@ -28,12 +28,13 @@
#ifdef OST_TRACE_COMPILER_IN_USE
#include "rsearchserversessionTraces.h"
#endif
-
+#include "cpixwatchdogcommon.h"
+#include <centralrepository.h>
// FUNCTION PROTOTYPES
-static TInt StartServer();
-static TInt CreateServerProcess();
+static TInt StartServer( const TDesC& aServerName , TUid aServerUid );
+static TInt CreateServerProcess( const TDesC& aServerName , TUid aServerUid );
// RsearchServerSession::RsearchServerSession()
// C++ default constructor can NOT contain any code, that might leave.
@@ -48,12 +49,45 @@
// -----------------------------------------------------------------------------
EXPORT_C TInt RSearchServerSession::Connect()
{
- TInt err = StartServer();
-
- if ( KErrNone == err )
- {
- err = CreateSession(KSearchServerName, Version(), KDefaultMessageSlots);
- }
+ //read the name and Uid of the search server
+ TInt err = KErrNotReady;
+ // get the watchdog repro
+ //TRAP_IGNORE is used to avoid the code scanner error
+ CRepository* wdrepo = NULL;
+ TRAP_IGNORE(wdrepo = CRepository::NewL( KWDrepoUidMenu ));
+ if ( wdrepo )
+ {
+ HBufC* servername = NULL;
+ TUid serveruid = {0};
+ TBuf<KCenrepUidLength> temp;
+ TInt64 value;
+ TLex uidvalue;
+ //read the searchserver UId
+ if ( KErrNone == wdrepo->Get( KSearchServerUIDKey, temp ))
+ {
+ uidvalue.Assign(temp);
+ if (KErrNone == uidvalue.Val( value,EHex ))
+ serveruid.iUid = value;
+ }
+ //read the search server name
+ if ( KErrNone == wdrepo->Get( KSearchServerNAMEKey, temp ))
+ {
+ //TRAP_IGNORE is used to avoid the code scanner error
+ TRAP_IGNORE(servername = HBufC::NewL( temp.Length() ));
+ TPtr ssname = servername->Des();
+ ssname.Copy( temp );
+ }
+ // make sure the server is started before creating connection
+ if ( servername )
+ err = StartServer( *servername , serveruid );
+
+ if ( KErrNone == err )
+ {
+ err = CreateSession(*servername, Version(), KDefaultMessageSlots);
+ }
+ delete servername;
+ }
+ delete wdrepo;
return err;
}
@@ -353,7 +387,7 @@
delete iSizeList;
iSizeList = NULL;
}
- iSizeList = STATIC_CAST(TInt *, User::AllocZL(iReqCount * sizeof(TInt)));
+ TRAP_IGNORE(iSizeList = STATIC_CAST(TInt *, User::AllocZL(iReqCount * sizeof(TInt))));
//iDocSizeArray
TPtr8 blob((TUint8*)iSizeList, iReqCount * sizeof(TInt));
@@ -484,11 +518,11 @@
// StartServer()
// Starts the server if it is not already running
-static TInt StartServer()
+static TInt StartServer( const TDesC& aServerName , TUid aServerUid )
{
TInt result;
- TFindServer findsearchServer(KSearchServerName);
+ TFindServer findsearchServer(aServerName);
TFullName name;
result = findsearchServer.Next(name);
@@ -505,7 +539,7 @@
return result;
}
- result = CreateServerProcess();
+ result = CreateServerProcess( aServerName,aServerUid );
if (result != KErrNone)
{
return result;
@@ -519,15 +553,15 @@
// CreateServerProcess()
// Creates a server process
-static TInt CreateServerProcess()
+static TInt CreateServerProcess( const TDesC& aServerName , TUid aServerUid )
{
TInt result;
- const TUidType serverUid( KNullUid, KNullUid, KServerUid3);
+ const TUidType serverUid( KNullUid, KNullUid, aServerUid);
RProcess server;
- result = server.Create(KSearchServerFilename, KNullDesC, serverUid);
+ result = server.Create(aServerName, KNullDesC, serverUid);
if (result != KErrNone)
{
return result;
--- a/searcher/tsrc/cpixsearchertest/group/cpixsearchertest.mmp Wed Aug 25 13:17:41 2010 +0530
+++ b/searcher/tsrc/cpixsearchertest/group/cpixsearchertest.mmp Tue Aug 31 17:30:16 2010 +0530
@@ -95,6 +95,7 @@
LIBRARY FLOGGER.lib
LIBRARY estor.lib
LIBRARY efsrv.lib
+LIBRARY centralrepository.lib
EPOCALLOWDLLDATA
// End of File
--- a/searchsrv_plat/cpix_framework_api/inc/csearchdocument.h Wed Aug 25 13:17:41 2010 +0530
+++ b/searchsrv_plat/cpix_framework_api/inc/csearchdocument.h Tue Aug 31 17:30:16 2010 +0530
@@ -182,16 +182,16 @@
*/
IMPORT_C TReal32 Boost() const;
-//#ifdef USE_HIGHLIGHTER
-// /**
-// * Adds the contents to field which will be
-// * shown in the first line of searchUI.
-// * The fields included here in this field should
-// * not be included in excerpt field(second line in seachUI)
-// * @param aExcerpt Excerpt text to add to the document.
-// */
-// IMPORT_C void AddHLDisplayFieldL(const TDesC& aField);
-//#endif
+#ifdef USE_HIGHLIGHTER
+ /**
+ * Adds the contents to field which will be
+ * shown in the first line of searchUI.
+ * The fields included here in this field should
+ * not be included in excerpt field(second line in seachUI)
+ * @param aExcerpt Excerpt text to add to the document.
+ */
+ IMPORT_C void AddHLDisplayFieldL(const TDesC& aField);
+#endif
private: // Constructors
--- a/sis/centrep.pkg Wed Aug 25 13:17:41 2010 +0530
+++ b/sis/centrep.pkg Tue Aug 31 17:30:16 2010 +0530
@@ -2,7 +2,7 @@
&EN
; Header
-#{ "CenRep INI file"}, (0x10202BE9), 1, 2, 3, TYPE=SP
+#{ "CenRep INI file"}, (0x10202BE9), 1, 2, 3, TYPE=SP, RU;
; Localised Vendor name
%{"Nokia"}