# HG changeset patch # User hgs # Date 1286264712 -19800 # Node ID d4d56f5e7c554f1edfeaf0a307c1b9f76838253d # Parent 55653477139631abab3f9bf836b1b4af0fc21dd0 201039 diff -r 556534771396 -r d4d56f5e7c55 harvester/contentinfodb/bwins/cpixcontentinfodbu.def --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/harvester/contentinfodb/bwins/cpixcontentinfodbu.def Tue Oct 05 13:15:12 2010 +0530 @@ -0,0 +1,46 @@ +EXPORTS + ?tr@ContentInfoDbRead@@SA?AVQString@@PBD0H@Z @ 1 NONAME ; class QString ContentInfoDbRead::tr(char const *, char const *, int) + ?tr@ContentInfoDbRead@@SA?AVQString@@PBD0@Z @ 2 NONAME ; class QString ContentInfoDbRead::tr(char const *, char const *) + ?qt_metacast@ContentInfoDbUpdate@@UAEPAXPBD@Z @ 3 NONAME ; void * ContentInfoDbUpdate::qt_metacast(char const *) + ?getPrimaryKeys@ContentInfoDbRead@@QAE?AVQStringList@@XZ @ 4 NONAME ; class QStringList ContentInfoDbRead::getPrimaryKeys(void) + ?d_func@ContentInfoDbRead@@AAEPAVContentInfoDbReadPrivate@@XZ @ 5 NONAME ; class ContentInfoDbReadPrivate * ContentInfoDbRead::d_func(void) + ??0ContentInfoDbRead@@QAE@XZ @ 6 NONAME ; ContentInfoDbRead::ContentInfoDbRead(void) + ?metaObject@ContentInfoDbRead@@UBEPBUQMetaObject@@XZ @ 7 NONAME ; struct QMetaObject const * ContentInfoDbRead::metaObject(void) const + ?UpdateDb@ContentInfoDbUpdate@@QAE_NVQString@@@Z @ 8 NONAME ; bool ContentInfoDbUpdate::UpdateDb(class QString) + ?UpdateIndexStatus@ContentInfoDbUpdate@@QAE_NVQString@@H@Z @ 9 NONAME ; bool ContentInfoDbUpdate::UpdateIndexStatus(class QString, int) + ?qt_metacast@ContentInfoDbRead@@UAEPAXPBD@Z @ 10 NONAME ; void * ContentInfoDbRead::qt_metacast(char const *) + ?trUtf8@ContentInfoDbUpdate@@SA?AVQString@@PBD0@Z @ 11 NONAME ; class QString ContentInfoDbUpdate::trUtf8(char const *, char const *) + ?slotfirstLineMapping@ContentInfoDbUpdate@@QAEXVQStringList@@@Z @ 12 NONAME ; void ContentInfoDbUpdate::slotfirstLineMapping(class QStringList) + ?dataChanged@ContentInfoDbRead@@IAEXXZ @ 13 NONAME ; void ContentInfoDbRead::dataChanged(void) + ?staticMetaObject@ContentInfoDbUpdate@@2UQMetaObject@@B @ 14 NONAME ; struct QMetaObject const ContentInfoDbUpdate::staticMetaObject + ?slotupdateCategoryInfo@ContentInfoDbUpdate@@QAEXV?$QMap@VQString@@V1@@@@Z @ 15 NONAME ; void ContentInfoDbUpdate::slotupdateCategoryInfo(class QMap) + ?trUtf8@ContentInfoDbRead@@SA?AVQString@@PBD0H@Z @ 16 NONAME ; class QString ContentInfoDbRead::trUtf8(char const *, char const *, int) + ?qt_metacall@ContentInfoDbUpdate@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 17 NONAME ; int ContentInfoDbUpdate::qt_metacall(enum QMetaObject::Call, int, void * *) + ?categoryCount@ContentInfoDbRead@@QAEHXZ @ 18 NONAME ; int ContentInfoDbRead::categoryCount(void) + ?deleteCategory@ContentInfoDbUpdate@@QAEXVQString@@@Z @ 19 NONAME ; void ContentInfoDbUpdate::deleteCategory(class QString) + ?getStaticMetaObject@ContentInfoDbUpdate@@SAABUQMetaObject@@XZ @ 20 NONAME ; struct QMetaObject const & ContentInfoDbUpdate::getStaticMetaObject(void) + ??1ContentInfoDbRead@@UAE@XZ @ 21 NONAME ; ContentInfoDbRead::~ContentInfoDbRead(void) + ??_EContentInfoDbRead@@UAE@I@Z @ 22 NONAME ; ContentInfoDbRead::~ContentInfoDbRead(unsigned int) + ?getLongTaburi@ContentInfoDbRead@@QAE?AVQStringList@@VQString@@0@Z @ 23 NONAME ; class QStringList ContentInfoDbRead::getLongTaburi(class QString, class QString) + ??1ContentInfoDbUpdate@@UAE@XZ @ 24 NONAME ; ContentInfoDbUpdate::~ContentInfoDbUpdate(void) + ?getStaticMetaObject@ContentInfoDbRead@@SAABUQMetaObject@@XZ @ 25 NONAME ; struct QMetaObject const & ContentInfoDbRead::getStaticMetaObject(void) + ?slotupdateFieldmapping@ContentInfoDbUpdate@@QAEXVQString@@VQStringList@@@Z @ 26 NONAME ; void ContentInfoDbUpdate::slotupdateFieldmapping(class QString, class QStringList) + ?d_func@ContentInfoDbRead@@ABEPBVContentInfoDbReadPrivate@@XZ @ 27 NONAME ; class ContentInfoDbReadPrivate const * ContentInfoDbRead::d_func(void) const + ?qt_metacall@ContentInfoDbRead@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 28 NONAME ; int ContentInfoDbRead::qt_metacall(enum QMetaObject::Call, int, void * *) + ?geturiDetails@ContentInfoDbRead@@QAE_NVQString@@0AAV2@1@Z @ 29 NONAME ; bool ContentInfoDbRead::geturiDetails(class QString, class QString, class QString &, class QString &) + ?slotrelevancyMapping@ContentInfoDbUpdate@@QAEXVQString@@0@Z @ 30 NONAME ; void ContentInfoDbUpdate::slotrelevancyMapping(class QString, class QString) + ?trUtf8@ContentInfoDbRead@@SA?AVQString@@PBD0@Z @ 31 NONAME ; class QString ContentInfoDbRead::trUtf8(char const *, char const *) + ?UpdateBlacklisted@ContentInfoDbUpdate@@QAE_NVQString@@H@Z @ 32 NONAME ; bool ContentInfoDbUpdate::UpdateBlacklisted(class QString, int) + ??0ContentInfoDbUpdate@@QAE@XZ @ 33 NONAME ; ContentInfoDbUpdate::ContentInfoDbUpdate(void) + ??_EContentInfoDbUpdate@@UAE@I@Z @ 34 NONAME ; ContentInfoDbUpdate::~ContentInfoDbUpdate(unsigned int) + ?getActionuri@ContentInfoDbRead@@QAE?AVQStringList@@VQString@@@Z @ 35 NONAME ; class QStringList ContentInfoDbRead::getActionuri(class QString) + ?getShortTaburi@ContentInfoDbRead@@QAE?AVQString@@V2@@Z @ 36 NONAME ; class QString ContentInfoDbRead::getShortTaburi(class QString) + ?InsertPrimaryKey@ContentInfoDbUpdate@@AAE?AVQString@@V2@0V?$QMap@VQString@@V1@@@@Z @ 37 NONAME ; class QString ContentInfoDbUpdate::InsertPrimaryKey(class QString, class QString, class QMap) + ?getValues@ContentInfoDbRead@@QAE?AVQString@@V2@0@Z @ 38 NONAME ; class QString ContentInfoDbRead::getValues(class QString, class QString) + ?metaObject@ContentInfoDbUpdate@@UBEPBUQMetaObject@@XZ @ 39 NONAME ; struct QMetaObject const * ContentInfoDbUpdate::metaObject(void) const + ?tr@ContentInfoDbUpdate@@SA?AVQString@@PBD0@Z @ 40 NONAME ; class QString ContentInfoDbUpdate::tr(char const *, char const *) + ?staticMetaObject@ContentInfoDbRead@@2UQMetaObject@@B @ 41 NONAME ; struct QMetaObject const ContentInfoDbRead::staticMetaObject + ?slotupdateUri@ContentInfoDbUpdate@@QAEXV?$QMap@VQString@@V1@@@@Z @ 42 NONAME ; void ContentInfoDbUpdate::slotupdateUri(class QMap) + ?trUtf8@ContentInfoDbUpdate@@SA?AVQString@@PBD0H@Z @ 43 NONAME ; class QString ContentInfoDbUpdate::trUtf8(char const *, char const *, int) + ?tr@ContentInfoDbUpdate@@SA?AVQString@@PBD0H@Z @ 44 NONAME ; class QString ContentInfoDbUpdate::tr(char const *, char const *, int) + diff -r 556534771396 -r d4d56f5e7c55 harvester/contentinfodb/contentinfodb.pri --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/harvester/contentinfodb/contentinfodb.pri Tue Oct 05 13:15:12 2010 +0530 @@ -0,0 +1,22 @@ +# +# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +# All rights reserved. +# This component and the accompanying materials are made available +# under the terms of "Eclipse Public License v1.0" +# which accompanies this distribution, and is available +# at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +# Initial Contributors: +# Nokia Corporation - initial contribution. +# +# Contributors: +# +# Description: will parse the xml file and does sql write/read operations +# + +HEADERS += ./inc/*.h \ + ../../searchsrv_plat/cpix_utility_api/inc/cpixcontentinfodbread.h \ + ../../searchsrv_plat/cpix_utility_api/inc/cpixcontentinfodbdef.h + +SOURCES += ./src/*.cpp + diff -r 556534771396 -r d4d56f5e7c55 harvester/contentinfodb/contentinfodb.pro --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/harvester/contentinfodb/contentinfodb.pro Tue Oct 05 13:15:12 2010 +0530 @@ -0,0 +1,44 @@ +# +# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +# All rights reserved. +# This component and the accompanying materials are made available +# under the terms of "Eclipse Public License v1.0" +# which accompanies this distribution, and is available +# at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +# Initial Contributors: +# Nokia Corporation - initial contribution. +# +# Contributors: +# +# Description: will parse the xml file and does sql write/read operations +# + +TEMPLATE = lib +TARGET = cpixcontentinfodb + +DEFINES += BUILD_CONTENTINFODB + +QT += xml \ + sql + +INCLUDEPATH += ./inc \ + ./src + +symbian { + TARGET.UID2 = 0x20004C45 + TARGET.UID3 = 0x2002C37E + TARGET.EPOCALLOWDLLDATA = 1 + TARGET.CAPABILITY = CAP_GENERAL_DLL + INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE + INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE + + defBlock = \ + "$${LITERAL_HASH}if defined(EABI)" \ + "DEFFILE eabi/" \ + "$${LITERAL_HASH}else" \ + "DEFFILE bwins/" \ + "$${LITERAL_HASH}endif" + MMP_RULES += defBlock +} +include(contentinfodb.pri) diff -r 556534771396 -r d4d56f5e7c55 harvester/contentinfodb/eabi/cpixcontentinfodbu.def --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/harvester/contentinfodb/eabi/cpixcontentinfodbu.def Tue Oct 05 13:15:12 2010 +0530 @@ -0,0 +1,44 @@ +EXPORTS + _ZN17ContentInfoDbRead11dataChangedEv @ 1 NONAME + _ZN17ContentInfoDbRead11qt_metacallEN11QMetaObject4CallEiPPv @ 2 NONAME + _ZN17ContentInfoDbRead11qt_metacastEPKc @ 3 NONAME + _ZN17ContentInfoDbRead12getActionuriE7QString @ 4 NONAME + _ZN17ContentInfoDbRead13categoryCountEv @ 5 NONAME + _ZN17ContentInfoDbRead13getLongTaburiE7QStringS0_ @ 6 NONAME + _ZN17ContentInfoDbRead13geturiDetailsE7QStringS0_RS0_S1_ @ 7 NONAME + _ZN17ContentInfoDbRead14getPrimaryKeysEv @ 8 NONAME + _ZN17ContentInfoDbRead14getShortTaburiE7QString @ 9 NONAME + _ZN17ContentInfoDbRead16staticMetaObjectE @ 10 NONAME DATA 16 + _ZN17ContentInfoDbRead19getStaticMetaObjectEv @ 11 NONAME + _ZN17ContentInfoDbRead9getValuesE7QStringS0_ @ 12 NONAME + _ZN17ContentInfoDbReadC1Ev @ 13 NONAME + _ZN17ContentInfoDbReadC2Ev @ 14 NONAME + _ZN17ContentInfoDbReadD0Ev @ 15 NONAME + _ZN17ContentInfoDbReadD1Ev @ 16 NONAME + _ZN17ContentInfoDbReadD2Ev @ 17 NONAME + _ZN19ContentInfoDbUpdate11qt_metacallEN11QMetaObject4CallEiPPv @ 18 NONAME + _ZN19ContentInfoDbUpdate11qt_metacastEPKc @ 19 NONAME + _ZN19ContentInfoDbUpdate13slotupdateUriE4QMapI7QStringS1_E @ 20 NONAME + _ZN19ContentInfoDbUpdate14deleteCategoryE7QString @ 21 NONAME + _ZN19ContentInfoDbUpdate16InsertPrimaryKeyE7QStringS0_4QMapIS0_S0_E @ 22 NONAME + _ZN19ContentInfoDbUpdate16staticMetaObjectE @ 23 NONAME DATA 16 + _ZN19ContentInfoDbUpdate17UpdateBlacklistedE7QStringi @ 24 NONAME + _ZN19ContentInfoDbUpdate17UpdateIndexStatusE7QStringi @ 25 NONAME + _ZN19ContentInfoDbUpdate19getStaticMetaObjectEv @ 26 NONAME + _ZN19ContentInfoDbUpdate20slotfirstLineMappingE11QStringList @ 27 NONAME + _ZN19ContentInfoDbUpdate20slotrelevancyMappingE7QStringS0_ @ 28 NONAME + _ZN19ContentInfoDbUpdate22slotupdateCategoryInfoE4QMapI7QStringS1_E @ 29 NONAME + _ZN19ContentInfoDbUpdate22slotupdateFieldmappingE7QString11QStringList @ 30 NONAME + _ZN19ContentInfoDbUpdate8UpdateDbE7QString @ 31 NONAME + _ZN19ContentInfoDbUpdateC1Ev @ 32 NONAME + _ZN19ContentInfoDbUpdateC2Ev @ 33 NONAME + _ZN19ContentInfoDbUpdateD0Ev @ 34 NONAME + _ZN19ContentInfoDbUpdateD1Ev @ 35 NONAME + _ZN19ContentInfoDbUpdateD2Ev @ 36 NONAME + _ZNK17ContentInfoDbRead10metaObjectEv @ 37 NONAME + _ZNK19ContentInfoDbUpdate10metaObjectEv @ 38 NONAME + _ZTI17ContentInfoDbRead @ 39 NONAME + _ZTI19ContentInfoDbUpdate @ 40 NONAME + _ZTV17ContentInfoDbRead @ 41 NONAME + _ZTV19ContentInfoDbUpdate @ 42 NONAME + diff -r 556534771396 -r d4d56f5e7c55 harvester/contentinfodb/inc/contentinfodb.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/harvester/contentinfodb/inc/contentinfodb.h Tue Oct 05 13:15:12 2010 +0530 @@ -0,0 +1,146 @@ +/* + * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: contentinfodb . + * + */ +#ifndef CONTENTINFODB_H +#define CONTENTINFODB_H +#include +#include +#include +#include "contentinfodbcommon.h" +CONTENTINFODB_CLASS(ContentinfodbTest) + +class ContentInfoDb : public QObject + { +Q_OBJECT +public: + /** + * Singleton construtor + * @since S60 ?S60_version. + */ + static ContentInfoDb* instance() + { + static QMutex mutex; + if (!m_instance) + { + mutex.lock(); + m_instanceCounter++; + if (!m_instance) + { + m_instance = new ContentInfoDb; + } + mutex.unlock(); + } + + return m_instance; + } + + /** + * Singleton destructor + * @since S60 ?S60_version. + */ + static void deleteinstance() + { + m_instanceCounter--; + if ((m_instanceCounter <= 0) && (m_instance)) + { + delete m_instance; + m_instance = 0; + } + } +private: + /** + * Constructor. + * @since S60 ?S60_version. + */ + ContentInfoDb(); + + /** + * Destructor. + * @since S60 ?S60_version. + */ + ~ContentInfoDb(); +public: + + /** + * returns success/failure status. + * @since S60 ?S60_version. + * @param query + */ + bool writeData(QString query); + + /** + * returns success/failure status. + * @since S60 ?S60_version. + * @param query input + */ + QStringList readData(QString query); + + /** + * returns value at mentioned position + * @param query input + */ + QString readStringData(QString query); + + /** + * creates the table with the mentioned tablename. + * @param tablename + * @param sql query + */ + void createTable(QString tablename, QString query); + + /** + * returns success/failure status. + * @since S60 ?S60_version. + */ + bool Open(); + + /** + * close the database connection + * @since S60 ?S60_version. + */ + void Close(); + +signals: + + /** + * signal to notify when updation happens in the contentinfodb + */ + void dbUpdated(); + +private: + + /** + * static instance to make single instance + * Own. + */ + static ContentInfoDb *m_instance; + + /** + * counter for number for instance + * Own. + */ + static int m_instanceCounter; + + /** + * database handle + * Own. + */ + QSqlDatabase m_db; + +private: + CONTENTINFODB_FRIEND_CLASS(ContentinfodbTest) + }; +#endif //CONTENTINFODB_H diff -r 556534771396 -r d4d56f5e7c55 harvester/contentinfodb/inc/contentinfodbcommon.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/harvester/contentinfodb/inc/contentinfodbcommon.h Tue Oct 05 13:15:12 2010 +0530 @@ -0,0 +1,111 @@ +/* + * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: SQL queries, tagname,macros. + * + */ + +#ifndef CONTENTINFODBCOMMON_H_ +#define CONTENTINFODBCOMMON_H_ + +#ifndef CONTENTINFODB_UNITTESTING +#define CONTENTINFODB_CLASS(aClassName) +#else +#define CONTENTINFODB_CLASS(aClassName) class aClassName; +#endif + +#ifndef CONTENTINFODB_UNITTESTING +#define CONTENTINFODB_FRIEND_CLASS(aClassName) +#else +#define CONTENTINFODB_FRIEND_CLASS(aClassName) friend class aClassName; +#endif + +#ifdef BUILD_CONTENTINFODB +#define DECL_CONTENTINFODB Q_DECL_EXPORT +#else +#define DECL_CONTENTINFODB Q_DECL_IMPORT +#endif + +//sql queries +// sql query to create a master table +#define QUERYCREATEMAINTABLE "create table maintable (name varchar(50) primary key,ins int default '0', bls int default '0',actionuri varchar(20),licon varchar(50),baseapp varchar(50),lname varchar(50),displayorder varchar(10),exceptionstring varchar(50),tsfile varchar(50),fieldmap varchar(20),indexcontentsize varchar(5),relevancy varchar(20),policy varchar(50),resultfirstline varchar(20))" + +// sql query to insert row into the mentioned table +#define QUERYINSERTROW "INSERT INTO %1 (%2) values('%3')" + +//sql query to update the value on mentioned table and field +#define QUERYUPDATEDATA "UPDATE %1 SET %2='%3' WHERE %4='%5'" + +//sql query to create activity uri table +#define QUERYCREATEACTIONURITABLE "create table %1 (uristring varchar(300) primary key,licon varchar(50),lname varchar(50),uriref varchar(20),action varchar(20))" + +//sql query to create field map table +#define QUERYCREATEFIELDMAPTABLE "create table %1 (field varchar(300) primary key,urilist varchar(50))" + +//sql query to create a table for field map values +#define QUERYCREATEFIELDMAPSUBTABLE "create table %1 (auri varchar(20) primary key)" + +//sql query to create a table for firstline information +#define QUERYCREATEFIRSTLINETABLE "create table %1 (field varchar(50) primary key)" + +//sql query to create a table for relevancy information +#define QUERYCREATERELEVANCYTABLE "create table %1 (field varchar(50) primary key,boostvalue varchar(20))" + +#define QUERYDATARETRIVAL "SELECT %1 FROM %2 WHERE %3 ='%4'" + +#define QUERYPRIMARYKEYS "SELECT DISTINCT %1 FROM %2" + +#define QUERYFILTERDATA "SELECT %1 FROM %2 WHERE %3 LIKE '%%4%'" + +#define QUERYSORT "SELECT name FROM maintable ORDER BY displayorder" + +#define QUERYDELETE "DELETE FROM maintable WHERE name ='%1'" + +#define QUERYCOUNT "SELECT COUNT(*) FROM maintable" + +// Database info +// master table name +#define MAINTABLENAME "maintable" + +// connection name +#define CONNECTIONNAME "contentinfodb" + +//database type +#define DATABASETYPE "QSQLITE" + +//path of contentinfo db +#define DBNAME "c:\\private\\2001f6fb\\contentinfo.sq" + +//dynamic table creation +#define DYNAMICTABLE "table%1" + +// xml tag name +#define TAGPRIMARYKEY "name" +#define TAGACTIONURI "actionuri" +#define TAGACTIONURISTRING "uristring" +#define TAGFIELDMAP "fieldmap" +#define TAGRELEVANCY "relevancy" +#define TAGFIELD "field" +#define TAGURILIST "urilist" +#define TAGAURI "auri" +#define TAGRESULTFIRSTLINE "resultfirstline" +#define TAGBOOSTVALUE "boostvalue" +#define TAGACTION "action" +#define TAGLNAME "lname" +#define TAGLICON "licon" +#define TAGURIREF "uriref" + +#define PRIMARYVALUE "primary" +#define SECONDARYVALUE "secondary" + +#endif /* CONTENTINFODBCOMMON_H_ */ diff -r 556534771396 -r d4d56f5e7c55 harvester/contentinfodb/inc/contentinfodbparser.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/harvester/contentinfodb/inc/contentinfodbparser.h Tue Oct 05 13:15:12 2010 +0530 @@ -0,0 +1,84 @@ +/* + * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: contentinfodb parser. + * + */ +#ifndef CONTENTINFODBPARSER_H +#define CONTENTINFODBPARSER_H +#include +#include +#include +#include "contentinfodbcommon.h" +CONTENTINFODB_CLASS(ContentinfodbTest) + +class ContentInfoDbParser : public QObject + { +Q_OBJECT +public: + + /** + * Constructor. + * @since S60 ?S60_version. + */ + ContentInfoDbParser(); + + /** + * Destructor. + * @since S60 ?S60_version. + */ + ~ContentInfoDbParser(); + + /** + * parse the xml file. + * @param path is the path for xml file. + */ + bool parse(QString path); + +signals: + + /** + * signal to notify the category details. + * @param Qmap is the tagname and value. + */ + void categoryDetails(QMap ); + + /** + * signal to notify the activity uri details. + * @param Qmap is the tagname and value. + */ + void actionUri(QMap ); + + /** + * signal to notify the field mapping with activity uri's. + * @param Qmap is the tagname and value. + */ + void filedMapping(QString, QStringList); + + /** + * signal to notfy the first line display information. + * @param list will be having the field names. + */ + void firstLineMapping(QStringList); + + /** + * signal to notfy the first line relevancy information. + * @param field name. + * @param boostvalue + */ + void relevancyMapping(QString, QString); + +private: + CONTENTINFODB_FRIEND_CLASS(ContentinfodbTest) + }; +#endif //CONTENTINFODBPARSER_H diff -r 556534771396 -r d4d56f5e7c55 harvester/contentinfodb/inc/contentinfodbreadprivate.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/harvester/contentinfodb/inc/contentinfodbreadprivate.h Tue Oct 05 13:15:12 2010 +0530 @@ -0,0 +1,112 @@ +/* + * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: ContentInfoDbReadPrivate implementation of read api's + * + */ + +#ifndef CONTENTINFODBREADPRIVATE_H +#define CONTENTINFODBREADPRIVATE_H + +/** + * @file + * @ingroup contentinfodb read api's + * @brief Contains ContentInfoDbReadPrivate used for reading the DB + */ + +#include +#include +#include "contentinfodbcommon.h" + +class ContentInfoDbRead; +class ContentInfoDb; + +CONTENTINFODB_CLASS(ContentinfodbTest) +class ContentInfoDbReadPrivate : public QObject + { +Q_OBJECT +public: + + /** + * Constructor. + * @since S60 ?S60_version. + */ + ContentInfoDbReadPrivate(QObject*); + + /** + * Destructor. + * @since S60 ?S60_version. + */ + ~ContentInfoDbReadPrivate(); + +public: + + /** + * returns primary keys alias category names + */ + QStringList getPrimaryKeys(); + + /** + * return db value for the mentioned key and fieldname + */ + QString getValues(QString Key, QString columnname); + + /** + * returns the list of activity uris for the mentioned category + */ + QStringList getActionuri(QString Key); + + /** + * returns primary activityuri + */ + QString getShortTaburi(QString Key); + + /** + * returns list of uri's mapped for particular field + */ + QStringList getLongTaburi(QString Key, QString FieldName); + + /** + * returns the logical name/icon for a particular uri + */ + bool geturiDetails(QString key, QString uri, QString& iconname, + QString& displayname); + + /** + * returns total number of categories available in contentinfoDb + */ + int categoryCount(); + +public slots: + /** + * slot to get notify when changes happen in Db + */ + void slotdataChanged(); + +private: + /** + * handler to emit datachanged signal + * Not Own. + */ + ContentInfoDbRead* iReadPtr; + + /** + * handler to manage database operations + * Own. + */ + ContentInfoDb* mdb; + +CONTENTINFODB_FRIEND_CLASS (ContentinfodbTest) + }; + +#endif //ContentInfoDbReadPrivate diff -r 556534771396 -r d4d56f5e7c55 harvester/contentinfodb/inc/contentinfodbupdate.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/harvester/contentinfodb/inc/contentinfodbupdate.h Tue Oct 05 13:15:12 2010 +0530 @@ -0,0 +1,150 @@ +/* + * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: contentinfodb update api. + * + */ +#ifndef CONTENTINFODBUPDATE_H +#define CONTENTINFODBUPDATE_H +#include "contentinfodbcommon.h" +#include +#include +#include + +CONTENTINFODB_CLASS(ContentinfodbTest) + +class ContentInfoDbParser; +class ContentInfoDb; + +class DECL_CONTENTINFODB ContentInfoDbUpdate : public QObject + { +Q_OBJECT +public: + /** + * Constructor. + * @since S60 ?S60_version. + */ + ContentInfoDbUpdate(); + + /** + * Destructor. + * @since S60 ?S60_version. + */ + ~ContentInfoDbUpdate(); + +public: + + /** + * returns success/failure status. + * @since S60 ?S60_version. + * @param xmlpath is the file path + */ + bool UpdateDb(QString xmlpath); + + /** + * returns success/failure status. + * @since S60 ?S60_version. + * @param primarykey + * @param value is the blacklisted status + */ + bool UpdateBlacklisted(QString primarykey, int value); + + /** + * returns success/failure status. + * @since S60 ?S60_version. + * @param primarykey + * @param value is the indexing status + */ + bool UpdateIndexStatus(QString primarykey, int value); + + /** + * deletes the row for the mentioned primarykey + * @since S60 ?S60_version. + * @param primarykey + */ + void deleteCategory(QString primarykey); + +private: + + /** + * funtion to create a row with primary key on mentioned table. + * @param tablename + * @param tagname + * @param data will have mapped data of tagname and value + */ + QString InsertPrimaryKey(QString tableName, QString tagName, QMap< + QString, QString> data); + +public slots: + + /** + * slot to update the category details to db. + * @param map will have mapped data of tagname and value + */ + void slotupdateCategoryInfo(QMap ); + + /** + * slot to update the activity uri details to db. + * @param map will have mapped data of tagname and value + */ + void slotupdateUri(QMap ); + + /** + * slot to update the fieldmapping details to db. + * @param string will be having name of the field + * @param list will be having the uri reference number list + */ + void slotupdateFieldmapping(QString, QStringList); + + /** + * slot to update the first line details to db. + * @param list will be having the field name as values + */ + void slotfirstLineMapping(QStringList); + + /** + * slot to update the relevancy details to db. + * @param string as field name + * @param string as boostfactor + */ + void slotrelevancyMapping(QString, QString); + +private: + + /** + * parser handler + * Own. + */ + ContentInfoDbParser* iParser; + + /** + * handler to manage database operations + * Own. + */ + ContentInfoDb* mdb; + + /** + * not to create a repeated table names for dynamic table creation + * Own. + */ + int counter; + + /** + * primary key + * Own. + */ + QString primarykey; +private: + CONTENTINFODB_FRIEND_CLASS(ContentinfodbTest) + }; +#endif //CONTENTINFODBUPDATE_H diff -r 556534771396 -r d4d56f5e7c55 harvester/contentinfodb/src/ccontentinfodbparser.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/harvester/contentinfodb/src/ccontentinfodbparser.cpp Tue Oct 05 13:15:12 2010 +0530 @@ -0,0 +1,184 @@ +/* + * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: Implementation of xml parser for contentinfodb + * + */ +#include "contentinfodbparser.h" +#include +#include +// --------------------------------------------------------------------------- +// ContentInfoDbParser::ContentInfoDbParser() +// --------------------------------------------------------------------------- +// +ContentInfoDbParser::ContentInfoDbParser() + { + } +// --------------------------------------------------------------------------- +// ContentInfoDbParser::~ContentInfoDbParser() +// --------------------------------------------------------------------------- +// +ContentInfoDbParser::~ContentInfoDbParser() + { + + } +// --------------------------------------------------------------------------- +// ContentInfoDbParser::parse() +// --------------------------------------------------------------------------- +// +bool ContentInfoDbParser::parse(QString path) + { + QDomDocument doc; + + QFile file(path); + QMap catDetails; + QMap uriDetails; + + if (!file.open(QFile::ReadOnly)) + return false; + + QByteArray array = file.readAll(); + + if (!doc.setContent(array, true)) + { + file.close(); + return false; + } + file.close(); + + QDomElement docElem = doc.documentElement(); + + QDomNode n = docElem.firstChild(); + + /* + * Sending the category details before the other details to prepare the table, + * update of other details are not possible because the 'PRIMARYKEY' has to be there in db + */ + while (!n.isNull()) + { + QDomElement e = n.toElement(); + if (!e.isNull()) + { + catDetails.insert(e.tagName(), e.text()); + } + n = n.nextSibling(); + } + emit categoryDetails(catDetails); + + n = docElem.firstChild();// repositioning the node to get the other details + + while (!n.isNull()) + { + QDomElement e = n.toElement(); // try to convert the node to an element. + if (!e.isNull()) + { + if (e.tagName() == TAGACTIONURI) // details of activity uri list + { + QDomNodeList uriNodeList = n.toElement().childNodes(); + for (int i = 0; i < uriNodeList.count(); i++) + { + QDomNode uriNode = uriNodeList.item(i); + QDomNodeList uriItemsList = + uriNode.toElement().childNodes(); + for (int i = 0; i < uriItemsList.count(); i++) + { + QDomNode uriitems = uriItemsList.item(i); + e = uriitems.toElement(); + uriDetails.insert(e.tagName(), e.text()); + } + emit actionUri(uriDetails); + } + } + else if (e.tagName() == TAGFIELDMAP)// details of activity uri mapped with particular field + { + QDomNodeList uriNodeList = n.toElement().childNodes(); + QString tagfield; + QStringList urilist; + for (int i = 0; i < uriNodeList.count(); i++) + { + QDomNode uriNode = uriNodeList.item(i); + QDomNodeList uriItemsList = + uriNode.toElement().childNodes(); + tagfield = QString(); + urilist.clear(); + for (int i = 0; i < uriItemsList.count(); i++) + { + QDomNode uriitems = uriItemsList.item(i); + e = uriitems.toElement(); + if (e.tagName() == TAGFIELD) + { + tagfield = e.text(); + } + else if (e.tagName() == TAGAURI) + { + urilist.append(e.text()); + } + } + emit filedMapping(tagfield, urilist); + } + } + else if (e.tagName() == TAGRESULTFIRSTLINE) // details of what to show on firstline of result screen in search ui + { + QDomNodeList uriNodeList = n.toElement().childNodes(); + QStringList urilist; + for (int i = 0; i < uriNodeList.count(); i++) + { + QDomNode uriNode = uriNodeList.item(i); + QDomNodeList uriItemsList = + uriNode.toElement().childNodes(); + urilist.clear(); + for (int i = 0; i < uriItemsList.count(); i++) + { + QDomNode uriitems = uriItemsList.item(i); + e = uriitems.toElement(); + if (e.tagName() == TAGFIELD) + { + urilist.append(e.text()); + } + } + emit firstLineMapping(urilist); + } + } + else if (e.tagName() == TAGRELEVANCY) // boost factor details, + { + QDomNodeList uriNodeList = n.toElement().childNodes(); + QString field; + QString boostvalue; + for (int i = 0; i < uriNodeList.count(); i++) + { + QDomNode uriNode = uriNodeList.item(i); + QDomNodeList uriItemsList = + uriNode.toElement().childNodes(); + field = QString(); + boostvalue = QString(); + for (int i = 0; i < uriItemsList.count(); i++) + { + QDomNode uriitems = uriItemsList.item(i); + e = uriitems.toElement(); + if (e.tagName() == TAGFIELD) + { + field = e.text(); + } + else if (e.tagName() == TAGBOOSTVALUE) + { + boostvalue = e.text(); + } + } + emit relevancyMapping(field, boostvalue); + } + } + } + n = n.nextSibling(); + } + return true; + } diff -r 556534771396 -r d4d56f5e7c55 harvester/contentinfodb/src/contentinfodb.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/harvester/contentinfodb/src/contentinfodb.cpp Tue Oct 05 13:15:12 2010 +0530 @@ -0,0 +1,141 @@ +/* + * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: Implementation of contentinfodb + * + */ +#include "contentinfodb.h" +#include +#include +#include +#include + + +ContentInfoDb *ContentInfoDb::m_instance = 0; +int ContentInfoDb::m_instanceCounter = 0; + +// --------------------------------------------------------------------------- +// ContentInfoDb::ContentInfoDb() +// --------------------------------------------------------------------------- +// +ContentInfoDb::ContentInfoDb() + { + m_db = QSqlDatabase::addDatabase(DATABASETYPE, CONNECTIONNAME); + m_db.setDatabaseName(DBNAME); + } +// --------------------------------------------------------------------------- +// ContentInfoDb::~ContentInfoDb() +// --------------------------------------------------------------------------- +// +ContentInfoDb::~ContentInfoDb() + { + Close(); + } +// --------------------------------------------------------------------------- +// ContentInfoDb::writeData() +// --------------------------------------------------------------------------- +// +bool ContentInfoDb::writeData(QString query) + { + if (Open()) + { + QSqlQuery q(QSqlDatabase::database(CONNECTIONNAME)); + q.prepare(query); + if (q.exec()) + { + emit dbUpdated(); + return true; + } + return false; + } + return false; + } +// --------------------------------------------------------------------------- +// ContentInfoDb::readData() +// --------------------------------------------------------------------------- +// +QStringList ContentInfoDb::readData(QString query) + { + QStringList list; + if (Open()) + { + QSqlQuery q(QSqlDatabase::database(CONNECTIONNAME)); + q.prepare(query); + q.exec(); + while (q.next()) + { + list.append(q.value(0).toString()); + } + } + return list; + } +// --------------------------------------------------------------------------- +// ContentInfoDb::readStringData() +// --------------------------------------------------------------------------- +// +QString ContentInfoDb::readStringData(QString query) + { + if (Open()) + { + QSqlQuery q(QSqlDatabase::database(CONNECTIONNAME)); + q.prepare(query); + q.exec(); + q.next(); + return q.value(0).toString(); + } + return QString(); + } +// --------------------------------------------------------------------------- +// ContentInfoDb::createTable() +// --------------------------------------------------------------------------- +// +void ContentInfoDb::createTable(QString tablename, QString query) + { + if (!m_db.tables().contains(tablename)) + { + QSqlQuery q(query, m_db); + } + } +// --------------------------------------------------------------------------- +// ContentInfoDb::open() +// --------------------------------------------------------------------------- +// +bool ContentInfoDb::Open() + { + if (!m_db.isValid()) + { + Close(); + return false; + } + if (!m_db.isOpen()) + { + if (!m_db.open()) + { + Close(); + return false; + } + } + if (!m_db.tables().contains(MAINTABLENAME)) + { + QSqlQuery q(QUERYCREATEMAINTABLE, m_db); + } + return true; + } +// --------------------------------------------------------------------------- +// ContentInfoDb::Close() +// --------------------------------------------------------------------------- +// +void ContentInfoDb::Close() + { + m_db.close(); + } diff -r 556534771396 -r d4d56f5e7c55 harvester/contentinfodb/src/contentinfodbread.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/harvester/contentinfodb/src/contentinfodbread.cpp Tue Oct 05 13:15:12 2010 +0530 @@ -0,0 +1,88 @@ +/* + * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: Implementation of read api for contentinfodb + * + */ +#include "cpixcontentinfodbread.h" +#include "contentinfodbreadprivate.h" +#include + +// --------------------------------------------------------------------------- +// ContentInfoDbRead::ContentInfoDbRead() +// --------------------------------------------------------------------------- +// +ContentInfoDbRead::ContentInfoDbRead():iPvtImpl( new ContentInfoDbReadPrivate( this ) ) + { + } +// --------------------------------------------------------------------------- +// ContentInfoDbRead::~ContentInfoDbRead() +// --------------------------------------------------------------------------- +// +ContentInfoDbRead::~ContentInfoDbRead() + { + + } +// --------------------------------------------------------------------------- +// ContentInfoDbRead::getPrimaryKeys() +// --------------------------------------------------------------------------- +// +QStringList ContentInfoDbRead::getPrimaryKeys() + { + return iPvtImpl->getPrimaryKeys(); + } +// --------------------------------------------------------------------------- +// ContentInfoDbRead::getValues() +// --------------------------------------------------------------------------- +// +QString ContentInfoDbRead::getValues(QString Key, QString columnname) + { + return iPvtImpl->getValues(Key,columnname); + } +// --------------------------------------------------------------------------- +// ContentInfoDbRead::getActionuri() +// --------------------------------------------------------------------------- +// +QStringList ContentInfoDbRead::getActionuri(QString Key) + { + return iPvtImpl->getActionuri(Key); + } +// --------------------------------------------------------------------------- +// ContentInfoDbRead::getShortTaburi() +// --------------------------------------------------------------------------- +// +QString ContentInfoDbRead::getShortTaburi(QString Key) + { + return iPvtImpl->getShortTaburi(Key); + } +// --------------------------------------------------------------------------- +// ContentInfoDbRead::getLongTaburi() +// --------------------------------------------------------------------------- +// +QStringList ContentInfoDbRead::getLongTaburi(QString Key, QString FieldName) + { + return iPvtImpl->getLongTaburi(Key,FieldName); + } +// --------------------------------------------------------------------------- +// ContentInfoDbRead::geturiDetails() +// --------------------------------------------------------------------------- +// +bool ContentInfoDbRead::geturiDetails(QString key, QString uri, QString& iconname, + QString& displayname) + { + return iPvtImpl->geturiDetails(key,uri,iconname,displayname); + } +int ContentInfoDbRead::categoryCount() + { + return iPvtImpl->categoryCount(); + } diff -r 556534771396 -r d4d56f5e7c55 harvester/contentinfodb/src/contentinfodbreadprivate.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/harvester/contentinfodb/src/contentinfodbreadprivate.cpp Tue Oct 05 13:15:12 2010 +0530 @@ -0,0 +1,168 @@ +/* + * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: read api implementation + * + */ +#include "contentinfodbreadprivate.h" +#include "contentinfodb.h" +#include "cpixcontentinfodbread.h" + + +// --------------------------------------------------------------------------- +// ContentInfoDbReadPrivate::ContentInfoDbReadPrivate() +// --------------------------------------------------------------------------- +// +ContentInfoDbReadPrivate::ContentInfoDbReadPrivate(QObject* aParent) + { + iReadPtr = reinterpret_cast (aParent); + mdb = ContentInfoDb::instance(); + connect(mdb, SIGNAL(dbUpdated()),this, SLOT(slotdataChanged())); + + } +// --------------------------------------------------------------------------- +// ContentInfoDbReadPrivate::ContentInfoDbReadPrivate() +// --------------------------------------------------------------------------- +// +ContentInfoDbReadPrivate::~ContentInfoDbReadPrivate() + { + ContentInfoDb::deleteinstance(); + } +// --------------------------------------------------------------------------- +// ContentInfoDbReadPrivate::ContentInfoDbReadPrivate() +// --------------------------------------------------------------------------- +// +QStringList ContentInfoDbReadPrivate::getPrimaryKeys() + { + return mdb->readData(QString(QUERYSORT)); + } +// --------------------------------------------------------------------------- +// ContentInfoDbReadPrivate::ContentInfoDbReadPrivate() +// --------------------------------------------------------------------------- +// +QString ContentInfoDbReadPrivate::getValues(QString Key, QString columnname) + { + return mdb->readStringData( + QString(QUERYDATARETRIVAL).arg(columnname).arg(MAINTABLENAME).arg( + TAGPRIMARYKEY).arg(Key)); + } +// --------------------------------------------------------------------------- +// ContentInfoDbReadPrivate::ContentInfoDbReadPrivate() +// --------------------------------------------------------------------------- +// +QStringList ContentInfoDbReadPrivate::getActionuri(QString Key) + { + QString tablename = mdb->readStringData(QString(QUERYDATARETRIVAL).arg( + TAGACTIONURI).arg(MAINTABLENAME).arg(TAGPRIMARYKEY).arg(Key)); + if (!tablename.length()) + return QStringList(); + return mdb->readData( + QString(QUERYPRIMARYKEYS).arg(TAGACTIONURISTRING).arg(tablename)); + } +// --------------------------------------------------------------------------- +// ContentInfoDbReadPrivate::ContentInfoDbReadPrivate() +// --------------------------------------------------------------------------- +// +QString ContentInfoDbReadPrivate::getShortTaburi(QString Key) + { + QString tablename = mdb->readStringData(QString(QUERYDATARETRIVAL).arg( + TAGACTIONURI).arg(MAINTABLENAME).arg(TAGPRIMARYKEY).arg(Key)); + if (!tablename.length()) + return NULL; + return mdb->readStringData(QString(QUERYFILTERDATA).arg( + TAGACTIONURISTRING).arg(tablename).arg(TAGACTION).arg( + PRIMARYVALUE)); + } +// --------------------------------------------------------------------------- +// ContentInfoDbReadPrivate::ContentInfoDbReadPrivate() +// --------------------------------------------------------------------------- +// +QStringList ContentInfoDbReadPrivate::getLongTaburi(QString Key, + QString FieldName) + { + QStringList longurilist; + + QString tablename = mdb->readStringData(QString(QUERYDATARETRIVAL).arg( + TAGACTIONURI).arg(MAINTABLENAME).arg(TAGPRIMARYKEY).arg(Key)); + if (!tablename.length()) + return QStringList(); + QString fieldmaptable = + mdb->readStringData( + QString(QUERYDATARETRIVAL).arg(TAGFIELDMAP).arg( + MAINTABLENAME).arg(TAGPRIMARYKEY).arg(Key)); + + QString + filedmapsubtable = mdb->readStringData( + QString(QUERYDATARETRIVAL).arg(TAGURILIST).arg( + fieldmaptable).arg(TAGFIELD).arg(FieldName)); + + QStringList urireflist = mdb->readData(QString(QUERYPRIMARYKEYS).arg( + TAGAURI).arg(filedmapsubtable)); + + for (int i = 0; i < urireflist.count(); i++) + { + QString str; + + str = mdb->readStringData(QString(QUERYDATARETRIVAL).arg( + TAGACTIONURISTRING).arg(tablename).arg(TAGURIREF).arg( + urireflist.at(i))); + + if (str.length()) + longurilist.append(str); + } + return longurilist; + } +// --------------------------------------------------------------------------- +// ContentInfoDbReadPrivate::ContentInfoDbReadPrivate() +// --------------------------------------------------------------------------- +// +bool ContentInfoDbReadPrivate::geturiDetails(QString key, QString uri, + QString& iconname, QString& displayname) + { + QString tablename = mdb->readStringData(QString(QUERYDATARETRIVAL).arg( + TAGACTIONURI).arg(MAINTABLENAME).arg(TAGPRIMARYKEY).arg(key)); + + if (!tablename.length()) + return false; + + iconname = QString(); + displayname = QString(); + + iconname = mdb->readStringData( + QString(QUERYDATARETRIVAL).arg(TAGLNAME).arg(tablename).arg( + TAGACTIONURISTRING).arg(uri)); + + displayname = mdb->readStringData( + QString(QUERYDATARETRIVAL).arg(TAGLICON).arg(tablename).arg( + TAGACTIONURISTRING).arg(uri)); + if (iconname.length() && displayname.length()) + return true; + return false; + } +// --------------------------------------------------------------------------- +// ContentInfoDbReadPrivate::slotdataChanged() +// --------------------------------------------------------------------------- +// +void ContentInfoDbReadPrivate::slotdataChanged() + { + if(iReadPtr) + emit iReadPtr->dataChanged(); + } +// --------------------------------------------------------------------------- +// ContentInfoDbReadPrivate::categoryCount() +// --------------------------------------------------------------------------- +// +int ContentInfoDbReadPrivate::categoryCount() + { + return (mdb->readStringData(QString(QUERYCOUNT))).toInt(); + } diff -r 556534771396 -r d4d56f5e7c55 harvester/contentinfodb/src/contentinfodbupdate.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/harvester/contentinfodb/src/contentinfodbupdate.cpp Tue Oct 05 13:15:12 2010 +0530 @@ -0,0 +1,338 @@ +/* + * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: update api for contentinfodb + * + */ +#include "contentinfodbupdate.h" +#include "contentinfodbparser.h" +#include "contentinfodb.h" +#include "cpixcontentinfodbdef.h" + +// --------------------------------------------------------------------------- +// ContentInfoDbUpdate::ContentInfoDbUpdate() +// --------------------------------------------------------------------------- +// +ContentInfoDbUpdate::ContentInfoDbUpdate() : + iParser(NULL),mdb(NULL) + { + mdb = ContentInfoDb::instance(); + iParser = new ContentInfoDbParser(); + if (iParser) + { + connect(iParser, SIGNAL(categoryDetails(QMap)), + this, SLOT(slotupdateCategoryInfo(QMap))); + connect(iParser, SIGNAL(actionUri(QMap)), this, + SLOT(slotupdateUri(QMap))); + connect(iParser, SIGNAL(filedMapping(QString,QStringList)), this, + SLOT(slotupdateFieldmapping(QString,QStringList))); + connect(iParser, SIGNAL(firstLineMapping(QStringList)), this, + SLOT(slotfirstLineMapping(QStringList))); + connect(iParser, SIGNAL(relevancyMapping(QString,QString)), this, + SLOT(slotrelevancyMapping(QString,QString))); + } + counter = 0; + } +// --------------------------------------------------------------------------- +// ContentInfoDbUpdate::~ContentInfoDbUpdate() +// --------------------------------------------------------------------------- +// +ContentInfoDbUpdate::~ContentInfoDbUpdate() + { + ContentInfoDb::deleteinstance(); + } +// --------------------------------------------------------------------------- +// ContentInfoDbUpdate::UpdateDb() +// --------------------------------------------------------------------------- +// +bool ContentInfoDbUpdate::UpdateDb(QString xmlpath) + { + if (mdb) + (void)mdb->Open(); + if (iParser) + { + primarykey = QString(); + return iParser->parse(xmlpath); + } + return false; + } +// --------------------------------------------------------------------------- +// ContentInfoDbUpdate::UpdateBlacklisted() +// --------------------------------------------------------------------------- +// +bool ContentInfoDbUpdate::UpdateBlacklisted(QString primarykey, int value) + { + if (mdb) + (void)mdb->Open(); + QString query = QString(QUERYUPDATEDATA).arg(MAINTABLENAME).arg( + BLACKLISTSTATUS).arg(value).arg(TAGPRIMARYKEY).arg(primarykey); + if (!mdb->writeData(query)) + return false; + return true; + } +// --------------------------------------------------------------------------- +// ContentInfoDbUpdate::UpdateIndexStatus() +// --------------------------------------------------------------------------- +// +bool ContentInfoDbUpdate::UpdateIndexStatus(QString primarykey, int value) + { + if (mdb) + (void)mdb->Open(); + QString query = QString(QUERYUPDATEDATA).arg(MAINTABLENAME).arg( + INDEXINGSTATUS).arg(value).arg(TAGPRIMARYKEY).arg(primarykey); + if (!mdb->writeData(query)) + return false; + return true; + } +// --------------------------------------------------------------------------- +// ContentInfoDbUpdate::InsertPrimaryKey() +// --------------------------------------------------------------------------- +// +QString ContentInfoDbUpdate::InsertPrimaryKey(QString tableName, + QString tagName, QMap data) + { + QMapIterator i(data); + QString query; + QString p_key; + while (i.hasNext()) + { + i.next(); + if (i.key() == tagName) + { + p_key = i.value(); + break; + } + } + query = QString(QUERYINSERTROW).arg(tableName).arg(tagName).arg(p_key); + mdb->writeData(query); + return p_key; + } +// --------------------------------------------------------------------------- +// ContentInfoDbUpdate::slotupdateCategoryInfo() +// --------------------------------------------------------------------------- +// +void ContentInfoDbUpdate::slotupdateCategoryInfo(QMap map) + { + QString query; + QString p_key = InsertPrimaryKey(MAINTABLENAME, TAGPRIMARYKEY, map); + primarykey = p_key; + if (p_key.length()) + { + QMapIterator i(map); + while (i.hasNext()) + { + i.next(); + if (i.key() != TAGPRIMARYKEY) + { + query = QString(); + if ((i.key() == TAGACTIONURI) || (i.key() == TAGFIELDMAP) + || (i.key() == TAGRELEVANCY) || (i.key() + == TAGRESULTFIRSTLINE)) + { + counter++; + QString tablename = QString(DYNAMICTABLE).arg(counter); + query = QString(QUERYUPDATEDATA).arg(MAINTABLENAME).arg( + i.key()).arg(tablename).arg(TAGPRIMARYKEY).arg( + p_key); + } + else + { + query = QString(QUERYUPDATEDATA).arg(MAINTABLENAME).arg( + i.key()).arg(i.value()).arg(TAGPRIMARYKEY).arg( + p_key); + } + if (!mdb->writeData(query)) + { + + } + } + } + } + } +// --------------------------------------------------------------------------- +// ContentInfoDbUpdate::slotupdateUri() +// --------------------------------------------------------------------------- +// +void ContentInfoDbUpdate::slotupdateUri(QMap map) + { + //get actionuri table name + QString query = QString(QUERYDATARETRIVAL).arg(TAGACTIONURI).arg( + MAINTABLENAME).arg(TAGPRIMARYKEY).arg(primarykey); + QString actionuritablename = mdb->readStringData(query); + + if (actionuritablename.length()) + { + query = QString(); + query = QString(QUERYCREATEACTIONURITABLE).arg(actionuritablename); + mdb->createTable(actionuritablename, query); + QString p_key = InsertPrimaryKey(actionuritablename, + TAGACTIONURISTRING, map); + if (p_key.length()) + { + QMapIterator i(map); + while (i.hasNext()) + { + i.next(); + if (i.key() != TAGACTIONURISTRING) + { + query = QString(); + query + = QString(QUERYUPDATEDATA).arg(actionuritablename).arg( + i.key()).arg(i.value()).arg( + TAGACTIONURISTRING).arg(p_key); + if (!mdb->writeData(query)) + { + + } + } + } + } + } + } +// --------------------------------------------------------------------------- +// ContentInfoDbUpdate::slotupdateFieldmapping() +// --------------------------------------------------------------------------- +// +void ContentInfoDbUpdate::slotupdateFieldmapping(QString key, + QStringList value) + { + //get fieldmap table name from maintable + QString query = QString(QUERYDATARETRIVAL).arg(TAGFIELDMAP).arg( + MAINTABLENAME).arg(TAGPRIMARYKEY).arg(primarykey); + QString fieldtablename = mdb->readStringData(query); + + if (fieldtablename.length()) + { + // create a table for fieldmap + query = QString(); + query = QString(QUERYCREATEFIELDMAPTABLE).arg(fieldtablename); + mdb->createTable(fieldtablename, query); + + // insert the field in filedmap table + query = QString(); + query + = QString(QUERYINSERTROW).arg(fieldtablename).arg(TAGFIELD).arg( + key); + mdb->writeData(query); + { + + } + + counter++; + query = QString(); + + QString tablename = QString(DYNAMICTABLE).arg(counter); + + // enter the value as table name second column in field map will refer to another table + query + = QString(QUERYUPDATEDATA).arg(fieldtablename).arg(TAGURILIST).arg( + tablename).arg(TAGFIELD).arg(key); + if (!mdb->writeData(query)) + { + + } + + query = QString(); + // creating a table for the field map values + query = QString(QUERYCREATEFIELDMAPSUBTABLE).arg(tablename); + mdb->createTable(tablename, query); + + for (int i = 0; i < value.count(); i++) + { + query = QString(); + // inserting the uri list mapped for a particular field + query = QString(QUERYINSERTROW).arg(tablename).arg(TAGAURI).arg( + value[i]); + if (!mdb->writeData(query)) + { + + } + } + } + } +// --------------------------------------------------------------------------- +// ContentInfoDbUpdate::slotfirstLineMapping() +// --------------------------------------------------------------------------- +// +void ContentInfoDbUpdate::slotfirstLineMapping(QStringList list) + { + //get actionuri table name + QString query = QString(QUERYDATARETRIVAL).arg(TAGRESULTFIRSTLINE).arg( + MAINTABLENAME).arg(TAGPRIMARYKEY).arg(primarykey); + QString firstlinetablename = mdb->readStringData(query); + + if (firstlinetablename.length()) + { + query = QString(); + query = QString(QUERYCREATEFIRSTLINETABLE).arg(firstlinetablename); + mdb->createTable(firstlinetablename, query); + + for (int i = 0; i < list.count(); i++) + { + query = QString(); + // inserting the uri list mapped for a particular field + query = QString(QUERYINSERTROW).arg(firstlinetablename).arg( + TAGFIELD).arg(list[i]); + if (!mdb->writeData(query)) + { + + } + } + } + } +// --------------------------------------------------------------------------- +// ContentInfoDbUpdate::slotrelevancyMapping() +// --------------------------------------------------------------------------- +// +void ContentInfoDbUpdate::slotrelevancyMapping(QString field, + QString boostvalue) + { + QString query = QString(QUERYDATARETRIVAL).arg(TAGRELEVANCY).arg( + MAINTABLENAME).arg(TAGPRIMARYKEY).arg(primarykey); + QString relevancytablename = mdb->readStringData(query); + if (relevancytablename.length()) + { + query = QString(); + query = QString(QUERYCREATERELEVANCYTABLE).arg(relevancytablename); + mdb->createTable(relevancytablename, query); + + query = QString(); + // inserting field name as a primary key + query + = QString(QUERYINSERTROW).arg(relevancytablename).arg( + TAGFIELD).arg(field); + + if (!mdb->writeData(query)) + { + + } + query = QString(); + // updating the row with boostvalue + query = QString(QUERYUPDATEDATA).arg(relevancytablename).arg( + TAGBOOSTVALUE).arg(boostvalue).arg(TAGFIELD).arg(field); + if (!mdb->writeData(query)) + { + + } + } + } +// --------------------------------------------------------------------------- +// ContentInfoDbUpdate::slotrelevancyMapping() +// --------------------------------------------------------------------------- +// +void ContentInfoDbUpdate::deleteCategory(QString Key) + { + if (mdb) + (void)mdb->Open(); + mdb->writeData(QString(QUERYDELETE).arg(Key)); + } diff -r 556534771396 -r d4d56f5e7c55 harvester/contentinfodb/tsrc/t_contentinfodb/inc/t_contentinfodb.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/harvester/contentinfodb/tsrc/t_contentinfodb/inc/t_contentinfodb.h Tue Oct 05 13:15:12 2010 +0530 @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: Tests for SearchStateProvider class. + * + */ + +#include +#include "contentinfodbparser.h" +#include "contentinfodbupdate.h" +#include "contentinfodbreadprivate.h" +class ContentinfodbTest : public QObject + { +Q_OBJECT + +public: + ContentinfodbTest(); + ~ContentinfodbTest(); + +private slots: + void init(); + void initTestCase(); + void cleanupTestCase(); + void Testupdate(); + void TestRead(); + void TestDelete(); + void TestCount(); + }; + diff -r 556534771396 -r d4d56f5e7c55 harvester/contentinfodb/tsrc/t_contentinfodb/src/t_contentinfodb.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/harvester/contentinfodb/tsrc/t_contentinfodb/src/t_contentinfodb.cpp Tue Oct 05 13:15:12 2010 +0530 @@ -0,0 +1,122 @@ +#include "t_contentinfodb.h" +#include "cpixcontentinfodbdef.h" +#include "cpixcontentinfodbread.h" +#include +#include +#include +#include +ContentinfodbTest::ContentinfodbTest() + { + } +ContentinfodbTest::~ContentinfodbTest() + { + } +void ContentinfodbTest::init() + { + + } +void ContentinfodbTest::initTestCase() + { + } +void ContentinfodbTest::cleanupTestCase() + { + } +void ContentinfodbTest::Testupdate() + { + /*ContentInfoDbUpdate *ptr = new ContentInfoDbUpdate(); + ptr->UpdateDb("C:\\data\\contact.xml"); + ptr->UpdateDb("C:\\data\\application.xml"); + ptr->UpdateDb("C:\\data\\audio.xml"); + ptr->UpdateDb("C:\\data\\video.xml"); + ptr->UpdateDb("C:\\data\\photos.xml"); + ptr->UpdateDb("C:\\data\\notes.xml"); + ptr->UpdateDb("C:\\data\\calendar.xml"); + ptr->UpdateDb("C:\\data\\smsmms.xml"); + ptr->UpdateDb("C:\\data\\files.xml"); + ptr->UpdateDb("C:\\data\\email.xml"); */ + } +void ContentinfodbTest::TestRead() + { + /* ContentInfoDbReadPrivate *ptr = new ContentInfoDbReadPrivate(NULL); + QStringList list = ptr->getPrimaryKeys(); + qDebug() << "primarykeys"<getValues(list.at(i),INDEXINGSTATUS); + qDebug() << ptr->getValues(list.at(i),BLACKLISTSTATUS); + qDebug() << ptr->getValues(list.at(i),DISPLAYICON); + qDebug() << ptr->getValues(list.at(i),DISPLAYNAME); + qDebug() << ptr->getValues(list.at(i),EXPECTIONID); + qDebug() << ptr->getValues(list.at(i),DISPLAYORDER); + qDebug() << ptr->getValues(list.at(i),TRANSLATION); + qDebug() << ptr->getShortTaburi(list.at(i)); + if (list.at(i) == "Video" || list.at(i) == "Audio" || list.at(i) + == "Photo") + { + qDebug() << ptr->getLongTaburi(list.at(i), "Name"); + qDebug() << ptr->getLongTaburi(list.at(i), "Title"); + } + else if (list.at(i) == "Contact") + { + qDebug() << ptr->getLongTaburi(list.at(i), "FAMILYNAME"); + qDebug() << ptr->getLongTaburi(list.at(i), "COMPANY"); + } + else if (list.at(i) == "Application") + { + qDebug() << ptr->getLongTaburi(list.at(i), "Name"); + } + else if (list.at(i) == "Notes") + { + qDebug() << ptr->getLongTaburi(list.at(i), "Memo"); + qDebug() << ptr->getLongTaburi(list.at(i), "Date"); + } + else if (list.at(i) == "Calendar") + { + qDebug() << ptr->getLongTaburi(list.at(i), "Summary"); + qDebug() << ptr->getLongTaburi(list.at(i), "Description"); + } + else if (list.at(i) == "smsmms") + { + qDebug() << ptr->getLongTaburi(list.at(i), "To"); + qDebug() << ptr->getLongTaburi(list.at(i), "Body"); + } + else if (list.at(i) == "Files") + { + qDebug() << ptr->getLongTaburi(list.at(i), "Name"); + qDebug() << ptr->getLongTaburi(list.at(i), "Extension"); + } + else if (list.at(i) == "Email") + { + qDebug() << ptr->getLongTaburi(list.at(i), "Sender"); + qDebug() << ptr->getLongTaburi(list.at(i), "Subject"); + } + QStringList listuri = ptr->getActionuri(list.at(i)); + qDebug() << listuri; + QString str1,str2; + for(int j=0;jgeturiDetails(list.at(i),listuri.at(j),str1,str2); + qDebug() << str1<getPrimaryKeys(); + for (int i = 0; i < list.count(); i++) + { + if (i = 1) + ptr->deleteCategory(list.at(i)); + } + } +void ContentinfodbTest::TestCount() + { + ContentInfoDbReadPrivate *ptrread = new ContentInfoDbReadPrivate(NULL); + int ret; + ret = ptrread->categoryCount(); + ret = 0; + } +QTEST_MAIN( ContentinfodbTest) + diff -r 556534771396 -r d4d56f5e7c55 harvester/contentinfodb/tsrc/t_contentinfodb/t_contentinfodb.pri --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/harvester/contentinfodb/tsrc/t_contentinfodb/t_contentinfodb.pri Tue Oct 05 13:15:12 2010 +0530 @@ -0,0 +1,24 @@ +# +# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +# All rights reserved. +# This component and the accompanying materials are made available +# under the terms of "Eclipse Public License v1.0" +# which accompanies this distribution, and is available +# at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +# Initial Contributors: +# Nokia Corporation - initial contribution. +# +# Contributors: +# +# Description: +# +#Header files +HEADERS += ./inc/*.h \ + ../../inc/*.h \ + ../../../../searchsrv_plat/cpix_utility_api/inc/cpixcontentinfodbread.h \ + ../../../../searchsrv_plat/cpix_utility_api/inc/cpixcontentinfodbdef.h + +#Source files +SOURCES += ./src/*.cpp \ + ../../src/*.cpp \ No newline at end of file diff -r 556534771396 -r d4d56f5e7c55 harvester/contentinfodb/tsrc/t_contentinfodb/t_contentinfodb.pro --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/harvester/contentinfodb/tsrc/t_contentinfodb/t_contentinfodb.pro Tue Oct 05 13:15:12 2010 +0530 @@ -0,0 +1,48 @@ +# +# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +# All rights reserved. +# This component and the accompanying materials are made available +# under the terms of "Eclipse Public License v1.0" +# which accompanies this distribution, and is available +# at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +# Initial Contributors: +# Nokia Corporation - initial contribution. +# +# Contributors: +# +# Description: Search stateprovider unit test project file +# + +TEMPLATE = app + + +DEFINES += CONTENTINFODB_UNITTESTING +DEFINES += BUILD_CONTENTINFODB + +INCLUDEPATH += . +INCLUDEPATH += ../../inc\ + ../../src + + + +CONFIG += qtestlib +CONFIG += hb + +QT += xml \ + sql + + +symbian { +#CONFIG += symbian_test +TARGET.UID2 = 0x100039CE +TARGET.UID3 = 0x20029B36 +TARGET.CAPABILITY = ALL -TCB -DRM +TARGET.EPOCSTACKSIZE = 0x14000 // 80kB +TARGET.EPOCHEAPSIZE = 0x20000 0x800000 // 128kB - 16MB +INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE +INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE +} + +include(t_contentinfodb.pri) + diff -r 556534771396 -r d4d56f5e7c55 harvester/contentinfodb/tsrc/tsrc.pro --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/harvester/contentinfodb/tsrc/tsrc.pro Tue Oct 05 13:15:12 2010 +0530 @@ -0,0 +1,21 @@ +# +# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +# All rights reserved. +# This component and the accompanying materials are made available +# under the terms of "Eclipse Public License v1.0" +# which accompanies this distribution, and is available +# at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +# Initial Contributors: +# Nokia Corporation - initial contribution. +# +# Contributors: +# +# Description: +# + +TEMPLATE = subdirs + +SUBDIRS = t_contentinfodb + +CONFIG += ordered \ No newline at end of file diff -r 556534771396 -r d4d56f5e7c55 harvester/contentinfodb/unittest.pro --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/harvester/contentinfodb/unittest.pro Tue Oct 05 13:15:12 2010 +0530 @@ -0,0 +1,21 @@ +# +# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +# All rights reserved. +# This component and the accompanying materials are made available +# under the terms of "Eclipse Public License v1.0" +# which accompanies this distribution, and is available +# at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +# Initial Contributors: +# Nokia Corporation - initial contribution. +# +# Contributors: +# +# Description: +# + +TEMPLATE = subdirs +CONFIG += ordered +SUBDIRS += contentinfodb.pro \ + tsrc + \ No newline at end of file diff -r 556534771396 -r d4d56f5e7c55 harvester/harvester.pro --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/harvester/harvester.pro Tue Oct 05 13:15:12 2010 +0530 @@ -0,0 +1,21 @@ +# +# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +# All rights reserved. +# This component and the accompanying materials are made available +# under the terms of "Eclipse Public License v1.0" +# which accompanies this distribution, and is available +# at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +# Initial Contributors: +# Nokia Corporation - initial contribution. +# +# Contributors: +# +# Description: +# + +TEMPLATE = subdirs +CONFIG += ordered +SUBDIRS += contentinfodb \ + harvesterserver \ + \ No newline at end of file diff -r 556534771396 -r d4d56f5e7c55 harvester/harvesterserver/harvester.pro --- a/harvester/harvesterserver/harvester.pro Mon Sep 20 12:35:47 2010 +0530 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,75 +0,0 @@ -# -# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). -# All rights reserved. -# This component and the accompanying materials are made available -# under the terms of "Eclipse Public License v1.0" -# which accompanies this distribution, and is available -# at the URL "http://www.eclipse.org/legal/epl-v10.html". -# -# Initial Contributors: -# Nokia Corporation - initial contribution. -# -# Contributors: -# -# Description: -# - -TEMPLATE = app -TARGET = cpixharvesterserver - -QT += core -QT -= gui - -symbian:TARGET.UID3 = 0x2001f6fb -symbian:TARGET.CAPABILITY = ALL -TCB -DRM -AllFiles - -symbian{ - INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE - - INCLUDEPATH += ../../searchengine/cpix/cpix/inc/public - - HEADERS += inc/CHarvesterServer.h - HEADERS += inc/CHarvesterServerSession.h - HEADERS += inc/CIndexingManager.h - HEADERS += inc/CBlacklistMgr.h - HEADERS += inc/CBlacklistDb.h - HEADERS += inc/ccotentinfodb.h - HEADERS += inc/contentinfomgr.h - HEADERS += inc/ccontentinfo.h - HEADERS += inc/harvesterserver.pan - HEADERS += inc/harvesterservercommons.h - HEADERS += inc/qtmythread.h - HEADERS += traces/CBlacklistDbTraces.h - HEADERS += traces/CBlacklistMgrTraces.h - HEADERS += traces/ccontentinfodbTraces.h - HEADERS += traces/ccontentinfoTraces.h - HEADERS += traces/CIndexingManagerTraces.h - HEADERS += traces/contentinfomgrTraces.h - HEADERS += traces/OstTraceDefinitions.h - HEADERS += traces/fixed_id.definitions - - SOURCES += src/main.cpp - SOURCES += src/CHarvesterServer.cpp - SOURCES += src/CHarvesterServerSession.cpp - SOURCES += src/CIndexingManager.cpp - SOURCES += src/CBlacklistMgr.cpp - SOURCES += src/CBlacklistDb.cpp - SOURCES += src/ccontentinfodb.cpp - SOURCES += src/contentinfomgr.cpp - SOURCES += src/ccontentinfo.cpp - - resourceTargetBlock = \ - "SOURCEPATH data" \ - "START RESOURCE 2001F6FB.rss" \ - "TARGETPATH /private/101f875a/import"\ - "END" \ - - MMP_RULES += resourceTargetBlock - - MMP_RULES += "EPOCSTACKSIZE 0x5000" - MMP_RULES += "EPOCHEAPSIZE 0x50000 0x300000" #From about 65KB to about 3 MB - - LIBS += -leuser -lestor -lCPixSearchClient -lCPixHarvesterPluginInterface -ledbms -lsqldb -lcentralrepository -lflogger - LIBS += -lefsrv - -} diff -r 556534771396 -r d4d56f5e7c55 harvester/harvesterserver/harvesterserver.pro --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/harvester/harvesterserver/harvesterserver.pro Tue Oct 05 13:15:12 2010 +0530 @@ -0,0 +1,72 @@ +# +# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +# All rights reserved. +# This component and the accompanying materials are made available +# under the terms of "Eclipse Public License v1.0" +# which accompanies this distribution, and is available +# at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +# Initial Contributors: +# Nokia Corporation - initial contribution. +# +# Contributors: +# +# Description: +# + +TEMPLATE = app +TARGET = cpixharvesterserver + +QT += core +QT -= gui + +symbian:TARGET.UID3 = 0x2001f6fb +symbian:TARGET.CAPABILITY = ALL -TCB -DRM -AllFiles + +symbian{ + INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE + + INCLUDEPATH += ../../searchengine/cpix/cpix/inc/public + + INCLUDEPATH += ../contentinfodb/inc + HEADERS += inc/CHarvesterServer.h + HEADERS += inc/CHarvesterServerSession.h + HEADERS += inc/CIndexingManager.h + HEADERS += inc/CBlacklistMgr.h + HEADERS += inc/CBlacklistDb.h + HEADERS += inc/cactivitymanager.h + HEADERS += inc/harvesterserver.pan + HEADERS += inc/harvesterservercommons.h + HEADERS += inc/qtmythread.h + HEADERS += inc/cgaurdtimer.h + HEADERS += traces/CBlacklistDbTraces.h + HEADERS += traces/CBlacklistMgrTraces.h + HEADERS += traces/CIndexingManagerTraces.h + HEADERS += traces/OstTraceDefinitions.h + HEADERS += traces/fixed_id.definitions + HEADERS += traces/cactivitymanagerTraces.h + + SOURCES += src/main.cpp + SOURCES += src/CHarvesterServer.cpp + SOURCES += src/CHarvesterServerSession.cpp + SOURCES += src/CIndexingManager.cpp + SOURCES += src/CBlacklistMgr.cpp + SOURCES += src/CBlacklistDb.cpp + SOURCES += src/cactivitymanager.cpp + SOURCES += src/cgaurdtimer.cpp + + resourceTargetBlock = \ + "SOURCEPATH data" \ + "START RESOURCE 2001F6FB.rss" \ + "TARGETPATH /private/101f875a/import"\ + "END" \ + + MMP_RULES += resourceTargetBlock + + MMP_RULES += "EPOCSTACKSIZE 0x5000" + MMP_RULES += "EPOCHEAPSIZE 0x50000 0x300000" #From about 65KB to about 3 MB + + LIBS += -leuser -lestor -lCPixSearchClient -lCPixHarvesterPluginInterface -ledbms -lsqldb -lcentralrepository -lflogger + LIBS += -lefsrv -lcpixcontentinfodb + +} diff -r 556534771396 -r d4d56f5e7c55 harvester/harvesterserver/inc/cactivitymanager.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/harvester/harvesterserver/inc/cactivitymanager.h Tue Oct 05 13:15:12 2010 +0530 @@ -0,0 +1,91 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + +#include +#include + +#ifndef CACTIVITYMANAGER_H_ +#define CACTIVITYMANAGER_H_ + +class MActivityManagerObserver +{ +public : + virtual void ActivityChanged(const TBool aActive) = 0; +}; + +//#define MONITOR_LIGHTS +class CActivityManager : public CActive +#ifdef MONITOR_LIGHTS + ,public MHWRMLightObserver +#endif + +{ +public: + + /** + * Two-phased constructor. + * + */ + static CActivityManager* NewL(MActivityManagerObserver* aObserver, TInt aTimeout = 60); + + /** + * Destructor + * + */ + virtual ~CActivityManager(); + void SetTimeout(TInt aTimeout); + void Start(); + void Reset(); + void Stop(); + TBool IsInactive(); + + +protected: // from CActive + void DoCancel(); + void RunL(); + TInt RunError(TInt aError); + +protected: + CActivityManager(MActivityManagerObserver* aObserver, TInt aTimeout); + void ConstructL(); + void NotifyObserver(); + +#ifdef MONITOR_LIGHTS +private: //From MHWRMLightObserver + void LightStatusChanged(TInt aTarget, CHWRMLight::TLightStatus aStatus); +#endif + +protected: + enum TWatch { ENone = 0, EWaitingForInactivity, EWaitingForActivity }; + +protected: + RTimer iTimer; + TWatch iWatch; + MActivityManagerObserver* iObserver; ///The observer of activity status + TInt iTimeout; ///Current inactivity period + +#ifdef MONITOR_LIGHTS + //Backlight control + CHWRMLight* iLight; + //backlight status + TBool iLights; +#endif + //previous status + TInt iPreviousStatus; + TBool iFirstRound; +}; +#endif /* CACTIVITYMANAGER_H_ */ diff -r 556534771396 -r d4d56f5e7c55 harvester/harvesterserver/inc/ccontentinfo.h --- a/harvester/harvesterserver/inc/ccontentinfo.h Mon Sep 20 12:35:47 2010 +0530 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,101 +0,0 @@ -/* -* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: This component is to store the details of harvester plugins -* -*/ -#ifndef CCONTENTINFO_H_ -#define CCONTENTINFO_H_ - -#include - -class CContentInfo : public CBase - { -public : - /* - * Construction - * @return instance of CContentInfo - */ - static CContentInfo* NewL(); - - /* - * Construction - * @return instance of CContentInfo - */ - static CContentInfo* NewLC(); - //Destructor - ~CContentInfo(); - -private : - /* - * Default constructor - */ - CContentInfo(); - -public: - /* - * @description Returns the name of the content( This is the display - * name given in the corresponding plugin RSS file). - * @return the descriptor containing the name of the content and it - * is the responsibility of the caller to free the allocated memory - * Leaves in case of errors. - */ - HBufC* GetNameL(); - - /* - * @description Returns the Indexing status of the content. - * @return the Indexing status of the content - */ - TInt GetIndexStatus(); - - /* - * @description Returns the Blacklist status of the content. - * @return ETrue if the plugin is blacklisted else returns EFalse - */ - TBool GetBlacklistStatus(); - - /* - * @description Sets the name of the content. - * @Param aName is the name of the content - * Leaves in case of errors. - */ - void SetNameL( const TDesC& aName ); - - /* - * @description Sets the Indexing status of the content. - * @Param aIndexStatus is the Indexing status of the content - */ - void SetIndexStatus( const TInt aIndexStatus ); - - /* - * @description Sets the Blacklisting status of the content. - * @Param aBlacklistStatus is the Blacklisting status of the content - */ - void SetBlacklistStatus( const TBool aBlacklistStatus ); - -private: - /* - * Name of the content.owned - */ - HBufC* iContentName; - /* - * Indexing status - */ - TInt iIndexStatus; - /** - * Blacklist status - */ - TBool iBlacklistStatus; - }; - -#endif /* CCONTENTINFO_H_ */ diff -r 556534771396 -r d4d56f5e7c55 harvester/harvesterserver/inc/ccotentinfodb.h --- a/harvester/harvesterserver/inc/ccotentinfodb.h Mon Sep 20 12:35:47 2010 +0530 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,128 +0,0 @@ -/* -* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: This component is to store the details of harvester plugins -* -*/ - -#ifndef CCOTENTINFODB_H_ -#define CCOTENTINFODB_H_ - -#include -#include -#include - -class CContentInfo; - -class CContentInfoDb : public CBase - { -public : - /* - * Construction - * @return instance of CContentInfo database - */ - static CContentInfoDb* NewL(); - - /* - * Construction - * @return instance of CContentInfo database - */ - static CContentInfoDb* NewLC(); - //Destructor - virtual ~CContentInfoDb(); - -private : - /* - * Default constructor - */ - CContentInfoDb(); - - /* - * Second phase constructor - */ - void ConstructL(); - -public : - /* - * @description Adds the given details of a plugin to the contentinfo DB. - * @param aContentInfo name,Indexing status,blacklist status of the plugin - * @return sysmbian error code - * Leaves in case of errors. - */ - TInt AddL( CContentInfo* aContentInfo ); - - /* - * @description Updates the blacklsit status of the plugin. - * @param aContentName name of the plugin - * @param aBlacklistStatus blacklist status of plugin - * @return sysmbian error code - * Leaves in case of errors. - */ - TInt UpdateBlacklistStatusL( const TDesC& aContentName , TInt aBlacklistStatus ); - - /* - * @description Updates the enable status of the plugin. - * @param aContentName name of the plugin - * @param aIndexStatus Indexing status of plugin - * @return sysmbian error code - * Leaves in case of errors. - */ - TInt UpdatePluginIndexStatusL( const TDesC& aContentName , TInt aIndexStatus ); - - /* - * @description Removes the given details of a plugin from the contentInfo DB. - * @param aContentName name of the plugin - * Leaves in case of errors. - */ - void RemoveL( const TDesC& aContentName ); - - /* - * @description Removes all the rows in the database. - * Leaves in case of errors. - */ - void ResetDatabaseL( ); - - /* - * @description Returns the count of the content in content info DB - * @return content count - * Leaves in case of errors. - */ - TInt GetContentCountL( ); - - /* - * @description Checks if the plugin details is present in the database. - * @param aContentName name of the plugin - * Leaves in case of errors. - */ - TBool FindL(const TDesC& aContentName); - - -private : - /* - * @description Creates the ContentInfo sql database. - * Leaves in case of errors. - */ - void CreateDBL(); - -private: - /* - * Database to maintain the details of ContentInfo plugin.Owned - */ - RSqlDatabase iDatabase; - /** - * Flag for, whether database has been opened - */ - TBool iOpened; - }; - -#endif /* CCOTENTINFODB_H_ */ diff -r 556534771396 -r d4d56f5e7c55 harvester/harvesterserver/inc/cgaurdtimer.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/harvester/harvesterserver/inc/cgaurdtimer.h Tue Oct 05 13:15:12 2010 +0530 @@ -0,0 +1,78 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: This component is to start gaurd timer +* +*/ + + +#ifndef CGAURDTIMER_H +#define CGAURDTIMER_H + +#include + +class MGaurdTimerHandler + { +public : + /* + * HandleGaurdTimerL signal when the gaurd timer expires + */ + virtual void HandleGaurdTimerL() = 0; + }; + +class CGaurdTimer : public CActive + { +public: + /* + * Construction + * @return instance of CGaurdTimer + */ + static CGaurdTimer* NewL( MGaurdTimerHandler* aGaurdTimerHandler ); //For callback + /* + * Construction + * @return instance of CGaurdTimer + */ + static CGaurdTimer* NewLC( MGaurdTimerHandler* aGaurdTimerHandler ); + /* + * Destructor + */ + virtual ~CGaurdTimer(); +public: + /* + * Srats the gaurd timer to find the idle time + */ + void StartgaurdTimer(); + + //From CActive + void RunL(); + void DoCancel(); + TInt RunError( TInt aError ); +private: + /* + * Constructor + */ + CGaurdTimer(); + /* + * Second phase constructor + */ + void ConstructL( MGaurdTimerHandler* aGaurdTimerHandler ); + +private: + + //Timer for self activation of AO + RTimer iTimer; + + MGaurdTimerHandler* iGaurdTimerHandler; + }; + +#endif /* CGAURDTIMER_H */ diff -r 556534771396 -r d4d56f5e7c55 harvester/harvesterserver/inc/cindexingmanager.h --- a/harvester/harvesterserver/inc/cindexingmanager.h Mon Sep 20 12:35:47 2010 +0530 +++ b/harvester/harvesterserver/inc/cindexingmanager.h Tue Oct 05 13:15:12 2010 +0530 @@ -21,14 +21,18 @@ #include #include #include +#include +#include "cgaurdtimer.h" const TInt KFilePluginBaseAppClassMaxLen = 64; //Forward Declaration class CBlacklistMgr; -class CContentInfoMgr; -class CContentInfo; +class ContentInfoDbUpdate; -class CIndexingManager : public CActive, public MIndexingService +class CIndexingManager : public CActive, + public MIndexingService, + public MActivityManagerObserver, + public MGaurdTimerHandler { public: static CIndexingManager* NewL(); @@ -72,7 +76,9 @@ * @param aError KErrNone if harvesting completed successfully otherwise systemwide errorcodes */ void HarvestingCompleted(CIndexingPlugin* aPlugin, const TDesC& aQualifiedBaseAppClass, TInt aError); - + + // from MGaurdTimerHandler + void HandleGaurdTimerL(); private: /** @@ -102,11 +108,9 @@ */ void SaveL(); /** - * Add an entry to the content info Db with the plugin details.If an entry with the given - * plugin name is already available in contentinfo db then the blacklist status of the plugin - * is updated with KEnable. + * Add an entry to the content info Db with the plugin details. */ - void UpdateContentInfoDbL( const TDesC& aPluginName, CContentInfo* aContentinfo); + void UpdateContentInfoDbL( const TDesC& aXmlPath ); /** * Update the dontload list in a separate table in blacklist database. * If any error occurs in reading Uid values from centrep, then the dontload list @@ -125,6 +129,9 @@ */ void LoadHarvesterpluginL (TUid aPluginUid, TInt aVersion, const TDesC& aPluginName); + //From MActivityManagerObserver + void ActivityChanged(const TBool aActive); + private: CIndexingManager(); void ConstructL(); @@ -226,7 +233,11 @@ /* Database to maintain blacklisted plugins.Owned */ CBlacklistMgr* iBlacklistMgr; /* Database to maintain the content info all the plugins.owned*/ - CContentInfoMgr* iContentInfoMgr; + ContentInfoDbUpdate* iContentInfodb; + //monitors device activity + CActivityManager* iActivityManager; + + CGaurdTimer *iGaurdTimer; }; #endif // CINDEXINGMANAGER_H diff -r 556534771396 -r d4d56f5e7c55 harvester/harvesterserver/inc/contentinfomgr.h --- a/harvester/harvesterserver/inc/contentinfomgr.h Mon Sep 20 12:35:47 2010 +0530 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,119 +0,0 @@ -/* -* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: This component is to store the details of harvester plugins -* -*/ - -#ifndef CONTENTINFOMGR_H_ -#define CONTENTINFOMGR_H_ - -#include - -class CContentInfoDb; -class CContentInfo; - -class CContentInfoMgr : public CBase - { -public : - /* - * Construction - * @return instance of Contentinfo manager - */ - static CContentInfoMgr* NewL(); - - /* - * Construction - * @return instance of content info manager - */ - static CContentInfoMgr* NewLC(); - - //Destructor - ~CContentInfoMgr(); - -private : - /* - * Default constructor - */ - CContentInfoMgr(); - - /* - * Second phase constructor - */ - void ConstructL(); - -public : - /* - * @description Adds the given details of a plugin to the contentinfo DB. - * status will be set as 1(Not Blacklisted) - * @param aContentInfo name,indexing status,blacklist status of content - * @return sysmbian error code - * Leaves in case of errors. - */ - TInt AddL( CContentInfo* aContentInfo ); - - /* - * @description Updates the blacklsit status of the plugin. - * @param aContentName name of the plugin - * @param aBlacklistStatus blacklist status of plugin - * @return sysmbian error code - * Leaves in case of errors. - */ - TInt UpdateBlacklistStatusL( const TDesC& aContentName , TInt aBlacklistStatus ); - - /* - * @description Updates the enable status of the plugin. - * @param aContentName name of the plugin - * @param aIndexStatus Indexing status of plugin - * @return sysmbian error code - * Leaves in case of errors. - */ - TInt UpdatePluginIndexStatusL( const TDesC& aContentName , TInt aIndexStatus ); - - /* - * @description Finds whether the given plugin exists in the - * database or not. - * @param aContentName name of the plugin - * @retutn ETrue if exists else returns EFalse - * Leaves in case of errors. - */ - TBool FindL( const TDesC& aContentName ); - - /* - * @description Removes the given details of a plugin from the contentInfo DB. - * @param aContentName name of the plugin - * Leaves in case of errors. - */ - void RemoveL( const TDesC& aContentName ); - - /* - * @description Removes all the rows in the database - * Leaves in case of errors. - */ - void ResetL( ); - - /* - * @description Returns the count of the content in content info DB - * @return content count - * Leaves in case of errors. - */ - TInt GetContentCountL( ); - -private: - /* - * Interface to contentinfo database.Owned - */ - CContentInfoDb* iContentInfoDb; - }; - -#endif /* CONTENTINFOMGR_H_ */ diff -r 556534771396 -r d4d56f5e7c55 harvester/harvesterserver/src/cactivitymanager.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/harvester/harvesterserver/src/cactivitymanager.cpp Tue Oct 05 13:15:12 2010 +0530 @@ -0,0 +1,306 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + +#include "cactivitymanager.h" +#include +#include "OstTraceDefinitions.h" +#ifdef OST_TRACE_COMPILER_IN_USE +#include "cactivitymanagerTraces.h" +#endif + + +// --------------------------------------------------------------------------- +// CActivityManager::NewL() +// --------------------------------------------------------------------------- +// +CActivityManager* CActivityManager::NewL(MActivityManagerObserver* aObserver, TInt aTimeout) + { + OstTraceFunctionEntry0( CACTIVITYMANAGER_NEWL_ENTRY ); + CActivityManager* self = new (ELeave) CActivityManager(aObserver, aTimeout); + CleanupStack::PushL(self); + self->ConstructL(); + CleanupStack::Pop(self); + OstTraceFunctionExit0( CACTIVITYMANAGER_NEWL_EXIT ); + return self; + } + +// --------------------------------------------------------------------------- +// CActivityManager::CActivityManager() +// --------------------------------------------------------------------------- +// +CActivityManager::CActivityManager(MActivityManagerObserver* aObserver, TInt aTimeout) +: CActive(CActive::EPriorityHigh), iObserver(aObserver), iTimeout(aTimeout), iPreviousStatus(KErrNotFound) + { + OstTraceFunctionEntry0( CACTIVITYMANAGER_CACTIVITYMANAGER_ENTRY ); + CActiveScheduler::Add(this); + OstTraceFunctionExit0( CACTIVITYMANAGER_CACTIVITYMANAGER_EXIT ); + } + +// --------------------------------------------------------------------------- +// CActivityManager::~CActivityManager() +// --------------------------------------------------------------------------- +// +CActivityManager::~CActivityManager() + { + OstTraceFunctionEntry0( DUP1_CACTIVITYMANAGER_CACTIVITYMANAGER_ENTRY ); + + iObserver = NULL; + Cancel(); + +#ifdef MONITOR_LIGHTS + delete iLight; + iLight = NULL; +#endif + + iTimer.Cancel(); + iTimer.Close(); + OstTraceFunctionExit0( DUP1_CACTIVITYMANAGER_CACTIVITYMANAGER_EXIT ); + } + +// --------------------------------------------------------------------------- +// CActivityManager::ConstructL() +// --------------------------------------------------------------------------- +// +void CActivityManager::ConstructL() + { + iTimer.CreateLocal(); + iWatch = ENone; + } + +// --------------------------------------------------------------------------- +// CTMActivityManager::SetTimeout() +// --------------------------------------------------------------------------- +// +void CActivityManager::SetTimeout(TInt aTimeout) + { + iTimeout = aTimeout; + Reset(); + } + +// --------------------------------------------------------------------------- +// CActivityManager::Reset() +// --------------------------------------------------------------------------- +// +void CActivityManager::Reset() + { +#ifdef MONITOR_LIGHTS + delete iLight; + iLight = NULL; +#endif + + Cancel(); + Start(); + } + +// --------------------------------------------------------------------------- +// CActivityManager::DoCancel() +// --------------------------------------------------------------------------- +void CActivityManager::DoCancel() + { + +#ifdef MONITOR_LIGHTS + delete iLight; + iLight = NULL; +#endif + + iTimer.Cancel(); + iWatch = ENone; + } + +// --------------------------------------------------------------------------- +// CActivityManager::Start() +// --------------------------------------------------------------------------- +// +void CActivityManager::Start() + { + OstTraceFunctionEntry0( CACTIVITYMANAGER_START_ENTRY ); + +#ifdef MONITOR_LIGHTS + if(!iLight) + { + TRAP_IGNORE(iLight = CHWRMLight::NewL(this)); + } +#endif + + if ( iWatch == ENone ) + { + iFirstRound = ETrue; + + if( !IsActive() ) + { + SetActive(); + TRequestStatus* statusPtr = &iStatus; + User::RequestComplete( statusPtr, KErrNone ); + } + } + OstTraceFunctionExit0( CACTIVITYMANAGER_START_EXIT ); + } + +// --------------------------------------------------------------------------- +// CActivityManager::RunL() +// --------------------------------------------------------------------------- +// +void CActivityManager::RunL() + { + OstTraceFunctionEntry0( CACTIVITYMANAGER_RUNL_ENTRY ); + if(iFirstRound) + { + iFirstRound = EFalse; + if (!IsActive()) + { + iWatch = EWaitingForInactivity; + iTimer.Inactivity(iStatus, iTimeout); + SetActive(); + } + NotifyObserver(); + OstTraceFunctionExit0( CACTIVITYMANAGER_RUNL_EXIT ); + return; + } + + if (iStatus == KErrNone) + { + if (iWatch == EWaitingForInactivity) + { + TInt inactivity = User::InactivityTime().Int(); + if (inactivity >= iTimeout) + { + NotifyObserver(); + + if (!IsActive()) //observer might have called a Reset() + { + iTimer.Inactivity(iStatus,0); + iWatch = EWaitingForActivity; + } + } + else + { + iTimer.Inactivity(iStatus,iTimeout); + } + } + else if (iWatch == EWaitingForActivity) + { + NotifyObserver(); + + if (!IsActive()) //observer might have called a Reset() + { + iTimer.Inactivity(iStatus,iTimeout); + iWatch = EWaitingForInactivity; + } + } + + if (!IsActive()) //observer might have called a Reset() + { + SetActive(); + } + } + else + { + iWatch = ENone; + } + OstTraceFunctionExit0( DUP1_CACTIVITYMANAGER_RUNL_EXIT ); + } + +// --------------------------------------------------------------------------- +// CActivityManager::RunError() +// --------------------------------------------------------------------------- +// +TInt CActivityManager::RunError(TInt aError) + { + OstTraceFunctionEntry0( CACTIVITYMANAGER_RUNERROR_ENTRY ); + if (aError != KErrNone) + { + Reset(); + } + + // nothing to do + OstTraceFunctionExit0( CACTIVITYMANAGER_RUNERROR_EXIT ); + return KErrNone; + } + +// ----------------------------------------------------------------------------- +// IsInactive() +// ----------------------------------------------------------------------------- +// +TBool CActivityManager::IsInactive() + { + OstTraceFunctionEntry0( CACTIVITYMANAGER_ISINACTIVE_ENTRY ); + +#ifdef MONITOR_LIGHTS +#ifdef _DEBUG +TInt inactivityTime = User::InactivityTime().Int(); +#endif +#else +TInt inactivityTime = User::InactivityTime().Int(); +#endif + + //if lights are off or inactivity timer is less that target the device is not idle + if( User::InactivityTime() >= TTimeIntervalSeconds(iTimeout) +#ifdef MONITOR_LIGHTS + || !iLights +#endif + ) + { + OstTraceFunctionExit0( CACTIVITYMANAGER_ISINACTIVE_EXIT ); + return ETrue; + } + OstTraceFunctionExit0( DUP1_CACTIVITYMANAGER_ISINACTIVE_EXIT ); + return EFalse; + } + +#ifdef MONITOR_LIGHTS +// ----------------------------------------------------------------------------- +// LightStatusChanged() +// ----------------------------------------------------------------------------- +// +void CActivityManager::LightStatusChanged(TInt aTarget, CHWRMLight::TLightStatus aStatus) + { + if(aTarget & CHWRMLight::EPrimaryDisplay) + { + if( aStatus == CHWRMLight::ELightOff ) + { + iLights = EFalse; + } + else + { + iLights = ETrue; + } + + NotifyObserver(); + } + } +#endif + +// ----------------------------------------------------------------------------- +// NotifyObserver() +// ----------------------------------------------------------------------------- +// +void CActivityManager::NotifyObserver() + { + OstTraceFunctionEntry0( CACTIVITYMANAGER_NOTIFYOBSERVER_ENTRY ); + TBool status = IsInactive(); + OstTrace1( TRACE_NORMAL, CACTIVITYMANAGER_NOTIFYOBSERVER, "CActivityManager::NotifyObserver;status=%d", status ); + + if( iPreviousStatus != status ) + { + iPreviousStatus = status; + if (iObserver) + { + iObserver->ActivityChanged(status); + } + } + OstTraceFunctionExit0( CACTIVITYMANAGER_NOTIFYOBSERVER_EXIT ); + } diff -r 556534771396 -r d4d56f5e7c55 harvester/harvesterserver/src/ccontentinfo.cpp --- a/harvester/harvesterserver/src/ccontentinfo.cpp Mon Sep 20 12:35:47 2010 +0530 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,135 +0,0 @@ -/* -* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -#include "ccontentinfo.h" -#include "OstTraceDefinitions.h" -#ifdef OST_TRACE_COMPILER_IN_USE -#include "ccontentinfoTraces.h" -#endif - - -// ----------------------------------------------------------------------------- -// CContentInfo::NewL() -// ----------------------------------------------------------------------------- -// -CContentInfo* CContentInfo::NewL() - { - OstTraceFunctionEntry0( CCONTENTINFO_NEWL_ENTRY ); - CContentInfo* instance = CContentInfo::NewLC(); - CleanupStack::Pop( instance ); - OstTraceFunctionExit0( CCONTENTINFO_NEWL_EXIT ); - return instance; - } - -// ----------------------------------------------------------------------------- -// CContentInfo::NewLC() -// ----------------------------------------------------------------------------- -// -CContentInfo* CContentInfo::NewLC() - { - OstTraceFunctionEntry0( CCONTENTINFO_NEWLC_ENTRY ); - CContentInfo* instance = new (ELeave) CContentInfo(); - CleanupStack::PushL( instance ); - OstTraceFunctionExit0( CCONTENTINFO_NEWLC_EXIT ); - return instance; - } -// ----------------------------------------------------------------------------- -// CContentInfo::CContentInfo() -// ----------------------------------------------------------------------------- -// -CContentInfo::CContentInfo() - { - //Do necessary initialization here - } -// ----------------------------------------------------------------------------- -// CContentInfo::~CContentInfo() -// ----------------------------------------------------------------------------- -// -CContentInfo::~CContentInfo() - { - delete iContentName; - } -// ----------------------------------------------------------------------------- -// CContentInfo::GetNameL() -// ----------------------------------------------------------------------------- -// -HBufC* CContentInfo::GetNameL() - { - OstTraceFunctionEntry0( CCONTENTINFO_GETNAMEL_ENTRY ); - HBufC* contentname = NULL; - if ( iContentName->Length() ) - { - contentname = iContentName->AllocL(); - } - OstTraceFunctionExit0( CCONTENTINFO_GETNAMEL_EXIT ); - return contentname; - } - -// ----------------------------------------------------------------------------- -// CContentInfo::GetIndexStatusL() -// ----------------------------------------------------------------------------- -// -TInt CContentInfo::GetIndexStatus() - { - return iIndexStatus; - } - -// ----------------------------------------------------------------------------- -// CContentInfo::GetBlacklistStatusL() -// ----------------------------------------------------------------------------- -// -TInt CContentInfo::GetBlacklistStatus() - { - return iBlacklistStatus; - } - -// ----------------------------------------------------------------------------- -// CContentInfo::SetNameL() -// ----------------------------------------------------------------------------- -// -void CContentInfo::SetNameL( const TDesC& aName ) - { - OstTraceFunctionEntry0( CCONTENTINFO_SETNAMEL_ENTRY ); - if ( iContentName ) - { - delete iContentName; - iContentName = NULL; - } - - iContentName = HBufC::NewL( aName.Length() ); - iContentName->Des().Copy( aName ); - OstTraceFunctionExit0( CCONTENTINFO_SETNAMEL_EXIT ); - } - -// ----------------------------------------------------------------------------- -// CContentInfo::SetIndexStatusL() -// ----------------------------------------------------------------------------- -// -void CContentInfo::SetIndexStatus( const TInt aIndexStatus ) - { - iIndexStatus = aIndexStatus; - } - -// ----------------------------------------------------------------------------- -// CContentInfo::SetBlacklistStatusL() -// ----------------------------------------------------------------------------- -// -void CContentInfo::SetBlacklistStatus( const TBool aBlacklistStatus ) - { - iBlacklistStatus = aBlacklistStatus; - } -//EOF diff -r 556534771396 -r d4d56f5e7c55 harvester/harvesterserver/src/ccontentinfodb.cpp --- a/harvester/harvesterserver/src/ccontentinfodb.cpp Mon Sep 20 12:35:47 2010 +0530 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,340 +0,0 @@ -/* -* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -#include "ccotentinfodb.h" -#include "ccontentinfo.h" -#include -#include "OstTraceDefinitions.h" -#ifdef OST_TRACE_COMPILER_IN_USE -#include "ccontentinfodbTraces.h" -#endif - - -// The max length for creating sql query for KCISqlFormatSeek format -const TInt KCISqlStringMaxLength(100); -//SQL query to fetch the records with given Plugin name -_LIT(KCISqlFormatSeek , "SELECT * FROM table1 WHERE NAME='%S'"); -//SQL query to delete the records with given plugin name -_LIT(KCISqlDelete, "DELETE FROM table1 WHERE NAME='%S'"); -//Syntax for adding a row to sql database -_LIT(KInsertRowFormat,"INSERT INTO table1(NAME,INS,BLS) values('%S',%d,%d)"); -//syntax to retrieve all the rows from the sql database -_LIT(KSelectAllRowsFormat,"SELECT * FROM table1"); -//syntax to update Index status for a given plugin -_LIT(KUpdateISFormat,"UPDATE table1 SET INS=%d WHERE NAME = '%S'"); -//syntax to update Blacklist status for a given plugin -_LIT(KUpdateBSFormat,"UPDATE table1 SET BLS=%d WHERE NAME = '%S'"); -_LIT(KDriveC, "c:"); -//syntax for removing all the records in the table -_LIT(KRemoveAll, "DELETE FROM table1" ); -//syntax for creating table with plugin name, indexing status and blacklist status as the columns -_LIT(KCreateTableFormat,"CREATE TABLE table1(NAME TEXT NOT NULL, INS INTEGER, BLS INTEGER, PRIMARY KEY(NAME))"); - -// ----------------------------------------------------------------------------- -// CContentInfoDb::NewL() -// ----------------------------------------------------------------------------- -// -CContentInfoDb* CContentInfoDb::NewL() - { - OstTraceFunctionEntry0( CCONTENTINFODB_NEWL_ENTRY ); - CContentInfoDb* instance = CContentInfoDb::NewLC(); - CleanupStack::Pop( instance ); - OstTraceFunctionExit0( CCONTENTINFODB_NEWL_EXIT ); - return instance; - } - -// ----------------------------------------------------------------------------- -// CContentInfoDb::NewLC() -// ----------------------------------------------------------------------------- -// -CContentInfoDb* CContentInfoDb::NewLC() - { - OstTraceFunctionEntry0( CCONTENTINFODB_NEWLC_ENTRY ); - CContentInfoDb* instance = new (ELeave) CContentInfoDb(); - CleanupStack::PushL( instance ); - instance->ConstructL(); - OstTraceFunctionExit0( CCONTENTINFODB_NEWLC_EXIT ); - return instance; - } - -// ----------------------------------------------------------------------------- -// CContentInfoDb::CContentInfoDb() -// ----------------------------------------------------------------------------- -// -CContentInfoDb::CContentInfoDb() - { - //Do the necessary initialisation - iOpened = EFalse; - } - -// ----------------------------------------------------------------------------- -// CContentInfoDb::~CContentInfoDb -// ----------------------------------------------------------------------------- -// -CContentInfoDb::~CContentInfoDb() - { - iDatabase.Close(); - } - -// ----------------------------------------------------------------------------- -// CBlacklistDb::ConstructL() -// ----------------------------------------------------------------------------- -// -void CContentInfoDb::ConstructL() - { - OstTraceFunctionEntry0( CCONTENTINFODB_CONSTRUCTL_ENTRY ); - //Open the sql database.If doesn't exist,create the sql database and open it - RFs fssession; - User::LeaveIfError( fssession.Connect() ); - TFileName privatePath; - TFileName datafile; - fssession.CreatePrivatePath(EDriveC); - fssession.PrivatePath(privatePath);//data caged path of loading process - fssession.Close(); - datafile.Copy(KDriveC); - datafile.Append(privatePath); - datafile.Append( KContentInfoFileName ); - - TInt err = iDatabase.Open( datafile ); - - switch ( err ) - { - case KErrNone: - iOpened = ETrue; - break; - - case KErrNotFound: - case KErrPathNotFound: - { - //Create the database - TRAPD( error , CreateDBL() ); - - if ( error == KErrNone ) - { - iOpened = ETrue; - } - } - break; - - default: - break; - } - - OstTraceFunctionExit0( CCONTENTINFODB_CONSTRUCTL_EXIT ); - return; - } - -// ----------------------------------------------------------------------------- -// CContentInfoDb::AddL() -// ----------------------------------------------------------------------------- -// -TInt CContentInfoDb::AddL( CContentInfo* aContentInfo ) - { - OstTraceFunctionEntry0( CCONTENTINFODB_ADDL_ENTRY ); - //Add the item record to database - - if ( !iOpened ) - return KErrNotReady; - - //Prepare the sql - TBuf sql; - HBufC* contentname = aContentInfo->GetNameL(); - - TInt indexstatus = aContentInfo->GetIndexStatus(); - TBool blstatus = aContentInfo->GetBlacklistStatus(); - sql.Format( KInsertRowFormat , contentname , indexstatus , blstatus ); - - TInt err = iDatabase.Exec(sql) ; - - delete contentname; - OstTraceFunctionExit0( CCONTENTINFODB_ADDL_EXIT ); - return err; - } - -// ----------------------------------------------------------------------------- -// CContentInfoDb::UpdateBlacklistStatusL -// ----------------------------------------------------------------------------- -// -TInt CContentInfoDb::UpdateBlacklistStatusL( const TDesC& aContentName , TInt aBlacklistStatus ) - { - OstTraceFunctionEntry0( CCONTENTINFODB_UPDATEBLACKLISTSTATUSL_ENTRY ); - //Update the item record to database - if ( !iOpened ) - return KErrNotReady; - - //Prepare the sql - TBuf sql; - sql.Format( KUpdateBSFormat , aBlacklistStatus, &aContentName ); - - TInt err = iDatabase.Exec(sql) ; - - OstTraceFunctionExit0( CCONTENTINFODB_UPDATEBLACKLISTSTATUSL_EXIT ); - return err; - } - -// ----------------------------------------------------------------------------- -// CContentInfoDb::UpdatePluginIndexStatusL -// ----------------------------------------------------------------------------- -// -TInt CContentInfoDb::UpdatePluginIndexStatusL( const TDesC& aContentName , TInt aIndexStatus ) - { - OstTraceFunctionEntry0( CCONTENTINFODB_UPDATEPLUGININDEXSTATUSL_ENTRY ); - //Update the item record to database - - if ( !iOpened ) - return KErrNotReady; - - //Prepare the sql - TBuf sql; - sql.Format( KUpdateISFormat , aIndexStatus, &aContentName ); - - TInt err = iDatabase.Exec(sql) ; - - OstTraceFunctionExit0( CCONTENTINFODB_UPDATEPLUGININDEXSTATUSL_EXIT ); - return err; - } - -// ----------------------------------------------------------------------------- -// CContentInfoDb::RemoveL -// ----------------------------------------------------------------------------- -// -void CContentInfoDb::RemoveL( const TDesC& aContentName ) - { - OstTraceFunctionEntry0( CCONTENTINFODB_REMOVEL_ENTRY ); - //remove the item record to database - - if ( !iOpened ) - User::Leave( KErrNotReady ); - - //Prepare the sql - TBuf sql; - sql.Format( KCISqlDelete , &aContentName ); - - User::LeaveIfError( iDatabase.Exec(sql) ); - OstTraceFunctionExit0( CCONTENTINFODB_REMOVEL_EXIT ); - return ; - } - -// ----------------------------------------------------------------------------- -// CContentInfoDb::ResetDatabaseL -// ----------------------------------------------------------------------------- -// -void CContentInfoDb::ResetDatabaseL( ) - { - OstTraceFunctionEntry0( CCONTENTINFODB_RESETDATABASEL_ENTRY ); - //remove all the item record to database - - if ( !iOpened ) - User::Leave( KErrNotReady ); - - //Prepare the sql - TBuf sql; - sql.Copy( KRemoveAll ); - - User::LeaveIfError( iDatabase.Exec(sql) ); - - OstTraceFunctionExit0( CCONTENTINFODB_RESETDATABASEL_EXIT ); - return ; - } - -// ----------------------------------------------------------------------------- -// CContentInfoDb::FindL -// ----------------------------------------------------------------------------- -// -TBool CContentInfoDb::FindL(const TDesC& aContentName) - { - OstTraceFunctionEntry0( CCONTENTINFODB_FINDL_ENTRY ); - if ( !iOpened ) - User::Leave( KErrNotReady ); - - //Prepare the sql - TBuf sql; - sql.Format( KCISqlFormatSeek, &aContentName ); - - RSqlStatement stmt; - TBool isfound = EFalse; - //Error check necessary to avoid sqldb 2 panic, - //if sqlstatement preparation fails, call to Next() raises this panic - TInt err = stmt.Prepare( iDatabase , sql ); - if ( err == KErrNone) - isfound = ( KSqlAtRow == stmt.Next() )?ETrue:EFalse; - OstTraceFunctionExit0( CCONTENTINFODB_FINDL_EXIT ); - return isfound; - } - -// ----------------------------------------------------------------------------- -// CContentInfoDb::GetContentCountL -// ----------------------------------------------------------------------------- -// -TInt CContentInfoDb::GetContentCountL() - { - OstTraceFunctionEntry0( CCONTENTINFODB_GETCONTENTCOUNTL_ENTRY ); - if ( !iOpened ) - User::Leave( KErrNotReady ); - - TInt count = 0; - - //Prepare the sql - TBuf sql; - sql.Copy( KSelectAllRowsFormat ); - - RSqlStatement stmt; - TInt err = stmt.Prepare( iDatabase , sql ); - //Error check necessary to avoid sqldb 2 panic, - //if sqlstatement preparation fails, call to Next() raises this panic - if( err == KErrNone) - { - while ( KSqlAtEnd != stmt.Next() ) - ++count; - } - OstTraceFunctionExit0( CCONTENTINFODB_GETCONTENTCOUNTL_EXIT ); - return count; - } - -// ----------------------------------------------------------------------------- -// CContentInfoDb::CreateDBL -// ----------------------------------------------------------------------------- -// -void CContentInfoDb::CreateDBL() - { - OstTraceFunctionEntry0( CCONTENTINFODB_CREATEDBL_ENTRY ); - - iDatabase.Close(); - - TFileName privatePath; - TFileName datafile; - RFs fssession; - User::LeaveIfError( fssession.Connect() ); - fssession.CreatePrivatePath(EDriveC); - fssession.PrivatePath(privatePath);//data caged path of loading process - fssession.Close(); - datafile.Copy(KDriveC); - datafile.Append(privatePath); - datafile.Append( KContentInfoFileName ); - - //create the database - User::LeaveIfError( iDatabase.Create( datafile ) ); - - //Add table - TBuf sql; - sql.Copy( KCreateTableFormat ); - - User::LeaveIfError( iDatabase.Exec( sql ) ); - - OstTraceFunctionExit0( CCONTENTINFODB_CREATEDBL_EXIT ); - } -//EOF diff -r 556534771396 -r d4d56f5e7c55 harvester/harvesterserver/src/cgaurdtimer.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/harvester/harvesterserver/src/cgaurdtimer.cpp Tue Oct 05 13:15:12 2010 +0530 @@ -0,0 +1,125 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: This application is to monitor Harvester and Search Server +* +*/ + + +#include "cgaurdtimer.h" +#include "HarvesterServerLogger.h" + +#define MONITORING_DELAY 2147483647 // Max time that RTimer::After() can allow ie. 35Min. +// ----------------------------------------------------------------------------- +// CGaurdTimer::NewL +// ----------------------------------------------------------------------------- +// +CGaurdTimer* CGaurdTimer::NewL( MGaurdTimerHandler* aGaurdTimerHandler ) + { + CGaurdTimer* self = CGaurdTimer::NewLC( aGaurdTimerHandler ); + CleanupStack::Pop(); + return self; + } +// ----------------------------------------------------------------------------- +// CGaurdTimer::NewLC +// ----------------------------------------------------------------------------- +// +CGaurdTimer* CGaurdTimer::NewLC( MGaurdTimerHandler* aGaurdTimerHandler ) + { + CGaurdTimer* self = new ( ELeave ) CGaurdTimer( ); + CleanupStack::PushL( self ); + self->ConstructL( aGaurdTimerHandler ); + return self; + } + +// ----------------------------------------------------------------------------- +// CGaurdTimer::~CGaurdTimer() +// ----------------------------------------------------------------------------- +// +CGaurdTimer::~CGaurdTimer() + { + Cancel(); + iTimer.Close(); + } + +// ----------------------------------------------------------------------------- +// CGaurdTimer::CGaurdTimer() +// ----------------------------------------------------------------------------- +// +CGaurdTimer::CGaurdTimer( ): CActive( CActive::EPriorityStandard ) + { + + } + +// ----------------------------------------------------------------------------- +// CGaurdTimer::ConstructL() +// ----------------------------------------------------------------------------- +// +void CGaurdTimer::ConstructL( MGaurdTimerHandler* aGaurdTimerHandler ) + { + CActiveScheduler::Add( this ); + User::LeaveIfError( iTimer.CreateLocal() ); + iGaurdTimerHandler = aGaurdTimerHandler; + } + +// ----------------------------------------------------------------------------- +// CGaurdTimer::StartgaurdTimer() +// ----------------------------------------------------------------------------- +// +void CGaurdTimer::StartgaurdTimer() + { + CPIXLOGSTRING("CGaurdTimer::StartWDTimer(): Entered"); + //start the timer + iTimer.After( iStatus , MONITORING_DELAY ); // Wait 60 seconds before checking the servers + SetActive(); + } + +// ----------------------------------------------------------------------------- +// CGaurdTimer::RunL() +// ----------------------------------------------------------------------------- +// +void CGaurdTimer::RunL() + { + //check for the Harvester server and the search server + if( iStatus.Int() == KErrNone ) + { + TInt err = KErrNone; + TRAP ( err , iGaurdTimerHandler->HandleGaurdTimerL() ); + } + } + +// ----------------------------------------------------------------------------- +// CGaurdTimer::DoCancel() +// ----------------------------------------------------------------------------- +// +void CGaurdTimer::DoCancel() + { + iTimer.Cancel(); + } + +// ----------------------------------------------------------------------------- +// CGaurdTimer::RunError() +// ----------------------------------------------------------------------------- +// +TInt CGaurdTimer::RunError( TInt ) + { + //Cancel the timer if there are any and start the new timer + iTimer.Cancel(); + + //start the timer + iTimer.After( iStatus , MONITORING_DELAY ); + SetActive(); + + return KErrNone; + } +//End of file diff -r 556534771396 -r d4d56f5e7c55 harvester/harvesterserver/src/charvesterserver.cpp --- a/harvester/harvesterserver/src/charvesterserver.cpp Mon Sep 20 12:35:47 2010 +0530 +++ b/harvester/harvesterserver/src/charvesterserver.cpp Tue Oct 05 13:15:12 2010 +0530 @@ -141,7 +141,7 @@ // Install active scheduler //CActiveScheduler::Install(activeScheduler); - + User::RenameThread(KHarvesterServerName); // Construct server CHarvesterServer* server = CHarvesterServer::NewLC(); @@ -149,7 +149,7 @@ //RProcess().SetPriority(EPriorityBackground); // Rename the thread. - User::RenameThread(KHarvesterServerName); + RProcess::Rendezvous(KErrNone); // Signal client thread if started by such diff -r 556534771396 -r d4d56f5e7c55 harvester/harvesterserver/src/cindexingmanager.cpp --- a/harvester/harvesterserver/src/cindexingmanager.cpp Mon Sep 20 12:35:47 2010 +0530 +++ b/harvester/harvesterserver/src/cindexingmanager.cpp Tue Oct 05 13:15:12 2010 +0530 @@ -21,8 +21,7 @@ #include "CIndexingManager.h" #include "HarvesterServerLogger.h" #include "CBlacklistMgr.h" -#include "contentinfomgr.h" -#include "ccontentinfo.h" +#include "contentinfodbupdate.h" #include "OstTraceDefinitions.h" #ifdef OST_TRACE_COMPILER_IN_USE #include "cindexingmanagerTraces.h" @@ -36,7 +35,7 @@ const TUint KDefaultWaitTimeInMinutes = 1; // How often harvester states are checked (in microseconds) -const TUint KDefaultWaitTime = KDefaultWaitTimeInMinutes*60*1000000; // 1 minute +//const TUint KDefaultWaitTime = KDefaultWaitTimeInMinutes*60*1000000; // 1 minute // If time difference between RunL calls is less than this value (i.e system time // changed to past) update harvesters start and complete times. @@ -106,7 +105,11 @@ delete iBlacklistMgr; - delete iContentInfoMgr; + delete iContentInfodb; + + delete iActivityManager; + + delete iGaurdTimer; } // ----------------------------------------------------------------------------- @@ -138,8 +141,9 @@ //instantiate blacklist database iBlacklistMgr = CBlacklistMgr::NewL(); - //Instantiate Contentinfo manager - iContentInfoMgr = CContentInfoMgr::NewL(); + + //Instantiate ContentInfoDbUpdate + iContentInfodb = new ContentInfoDbUpdate(); UpdateDontloadListL(); @@ -149,8 +153,14 @@ //release the Blacklist manager as the blacklist functionality is done delete iBlacklistMgr; //release the content info manager as all the content details of all plugins are stored - delete iContentInfoMgr; - + delete iContentInfodb; + //Start the activity manager to monitor the user activity status + iActivityManager = CActivityManager::NewL( this ); + if(iActivityManager) + { + iActivityManager->Start(); + } + iGaurdTimer = CGaurdTimer::NewL( this ); StartPlugins(); // Wait before running RunL @@ -319,19 +329,29 @@ TInt count( 0 ); count = infoArray.Count(); - TInt contentcount(iContentInfoMgr->GetContentCountL() ); - // If the content count in the content info DB is not equal to the plugin count, reset the content info DB - if ( contentcount != count) - iContentInfoMgr->ResetL(); - - CContentInfo* contentinfo = CContentInfo::NewL(); - + CImplementationInformation *info = NULL; + for(TInt i = 0; i < count; i++ ) + { + TUid uid = infoArray[i]->ImplementationUid(); + if( uid.iUid == 0x2001F703) // files + { + info = infoArray[i]; + infoArray.Remove(i); + break; + } + } + // Now add file plugin at the end of the list + infoArray.AppendL(info); for ( TInt i = 0; i < count; i++ ) { TUid uid = infoArray[i]->ImplementationUid(); // Create the plug-ins TInt version = infoArray[i]->Version(); + //Update the details of the plugin in Contentinfo DB - UpdateContentInfoDbL( infoArray[i]->DisplayName(), contentinfo ); + TBuf<255> filepath; + filepath.Copy(infoArray[i]->OpaqueData()); + UpdateContentInfoDbL(filepath); + //Get the load status of the plugin. TBool pluginloadstatus = GetPluginLoadStatusL ( uid, version, infoArray[i]->DisplayName() ); @@ -340,7 +360,6 @@ LoadHarvesterpluginL (uid, version, infoArray[i]->DisplayName() );//Load the harvester plugin } } - delete contentinfo; CleanupStack::PopAndDestroy( &infoArray ); // infoArray, results in a call to CleanupEComArray OstTraceFunctionExit0( CINDEXINGMANAGER_LOADPLUGINSL_EXIT ); } @@ -590,24 +609,13 @@ // CIndexingManager::UpdateContentInfoDbL() // ----------------------------------------------------------------------------- // -void CIndexingManager::UpdateContentInfoDbL( const TDesC& aPluginName, CContentInfo* aContentinfo) +void CIndexingManager::UpdateContentInfoDbL( const TDesC& aXmlPath) { OstTraceFunctionEntry0( CINDEXINGMANAGER_UPDATECONTENTINFODBL_ENTRY ); - TBool iscontentfound = iContentInfoMgr->FindL( aPluginName ); - - if( !iscontentfound ) - { - //Add the content details to database - aContentinfo->SetNameL( aPluginName ); - aContentinfo->SetBlacklistStatus( KEnable ); - aContentinfo->SetIndexStatus( KEnable ); - iContentInfoMgr->AddL( aContentinfo ); - - } - else - { - iContentInfoMgr->UpdateBlacklistStatusL( aPluginName , KEnable ); - } + + if(iContentInfodb) + iContentInfodb->UpdateDb(QString::fromUtf16(aXmlPath.Ptr(),aXmlPath.Length())); + OstTraceFunctionExit0( CINDEXINGMANAGER_UPDATECONTENTINFODBL_EXIT ); } @@ -669,18 +677,18 @@ if ( loadstatus ) { //Found in unload list.Update the indexing and blacklist status in contentinfo DB - iContentInfoMgr->UpdatePluginIndexStatusL( aPluginName , KDisable ); - iContentInfoMgr->UpdateBlacklistStatusL( aPluginName , KDisable ); + iContentInfodb->UpdateIndexStatus( QString::fromUtf16(aPluginName.Ptr(), aPluginName.Length()) , KDisable ); + iContentInfodb->UpdateBlacklisted( QString::fromUtf16(aPluginName.Ptr(), aPluginName.Length()), KDisable ); } if ( pluginblacklisted ) //Update the blacklist status in content info db - iContentInfoMgr->UpdateBlacklistStatusL( aPluginName , KEnable ); + iContentInfodb->UpdateBlacklisted( QString::fromUtf16(aPluginName.Ptr(), aPluginName.Length()), KEnable ); return (! (loadstatus | pluginblacklisted)); } // ----------------------------------------------------------------------------- -// CIndexingManager::GetPluginLoadStatus() +// CIndexingManager::LoadHarvesterpluginL() // ----------------------------------------------------------------------------- // void CIndexingManager::LoadHarvesterpluginL (TUid aPluginUid, TInt aVersion, const TDesC& aPluginName) @@ -699,7 +707,7 @@ iBlacklistMgr->Remove(aPluginUid); OstTrace1( TRACE_NORMAL, CINDEXINGMANAGER_LOADHARVESTERPLUGINL, "CIndexingManager::LoadPluginsL;Plugin with uid=%x is removed from DB", aPluginUid.iUid ); CPIXLOGSTRING2("CIndexingManager::LoadHarvesterpluginL(): Plugin with uid = %x is removed from database", aPluginUid.iUid); - iContentInfoMgr->UpdateBlacklistStatusL( aPluginName , KDisable ); + iContentInfodb->UpdateBlacklisted( QString::fromUtf16(aPluginName.Ptr(), aPluginName.Length()) , KDisable );// new implementation CleanupStack::PushL( plugin ); plugin->SetObserver( *this ); plugin->SetSearchSession( iSearchSession ); @@ -710,3 +718,67 @@ } OstTraceFunctionExit0( CINDEXINGMANAGER_LOADHARVESTERPLUGINL_EXIT ); } + +// ----------------------------------------------------------------------------- +// CIndexingManager::ActivityChanged() +// ----------------------------------------------------------------------------- +// +void CIndexingManager::ActivityChanged(const TBool aActive) + { + //User is Inactive,so continue with harvesting + if(aActive) + { + if( iGaurdTimer->IsActive()) + iGaurdTimer->Cancel(); + + for (TInt i = 0; i < iPluginArray.Count(); i++) + { + iPluginArray[i]->ResumePluginL(); + OstTrace0( TRACE_NORMAL, CINDEXINGMANAGER_ACTIVITYCHANGED, "CIndexingManager::ResumePluginsL" ); + + } + } + else + { + //call pause on all the plugins and restart the gaurd timer + for (TInt i = 0; i < iPluginArray.Count(); i++) + { + iPluginArray[i]->PausePluginL(); + OstTrace0( TRACE_NORMAL, DUP1_CINDEXINGMANAGER_ACTIVITYCHANGED, "CIndexingManager::PausePluginsL" ); + + } + iGaurdTimer->StartgaurdTimer(); + } + + } + +// ----------------------------------------------------------------------------- +// CIndexingManager::HandleGaurdTimerL() +// ----------------------------------------------------------------------------- +// +void CIndexingManager::HandleGaurdTimerL() + { + OstTraceFunctionEntry0( CINDEXINGMANAGER_HANDLEGAURDTIMERL_ENTRY ); + //On gaurd timer expiry, check for the current useractive state, + //and update the status accordingly + TBool isActive = iActivityManager->IsActive(); + if ( isActive ) + { + for (TInt i = 0; i < iPluginArray.Count(); i++) + { + TRAPD(err, iPluginArray[i]->ResumePluginL()); + OstTrace0( TRACE_NORMAL, CINDEXINGMANAGER_HANDLEGAURDTIMERL, "CIndexingManager::ResumePluginsL" ); + + if (err != KErrNone) + { + // Failed to start the plugin + } + } + } + else + { + // Start timer + iGaurdTimer->StartgaurdTimer(); + } + OstTraceFunctionExit0( CINDEXINGMANAGER_HANDLEGAURDTIMERL_EXIT ); + } diff -r 556534771396 -r d4d56f5e7c55 harvester/harvesterserver/src/contentinfomgr.cpp --- a/harvester/harvesterserver/src/contentinfomgr.cpp Mon Sep 20 12:35:47 2010 +0530 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,145 +0,0 @@ -/* -* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -#include "contentinfomgr.h" -#include "ccotentinfodb.h" -#include "ccontentinfo.h" -#include "OstTraceDefinitions.h" -#ifdef OST_TRACE_COMPILER_IN_USE -#include "contentinfomgrTraces.h" -#endif - - -// ----------------------------------------------------------------------------- -// CContentInfoMgr::NewL() -// ----------------------------------------------------------------------------- -// -CContentInfoMgr* CContentInfoMgr::NewL() - { - OstTraceFunctionEntry0( CCONTENTINFOMGR_NEWL_ENTRY ); - CContentInfoMgr* instance = CContentInfoMgr::NewLC(); - CleanupStack::Pop( instance ); - OstTraceFunctionExit0( CCONTENTINFOMGR_NEWL_EXIT ); - return instance; - } - -// ----------------------------------------------------------------------------- -// CContentInfoMgr::NewLC() -// ----------------------------------------------------------------------------- -// -CContentInfoMgr* CContentInfoMgr::NewLC() - { - OstTraceFunctionEntry0( CCONTENTINFOMGR_NEWLC_ENTRY ); - CContentInfoMgr* instance = new (ELeave) CContentInfoMgr(); - CleanupStack::PushL( instance ); - instance->ConstructL(); - OstTraceFunctionExit0( CCONTENTINFOMGR_NEWLC_EXIT ); - return instance; - } - -// ----------------------------------------------------------------------------- -// Constructor -// ----------------------------------------------------------------------------- -// -CContentInfoMgr::CContentInfoMgr() - { - //Do the necessary initialisation - } - -// ----------------------------------------------------------------------------- -// Destructor -// ----------------------------------------------------------------------------- -// -CContentInfoMgr::~CContentInfoMgr() - { - delete iContentInfoDb; - } - -// ----------------------------------------------------------------------------- -// CContentInfoMgr::ConstructL -// ----------------------------------------------------------------------------- -// -void CContentInfoMgr::ConstructL() - { - OstTraceFunctionEntry0( CCONTENTINFOMGR_CONSTRUCTL_ENTRY ); - iContentInfoDb = CContentInfoDb::NewL(); - OstTraceFunctionExit0( CCONTENTINFOMGR_CONSTRUCTL_EXIT ); - } - -// ----------------------------------------------------------------------------- -// CContentInfoMgr::AddL -// ----------------------------------------------------------------------------- -// -TInt CContentInfoMgr::AddL( CContentInfo* aContentInfo ) - { - return iContentInfoDb->AddL( aContentInfo ); - } - -// ----------------------------------------------------------------------------- -// CContentInfoMgr::UpdateBlacklistStatusL -// ----------------------------------------------------------------------------- -// -TInt CContentInfoMgr::UpdateBlacklistStatusL( const TDesC& aContentName , TInt aBlacklistStatus ) - { - return iContentInfoDb->UpdateBlacklistStatusL( aContentName, aBlacklistStatus ); - } - -// ----------------------------------------------------------------------------- -// CContentInfoMgr::UpdatePluginIndexStatusL -// ----------------------------------------------------------------------------- -// -TInt CContentInfoMgr::UpdatePluginIndexStatusL( const TDesC& aContentName , TInt aIndexStatus ) - { - return iContentInfoDb->UpdatePluginIndexStatusL( aContentName, aIndexStatus ); - } - -// ----------------------------------------------------------------------------- -// CContentInfoMgr::FindL -// ----------------------------------------------------------------------------- -// -TBool CContentInfoMgr::FindL( const TDesC& aContentName ) - { - return iContentInfoDb->FindL( aContentName ); - } - -// ----------------------------------------------------------------------------- -// CContentInfoMgr::Remove -// ----------------------------------------------------------------------------- -// -void CContentInfoMgr::RemoveL( const TDesC& aContentName ) - { - iContentInfoDb->RemoveL( aContentName ); - } - -// ----------------------------------------------------------------------------- -// CContentInfoMgr::Remove -// ----------------------------------------------------------------------------- -// -void CContentInfoMgr::ResetL( ) - { - iContentInfoDb->ResetDatabaseL(); - } - -// ----------------------------------------------------------------------------- -// CContentInfoMgr::GetContentCountL -// ----------------------------------------------------------------------------- -// -TInt CContentInfoMgr::GetContentCountL( ) - { - return iContentInfoDb->GetContentCountL(); - } -//EOF diff -r 556534771396 -r d4d56f5e7c55 harvester/harvesterserver/src/main.cpp --- a/harvester/harvesterserver/src/main.cpp Mon Sep 20 12:35:47 2010 +0530 +++ b/harvester/harvesterserver/src/main.cpp Tue Oct 05 13:15:12 2010 +0530 @@ -29,7 +29,8 @@ void HarvesterThread::run() { - //Trapping the error is handled inside the ThreadFunction + User::SetCritical(User::EProcessCritical); + //Trapping the error is handled inside the ThreadFunction CHarvesterServer::ThreadFunction(); exec(); } diff -r 556534771396 -r d4d56f5e7c55 harvester/harvesterserver/traces/CBlacklistDbTraces.h --- a/harvester/harvesterserver/traces/CBlacklistDbTraces.h Mon Sep 20 12:35:47 2010 +0530 +++ b/harvester/harvesterserver/traces/CBlacklistDbTraces.h Tue Oct 05 13:15:12 2010 +0530 @@ -1,4 +1,20 @@ -// Created by TraceCompiler 2.2.2 +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ +// Created by TraceCompiler 2.3.0 // DO NOT EDIT, CHANGES WILL BE LOST #ifndef __CBLACKLISTDBTRACES_H__ @@ -18,16 +34,16 @@ #define CBLACKLISTDB_UPDATEL_EXIT 0x8a000a #define CBLACKLISTDB_CREATEDBL_ENTRY 0x8a000b #define CBLACKLISTDB_CREATEDBL_EXIT 0x8a000c -#define CBLACKLISTDB_CREATEBLACKLISTCOLUMNSETLC_ENTRY 0x8a004b -#define CBLACKLISTDB_CREATEBLACKLISTCOLUMNSETLC_EXIT 0x8a004c -#define CBLACKLISTDB_CREATEDONTLOADCOLUMNSETLC_ENTRY 0x8a004d -#define CBLACKLISTDB_CREATEDONTLOADCOLUMNSETLC_EXIT 0x8a004e -#define CBLACKLISTDB_ADDTODONTLOADLISTL_ENTRY 0x8a004f -#define CBLACKLISTDB_ADDTODONTLOADLISTL_EXIT 0x8a0050 -#define CBLACKLISTDB_REMOVEFROMDONTLOADLISTL_ENTRY 0x8a0051 -#define CBLACKLISTDB_REMOVEFROMDONTLOADLISTL_EXIT 0x8a0052 -#define CBLACKLISTDB_FINDINDONTLOADLISTL_ENTRY 0x8a0053 -#define CBLACKLISTDB_FINDINDONTLOADLISTL_EXIT 0x8a0054 +#define CBLACKLISTDB_CREATEBLACKLISTCOLUMNSETLC_ENTRY 0x8a000d +#define CBLACKLISTDB_CREATEBLACKLISTCOLUMNSETLC_EXIT 0x8a000e +#define CBLACKLISTDB_CREATEDONTLOADCOLUMNSETLC_ENTRY 0x8a000f +#define CBLACKLISTDB_CREATEDONTLOADCOLUMNSETLC_EXIT 0x8a0010 +#define CBLACKLISTDB_ADDTODONTLOADLISTL_ENTRY 0x8a0011 +#define CBLACKLISTDB_ADDTODONTLOADLISTL_EXIT 0x8a0012 +#define CBLACKLISTDB_REMOVEFROMDONTLOADLISTL_ENTRY 0x8a0013 +#define CBLACKLISTDB_REMOVEFROMDONTLOADLISTL_EXIT 0x8a0014 +#define CBLACKLISTDB_FINDINDONTLOADLISTL_ENTRY 0x8a0015 +#define CBLACKLISTDB_FINDINDONTLOADLISTL_EXIT 0x8a0016 #define CBLACKLISTDB_CONSTRUCTL 0x860001 #define CBLACKLISTDB_ADDL 0x860002 #define CBLACKLISTDB_REMOVE 0x860003 @@ -38,10 +54,13 @@ #define CBLACKLISTDB_UPDATEL 0x860008 #define CBLACKLISTDB_FINDL 0x860009 #define DUP1_CBLACKLISTDB_FINDL 0x86000a -#define DUP3_CBLACKLISTDB_REMOVEFROMDONTLOADLISTL 0x86002d -#define CBLACKLISTDB_FINDFROMDONTLOADLISTL 0x86002e +#define DUP3_CBLACKLISTDB_REMOVEFROMDONTLOADLISTL 0x86000b +#define CBLACKLISTDB_FINDFROMDONTLOADLISTL 0x86000c +#ifndef __OSTTRACEGEN2_TUINT32_TUINT_TINT__ +#define __OSTTRACEGEN2_TUINT32_TUINT_TINT__ + inline TBool OstTraceGen2( TUint32 aTraceID, TUint aParam1, TInt aParam2 ) { TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID ); @@ -59,6 +78,12 @@ return retval; } +#endif // __OSTTRACEGEN2_TUINT32_TUINT_TINT__ + + +#ifndef __OSTTRACEGEN2_TUINT32_TUINT32_TINT32__ +#define __OSTTRACEGEN2_TUINT32_TUINT32_TINT32__ + inline TBool OstTraceGen2( TUint32 aTraceID, TUint32 aParam1, TInt32 aParam2 ) { TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID ); @@ -76,6 +101,9 @@ return retval; } +#endif // __OSTTRACEGEN2_TUINT32_TUINT32_TINT32__ + + #endif diff -r 556534771396 -r d4d56f5e7c55 harvester/harvesterserver/traces/CBlacklistMgrTraces.h --- a/harvester/harvesterserver/traces/CBlacklistMgrTraces.h Mon Sep 20 12:35:47 2010 +0530 +++ b/harvester/harvesterserver/traces/CBlacklistMgrTraces.h Tue Oct 05 13:15:12 2010 +0530 @@ -1,4 +1,20 @@ -// Created by TraceCompiler 2.2.2 +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ +// Created by TraceCompiler 2.3.0 // DO NOT EDIT, CHANGES WILL BE LOST #ifndef __CBLACKLISTMGRTRACES_H__ @@ -6,28 +22,31 @@ #define KOstTraceComponentID 0x2001f6fb -#define CBLACKLISTMGR_NEWL_ENTRY 0x8a000f -#define CBLACKLISTMGR_NEWL_EXIT 0x8a0010 -#define CBLACKLISTMGR_CONSTRUCTL_ENTRY 0x8a0011 -#define CBLACKLISTMGR_CONSTRUCTL_EXIT 0x8a0012 -#define CBLACKLISTMGR_ADDL_ENTRY 0x8a0013 -#define CBLACKLISTMGR_ADDL_EXIT 0x8a0014 -#define CBLACKLISTMGR_REMOVE_ENTRY 0x8a0015 -#define CBLACKLISTMGR_REMOVE_EXIT 0x8a0016 -#define CBLACKLISTMGR_ADDTOUNLOADLISTL_ENTRY 0x8a0043 -#define CBLACKLISTMGR_REMOVEFROMUNLOADLISTL_ENTRY 0x8a0045 -#define CBLACKLISTMGR_ADDTODONTLOADLISTL_EXIT 0x8a0055 -#define CBLACKLISTMGR_REMOVEFROMDONTLOADLISTL_EXIT 0x8a0056 -#define CBLACKLISTMGR_ADDL 0x86000b -#define CBLACKLISTMGR_REMOVE 0x86000c -#define CBLACKLISTMGR_FINDL 0x86000d -#define DUP1_CBLACKLISTMGR_FINDL 0x86000e -#define DUP2_CBLACKLISTMGR_FINDL 0x86000f -#define CBLACKLISTMGR_REMOVEFROMUNLOADLISTL 0x86002b -#define CBLACKLISTMGR_ADDTODONTLOADLISTL 0x86002f -#define CBLACKLISTMGR_FINDINDONTLOADLISTL 0x860030 +#define CBLACKLISTMGR_NEWL_ENTRY 0x8a0017 +#define CBLACKLISTMGR_NEWL_EXIT 0x8a0018 +#define CBLACKLISTMGR_CONSTRUCTL_ENTRY 0x8a0019 +#define CBLACKLISTMGR_CONSTRUCTL_EXIT 0x8a001a +#define CBLACKLISTMGR_ADDL_ENTRY 0x8a001b +#define CBLACKLISTMGR_ADDL_EXIT 0x8a001c +#define CBLACKLISTMGR_REMOVE_ENTRY 0x8a001d +#define CBLACKLISTMGR_REMOVE_EXIT 0x8a001e +#define CBLACKLISTMGR_ADDTOUNLOADLISTL_ENTRY 0x8a001f +#define CBLACKLISTMGR_ADDTODONTLOADLISTL_EXIT 0x8a0020 +#define CBLACKLISTMGR_REMOVEFROMUNLOADLISTL_ENTRY 0x8a0021 +#define CBLACKLISTMGR_REMOVEFROMDONTLOADLISTL_EXIT 0x8a0022 +#define CBLACKLISTMGR_ADDL 0x86000d +#define CBLACKLISTMGR_REMOVE 0x86000e +#define CBLACKLISTMGR_FINDL 0x86000f +#define DUP1_CBLACKLISTMGR_FINDL 0x860010 +#define DUP2_CBLACKLISTMGR_FINDL 0x860011 +#define CBLACKLISTMGR_ADDTODONTLOADLISTL 0x860012 +#define CBLACKLISTMGR_REMOVEFROMUNLOADLISTL 0x860013 +#define CBLACKLISTMGR_FINDINDONTLOADLISTL 0x860014 +#ifndef __OSTTRACEGEN2_TUINT32_TUINT_TINT__ +#define __OSTTRACEGEN2_TUINT32_TUINT_TINT__ + inline TBool OstTraceGen2( TUint32 aTraceID, TUint aParam1, TInt aParam2 ) { TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID ); @@ -45,6 +64,12 @@ return retval; } +#endif // __OSTTRACEGEN2_TUINT32_TUINT_TINT__ + + +#ifndef __OSTTRACEGEN2_TUINT32_TUINT32_TINT32__ +#define __OSTTRACEGEN2_TUINT32_TUINT32_TINT32__ + inline TBool OstTraceGen2( TUint32 aTraceID, TUint32 aParam1, TInt32 aParam2 ) { TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID ); @@ -62,6 +87,9 @@ return retval; } +#endif // __OSTTRACEGEN2_TUINT32_TUINT32_TINT32__ + + #endif diff -r 556534771396 -r d4d56f5e7c55 harvester/harvesterserver/traces/CIndexingManagerTraces.h --- a/harvester/harvesterserver/traces/CIndexingManagerTraces.h Mon Sep 20 12:35:47 2010 +0530 +++ b/harvester/harvesterserver/traces/CIndexingManagerTraces.h Tue Oct 05 13:15:12 2010 +0530 @@ -1,4 +1,20 @@ -// Created by TraceCompiler 2.2.2 +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ +// Created by TraceCompiler 2.3.0 // DO NOT EDIT, CHANGES WILL BE LOST #ifndef __CINDEXINGMANAGERTRACES_H__ @@ -6,41 +22,49 @@ #define KOstTraceComponentID 0x2001f6fb -#define CINDEXINGMANAGER_UPDATECONTENTINFODBL_ENTRY 0x8a0047 -#define CINDEXINGMANAGER_UPDATECONTENTINFODBL_EXIT 0x8a0048 -#define CINDEXINGMANAGER_LOADPLUGINSL_ENTRY 0x8a0057 -#define CINDEXINGMANAGER_LOADPLUGINSL_EXIT 0x8a0058 -#define CINDEXINGMANAGER_UPDATEDONTLOADLISTL_ENTRY 0x8a0059 -#define CINDEXINGMANAGER_UPDATEDONTLOADLISTL_EXIT 0x8a005a -#define DUP1_CINDEXINGMANAGER_GETPLUGINLOADSTATUSL_ENTRY 0x8a005b -#define CINDEXINGMANAGER_LOADHARVESTERPLUGINL_ENTRY 0x8a005c -#define CINDEXINGMANAGER_LOADHARVESTERPLUGINL_EXIT 0x8a005d -#define CINDEXINGMANAGER_RUNL 0x860010 -#define DUP1_CINDEXINGMANAGER_RUNL 0x860011 -#define DUP2_CINDEXINGMANAGER_RUNL 0x860012 -#define DUP3_CINDEXINGMANAGER_RUNL 0x860013 -#define DUP4_CINDEXINGMANAGER_RUNL 0x860014 -#define DUP5_CINDEXINGMANAGER_RUNL 0x860015 -#define DUP6_CINDEXINGMANAGER_RUNL 0x860016 -#define DUP7_CINDEXINGMANAGER_RUNL 0x860017 -#define DUP8_CINDEXINGMANAGER_RUNL 0x860018 -#define DUP9_CINDEXINGMANAGER_RUNL 0x860019 -#define CINDEXINGMANAGER_ADDHARVESTINGQUEUE 0x86001d -#define DUP1_CINDEXINGMANAGER_ADDHARVESTINGQUEUE 0x86001e -#define DUP2_CINDEXINGMANAGER_ADDHARVESTINGQUEUE 0x86001f -#define DUP3_CINDEXINGMANAGER_ADDHARVESTINGQUEUE 0x860020 -#define CINDEXINGMANAGER_REMOVEHARVESTINGQUEUE 0x860021 -#define DUP1_CINDEXINGMANAGER_REMOVEHARVESTINGQUEUE 0x860022 -#define DUP2_CINDEXINGMANAGER_REMOVEHARVESTINGQUEUE 0x860023 -#define CINDEXINGMANAGER_HARVESTINGCOMPLETED 0x860024 -#define DUP1_CINDEXINGMANAGER_HARVESTINGCOMPLETED 0x860025 -#define DUP2_CINDEXINGMANAGER_HARVESTINGCOMPLETED 0x860026 -#define DUP1_CINDEXINGMANAGER_LOADHARVESTERPLUGINL 0x860031 -#define CINDEXINGMANAGER_LOADHARVESTERPLUGINL 0x860032 -#define DUP2_CINDEXINGMANAGER_LOADHARVESTERPLUGINL 0x860033 +#define CINDEXINGMANAGER_LOADPLUGINSL_ENTRY 0x8a0023 +#define CINDEXINGMANAGER_LOADPLUGINSL_EXIT 0x8a0024 +#define CINDEXINGMANAGER_UPDATECONTENTINFODBL_ENTRY 0x8a0025 +#define CINDEXINGMANAGER_UPDATECONTENTINFODBL_EXIT 0x8a0026 +#define CINDEXINGMANAGER_UPDATEDONTLOADLISTL_ENTRY 0x8a0027 +#define CINDEXINGMANAGER_UPDATEDONTLOADLISTL_EXIT 0x8a0028 +#define DUP1_CINDEXINGMANAGER_GETPLUGINLOADSTATUSL_ENTRY 0x8a0029 +#define CINDEXINGMANAGER_LOADHARVESTERPLUGINL_ENTRY 0x8a002a +#define CINDEXINGMANAGER_LOADHARVESTERPLUGINL_EXIT 0x8a002b +#define CINDEXINGMANAGER_HANDLEGAURDTIMERL_ENTRY 0x8a002c +#define CINDEXINGMANAGER_HANDLEGAURDTIMERL_EXIT 0x8a002d +#define CINDEXINGMANAGER_RUNL 0x860015 +#define DUP1_CINDEXINGMANAGER_RUNL 0x860016 +#define DUP2_CINDEXINGMANAGER_RUNL 0x860017 +#define DUP3_CINDEXINGMANAGER_RUNL 0x860018 +#define DUP4_CINDEXINGMANAGER_RUNL 0x860019 +#define DUP5_CINDEXINGMANAGER_RUNL 0x86001a +#define DUP6_CINDEXINGMANAGER_RUNL 0x86001b +#define DUP7_CINDEXINGMANAGER_RUNL 0x86001c +#define DUP8_CINDEXINGMANAGER_RUNL 0x86001d +#define DUP9_CINDEXINGMANAGER_RUNL 0x86001e +#define CINDEXINGMANAGER_ADDHARVESTINGQUEUE 0x86001f +#define DUP1_CINDEXINGMANAGER_ADDHARVESTINGQUEUE 0x860020 +#define DUP2_CINDEXINGMANAGER_ADDHARVESTINGQUEUE 0x860021 +#define DUP3_CINDEXINGMANAGER_ADDHARVESTINGQUEUE 0x860022 +#define CINDEXINGMANAGER_REMOVEHARVESTINGQUEUE 0x860023 +#define DUP1_CINDEXINGMANAGER_REMOVEHARVESTINGQUEUE 0x860024 +#define DUP2_CINDEXINGMANAGER_REMOVEHARVESTINGQUEUE 0x860025 +#define CINDEXINGMANAGER_HARVESTINGCOMPLETED 0x860026 +#define DUP1_CINDEXINGMANAGER_HARVESTINGCOMPLETED 0x860027 +#define DUP2_CINDEXINGMANAGER_HARVESTINGCOMPLETED 0x860028 +#define DUP1_CINDEXINGMANAGER_LOADHARVESTERPLUGINL 0x860029 +#define CINDEXINGMANAGER_LOADHARVESTERPLUGINL 0x86002a +#define DUP2_CINDEXINGMANAGER_LOADHARVESTERPLUGINL 0x86002b +#define CINDEXINGMANAGER_ACTIVITYCHANGED 0x86002c +#define DUP1_CINDEXINGMANAGER_ACTIVITYCHANGED 0x86002d +#define CINDEXINGMANAGER_HANDLEGAURDTIMERL 0x86002e #ifndef __KERNEL_MODE__ +#ifndef __OSTTRACEGEN1_TUINT32_CONST_TDESC16REF__ +#define __OSTTRACEGEN1_TUINT32_CONST_TDESC16REF__ + inline TBool OstTraceGen1( TUint32 aTraceID, const TDesC16& aParam1 ) { TBool retval; @@ -75,9 +99,15 @@ } return retval; } + +#endif // __OSTTRACEGEN1_TUINT32_CONST_TDESC16REF__ + #endif +#ifndef __OSTTRACEGEN2_TUINT32_TINT_TINT__ +#define __OSTTRACEGEN2_TUINT32_TINT_TINT__ + inline TBool OstTraceGen2( TUint32 aTraceID, TInt aParam1, TInt aParam2 ) { TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID ); @@ -95,6 +125,12 @@ return retval; } +#endif // __OSTTRACEGEN2_TUINT32_TINT_TINT__ + + +#ifndef __OSTTRACEGEN2_TUINT32_TINT32_TINT32__ +#define __OSTTRACEGEN2_TUINT32_TINT32_TINT32__ + inline TBool OstTraceGen2( TUint32 aTraceID, TInt32 aParam1, TInt32 aParam2 ) { TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID ); @@ -112,6 +148,9 @@ return retval; } +#endif // __OSTTRACEGEN2_TUINT32_TINT32_TINT32__ + + #endif diff -r 556534771396 -r d4d56f5e7c55 harvester/harvesterserver/traces/OstTraceDefinitions.h --- a/harvester/harvesterserver/traces/OstTraceDefinitions.h Mon Sep 20 12:35:47 2010 +0530 +++ b/harvester/harvesterserver/traces/OstTraceDefinitions.h Tue Oct 05 13:15:12 2010 +0530 @@ -1,3 +1,20 @@ +/* +* This is Default Licence added by TraceCompiler +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ #ifndef __OSTTRACEDEFINITIONS_H__ #define __OSTTRACEDEFINITIONS_H__ // OST_TRACE_COMPILER_IN_USE flag has been added by Trace Compiler diff -r 556534771396 -r d4d56f5e7c55 harvester/harvesterserver/traces/cactivitymanagerTraces.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/harvester/harvesterserver/traces/cactivitymanagerTraces.h Tue Oct 05 13:15:12 2010 +0530 @@ -0,0 +1,49 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ +// Created by TraceCompiler 2.3.0 +// DO NOT EDIT, CHANGES WILL BE LOST + +#ifndef __CACTIVITYMANAGERTRACES_H__ +#define __CACTIVITYMANAGERTRACES_H__ + +#define KOstTraceComponentID 0x2001f6fb + +#define CACTIVITYMANAGER_NEWL_ENTRY 0x8a002e +#define CACTIVITYMANAGER_NEWL_EXIT 0x8a002f +#define CACTIVITYMANAGER_CACTIVITYMANAGER_ENTRY 0x8a0030 +#define CACTIVITYMANAGER_CACTIVITYMANAGER_EXIT 0x8a0031 +#define DUP1_CACTIVITYMANAGER_CACTIVITYMANAGER_ENTRY 0x8a0032 +#define DUP1_CACTIVITYMANAGER_CACTIVITYMANAGER_EXIT 0x8a0033 +#define CACTIVITYMANAGER_START_ENTRY 0x8a0034 +#define CACTIVITYMANAGER_START_EXIT 0x8a0035 +#define CACTIVITYMANAGER_RUNL_ENTRY 0x8a0036 +#define CACTIVITYMANAGER_RUNL_EXIT 0x8a0037 +#define DUP1_CACTIVITYMANAGER_RUNL_EXIT 0x8a0038 +#define CACTIVITYMANAGER_RUNERROR_ENTRY 0x8a0039 +#define CACTIVITYMANAGER_RUNERROR_EXIT 0x8a003a +#define CACTIVITYMANAGER_ISINACTIVE_ENTRY 0x8a003b +#define CACTIVITYMANAGER_ISINACTIVE_EXIT 0x8a003c +#define DUP1_CACTIVITYMANAGER_ISINACTIVE_EXIT 0x8a003d +#define CACTIVITYMANAGER_NOTIFYOBSERVER_ENTRY 0x8a003e +#define CACTIVITYMANAGER_NOTIFYOBSERVER_EXIT 0x8a003f +#define CACTIVITYMANAGER_NOTIFYOBSERVER 0x86002f + + +#endif + +// End of file + diff -r 556534771396 -r d4d56f5e7c55 harvester/harvesterserver/traces/ccontentinfoTraces.h --- a/harvester/harvesterserver/traces/ccontentinfoTraces.h Mon Sep 20 12:35:47 2010 +0530 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,22 +0,0 @@ -// Created by TraceCompiler 2.2.2 -// DO NOT EDIT, CHANGES WILL BE LOST - -#ifndef __CCONTENTINFOTRACES_H__ -#define __CCONTENTINFOTRACES_H__ - -#define KOstTraceComponentID 0x2001f6fb - -#define CCONTENTINFO_NEWL_ENTRY 0x8a0017 -#define CCONTENTINFO_NEWL_EXIT 0x8a0018 -#define CCONTENTINFO_NEWLC_ENTRY 0x8a0019 -#define CCONTENTINFO_NEWLC_EXIT 0x8a001a -#define CCONTENTINFO_GETNAMEL_ENTRY 0x8a001b -#define CCONTENTINFO_GETNAMEL_EXIT 0x8a001c -#define CCONTENTINFO_SETNAMEL_ENTRY 0x8a001d -#define CCONTENTINFO_SETNAMEL_EXIT 0x8a001e - - -#endif - -// End of file - diff -r 556534771396 -r d4d56f5e7c55 harvester/harvesterserver/traces/ccontentinfodbTraces.h --- a/harvester/harvesterserver/traces/ccontentinfodbTraces.h Mon Sep 20 12:35:47 2010 +0530 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,36 +0,0 @@ -// Created by TraceCompiler 2.2.2 -// DO NOT EDIT, CHANGES WILL BE LOST - -#ifndef __CCONTENTINFODBTRACES_H__ -#define __CCONTENTINFODBTRACES_H__ - -#define KOstTraceComponentID 0x2001f6fb - -#define CCONTENTINFODB_NEWL_ENTRY 0x8a001f -#define CCONTENTINFODB_NEWL_EXIT 0x8a0020 -#define CCONTENTINFODB_NEWLC_ENTRY 0x8a0021 -#define CCONTENTINFODB_NEWLC_EXIT 0x8a0022 -#define CCONTENTINFODB_CONSTRUCTL_ENTRY 0x8a0023 -#define CCONTENTINFODB_CONSTRUCTL_EXIT 0x8a0024 -#define CCONTENTINFODB_ADDL_ENTRY 0x8a0025 -#define CCONTENTINFODB_ADDL_EXIT 0x8a0026 -#define CCONTENTINFODB_UPDATEBLACKLISTSTATUSL_ENTRY 0x8a0027 -#define CCONTENTINFODB_UPDATEBLACKLISTSTATUSL_EXIT 0x8a0028 -#define CCONTENTINFODB_UPDATEPLUGININDEXSTATUSL_ENTRY 0x8a0029 -#define CCONTENTINFODB_UPDATEPLUGININDEXSTATUSL_EXIT 0x8a002a -#define CCONTENTINFODB_REMOVEL_ENTRY 0x8a002b -#define CCONTENTINFODB_REMOVEL_EXIT 0x8a002c -#define CCONTENTINFODB_RESETDATABASEL_ENTRY 0x8a002d -#define CCONTENTINFODB_RESETDATABASEL_EXIT 0x8a002e -#define CCONTENTINFODB_FINDL_ENTRY 0x8a002f -#define CCONTENTINFODB_FINDL_EXIT 0x8a0030 -#define CCONTENTINFODB_GETCONTENTCOUNTL_ENTRY 0x8a0031 -#define CCONTENTINFODB_GETCONTENTCOUNTL_EXIT 0x8a0032 -#define CCONTENTINFODB_CREATEDBL_ENTRY 0x8a0033 -#define CCONTENTINFODB_CREATEDBL_EXIT 0x8a0034 - - -#endif - -// End of file - diff -r 556534771396 -r d4d56f5e7c55 harvester/harvesterserver/traces/contentinfomgrTraces.h --- a/harvester/harvesterserver/traces/contentinfomgrTraces.h Mon Sep 20 12:35:47 2010 +0530 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,20 +0,0 @@ -// Created by TraceCompiler 2.2.2 -// DO NOT EDIT, CHANGES WILL BE LOST - -#ifndef __CONTENTINFOMGRTRACES_H__ -#define __CONTENTINFOMGRTRACES_H__ - -#define KOstTraceComponentID 0x2001f6fb - -#define CCONTENTINFOMGR_NEWL_ENTRY 0x8a0035 -#define CCONTENTINFOMGR_NEWL_EXIT 0x8a0036 -#define CCONTENTINFOMGR_NEWLC_ENTRY 0x8a0037 -#define CCONTENTINFOMGR_NEWLC_EXIT 0x8a0038 -#define CCONTENTINFOMGR_CONSTRUCTL_ENTRY 0x8a0039 -#define CCONTENTINFOMGR_CONSTRUCTL_EXIT 0x8a003a - - -#endif - -// End of file - diff -r 556534771396 -r d4d56f5e7c55 harvester/harvesterserver/traces/fixed_id.definitions --- a/harvester/harvesterserver/traces/fixed_id.definitions Mon Sep 20 12:35:47 2010 +0530 +++ b/harvester/harvesterserver/traces/fixed_id.definitions Tue Oct 05 13:15:12 2010 +0530 @@ -1,147 +1,130 @@ +## +# This is Default Licence added by TraceCompiler +# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +# All rights reserved. +# This component and the accompanying materials are made available +# under the terms of "Eclipse Public License v1.0" +# which accompanies this distribution, and is available +# at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +# Initial Contributors: +# Nokia Corporation - initial contribution. +# +# Contributors: +# +# Description: +# +## #Fixed group and trace id definitions. If this file is removed, the identifiers are rebuilt. [GROUP]TRACE_FLOW=0x8a [GROUP]TRACE_NORMAL=0x86 +[TRACE]TRACE_FLOW[0x8A]_CACTIVITYMANAGER_CACTIVITYMANAGER_ENTRY=0x30 +[TRACE]TRACE_FLOW[0x8A]_CACTIVITYMANAGER_CACTIVITYMANAGER_EXIT=0x31 +[TRACE]TRACE_FLOW[0x8A]_CACTIVITYMANAGER_ISINACTIVE_ENTRY=0x3b +[TRACE]TRACE_FLOW[0x8A]_CACTIVITYMANAGER_ISINACTIVE_EXIT=0x3c +[TRACE]TRACE_FLOW[0x8A]_CACTIVITYMANAGER_NEWL_ENTRY=0x2e +[TRACE]TRACE_FLOW[0x8A]_CACTIVITYMANAGER_NEWL_EXIT=0x2f +[TRACE]TRACE_FLOW[0x8A]_CACTIVITYMANAGER_NOTIFYOBSERVER_ENTRY=0x3e +[TRACE]TRACE_FLOW[0x8A]_CACTIVITYMANAGER_NOTIFYOBSERVER_EXIT=0x3f +[TRACE]TRACE_FLOW[0x8A]_CACTIVITYMANAGER_RUNERROR_ENTRY=0x39 +[TRACE]TRACE_FLOW[0x8A]_CACTIVITYMANAGER_RUNERROR_EXIT=0x3a +[TRACE]TRACE_FLOW[0x8A]_CACTIVITYMANAGER_RUNL_ENTRY=0x36 +[TRACE]TRACE_FLOW[0x8A]_CACTIVITYMANAGER_RUNL_EXIT=0x37 +[TRACE]TRACE_FLOW[0x8A]_CACTIVITYMANAGER_START_ENTRY=0x34 +[TRACE]TRACE_FLOW[0x8A]_CACTIVITYMANAGER_START_EXIT=0x35 [TRACE]TRACE_FLOW[0x8A]_CBLACKLISTDB_ADDL_ENTRY=0x5 [TRACE]TRACE_FLOW[0x8A]_CBLACKLISTDB_ADDL_EXIT=0x6 -[TRACE]TRACE_FLOW[0x8A]_CBLACKLISTDB_ADDTODONTLOADLISTL_ENTRY=0x4f -[TRACE]TRACE_FLOW[0x8A]_CBLACKLISTDB_ADDTODONTLOADLISTL_EXIT=0x50 +[TRACE]TRACE_FLOW[0x8A]_CBLACKLISTDB_ADDTODONTLOADLISTL_ENTRY=0x11 +[TRACE]TRACE_FLOW[0x8A]_CBLACKLISTDB_ADDTODONTLOADLISTL_EXIT=0x12 [TRACE]TRACE_FLOW[0x8A]_CBLACKLISTDB_CONSTRUCTL_ENTRY=0x3 [TRACE]TRACE_FLOW[0x8A]_CBLACKLISTDB_CONSTRUCTL_EXIT=0x4 -[TRACE]TRACE_FLOW[0x8A]_CBLACKLISTDB_CREATEBLACKLISTCOLUMNSETLC_ENTRY=0x4b -[TRACE]TRACE_FLOW[0x8A]_CBLACKLISTDB_CREATEBLACKLISTCOLUMNSETLC_EXIT=0x4c +[TRACE]TRACE_FLOW[0x8A]_CBLACKLISTDB_CREATEBLACKLISTCOLUMNSETLC_ENTRY=0xd +[TRACE]TRACE_FLOW[0x8A]_CBLACKLISTDB_CREATEBLACKLISTCOLUMNSETLC_EXIT=0xe [TRACE]TRACE_FLOW[0x8A]_CBLACKLISTDB_CREATEDBL_ENTRY=0xb [TRACE]TRACE_FLOW[0x8A]_CBLACKLISTDB_CREATEDBL_EXIT=0xc -[TRACE]TRACE_FLOW[0x8A]_CBLACKLISTDB_CREATEDONTLOADCOLUMNSETLC_ENTRY=0x4d -[TRACE]TRACE_FLOW[0x8A]_CBLACKLISTDB_CREATEDONTLOADCOLUMNSETLC_EXIT=0x4e -[TRACE]TRACE_FLOW[0x8A]_CBLACKLISTDB_FINDINDONTLOADLISTL_ENTRY=0x53 -[TRACE]TRACE_FLOW[0x8A]_CBLACKLISTDB_FINDINDONTLOADLISTL_EXIT=0x54 +[TRACE]TRACE_FLOW[0x8A]_CBLACKLISTDB_CREATEDONTLOADCOLUMNSETLC_ENTRY=0xf +[TRACE]TRACE_FLOW[0x8A]_CBLACKLISTDB_CREATEDONTLOADCOLUMNSETLC_EXIT=0x10 +[TRACE]TRACE_FLOW[0x8A]_CBLACKLISTDB_FINDINDONTLOADLISTL_ENTRY=0x15 +[TRACE]TRACE_FLOW[0x8A]_CBLACKLISTDB_FINDINDONTLOADLISTL_EXIT=0x16 [TRACE]TRACE_FLOW[0x8A]_CBLACKLISTDB_NEWL_ENTRY=0x1 [TRACE]TRACE_FLOW[0x8A]_CBLACKLISTDB_NEWL_EXIT=0x2 -[TRACE]TRACE_FLOW[0x8A]_CBLACKLISTDB_REMOVEFROMDONTLOADLISTL_ENTRY=0x51 -[TRACE]TRACE_FLOW[0x8A]_CBLACKLISTDB_REMOVEFROMDONTLOADLISTL_EXIT=0x52 +[TRACE]TRACE_FLOW[0x8A]_CBLACKLISTDB_REMOVEFROMDONTLOADLISTL_ENTRY=0x13 +[TRACE]TRACE_FLOW[0x8A]_CBLACKLISTDB_REMOVEFROMDONTLOADLISTL_EXIT=0x14 [TRACE]TRACE_FLOW[0x8A]_CBLACKLISTDB_REMOVE_ENTRY=0x7 [TRACE]TRACE_FLOW[0x8A]_CBLACKLISTDB_REMOVE_EXIT=0x8 [TRACE]TRACE_FLOW[0x8A]_CBLACKLISTDB_UPDATEL_ENTRY=0x9 [TRACE]TRACE_FLOW[0x8A]_CBLACKLISTDB_UPDATEL_EXIT=0xa -[TRACE]TRACE_FLOW[0x8A]_CBLACKLISTMGR_ADDL_ENTRY=0x13 -[TRACE]TRACE_FLOW[0x8A]_CBLACKLISTMGR_ADDL_EXIT=0x14 -[TRACE]TRACE_FLOW[0x8A]_CBLACKLISTMGR_ADDTODONTLOADLISTL_EXIT=0x55 -[TRACE]TRACE_FLOW[0x8A]_CBLACKLISTMGR_ADDTOUNLOADLISTL_ENTRY=0x43 -[TRACE]TRACE_FLOW[0x8A]_CBLACKLISTMGR_CONSTRUCTL_ENTRY=0x11 -[TRACE]TRACE_FLOW[0x8A]_CBLACKLISTMGR_CONSTRUCTL_EXIT=0x12 -[TRACE]TRACE_FLOW[0x8A]_CBLACKLISTMGR_NEWL_ENTRY=0xf -[TRACE]TRACE_FLOW[0x8A]_CBLACKLISTMGR_NEWL_EXIT=0x10 -[TRACE]TRACE_FLOW[0x8A]_CBLACKLISTMGR_REMOVEFROMDONTLOADLISTL_EXIT=0x56 -[TRACE]TRACE_FLOW[0x8A]_CBLACKLISTMGR_REMOVEFROMUNLOADLISTL_ENTRY=0x45 -[TRACE]TRACE_FLOW[0x8A]_CBLACKLISTMGR_REMOVE_ENTRY=0x15 -[TRACE]TRACE_FLOW[0x8A]_CBLACKLISTMGR_REMOVE_EXIT=0x16 -[TRACE]TRACE_FLOW[0x8A]_CCONTENTINFODB_ADDL_ENTRY=0x25 -[TRACE]TRACE_FLOW[0x8A]_CCONTENTINFODB_ADDL_EXIT=0x26 -[TRACE]TRACE_FLOW[0x8A]_CCONTENTINFODB_CONSTRUCTL_ENTRY=0x23 -[TRACE]TRACE_FLOW[0x8A]_CCONTENTINFODB_CONSTRUCTL_EXIT=0x24 -[TRACE]TRACE_FLOW[0x8A]_CCONTENTINFODB_CREATEDBL_ENTRY=0x33 -[TRACE]TRACE_FLOW[0x8A]_CCONTENTINFODB_CREATEDBL_EXIT=0x34 -[TRACE]TRACE_FLOW[0x8A]_CCONTENTINFODB_FINDL_ENTRY=0x2f -[TRACE]TRACE_FLOW[0x8A]_CCONTENTINFODB_FINDL_EXIT=0x30 -[TRACE]TRACE_FLOW[0x8A]_CCONTENTINFODB_GETCONTENTCOUNTL_ENTRY=0x31 -[TRACE]TRACE_FLOW[0x8A]_CCONTENTINFODB_GETCONTENTCOUNTL_EXIT=0x32 -[TRACE]TRACE_FLOW[0x8A]_CCONTENTINFODB_NEWLC_ENTRY=0x21 -[TRACE]TRACE_FLOW[0x8A]_CCONTENTINFODB_NEWLC_EXIT=0x22 -[TRACE]TRACE_FLOW[0x8A]_CCONTENTINFODB_NEWL_ENTRY=0x1f -[TRACE]TRACE_FLOW[0x8A]_CCONTENTINFODB_NEWL_EXIT=0x20 -[TRACE]TRACE_FLOW[0x8A]_CCONTENTINFODB_REMOVEL_ENTRY=0x2b -[TRACE]TRACE_FLOW[0x8A]_CCONTENTINFODB_REMOVEL_EXIT=0x2c -[TRACE]TRACE_FLOW[0x8A]_CCONTENTINFODB_RESETDATABASEL_ENTRY=0x2d -[TRACE]TRACE_FLOW[0x8A]_CCONTENTINFODB_RESETDATABASEL_EXIT=0x2e -[TRACE]TRACE_FLOW[0x8A]_CCONTENTINFODB_UPDATEBLACKLISTSTATUSL_ENTRY=0x27 -[TRACE]TRACE_FLOW[0x8A]_CCONTENTINFODB_UPDATEBLACKLISTSTATUSL_EXIT=0x28 -[TRACE]TRACE_FLOW[0x8A]_CCONTENTINFODB_UPDATEPLUGININDEXSTATUSL_ENTRY=0x29 -[TRACE]TRACE_FLOW[0x8A]_CCONTENTINFODB_UPDATEPLUGININDEXSTATUSL_EXIT=0x2a -[TRACE]TRACE_FLOW[0x8A]_CCONTENTINFOMGR_CONSTRUCTL_ENTRY=0x39 -[TRACE]TRACE_FLOW[0x8A]_CCONTENTINFOMGR_CONSTRUCTL_EXIT=0x3a -[TRACE]TRACE_FLOW[0x8A]_CCONTENTINFOMGR_NEWLC_ENTRY=0x37 -[TRACE]TRACE_FLOW[0x8A]_CCONTENTINFOMGR_NEWLC_EXIT=0x38 -[TRACE]TRACE_FLOW[0x8A]_CCONTENTINFOMGR_NEWL_ENTRY=0x35 -[TRACE]TRACE_FLOW[0x8A]_CCONTENTINFOMGR_NEWL_EXIT=0x36 -[TRACE]TRACE_FLOW[0x8A]_CCONTENTINFO_GETNAMEL_ENTRY=0x1b -[TRACE]TRACE_FLOW[0x8A]_CCONTENTINFO_GETNAMEL_EXIT=0x1c -[TRACE]TRACE_FLOW[0x8A]_CCONTENTINFO_NEWLC_ENTRY=0x19 -[TRACE]TRACE_FLOW[0x8A]_CCONTENTINFO_NEWLC_EXIT=0x1a -[TRACE]TRACE_FLOW[0x8A]_CCONTENTINFO_NEWL_ENTRY=0x17 -[TRACE]TRACE_FLOW[0x8A]_CCONTENTINFO_NEWL_EXIT=0x18 -[TRACE]TRACE_FLOW[0x8A]_CCONTENTINFO_SETNAMEL_ENTRY=0x1d -[TRACE]TRACE_FLOW[0x8A]_CCONTENTINFO_SETNAMEL_EXIT=0x1e -[TRACE]TRACE_FLOW[0x8A]_CINDEXINGMANAGER_LOADHARVESTERPLUGINL_ENTRY=0x5c -[TRACE]TRACE_FLOW[0x8A]_CINDEXINGMANAGER_LOADHARVESTERPLUGINL_EXIT=0x5d -[TRACE]TRACE_FLOW[0x8A]_CINDEXINGMANAGER_LOADPLUGINSL_ENTRY=0x57 -[TRACE]TRACE_FLOW[0x8A]_CINDEXINGMANAGER_LOADPLUGINSL_EXIT=0x58 -[TRACE]TRACE_FLOW[0x8A]_CINDEXINGMANAGER_UPDATECONTENTINFODBL_ENTRY=0x47 -[TRACE]TRACE_FLOW[0x8A]_CINDEXINGMANAGER_UPDATECONTENTINFODBL_EXIT=0x48 -[TRACE]TRACE_FLOW[0x8A]_CINDEXINGMANAGER_UPDATEDONTLOADLISTL_ENTRY=0x59 -[TRACE]TRACE_FLOW[0x8A]_CINDEXINGMANAGER_UPDATEDONTLOADLISTL_EXIT=0x5a -[TRACE]TRACE_FLOW[0x8A]_DUP1_CINDEXINGMANAGER_GETPLUGINLOADSTATUSL_ENTRY=0x5b +[TRACE]TRACE_FLOW[0x8A]_CBLACKLISTMGR_ADDL_ENTRY=0x1b +[TRACE]TRACE_FLOW[0x8A]_CBLACKLISTMGR_ADDL_EXIT=0x1c +[TRACE]TRACE_FLOW[0x8A]_CBLACKLISTMGR_ADDTODONTLOADLISTL_EXIT=0x20 +[TRACE]TRACE_FLOW[0x8A]_CBLACKLISTMGR_ADDTOUNLOADLISTL_ENTRY=0x1f +[TRACE]TRACE_FLOW[0x8A]_CBLACKLISTMGR_CONSTRUCTL_ENTRY=0x19 +[TRACE]TRACE_FLOW[0x8A]_CBLACKLISTMGR_CONSTRUCTL_EXIT=0x1a +[TRACE]TRACE_FLOW[0x8A]_CBLACKLISTMGR_NEWL_ENTRY=0x17 +[TRACE]TRACE_FLOW[0x8A]_CBLACKLISTMGR_NEWL_EXIT=0x18 +[TRACE]TRACE_FLOW[0x8A]_CBLACKLISTMGR_REMOVEFROMDONTLOADLISTL_EXIT=0x22 +[TRACE]TRACE_FLOW[0x8A]_CBLACKLISTMGR_REMOVEFROMUNLOADLISTL_ENTRY=0x21 +[TRACE]TRACE_FLOW[0x8A]_CBLACKLISTMGR_REMOVE_ENTRY=0x1d +[TRACE]TRACE_FLOW[0x8A]_CBLACKLISTMGR_REMOVE_EXIT=0x1e +[TRACE]TRACE_FLOW[0x8A]_CINDEXINGMANAGER_HANDLEGAURDTIMERL_ENTRY=0x2c +[TRACE]TRACE_FLOW[0x8A]_CINDEXINGMANAGER_HANDLEGAURDTIMERL_EXIT=0x2d +[TRACE]TRACE_FLOW[0x8A]_CINDEXINGMANAGER_LOADHARVESTERPLUGINL_ENTRY=0x2a +[TRACE]TRACE_FLOW[0x8A]_CINDEXINGMANAGER_LOADHARVESTERPLUGINL_EXIT=0x2b +[TRACE]TRACE_FLOW[0x8A]_CINDEXINGMANAGER_LOADPLUGINSL_ENTRY=0x23 +[TRACE]TRACE_FLOW[0x8A]_CINDEXINGMANAGER_LOADPLUGINSL_EXIT=0x24 +[TRACE]TRACE_FLOW[0x8A]_CINDEXINGMANAGER_UPDATECONTENTINFODBL_ENTRY=0x25 +[TRACE]TRACE_FLOW[0x8A]_CINDEXINGMANAGER_UPDATECONTENTINFODBL_EXIT=0x26 +[TRACE]TRACE_FLOW[0x8A]_CINDEXINGMANAGER_UPDATEDONTLOADLISTL_ENTRY=0x27 +[TRACE]TRACE_FLOW[0x8A]_CINDEXINGMANAGER_UPDATEDONTLOADLISTL_EXIT=0x28 +[TRACE]TRACE_FLOW[0x8A]_DUP1_CACTIVITYMANAGER_CACTIVITYMANAGER_ENTRY=0x32 +[TRACE]TRACE_FLOW[0x8A]_DUP1_CACTIVITYMANAGER_CACTIVITYMANAGER_EXIT=0x33 +[TRACE]TRACE_FLOW[0x8A]_DUP1_CACTIVITYMANAGER_ISINACTIVE_EXIT=0x3d +[TRACE]TRACE_FLOW[0x8A]_DUP1_CACTIVITYMANAGER_RUNL_EXIT=0x38 +[TRACE]TRACE_FLOW[0x8A]_DUP1_CINDEXINGMANAGER_GETPLUGINLOADSTATUSL_ENTRY=0x29 +[TRACE]TRACE_NORMAL[0x86]_CACTIVITYMANAGER_NOTIFYOBSERVER=0x2f [TRACE]TRACE_NORMAL[0x86]_CBLACKLISTDB_ADDL=0x2 [TRACE]TRACE_NORMAL[0x86]_CBLACKLISTDB_CONSTRUCTL=0x1 -[TRACE]TRACE_NORMAL[0x86]_CBLACKLISTDB_FINDFROMDONTLOADLISTL=0x2e +[TRACE]TRACE_NORMAL[0x86]_CBLACKLISTDB_FINDFROMDONTLOADLISTL=0xc [TRACE]TRACE_NORMAL[0x86]_CBLACKLISTDB_FINDL=0x9 [TRACE]TRACE_NORMAL[0x86]_CBLACKLISTDB_FINDWITHVERSIONL=0x6 [TRACE]TRACE_NORMAL[0x86]_CBLACKLISTDB_REMOVE=0x3 [TRACE]TRACE_NORMAL[0x86]_CBLACKLISTDB_UPDATEL=0x8 -[TRACE]TRACE_NORMAL[0x86]_CBLACKLISTMGR_ADDL=0xb -[TRACE]TRACE_NORMAL[0x86]_CBLACKLISTMGR_ADDTODONTLOADLISTL=0x2f -[TRACE]TRACE_NORMAL[0x86]_CBLACKLISTMGR_FINDINDONTLOADLISTL=0x30 -[TRACE]TRACE_NORMAL[0x86]_CBLACKLISTMGR_FINDL=0xd -[TRACE]TRACE_NORMAL[0x86]_CBLACKLISTMGR_REMOVE=0xc -[TRACE]TRACE_NORMAL[0x86]_CBLACKLISTMGR_REMOVEFROMUNLOADLISTL=0x2b -[TRACE]TRACE_NORMAL[0x86]_CINDEXINGMANAGER_ADDHARVESTINGQUEUE=0x1d -[TRACE]TRACE_NORMAL[0x86]_CINDEXINGMANAGER_HARVESTINGCOMPLETED=0x24 -[TRACE]TRACE_NORMAL[0x86]_CINDEXINGMANAGER_LOADHARVESTERPLUGINL=0x32 -[TRACE]TRACE_NORMAL[0x86]_CINDEXINGMANAGER_REMOVEHARVESTINGQUEUE=0x21 -[TRACE]TRACE_NORMAL[0x86]_CINDEXINGMANAGER_RUNL=0x10 +[TRACE]TRACE_NORMAL[0x86]_CBLACKLISTMGR_ADDL=0xd +[TRACE]TRACE_NORMAL[0x86]_CBLACKLISTMGR_ADDTODONTLOADLISTL=0x12 +[TRACE]TRACE_NORMAL[0x86]_CBLACKLISTMGR_FINDINDONTLOADLISTL=0x14 +[TRACE]TRACE_NORMAL[0x86]_CBLACKLISTMGR_FINDL=0xf +[TRACE]TRACE_NORMAL[0x86]_CBLACKLISTMGR_REMOVE=0xe +[TRACE]TRACE_NORMAL[0x86]_CBLACKLISTMGR_REMOVEFROMUNLOADLISTL=0x13 +[TRACE]TRACE_NORMAL[0x86]_CINDEXINGMANAGER_ACTIVITYCHANGED=0x2c +[TRACE]TRACE_NORMAL[0x86]_CINDEXINGMANAGER_ADDHARVESTINGQUEUE=0x1f +[TRACE]TRACE_NORMAL[0x86]_CINDEXINGMANAGER_HANDLEGAURDTIMERL=0x2e +[TRACE]TRACE_NORMAL[0x86]_CINDEXINGMANAGER_HARVESTINGCOMPLETED=0x26 +[TRACE]TRACE_NORMAL[0x86]_CINDEXINGMANAGER_LOADHARVESTERPLUGINL=0x2a +[TRACE]TRACE_NORMAL[0x86]_CINDEXINGMANAGER_REMOVEHARVESTINGQUEUE=0x23 +[TRACE]TRACE_NORMAL[0x86]_CINDEXINGMANAGER_RUNL=0x15 [TRACE]TRACE_NORMAL[0x86]_DUP1_CBLACKLISTDB_FINDL=0xa [TRACE]TRACE_NORMAL[0x86]_DUP1_CBLACKLISTDB_FINDWITHVERSIONL=0x7 [TRACE]TRACE_NORMAL[0x86]_DUP1_CBLACKLISTDB_REMOVE=0x4 -[TRACE]TRACE_NORMAL[0x86]_DUP1_CBLACKLISTMGR_FINDL=0xe -[TRACE]TRACE_NORMAL[0x86]_DUP1_CINDEXINGMANAGER_ADDHARVESTINGQUEUE=0x1e -[TRACE]TRACE_NORMAL[0x86]_DUP1_CINDEXINGMANAGER_HARVESTINGCOMPLETED=0x25 -[TRACE]TRACE_NORMAL[0x86]_DUP1_CINDEXINGMANAGER_LOADHARVESTERPLUGINL=0x31 -[TRACE]TRACE_NORMAL[0x86]_DUP1_CINDEXINGMANAGER_REMOVEHARVESTINGQUEUE=0x22 -[TRACE]TRACE_NORMAL[0x86]_DUP1_CINDEXINGMANAGER_RUNL=0x11 +[TRACE]TRACE_NORMAL[0x86]_DUP1_CBLACKLISTMGR_FINDL=0x10 +[TRACE]TRACE_NORMAL[0x86]_DUP1_CINDEXINGMANAGER_ACTIVITYCHANGED=0x2d +[TRACE]TRACE_NORMAL[0x86]_DUP1_CINDEXINGMANAGER_ADDHARVESTINGQUEUE=0x20 +[TRACE]TRACE_NORMAL[0x86]_DUP1_CINDEXINGMANAGER_HARVESTINGCOMPLETED=0x27 +[TRACE]TRACE_NORMAL[0x86]_DUP1_CINDEXINGMANAGER_LOADHARVESTERPLUGINL=0x29 +[TRACE]TRACE_NORMAL[0x86]_DUP1_CINDEXINGMANAGER_REMOVEHARVESTINGQUEUE=0x24 +[TRACE]TRACE_NORMAL[0x86]_DUP1_CINDEXINGMANAGER_RUNL=0x16 [TRACE]TRACE_NORMAL[0x86]_DUP2_CBLACKLISTDB_REMOVE=0x5 -[TRACE]TRACE_NORMAL[0x86]_DUP2_CBLACKLISTMGR_FINDL=0xf -[TRACE]TRACE_NORMAL[0x86]_DUP2_CINDEXINGMANAGER_ADDHARVESTINGQUEUE=0x1f -[TRACE]TRACE_NORMAL[0x86]_DUP2_CINDEXINGMANAGER_HARVESTINGCOMPLETED=0x26 -[TRACE]TRACE_NORMAL[0x86]_DUP2_CINDEXINGMANAGER_LOADHARVESTERPLUGINL=0x33 -[TRACE]TRACE_NORMAL[0x86]_DUP2_CINDEXINGMANAGER_REMOVEHARVESTINGQUEUE=0x23 -[TRACE]TRACE_NORMAL[0x86]_DUP2_CINDEXINGMANAGER_RUNL=0x12 -[TRACE]TRACE_NORMAL[0x86]_DUP3_CBLACKLISTDB_REMOVEFROMDONTLOADLISTL=0x2d -[TRACE]TRACE_NORMAL[0x86]_DUP3_CINDEXINGMANAGER_ADDHARVESTINGQUEUE=0x20 -[TRACE]TRACE_NORMAL[0x86]_DUP3_CINDEXINGMANAGER_RUNL=0x13 -[TRACE]TRACE_NORMAL[0x86]_DUP4_CINDEXINGMANAGER_RUNL=0x14 -[TRACE]TRACE_NORMAL[0x86]_DUP5_CINDEXINGMANAGER_RUNL=0x15 -[TRACE]TRACE_NORMAL[0x86]_DUP6_CINDEXINGMANAGER_RUNL=0x16 -[TRACE]TRACE_NORMAL[0x86]_DUP7_CINDEXINGMANAGER_RUNL=0x17 -[TRACE]TRACE_NORMAL[0x86]_DUP8_CINDEXINGMANAGER_RUNL=0x18 -[TRACE]TRACE_NORMAL[0x86]_DUP9_CINDEXINGMANAGER_RUNL=0x19 -[[OBSOLETE]][TRACE]TRACE_FLOW[0x8A]_CBLACKLISTDB_ADDTOUNLOADLISTL_ENTRY=0x3d -[[OBSOLETE]][TRACE]TRACE_FLOW[0x8A]_CBLACKLISTDB_ADDTOUNLOADLISTL_EXIT=0x3e -[[OBSOLETE]][TRACE]TRACE_FLOW[0x8A]_CBLACKLISTDB_CREATECOLUMNSETLC_ENTRY=0xd -[[OBSOLETE]][TRACE]TRACE_FLOW[0x8A]_CBLACKLISTDB_CREATECOLUMNSETLC_EXIT=0xe -[[OBSOLETE]][TRACE]TRACE_FLOW[0x8A]_CBLACKLISTDB_CREATEUNLOADCOLUMNSETLC_ENTRY=0x3b -[[OBSOLETE]][TRACE]TRACE_FLOW[0x8A]_CBLACKLISTDB_CREATEUNLOADCOLUMNSETLC_EXIT=0x3c -[[OBSOLETE]][TRACE]TRACE_FLOW[0x8A]_CBLACKLISTDB_FINDFROMUNLOADLISTL_ENTRY=0x41 -[[OBSOLETE]][TRACE]TRACE_FLOW[0x8A]_CBLACKLISTDB_FINDFROMUNLOADLISTL_EXIT=0x42 -[[OBSOLETE]][TRACE]TRACE_FLOW[0x8A]_CBLACKLISTDB_REMOVEFROMUNLOADLISTL_ENTRY=0x3f -[[OBSOLETE]][TRACE]TRACE_FLOW[0x8A]_CBLACKLISTDB_REMOVEFROMUNLOADLISTL_EXIT=0x40 -[[OBSOLETE]][TRACE]TRACE_FLOW[0x8A]_CBLACKLISTMGR_ADDTOUNLOADLISTL_EXIT=0x44 -[[OBSOLETE]][TRACE]TRACE_FLOW[0x8A]_CBLACKLISTMGR_REMOVEFROMUNLOADLISTL_EXIT=0x46 -[[OBSOLETE]][TRACE]TRACE_FLOW[0x8A]_CINDEXINGMANAGER_UPDATEUNLOADLISTL_ENTRY=0x49 -[[OBSOLETE]][TRACE]TRACE_FLOW[0x8A]_CINDEXINGMANAGER_UPDATEUNLOADLISTL_EXIT=0x4a -[[OBSOLETE]][TRACE]TRACE_NORMAL[0x86]_CBLACKLISTDB_FINDFROMUNLOADLISTL=0x29 -[[OBSOLETE]][TRACE]TRACE_NORMAL[0x86]_CBLACKLISTDB_REMOVEFROMUNLOADLISTL=0x27 -[[OBSOLETE]][TRACE]TRACE_NORMAL[0x86]_CBLACKLISTMGR_ADDTOUNLOADLISTL=0x2a -[[OBSOLETE]][TRACE]TRACE_NORMAL[0x86]_CBLACKLISTMGR_FINDFROMUNLOADLISTL=0x2c -[[OBSOLETE]][TRACE]TRACE_NORMAL[0x86]_CINDEXINGMANAGER_LOADPLUGINSL=0x1a -[[OBSOLETE]][TRACE]TRACE_NORMAL[0x86]_DUP1_CBLACKLISTDB_REMOVEFROMUNLOADLISTL=0x28 -[[OBSOLETE]][TRACE]TRACE_NORMAL[0x86]_DUP1_CINDEXINGMANAGER_LOADPLUGINSL=0x1b -[[OBSOLETE]][TRACE]TRACE_NORMAL[0x86]_DUP2_CINDEXINGMANAGER_LOADPLUGINSL=0x1c +[TRACE]TRACE_NORMAL[0x86]_DUP2_CBLACKLISTMGR_FINDL=0x11 +[TRACE]TRACE_NORMAL[0x86]_DUP2_CINDEXINGMANAGER_ADDHARVESTINGQUEUE=0x21 +[TRACE]TRACE_NORMAL[0x86]_DUP2_CINDEXINGMANAGER_HARVESTINGCOMPLETED=0x28 +[TRACE]TRACE_NORMAL[0x86]_DUP2_CINDEXINGMANAGER_LOADHARVESTERPLUGINL=0x2b +[TRACE]TRACE_NORMAL[0x86]_DUP2_CINDEXINGMANAGER_REMOVEHARVESTINGQUEUE=0x25 +[TRACE]TRACE_NORMAL[0x86]_DUP2_CINDEXINGMANAGER_RUNL=0x17 +[TRACE]TRACE_NORMAL[0x86]_DUP3_CBLACKLISTDB_REMOVEFROMDONTLOADLISTL=0xb +[TRACE]TRACE_NORMAL[0x86]_DUP3_CINDEXINGMANAGER_ADDHARVESTINGQUEUE=0x22 +[TRACE]TRACE_NORMAL[0x86]_DUP3_CINDEXINGMANAGER_RUNL=0x18 +[TRACE]TRACE_NORMAL[0x86]_DUP4_CINDEXINGMANAGER_RUNL=0x19 +[TRACE]TRACE_NORMAL[0x86]_DUP5_CINDEXINGMANAGER_RUNL=0x1a +[TRACE]TRACE_NORMAL[0x86]_DUP6_CINDEXINGMANAGER_RUNL=0x1b +[TRACE]TRACE_NORMAL[0x86]_DUP7_CINDEXINGMANAGER_RUNL=0x1c +[TRACE]TRACE_NORMAL[0x86]_DUP8_CINDEXINGMANAGER_RUNL=0x1d +[TRACE]TRACE_NORMAL[0x86]_DUP9_CINDEXINGMANAGER_RUNL=0x1e diff -r 556534771396 -r d4d56f5e7c55 layers.sysdef.xml --- a/layers.sysdef.xml Mon Sep 20 12:35:47 2010 +0530 +++ b/layers.sysdef.xml Tue Oct 05 13:15:12 2010 +0530 @@ -7,7 +7,7 @@ - + diff -r 556534771396 -r d4d56f5e7c55 package_definition.xml --- a/package_definition.xml Mon Sep 20 12:35:47 2010 +0530 +++ b/package_definition.xml Tue Oct 05 13:15:12 2010 +0530 @@ -42,7 +42,7 @@ - + diff -r 556534771396 -r d4d56f5e7c55 qcpix/cpixsearch.pro --- a/qcpix/cpixsearch.pro Mon Sep 20 12:35:47 2010 +0530 +++ b/qcpix/cpixsearch.pro Tue Oct 05 13:15:12 2010 +0530 @@ -36,7 +36,7 @@ symbian{ TARGET.CAPABILITY = CAP_GENERAL_DLL TARGET.EPOCALLOWDLLDATA = 1 - TARGET.UID3 = 0xE3B89364 + TARGET.UID3 = 0x20029B38 TARGET.VID = VID_DEFAULT VERSION = 1.0.0 LIBS += -leuser -lcpixsearchclient diff -r 556534771396 -r d4d56f5e7c55 qcpix/tsrc/samplesearch/samplesearch.cpp --- a/qcpix/tsrc/samplesearch/samplesearch.cpp Mon Sep 20 12:35:47 2010 +0530 +++ b/qcpix/tsrc/samplesearch/samplesearch.cpp Tue Oct 05 13:15:12 2010 +0530 @@ -352,7 +352,7 @@ //Instead of having these traps all over the place, we'll have it just here. QT_TRAP_THROWING(/* Call all the symbian APIs here */); if( info.type == "root calendar" ){ - XQServiceRequest *snd = new XQServiceRequest("com.nokia.services.phonebookservices.Fetch", "open(int)",false); + XQServiceRequest *snd = new XQServiceRequest("com.nokia.symbian.IContactsFetch", "open(int)",false); *snd << info.docId.toInt(); snd->send(); } diff -r 556534771396 -r d4d56f5e7c55 rom/cpix_mw.iby --- a/rom/cpix_mw.iby Mon Sep 20 12:35:47 2010 +0530 +++ b/rom/cpix_mw.iby Tue Oct 05 13:15:12 2010 +0530 @@ -37,6 +37,7 @@ file=ABI_DIR\BUILD_DIR\CPixSearchClient.dll SHARED_LIB_DIR\CPixSearchClient.dll file=ABI_DIR\BUILD_DIR\CPixSearchServer.exe SHARED_LIB_DIR\CPixSearchServer.exe +file=ABI_DIR\BUILD_DIR\cpixcontentinfodb.dll SHARED_LIB_DIR\cpixcontentinfodb.dll // CPiX NP Plugin //ECOM_PLUGIN( npCPixPlugin.dll, npCPixPlugin.rsc) @@ -59,7 +60,7 @@ data=ZSYSTEM\install\cpixsearch_stub.sis System\Install\cpixsearch_stub.sis data=DATAZ_\private\10202be9\2001f6fb.cre private\10202be9\2001f6fb.cre -data=DATAZ_\private\10202be9\20029AB8.cre private\10202be9\20029AB8.cre +data=DATAZ_\private\10202be9\20029AB8.txt private\10202be9\20029AB8.txt #endif //FF_SEARCH_SW diff -r 556534771396 -r d4d56f5e7c55 searchengine/cpix/cpix/inc/private/idxdbmgr.h --- a/searchengine/cpix/cpix/inc/private/idxdbmgr.h Mon Sep 20 12:35:47 2010 +0530 +++ b/searchengine/cpix/cpix/inc/private/idxdbmgr.h Tue Oct 05 13:15:12 2010 +0530 @@ -139,6 +139,8 @@ Cpt::Mutex mutex_; + Cpt::Mutex versionMutex_; + Version version_; InitParams initParams_; @@ -189,6 +191,7 @@ static void shutdownAll(); + const InitParams& getInitParams() const; /** * (Re-)defines an index on a qualified base app class. The diff -r 556534771396 -r d4d56f5e7c55 searchengine/cpix/cpix/src/cpixhits.cpp --- a/searchengine/cpix/cpix/src/cpixhits.cpp Mon Sep 20 12:35:47 2010 +0530 +++ b/searchengine/cpix/cpix/src/cpixhits.cpp Tue Oct 05 13:15:12 2010 +0530 @@ -45,8 +45,8 @@ for (; i != wrappers_.end(); ++i) { delete i->second; - wrappers_.clear(); } + wrappers_.erase(wrappers_.begin(),wrappers_.end()); } else { for (; i != wrappers_.find(index); ++i) { @@ -266,7 +266,7 @@ delete hits_; hits_ = 0; - destroyWrappers(0); + destroyWrappers(-1); delete docConsumer_; @@ -336,7 +336,7 @@ HitDocumentList::~HitDocumentList() { - destroyWrappers(0); + destroyWrappers(-1); for (std::vector::iterator i = documents_.begin(); i != documents_.end(); i++) diff -r 556534771396 -r d4d56f5e7c55 searchengine/cpix/cpix/src/idxdbmgr.cpp --- a/searchengine/cpix/cpix/src/idxdbmgr.cpp Mon Sep 20 12:35:47 2010 +0530 +++ b/searchengine/cpix/cpix/src/idxdbmgr.cpp Tue Oct 05 13:15:12 2010 +0530 @@ -60,7 +60,7 @@ template struct HighestBit { - enum { Value = (1 << (8*sizeof(INTEGER) - 1)) }; + enum { Value = ((INTEGER)1 << (8*sizeof(INTEGER) - 1)) }; }; @@ -328,6 +328,10 @@ instance_ = NULL; } + const InitParams& IdxDbMgr::getInitParams() const + { + return initParams_; + } IdxDbHndl IdxDbMgr::create(const char * qualBaseAppClass) { @@ -532,7 +536,7 @@ Version IdxDbMgr::getNextVersion() { Cpt::SyncRegion - sr(mutex_); + sr(versionMutex_); Version rv = version_; @@ -894,6 +898,7 @@ regFilePath_(ip.getCpixDir()), maxIdleSec_(ip.getMaxIdleSec()), mutex_(true), // recursive + versionMutex_(false), // not recursive version_(0), initParams_(ip), housekeepCounter_(0) diff -r 556534771396 -r d4d56f5e7c55 searchengine/cpix/cpix/src/multiIdxDb.cpp --- a/searchengine/cpix/cpix/src/multiIdxDb.cpp Mon Sep 20 12:35:47 2010 +0530 +++ b/searchengine/cpix/cpix/src/multiIdxDb.cpp Tue Oct 05 13:15:12 2010 +0530 @@ -310,6 +310,7 @@ end = originators_.end(); for (; i != end; ++i) { + bool readerValid = true; IReaderOwner & ro(i->second.readerOwner()); @@ -318,15 +319,26 @@ // idx is locked now (lock information is in // msr) + lucene::index::IndexReader* idxReader = NULL; + try + { + idxReader = ro.getReader(&msr, &version); + readerValid = idxReader->indexExists(); + } + catch(...) + { + readerValid = false; + } - readers.push_back(ro.getReader(&msr, - &version)); - + if(true == readerValid) + { + readers.push_back(idxReader); if (version != i->second.version()) { - i->second.setVersion(version); - hasAnyOriginatorChanged = true; + i->second.setVersion(version); + hasAnyOriginatorChanged = true; } + } } if (hasAnyOriginatorChanged) @@ -611,6 +623,7 @@ Version * version, Cpt::MultiSyncRegion * msr) { + cleanup(); // TODO @@ -632,21 +645,37 @@ for (; i != end; ++i) { +// Connection in MassStorage mode and formating MMC may invalidate the Reader. +// Added Check for validation of the reader. + bool readerValid = true; IReaderOwner & ro(i->second.readerOwner()); Version idxDbVersion; - + lucene::index::IndexReader* idxReader = NULL; + try + { + idxReader = ro.getReader(msr,&idxDbVersion); + readerValid = idxReader->indexExists(); // idx is locked now (lock information is in msr) - searchers_.push_back(new IndexSearcher(ro.getReader(msr, - &idxDbVersion))); - - if (idxDbVersion != i->second.version()) + } + catch(...) + { + readerValid = false; + } + + if(readerValid == true) { - i->second.setVersion(idxDbVersion); - hasAnyOriginatorChanged = true; - } + searchers_.push_back(new IndexSearcher(idxReader)); + + if (idxDbVersion != i->second.version()) + { + i->second.setVersion(idxDbVersion); + hasAnyOriginatorChanged = true; + } + + } } if (hasAnyOriginatorChanged) diff -r 556534771396 -r d4d56f5e7c55 searchengine/cpix/cpixrotlog/group/cpixrotlog.mmp --- a/searchengine/cpix/cpixrotlog/group/cpixrotlog.mmp Mon Sep 20 12:35:47 2010 +0530 +++ b/searchengine/cpix/cpixrotlog/group/cpixrotlog.mmp Tue Oct 05 13:15:12 2010 +0530 @@ -21,7 +21,7 @@ TARGET cpixrotlog.exe TARGETTYPE exe -UID 0x100039CE 0x01CDEE56 +UID 0x100039CE 0x20029B39 EPOCSTACKSIZE 0x10000 EPOCHEAPSIZE 0x50000 0xa00000 // From about 65KB to about 10 MB VENDORID 0 diff -r 556534771396 -r d4d56f5e7c55 searchengine/util/cpixtools/src/cpixfstools.cpp --- a/searchengine/util/cpixtools/src/cpixfstools.cpp Mon Sep 20 12:35:47 2010 +0530 +++ b/searchengine/util/cpixtools/src/cpixfstools.cpp Tue Oct 05 13:15:12 2010 +0530 @@ -413,6 +413,12 @@ while (!feof(file)) { int c = fgetc(file); + if (c == '\r') { + c = fgetc(file); + if (c != '\n'){ + buf<<'\r'; + } + } if (c == EOF || c == '\n') { break; } diff -r 556534771396 -r d4d56f5e7c55 searcher/searchclient/group/searchclient.mmp --- a/searcher/searchclient/group/searchclient.mmp Mon Sep 20 12:35:47 2010 +0530 +++ b/searcher/searchclient/group/searchclient.mmp Tue Oct 05 13:15:12 2010 +0530 @@ -44,6 +44,4 @@ CAPABILITY CAP_GENERAL_DLL -//Useto enable highlighter -MACRO USE_HIGHLIGHTER // End of File diff -r 556534771396 -r d4d56f5e7c55 searcher/searchclient/inc/searchservercommon.h --- a/searcher/searchclient/inc/searchservercommon.h Mon Sep 20 12:35:47 2010 +0530 +++ b/searcher/searchclient/inc/searchservercommon.h Tue Oct 05 13:15:12 2010 +0530 @@ -32,8 +32,6 @@ // CONSTANTS -_LIT( KSearchServerName,"CPixSearchServer" ); // Server name -_LIT( KSearchServerSemaphoreName, "CPixSearchServerSemaphore" ); // The server version. A version must be specified when // creating a session with the server. diff -r 556534771396 -r d4d56f5e7c55 searcher/searchclient/src/csearchdocument.cpp --- a/searcher/searchclient/src/csearchdocument.cpp Mon Sep 20 12:35:47 2010 +0530 +++ b/searcher/searchclient/src/csearchdocument.cpp Tue Oct 05 13:15:12 2010 +0530 @@ -249,9 +249,7 @@ EXPORT_C void CSearchDocument::AddHLDisplayFieldL(const TDesC& aField) { -#ifdef USE_HIGHLIGHTER // 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 } diff -r 556534771396 -r d4d56f5e7c55 searcher/searchclient/src/rsearchserversession.cpp --- a/searcher/searchclient/src/rsearchserversession.cpp Mon Sep 20 12:35:47 2010 +0530 +++ b/searcher/searchclient/src/rsearchserversession.cpp Tue Oct 05 13:15:12 2010 +0530 @@ -31,6 +31,7 @@ #include "cpixwatchdogcommon.h" #include +_LIT( KSemaphore,"Semaphore"); // FUNCTION PROTOTYPES static TInt StartServer( const TDesC& aServerName , TUid aServerUid ); @@ -533,7 +534,15 @@ } RSemaphore semaphore; - result = semaphore.CreateGlobal(KSearchServerSemaphoreName, 0); + HBufC* semaphorename = HBufC16::NewL( aServerName.Length() + 10 ); + TPtr semaphoreptr = semaphorename->Des(); + semaphoreptr.Copy( aServerName ); + semaphoreptr.Append( KSemaphore ); + + result = semaphore.CreateGlobal(*semaphorename, 0); + + delete semaphorename; + if (result != KErrNone) { return result; diff -r 556534771396 -r d4d56f5e7c55 searcher/searchserver/group/searchserver.mmp --- a/searcher/searchserver/group/searchserver.mmp Mon Sep 20 12:35:47 2010 +0530 +++ b/searcher/searchserver/group/searchserver.mmp Tue Oct 05 13:15:12 2010 +0530 @@ -94,8 +94,5 @@ CAPABILITY CAP_SERVER AllFiles -//Used to enable highlighter -//MACRO USE_HIGHLIGHTER - // End of File diff -r 556534771396 -r d4d56f5e7c55 searcher/searchserver/src/csearchserver.cpp --- a/searcher/searchserver/src/csearchserver.cpp Mon Sep 20 12:35:47 2010 +0530 +++ b/searcher/searchserver/src/csearchserver.cpp Tue Oct 05 13:15:12 2010 +0530 @@ -31,6 +31,9 @@ #include "csearchserverTraces.h" #endif +// CONSTANTS +_LIT( KSearchServerName,"CPixSearchServer" ); // Server name +_LIT( KSearchServerSemaphoreName, "CPixSearchServerSemaphore" ); // Server security policy @@ -302,6 +305,7 @@ void CSearchServer::ThreadFunctionL() { // Construct active scheduler + User::RenameThread(KSearchServerName); CActiveScheduler* activeScheduler = new ( ELeave ) CActiveScheduler; CleanupStack::PushL(activeScheduler); @@ -312,7 +316,7 @@ CSearchServer* server = CSearchServer::NewLC(); // Rename the thread. - User::RenameThread(KSearchServerName); + RProcess::Rendezvous(KErrNone); // Signal client thread if started by such diff -r 556534771396 -r d4d56f5e7c55 searcher/searchserver/src/csearchserversubsession.cpp --- a/searcher/searchserver/src/csearchserversubsession.cpp Mon Sep 20 12:35:47 2010 +0530 +++ b/searcher/searchserver/src/csearchserversubsession.cpp Tue Oct 05 13:15:12 2010 +0530 @@ -448,8 +448,7 @@ //This is commented because HIGHLIGHTER uses full expcerpt field, //no need to limit excerpt //check if excerpt is more then maximum allowed -#ifdef USE_HIGHLIGHTER -#else +#if 0 if(aSearchDocument->Excerpt().Length() > MAX_EXCERPT_LENGTH) { OstTraceExt1( TRACE_NORMAL, CSEARCHSERVERSUBSESSION_LIMITEXCERPTTOMAXLENGTHL, "CSearchServerSubSession::LimitExcerptToMaxLengthL;docuid=%S", (aSearchDocument->Id()) ); diff -r 556534771396 -r d4d56f5e7c55 searcher/tsrc/cpixsearchertest/eabi/cpixsearchertestu.def --- a/searcher/tsrc/cpixsearchertest/eabi/cpixsearchertestu.def Mon Sep 20 12:35:47 2010 +0530 +++ b/searcher/tsrc/cpixsearchertest/eabi/cpixsearchertestu.def Tue Oct 05 13:15:12 2010 +0530 @@ -1,3 +1,129 @@ EXPORTS _Z9LibEntryLR13CTestModuleIf @ 1 NONAME + _ZN12CCPixIndexer12SetAnalyzerLER31MCPixSetAnalyzerRequestObserverRK7TDesC16 @ 2 NONAME + _ZN12CCPixIndexer12SetAnalyzerLERK7TDesC16 @ 3 NONAME + _ZN12CCPixIndexer13OpenDatabaseLER32MCPixOpenDatabaseRequestObserverRK7TDesC16 @ 4 NONAME + _ZN12CCPixIndexer13OpenDatabaseLERK7TDesC16 @ 5 NONAME + _ZN12CCPixIndexer4AddLER28MCPixIndexingRequestObserverRK15CSearchDocument @ 6 NONAME + _ZN12CCPixIndexer4AddLERK15CSearchDocument @ 7 NONAME + _ZN12CCPixIndexer4NewLER20RSearchServerSession @ 8 NONAME + _ZN12CCPixIndexer5NewLCER20RSearchServerSession @ 9 NONAME + _ZN12CCPixIndexer6FlushLER28MCPixIndexingRequestObserver @ 10 NONAME + _ZN12CCPixIndexer6FlushLEv @ 11 NONAME + _ZN12CCPixIndexer6ResetLER28MCPixIndexingRequestObserver @ 12 NONAME + _ZN12CCPixIndexer6ResetLEv @ 13 NONAME + _ZN12CCPixIndexer7DeleteLER28MCPixIndexingRequestObserverRK7TDesC16 @ 14 NONAME + _ZN12CCPixIndexer7DeleteLERK7TDesC16 @ 15 NONAME + _ZN12CCPixIndexer7UpdateLER28MCPixIndexingRequestObserverRK15CSearchDocument @ 16 NONAME + _ZN12CCPixIndexer7UpdateLERK15CSearchDocument @ 17 NONAME + _ZN12CCPixIndexerD0Ev @ 18 NONAME + _ZN12CCPixIndexerD1Ev @ 19 NONAME + _ZN12CCPixIndexerD2Ev @ 20 NONAME + _ZN13CCPixSearcher12GetDocumentLEi @ 21 NONAME + _ZN13CCPixSearcher12GetDocumentLEiR32MCPixNextDocumentRequestObserver @ 22 NONAME + _ZN13CCPixSearcher12SetAnalyzerLER31MCPixSetAnalyzerRequestObserverRK7TDesC16 @ 23 NONAME + _ZN13CCPixSearcher12SetAnalyzerLERK7TDesC16 @ 24 NONAME + _ZN13CCPixSearcher13OpenDatabaseLER32MCPixOpenDatabaseRequestObserverRK7TDesC16 @ 25 NONAME + _ZN13CCPixSearcher13OpenDatabaseLERK7TDesC16 @ 26 NONAME + _ZN13CCPixSearcher15SetQueryParserLENS_12TQueryParserE @ 27 NONAME + _ZN13CCPixSearcher15SetQueryParserLER34MCPixSetQueryParserRequestObserverNS_12TQueryParserE @ 28 NONAME + _ZN13CCPixSearcher17GetBatchDocumentLEiR32MCPixNextDocumentRequestObserveri @ 29 NONAME + _ZN13CCPixSearcher17GetBatchDocumentLEiRii @ 30 NONAME + _ZN13CCPixSearcher4NewLER20RSearchServerSessionRK7TDesC16 @ 31 NONAME + _ZN13CCPixSearcher5NewLCER20RSearchServerSessionRK7TDesC16 @ 32 NONAME + _ZN13CCPixSearcher7SearchLER26MCPixSearchRequestObserverRK7TDesC16S4_ @ 33 NONAME + _ZN13CCPixSearcher7SearchLERK7TDesC16S2_ @ 34 NONAME + _ZN13CCPixSearcherD0Ev @ 35 NONAME + _ZN13CCPixSearcherD1Ev @ 36 NONAME + _ZN13CCPixSearcherD2Ev @ 37 NONAME + _ZN14CDocumentField12InternalizeLER11RReadStream @ 38 NONAME + _ZN14CDocumentField4NewLER11RReadStream @ 39 NONAME + _ZN14CDocumentField4NewLERK7TDesC16S2_i @ 40 NONAME + _ZN14CDocumentField5NewLCER11RReadStream @ 41 NONAME + _ZN14CDocumentField5NewLCERK7TDesC16S2_i @ 42 NONAME + _ZN14CDocumentField8SetBoostEf @ 43 NONAME + _ZN14CDocumentFieldD0Ev @ 44 NONAME + _ZN14CDocumentFieldD1Ev @ 45 NONAME + _ZN14CDocumentFieldD2Ev @ 46 NONAME + _ZN15CSearchDocument11AddExcerptLERK7TDesC16 @ 47 NONAME + _ZN15CSearchDocument11RemoveFieldERK7TDesC16 @ 48 NONAME + _ZN15CSearchDocument12InternalizeLER11RReadStream @ 49 NONAME + _ZN15CSearchDocument18AddHLDisplayFieldLERK7TDesC16 @ 50 NONAME + _ZN15CSearchDocument4NewLER11RReadStream @ 51 NONAME + _ZN15CSearchDocument4NewLERK7TDesC16S2_S2_NS_9TFilterIdE @ 52 NONAME + _ZN15CSearchDocument5NewLCER11RReadStream @ 53 NONAME + _ZN15CSearchDocument5NewLCERK7TDesC16S2_S2_NS_9TFilterIdE @ 54 NONAME + _ZN15CSearchDocument8SetBoostEf @ 55 NONAME + _ZN15CSearchDocument9AddFieldLERK7TDesC16S2_i @ 56 NONAME + _ZN15CSearchDocumentD0Ev @ 57 NONAME + _ZN15CSearchDocumentD1Ev @ 58 NONAME + _ZN15CSearchDocumentD2Ev @ 59 NONAME + _ZN20RSearchServerSession12DefineVolumeERK7TDesC16S2_ @ 60 NONAME + _ZN20RSearchServerSession14UnDefineVolumeERK7TDesC16 @ 61 NONAME + _ZN20RSearchServerSession16StopHouseKeepingEv @ 62 NONAME + _ZN20RSearchServerSession17ForceHouseKeepingEv @ 63 NONAME + _ZN20RSearchServerSession20ContinueHouseKeepingEv @ 64 NONAME + _ZN20RSearchServerSession5CloseEv @ 65 NONAME + _ZN20RSearchServerSession7ConnectEv @ 66 NONAME + _ZN20RSearchServerSessionC1Ev @ 67 NONAME + _ZN20RSearchServerSessionC2Ev @ 68 NONAME + _ZN23RSearchServerSubSession11GetDocumentEiR14TRequestStatus @ 69 NONAME + _ZN23RSearchServerSubSession11SetAnalyzerERK7TDesC16R14TRequestStatus @ 70 NONAME + _ZN23RSearchServerSubSession12GetDocumentLEi @ 71 NONAME + _ZN23RSearchServerSubSession12SetAnalyzerLERK7TDesC16 @ 72 NONAME + _ZN23RSearchServerSubSession14SetQueryParserEiR14TRequestStatus @ 73 NONAME + _ZN23RSearchServerSubSession15SetQueryParserLEi @ 74 NONAME + _ZN23RSearchServerSubSession16GetBatchDocumentEiR14TRequestStatusi @ 75 NONAME + _ZN23RSearchServerSubSession17GetBatchDocumentLEiRii @ 76 NONAME + _ZN23RSearchServerSubSession18GetDocumentObjectLEv @ 77 NONAME + _ZN23RSearchServerSubSession23GetBatchDocumentObjectLERi @ 78 NONAME + _ZN23RSearchServerSubSession3AddERK6TDesC8R14TRequestStatus @ 79 NONAME + _ZN23RSearchServerSubSession4AddLERK6TDesC8 @ 80 NONAME + _ZN23RSearchServerSubSession5FlushER14TRequestStatus @ 81 NONAME + _ZN23RSearchServerSubSession5ResetER14TRequestStatus @ 82 NONAME + _ZN23RSearchServerSubSession6DeleteERK7TDesC16R14TRequestStatus @ 83 NONAME + _ZN23RSearchServerSubSession6FlushLEv @ 84 NONAME + _ZN23RSearchServerSubSession6ResetLEv @ 85 NONAME + _ZN23RSearchServerSubSession6SearchERK7TDesC16R14TRequestStatus @ 86 NONAME + _ZN23RSearchServerSubSession6UpdateERK6TDesC8R14TRequestStatus @ 87 NONAME + _ZN23RSearchServerSubSession7DeleteLERK7TDesC16 @ 88 NONAME + _ZN23RSearchServerSubSession7SearchLERK7TDesC16 @ 89 NONAME + _ZN23RSearchServerSubSession7UpdateLERK6TDesC8 @ 90 NONAME + _ZNK12CCPixIndexer14IsDatabaseOpenEv @ 91 NONAME + _ZNK12CCPixIndexer15GetBaseAppClassEv @ 92 NONAME + _ZNK13CCPixSearcher14IsDatabaseOpenEv @ 93 NONAME + _ZNK13CCPixSearcher15GetBaseAppClassEv @ 94 NONAME + _ZNK14CDocumentField12ExternalizeLER12RWriteStream @ 95 NONAME + _ZNK14CDocumentField4NameEv @ 96 NONAME + _ZNK14CDocumentField4SizeEv @ 97 NONAME + _ZNK14CDocumentField5BoostEv @ 98 NONAME + _ZNK14CDocumentField5ValueEv @ 99 NONAME + _ZNK14CDocumentField6ConfigEv @ 100 NONAME + _ZNK15CSearchDocument10FieldCountEv @ 101 NONAME + _ZNK15CSearchDocument12ExternalizeLER12RWriteStream @ 102 NONAME + _ZNK15CSearchDocument2IdEv @ 103 NONAME + _ZNK15CSearchDocument4SizeEv @ 104 NONAME + _ZNK15CSearchDocument5BoostEv @ 105 NONAME + _ZNK15CSearchDocument5FieldERK7TDesC16 @ 106 NONAME + _ZNK15CSearchDocument5FieldEi @ 107 NONAME + _ZNK15CSearchDocument7ExcerptEv @ 108 NONAME + _ZNK15CSearchDocument8AppClassEv @ 109 NONAME + _ZNK20RSearchServerSession7VersionEv @ 110 NONAME + _ZNK23RSearchServerSubSession9CancelAllEv @ 111 NONAME + _ZTI12CAOTestClass @ 112 NONAME + _ZTI12CCPixIndexer @ 113 NONAME + _ZTI12CTestIndexer @ 114 NONAME + _ZTI13CCPixSearcher @ 115 NONAME + _ZTI13CTestSearcher @ 116 NONAME + _ZTI14CDocumentField @ 117 NONAME + _ZTI15CSearchDocument @ 118 NONAME + _ZTI27CHandleIndexingResultLeaves @ 119 NONAME + _ZTV12CAOTestClass @ 120 NONAME + _ZTV12CCPixIndexer @ 121 NONAME + _ZTV12CTestIndexer @ 122 NONAME + _ZTV13CCPixSearcher @ 123 NONAME + _ZTV13CTestSearcher @ 124 NONAME + _ZTV14CDocumentField @ 125 NONAME + _ZTV15CSearchDocument @ 126 NONAME + _ZTV27CHandleIndexingResultLeaves @ 127 NONAME diff -r 556534771396 -r d4d56f5e7c55 searcher/tsrc/robustnesstest/src/crobustnesstest.cpp --- a/searcher/tsrc/robustnesstest/src/crobustnesstest.cpp Mon Sep 20 12:35:47 2010 +0530 +++ b/searcher/tsrc/robustnesstest/src/crobustnesstest.cpp Tue Oct 05 13:15:12 2010 +0530 @@ -27,7 +27,8 @@ _LIT( KRecordFile, "c:\\Data\\robustness\\record.csv" ); _LIT( KTempRecordFile, "c:\\Data\\robustness\\_record.csv" ); //_LIT( KReportFile, "c:\\Data\\robustness\\report.txt" ); -_LIT( KConfigFile, "c:\\Data\\robustness\\config.txt" ); +_LIT( KConfigFile, "c:\\Data\\robustness\\config.txt" ); +_LIT( KSearchServerName,"CPixSearchServer" ); // Server name CRobustnessTest::CRobustnessTest( CConsoleBase& aConsole, MRobustnessTestObserver& aObserver ) diff -r 556534771396 -r d4d56f5e7c55 searchsrv_plat/cpix_framework_api/inc/cindexingplugin.h --- a/searchsrv_plat/cpix_framework_api/inc/cindexingplugin.h Mon Sep 20 12:35:47 2010 +0530 +++ b/searchsrv_plat/cpix_framework_api/inc/cindexingplugin.h Tue Oct 05 13:15:12 2010 +0530 @@ -123,6 +123,18 @@ */ IMPORT_C void Flush(CCPixIndexer& aIndexer); + /** + * A pure virtual method which instructs plugin to pause harvesting. + * Data to be indexed has to be stored and later index when resume is called. + */ + virtual void PausePluginL() = 0; + + /** + * A pure virtual method which instructs plugin to resume harvesting. + * plugin should index the queued items if any. + */ + virtual void ResumePluginL() = 0; + private: // data members // Identification on cleanup. TUid iDtor_ID_Key; diff -r 556534771396 -r d4d56f5e7c55 searchsrv_plat/cpix_framework_api/inc/harvesterserverlogger.h --- a/searchsrv_plat/cpix_framework_api/inc/harvesterserverlogger.h Mon Sep 20 12:35:47 2010 +0530 +++ b/searchsrv_plat/cpix_framework_api/inc/harvesterserverlogger.h Tue Oct 05 13:15:12 2010 +0530 @@ -18,7 +18,12 @@ #ifndef HARVESTERSERVERLOGGER_H #define HARVESTERSERVERLOGGER_H - +/** + * @file + * @ingroup Common + * @brief Contains Logging Macros for debug purpose + */ + /** * * LOG SELECTION diff -r 556534771396 -r d4d56f5e7c55 searchsrv_plat/cpix_framework_api/inc/mcpixdatabaseobserver.h --- a/searchsrv_plat/cpix_framework_api/inc/mcpixdatabaseobserver.h Mon Sep 20 12:35:47 2010 +0530 +++ b/searchsrv_plat/cpix_framework_api/inc/mcpixdatabaseobserver.h Tue Oct 05 13:15:12 2010 +0530 @@ -21,6 +21,12 @@ #include /** + * @file + * @ingroup Common + * @brief Contains MCPixOpenDatabaseRequestObserver, MCPixSetAnalyzerRequestObserver, MCPixSetQueryParserRequestObserver + */ + +/** * @brief Observes completions of CPixIndexer's asynchronous requests * @ingroup ClientAPI * diff -r 556534771396 -r d4d56f5e7c55 searchsrv_plat/cpix_search_api/inc/cpixcommon.h --- a/searchsrv_plat/cpix_search_api/inc/cpixcommon.h Mon Sep 20 12:35:47 2010 +0530 +++ b/searchsrv_plat/cpix_search_api/inc/cpixcommon.h Tue Oct 05 13:15:12 2010 +0530 @@ -24,6 +24,12 @@ #endif /** + * @file + * @ingroup Qt Search ClientAPI + * @brief Contains constants needed in the API + */ + +/** * Maximum string length. * */ //@TODO:sai: Is this a sane value? diff -r 556534771396 -r d4d56f5e7c55 searchsrv_plat/cpix_search_api/inc/cpixdocument.h --- a/searchsrv_plat/cpix_search_api/inc/cpixdocument.h Mon Sep 20 12:35:47 2010 +0530 +++ b/searchsrv_plat/cpix_search_api/inc/cpixdocument.h Tue Oct 05 13:15:12 2010 +0530 @@ -79,7 +79,7 @@ enum Aggregated { AggregateNo = 1<<30, - AggregateYes = 1<<31, + AggregateYes = (unsigned int)1<<31, AggregateDefault = 0 }; /** diff -r 556534771396 -r d4d56f5e7c55 searchsrv_plat/cpix_utility_api/group/bld.inf --- a/searchsrv_plat/cpix_utility_api/group/bld.inf Mon Sep 20 12:35:47 2010 +0530 +++ b/searchsrv_plat/cpix_utility_api/group/bld.inf Tue Oct 05 13:15:12 2010 +0530 @@ -28,5 +28,8 @@ ../inc/indevicecfg.h MW_LAYER_PLATFORM_EXPORT_PATH(indevicecfg.h) ../inc/messageharvesterdefs.h MW_LAYER_PLATFORM_EXPORT_PATH(messageharvesterdefs.h) ../inc/searchserverdefs.h MW_LAYER_PLATFORM_EXPORT_PATH(searchserverdefs.h) -../inc/cpixcontentinfocommon.h MW_LAYER_PLATFORM_EXPORT_PATH(cpixcontentinfocommon.h) -../inc/cpixwatchdogcommon.h MW_LAYER_PLATFORM_EXPORT_PATH(cpixwatchdogcommon.h) \ No newline at end of file +../inc/cpixwatchdogcommon.h MW_LAYER_PLATFORM_EXPORT_PATH(cpixwatchdogcommon.h) +../inc/cpixcontentinfodbread.h MW_LAYER_PLATFORM_EXPORT_PATH(cpixcontentinfodbread.h) +../inc/cpixcontentinfodbdef.h MW_LAYER_PLATFORM_EXPORT_PATH(cpixcontentinfodbdef.h) +../inc/contentinfodbcommon.h MW_LAYER_PLATFORM_EXPORT_PATH(contentinfodbcommon.h) +../inc/contentinfodbupdate.h MW_LAYER_PLATFORM_EXPORT_PATH(contentinfodbupdate.h) \ No newline at end of file diff -r 556534771396 -r d4d56f5e7c55 searchsrv_plat/cpix_utility_api/inc/contentinfodbcommon.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/searchsrv_plat/cpix_utility_api/inc/contentinfodbcommon.h Tue Oct 05 13:15:12 2010 +0530 @@ -0,0 +1,111 @@ +/* + * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: SQL queries, tagname,macros. + * + */ + +#ifndef CONTENTINFODBCOMMON_H_ +#define CONTENTINFODBCOMMON_H_ + +#ifndef CONTENTINFODB_UNITTESTING +#define CONTENTINFODB_CLASS(aClassName) +#else +#define CONTENTINFODB_CLASS(aClassName) class aClassName; +#endif + +#ifndef CONTENTINFODB_UNITTESTING +#define CONTENTINFODB_FRIEND_CLASS(aClassName) +#else +#define CONTENTINFODB_FRIEND_CLASS(aClassName) friend class aClassName; +#endif + +#ifdef BUILD_CONTENTINFODB +#define DECL_CONTENTINFODB Q_DECL_EXPORT +#else +#define DECL_CONTENTINFODB Q_DECL_IMPORT +#endif + +//sql queries +// sql query to create a master table +#define QUERYCREATEMAINTABLE "create table maintable (name varchar(50) primary key,ins int default '0', bls int default '0',actionuri varchar(20),licon varchar(50),baseapp varchar(50),lname varchar(50),displayorder varchar(10),exceptionstring varchar(50),tsfile varchar(50),fieldmap varchar(20),indexcontentsize varchar(5),relevancy varchar(20),policy varchar(50),resultfirstline varchar(20))" + +// sql query to insert row into the mentioned table +#define QUERYINSERTROW "INSERT INTO %1 (%2) values('%3')" + +//sql query to update the value on mentioned table and field +#define QUERYUPDATEDATA "UPDATE %1 SET %2='%3' WHERE %4='%5'" + +//sql query to create activity uri table +#define QUERYCREATEACTIONURITABLE "create table %1 (uristring varchar(300) primary key,licon varchar(50),lname varchar(50),uriref varchar(20),action varchar(20))" + +//sql query to create field map table +#define QUERYCREATEFIELDMAPTABLE "create table %1 (field varchar(300) primary key,urilist varchar(50))" + +//sql query to create a table for field map values +#define QUERYCREATEFIELDMAPSUBTABLE "create table %1 (auri varchar(20) primary key)" + +//sql query to create a table for firstline information +#define QUERYCREATEFIRSTLINETABLE "create table %1 (field varchar(50) primary key)" + +//sql query to create a table for relevancy information +#define QUERYCREATERELEVANCYTABLE "create table %1 (field varchar(50) primary key,boostvalue varchar(20))" + +#define QUERYDATARETRIVAL "SELECT %1 FROM %2 WHERE %3 ='%4'" + +#define QUERYPRIMARYKEYS "SELECT DISTINCT %1 FROM %2" + +#define QUERYFILTERDATA "SELECT %1 FROM %2 WHERE %3 LIKE '%%4%'" + +#define QUERYSORT "SELECT name FROM maintable ORDER BY displayorder" + +#define QUERYDELETE "DELETE FROM maintable WHERE name ='%1'" + +#define QUERYCOUNT "SELECT COUNT(*) FROM maintable" + +// Database info +// master table name +#define MAINTABLENAME "maintable" + +// connection name +#define CONNECTIONNAME "contentinfodb" + +//database type +#define DATABASETYPE "QSQLITE" + +//path of contentinfo db +#define DBNAME "c:\\private\\2001f6fb\\contentinfo.sq" + +//dynamic table creation +#define DYNAMICTABLE "table%1" + +// xml tag name +#define TAGPRIMARYKEY "name" +#define TAGACTIONURI "actionuri" +#define TAGACTIONURISTRING "uristring" +#define TAGFIELDMAP "fieldmap" +#define TAGRELEVANCY "relevancy" +#define TAGFIELD "field" +#define TAGURILIST "urilist" +#define TAGAURI "auri" +#define TAGRESULTFIRSTLINE "resultfirstline" +#define TAGBOOSTVALUE "boostvalue" +#define TAGACTION "action" +#define TAGLNAME "lname" +#define TAGLICON "licon" +#define TAGURIREF "uriref" + +#define PRIMARYVALUE "primary" +#define SECONDARYVALUE "secondary" + +#endif /* CONTENTINFODBCOMMON_H_ */ diff -r 556534771396 -r d4d56f5e7c55 searchsrv_plat/cpix_utility_api/inc/contentinfodbupdate.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/searchsrv_plat/cpix_utility_api/inc/contentinfodbupdate.h Tue Oct 05 13:15:12 2010 +0530 @@ -0,0 +1,150 @@ +/* + * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: contentinfodb update api. + * + */ +#ifndef CONTENTINFODBUPDATE_H +#define CONTENTINFODBUPDATE_H +#include "contentinfodbcommon.h" +#include +#include +#include + +CONTENTINFODB_CLASS(ContentinfodbTest) + +class ContentInfoDbParser; +class ContentInfoDb; + +class DECL_CONTENTINFODB ContentInfoDbUpdate : public QObject + { +Q_OBJECT +public: + /** + * Constructor. + * @since S60 ?S60_version. + */ + ContentInfoDbUpdate(); + + /** + * Destructor. + * @since S60 ?S60_version. + */ + ~ContentInfoDbUpdate(); + +public: + + /** + * returns success/failure status. + * @since S60 ?S60_version. + * @param xmlpath is the file path + */ + bool UpdateDb(QString xmlpath); + + /** + * returns success/failure status. + * @since S60 ?S60_version. + * @param primarykey + * @param value is the blacklisted status + */ + bool UpdateBlacklisted(QString primarykey, int value); + + /** + * returns success/failure status. + * @since S60 ?S60_version. + * @param primarykey + * @param value is the indexing status + */ + bool UpdateIndexStatus(QString primarykey, int value); + + /** + * deletes the row for the mentioned primarykey + * @since S60 ?S60_version. + * @param primarykey + */ + void deleteCategory(QString primarykey); + +private: + + /** + * funtion to create a row with primary key on mentioned table. + * @param tablename + * @param tagname + * @param data will have mapped data of tagname and value + */ + QString InsertPrimaryKey(QString tableName, QString tagName, QMap< + QString, QString> data); + +public slots: + + /** + * slot to update the category details to db. + * @param map will have mapped data of tagname and value + */ + void slotupdateCategoryInfo(QMap ); + + /** + * slot to update the activity uri details to db. + * @param map will have mapped data of tagname and value + */ + void slotupdateUri(QMap ); + + /** + * slot to update the fieldmapping details to db. + * @param string will be having name of the field + * @param list will be having the uri reference number list + */ + void slotupdateFieldmapping(QString, QStringList); + + /** + * slot to update the first line details to db. + * @param list will be having the field name as values + */ + void slotfirstLineMapping(QStringList); + + /** + * slot to update the relevancy details to db. + * @param string as field name + * @param string as boostfactor + */ + void slotrelevancyMapping(QString, QString); + +private: + + /** + * parser handler + * Own. + */ + ContentInfoDbParser* iParser; + + /** + * handler to manage database operations + * Own. + */ + ContentInfoDb* mdb; + + /** + * not to create a repeated table names for dynamic table creation + * Own. + */ + int counter; + + /** + * primary key + * Own. + */ + QString primarykey; +private: + CONTENTINFODB_FRIEND_CLASS(ContentinfodbTest) + }; +#endif //CONTENTINFODBUPDATE_H diff -r 556534771396 -r d4d56f5e7c55 searchsrv_plat/cpix_utility_api/inc/cpixcontentinfocommon.h --- a/searchsrv_plat/cpix_utility_api/inc/cpixcontentinfocommon.h Mon Sep 20 12:35:47 2010 +0530 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,44 +0,0 @@ -/* -* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: This component is to store the details of harvester plugins -* -*/ - -#ifndef CPIXCONTENTINFOCOMMON_H_ -#define CPIXCONTENTINFOCOMMON_H_ - -//ContentInfo DB path -_LIT( KCIDBPath , "c:\\Private\\2001f6fb" ); -//Content Info DB filename -_LIT(KContentInfoFileName,"cpixcontentinfo.sq"); - -//Table name in ContentInfo database -_LIT( KContentInfoTableName , "table1" ); - -//Max length for plugin display name -const TInt KMaxPluginNameLength(20); - -//column name for content name column -_LIT( KContentName , "NAME" ); - -//column name for Indexing status column -_LIT( KIndexingStatus , "INS" ); - -//column name for Blacklist status column -_LIT( KBlacklistStatus , "BLS" ); - -//Primary key -_LIT( KPrimaryKey , "NAME" ); - -#endif /* CPIXCONTENTINFOCOMMON_H_ */ diff -r 556534771396 -r d4d56f5e7c55 searchsrv_plat/cpix_utility_api/inc/cpixcontentinfodbdef.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/searchsrv_plat/cpix_utility_api/inc/cpixcontentinfodbdef.h Tue Oct 05 13:15:12 2010 +0530 @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: contentinfodb defintions and macros. + * + */ +/** + * @file + * @ingroup contentinfodb read api's + * @brief Contains constants used in ContentInfoDbRead functions + */ + +#define INDEXINGSTATUS "ins" // indexing status + +#define BLACKLISTSTATUS "bls" //blacklisted status + +#define ACTIONURI "actionuri" //action uri's + +#define DISPLAYICON "licon" // icon representing category + +#define DISPLAYNAME "lname" // localised string representing category + +#define EXPECTIONID "expectionstring" // expection string to be filled if first row of search result item is empty + +#define DISPLAYORDER "displayorder" // to set the display order in delimeter screen on search application + +#define TRANSLATION "tsfile" // translation file for particular category + +#define BASEAPP "baseapp" // value used to open the search handler + +#define INDEXCONTENTSIZE "indexcontentsize" // indexing size diff -r 556534771396 -r d4d56f5e7c55 searchsrv_plat/cpix_utility_api/inc/cpixcontentinfodbread.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/searchsrv_plat/cpix_utility_api/inc/cpixcontentinfodbread.h Tue Oct 05 13:15:12 2010 +0530 @@ -0,0 +1,102 @@ +/* + * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: contentinfodb read api. + * + */ + +#ifndef CONTENTINFODBREAD_H +#define CONTENTINFODBREAD_H + +/** + * @file + * @ingroup contentinfodb read api's + * @brief Contains ContentInfoDbRead used for reading the DB + */ + +#include + +#ifdef BUILD_CONTENTINFODB +#define DECL_CONTENTINFODB Q_DECL_EXPORT +#else +#define DECL_CONTENTINFODB Q_DECL_IMPORT +#endif + +class ContentInfoDbReadPrivate; + +class DECL_CONTENTINFODB ContentInfoDbRead : public QObject + { +Q_OBJECT +public: + + /** + * Constructor. + * @since S60 ?S60_version. + */ + ContentInfoDbRead(); + + /** + * Destructor. + * @since S60 ?S60_version. + */ + ~ContentInfoDbRead(); + +public: + + /** + * returns primary keys alias category names + */ + QStringList getPrimaryKeys(); + + /** + * return db value for the mentioned key and fieldname + */ + QString getValues(QString Key, QString columnname); + + /** + * returns the list of activity uris for the mentioned category + */ + QStringList getActionuri(QString Key); + + /** + * returns primary activityuri + */ + QString getShortTaburi(QString Key); + + /** + * returns list of uri's mapped for particular field + */ + QStringList getLongTaburi(QString Key, QString FieldName); + + /** + * returns the logical name/icon for a particular uri + */ + bool geturiDetails(QString key, QString uri, QString& iconname, + QString& displayname); + + /** + * returns total number of categories available in contentinfoDb + */ + int categoryCount(); + +signals: + /* + * signal to get notificcation when db gets updated + */ + void dataChanged(); +private: + ContentInfoDbReadPrivate* const iPvtImpl; + Q_DECLARE_PRIVATE_D( iPvtImpl, ContentInfoDbRead ) + }; + +#endif //CONTENTINFODBREAD_H diff -r 556534771396 -r d4d56f5e7c55 searchsrv_plat/cpix_utility_api/inc/cpixmaindefs.h --- a/searchsrv_plat/cpix_utility_api/inc/cpixmaindefs.h Mon Sep 20 12:35:47 2010 +0530 +++ b/searchsrv_plat/cpix_utility_api/inc/cpixmaindefs.h Tue Oct 05 13:15:12 2010 +0530 @@ -18,6 +18,11 @@ #ifndef __CPIXMAINDEFS_H__ #define __CPIXMAINDEFS_H__ +/** + * @file + * @ingroup Common + * @brief Provides main definitions. + */ // // TODO LIST diff -r 556534771396 -r d4d56f5e7c55 searchsrv_plat/cpix_utility_api/inc/cpixwatchdogcommon.h --- a/searchsrv_plat/cpix_utility_api/inc/cpixwatchdogcommon.h Mon Sep 20 12:35:47 2010 +0530 +++ b/searchsrv_plat/cpix_utility_api/inc/cpixwatchdogcommon.h Tue Oct 05 13:15:12 2010 +0530 @@ -14,6 +14,12 @@ * Description: * */ +/** + * @file + * @ingroup Common + * @brief Provides watchdog common definitions which mentions the keys used for configured harvester and search servers. + * The central repository key for search UI application is also covered here. + */ #ifndef CPIXWATCHDOGCOMMON_H_ #define CPIXWATCHDOGCOMMON_H_ diff -r 556534771396 -r d4d56f5e7c55 searchsrv_plat/cpix_utility_api/inc/fileharvesterdefs.h --- a/searchsrv_plat/cpix_utility_api/inc/fileharvesterdefs.h Mon Sep 20 12:35:47 2010 +0530 +++ b/searchsrv_plat/cpix_utility_api/inc/fileharvesterdefs.h Tue Oct 05 13:15:12 2010 +0530 @@ -18,6 +18,11 @@ #ifndef __FILEHARVESTERDEFS_H__ #define __FILEHARVESTERDEFS_H__ +/** + * @file + * @ingroup Common + * @brief File harvester definitions + */ //***** FILE ***** diff -r 556534771396 -r d4d56f5e7c55 searchsrv_plat/cpix_utility_api/inc/indevicecfg.h --- a/searchsrv_plat/cpix_utility_api/inc/indevicecfg.h Mon Sep 20 12:35:47 2010 +0530 +++ b/searchsrv_plat/cpix_utility_api/inc/indevicecfg.h Tue Oct 05 13:15:12 2010 +0530 @@ -18,6 +18,13 @@ #ifndef __INDEVICECFG_H__ #define __INDEVICECFG_H__ + +/** + * @file + * @ingroup Common + * @brief Common definition of necessary include files. + */ + #include "cpixmaindefs.h" #include "fileharvesterdefs.h" #include "messageharvesterdefs.h" diff -r 556534771396 -r d4d56f5e7c55 searchsrv_plat/cpix_utility_api/inc/messageharvesterdefs.h --- a/searchsrv_plat/cpix_utility_api/inc/messageharvesterdefs.h Mon Sep 20 12:35:47 2010 +0530 +++ b/searchsrv_plat/cpix_utility_api/inc/messageharvesterdefs.h Tue Oct 05 13:15:12 2010 +0530 @@ -18,6 +18,14 @@ #ifndef __MESSAGEHARVESTERDEFS_H__ #define __MESSAGEHARVESTERDEFS_H__ + +/** + * @file + * @ingroup Common + * @brief Message harvester definitions + */ + + // ***** MESSAGING ***** #define SMS_QBASEAPPCLASS "@0:root msg phone sms" diff -r 556534771396 -r d4d56f5e7c55 searchsrv_plat/cpix_utility_api/inc/searchserverdefs.h --- a/searchsrv_plat/cpix_utility_api/inc/searchserverdefs.h Mon Sep 20 12:35:47 2010 +0530 +++ b/searchsrv_plat/cpix_utility_api/inc/searchserverdefs.h Tue Oct 05 13:15:12 2010 +0530 @@ -19,6 +19,12 @@ #define __SEARCHSERVERDEFS_H__ /** + * @file + * @ingroup Common + * @brief Provides Search server definitions + */ + +/** * Does Search Server store log player data * Default location is C:\logs\CPix\LogPlayer\LogPlayer.txt */ diff -r 556534771396 -r d4d56f5e7c55 tsrc/cpixmwtester/EABI/cpixmwtesteru.def --- a/tsrc/cpixmwtester/EABI/cpixmwtesteru.def Mon Sep 20 12:35:47 2010 +0530 +++ b/tsrc/cpixmwtester/EABI/cpixmwtesteru.def Tue Oct 05 13:15:12 2010 +0530 @@ -4,10 +4,4 @@ _ZTI13CBlacklistMgr @ 3 NONAME _ZTV12CBlacklistDb @ 4 NONAME _ZTV13CBlacklistMgr @ 5 NONAME - _ZTI12CContentInfo @ 6 NONAME - _ZTI14CContentInfoDb @ 7 NONAME - _ZTI15CContentInfoMgr @ 8 NONAME - _ZTV12CContentInfo @ 9 NONAME - _ZTV14CContentInfoDb @ 10 NONAME - _ZTV15CContentInfoMgr @ 11 NONAME diff -r 556534771396 -r d4d56f5e7c55 tsrc/cpixmwtester/group/cpixmwtester.mmp --- a/tsrc/cpixmwtester/group/cpixmwtester.mmp Mon Sep 20 12:35:47 2010 +0530 +++ b/tsrc/cpixmwtester/group/cpixmwtester.mmp Tue Oct 05 13:15:12 2010 +0530 @@ -91,7 +91,6 @@ SOURCEPATH ../../../harvester/harvesterserver/src SOURCE CBlacklistDb.cpp CBlacklistMgr.cpp -SOURCE ccontentinfo.cpp ccontentinfodb.cpp contentinfomgr.cpp LIBRARY sqldb.lib //------------------End for Blacklist database ---------------------------- EPOCALLOWDLLDATA diff -r 556534771396 -r d4d56f5e7c55 tsrc/cpixmwtester/src/cpixmwtesterblocks.cpp --- a/tsrc/cpixmwtester/src/cpixmwtesterblocks.cpp Mon Sep 20 12:35:47 2010 +0530 +++ b/tsrc/cpixmwtester/src/cpixmwtesterblocks.cpp Tue Oct 05 13:15:12 2010 +0530 @@ -24,8 +24,8 @@ #include #include #include "CBlacklistMgr.h" -#include "contentinfomgr.h" -#include "ccontentinfo.h" +//#include "contentinfomgr.h" +//#include "ccontentinfo.h" // EXTERNAL DATA STRUCTURES //extern ?external_data; @@ -273,7 +273,7 @@ // TInt CCPixMWTester::TestDeleteContentInfoDBL( CStifItemParser& /*aItem*/) { - RFs fssession; + /*RFs fssession; CContentInfoMgr* contentInfoMgr = NULL; User::LeaveIfError( fssession.Connect() ); TFileName privatePath; @@ -288,7 +288,8 @@ TRAPD ( err , contentInfoMgr = CContentInfoMgr::NewL() ); delete contentInfoMgr; doLog( iLog, err, KNoErrorString ); - return err; + return err;*/ + return KErrNone; } // ----------------------------------------------------------------------------- // CCPixMWTester::TestAddContentL @@ -296,7 +297,7 @@ // TInt CCPixMWTester::TestAddContentL( CStifItemParser& aItem) { - RFs fssession; + /*RFs fssession; TPtrC content; TInt err = KErrNone; aItem.GetNextString( content ); @@ -315,7 +316,8 @@ delete contentInfoMgr; if ( !found ) err = KErrNotFound; doLog( iLog, err, KNoErrorString ); - return err; + return err;*/ + return KErrNone; } // ----------------------------------------------------------------------------- // CCPixMWTester::TestRemoveContentL @@ -323,7 +325,7 @@ // TInt CCPixMWTester::TestRemoveContentL( CStifItemParser& aItem) { - RFs fssession; + /*RFs fssession; TPtrC content; TInt err = KErrNotFound; aItem.GetNextString( content ); @@ -347,7 +349,8 @@ } delete contentInfoMgr; doLog( iLog, err, KNoErrorString ); - return err; + return err;*/ + return KErrNone; } // ----------------------------------------------------------------------------- // CCPixMWTester::TestResetContentL @@ -355,7 +358,7 @@ // TInt CCPixMWTester::TestResetContentL( CStifItemParser& aItem) { - RFs fssession; + /*RFs fssession; TPtrC content; TInt err = KErrNotFound; aItem.GetNextString( content ); @@ -378,7 +381,8 @@ } delete contentInfoMgr; doLog( iLog, err, KNoErrorString ); - return err; + return err;*/ + return KErrNone; } // ----------------------------------------------------------------------------- // CCPixMWTester::TestUpdateBLStatusL @@ -386,7 +390,7 @@ // TInt CCPixMWTester::TestUpdateBLStatusL( CStifItemParser& aItem) { - RFs fssession; + /*RFs fssession; TPtrC content; TInt err = KErrNotFound; aItem.GetNextString( content ); @@ -406,7 +410,8 @@ if ( blstatus ) err = KErrNone; delete contentInfoMgr; doLog( iLog, err, KNoErrorString ); - return err; + return err;*/ + return KErrNone; } // ----------------------------------------------------------------------------- @@ -415,7 +420,7 @@ // TInt CCPixMWTester::TestUpdateINStatusL( CStifItemParser& aItem) { - RFs fssession; + /*RFs fssession; TPtrC content; TInt err = KErrNotFound; aItem.GetNextString( content ); @@ -435,7 +440,8 @@ if ( !blstatus ) err = KErrNone; delete contentInfoMgr; doLog( iLog, err, KNoErrorString ); - return err; + return err;*/ + return KErrNone; } // ----------------------------------------------------------------------------- diff -r 556534771396 -r d4d56f5e7c55 watchdog/group/bld.inf --- a/watchdog/group/bld.inf Mon Sep 20 12:35:47 2010 +0530 +++ b/watchdog/group/bld.inf Tue Oct 05 13:15:12 2010 +0530 @@ -23,5 +23,5 @@ WatchDog.mmp PRJ_EXPORTS -../cenrep/20029AB8.cre /epoc32/winscw/c/private/10202be9/20029AB8.cre -../cenrep/20029AB8.cre /epoc32/data/z/private/10202be9/20029AB8.cre +../cenrep/20029AB8.txt /epoc32/winscw/c/private/10202be9/20029AB8.txt +../cenrep/20029AB8.txt /epoc32/data/z/private/10202be9/20029AB8.txt diff -r 556534771396 -r d4d56f5e7c55 watchdog/group/watchdog.mmp --- a/watchdog/group/watchdog.mmp Mon Sep 20 12:35:47 2010 +0530 +++ b/watchdog/group/watchdog.mmp Tue Oct 05 13:15:12 2010 +0530 @@ -31,6 +31,7 @@ SOURCEPATH ../src SOURCE WatchDog.cpp CWDMonitor.cpp CWDTimer.cpp centrepmonitor.cpp +SOURCE servermonitor.cpp LIBRARY euser.lib LIBRARY centralrepository.lib diff -r 556534771396 -r d4d56f5e7c55 watchdog/inc/cwdmonitor.h --- a/watchdog/inc/cwdmonitor.h Mon Sep 20 12:35:47 2010 +0530 +++ b/watchdog/inc/cwdmonitor.h Tue Oct 05 13:15:12 2010 +0530 @@ -26,6 +26,7 @@ //Forward declaration class CWDTimer; class CentrepMonitor; +class CServerMonitor; class CWDMonitor : public CBase , public MWDTimerHandler, public MCentrepHandler { @@ -57,24 +58,7 @@ //From MCentrepHandler void HandlecentrepL( TUint32 aKey ); -private: - /* - * @description Starts the specified server. - * @param TDesC& aServerName Name of the server to start - * @param TUid aServerUid uid of the server to start - * @param TDesC& aSemaphoreName Name of the semaphore - * @return KErrNone on succesful operation. - */ - TInt StartServer( const TDesC& aServerName , TUid aServerUid , - const TDesC& aSemaphoreName); - - /* - * @description creates the specified server process. - * @param TDesC& aServerName Name of the server to start - * @param TUid aServerUid uid of the server to start - * @return KErrNone on succesful operation. - */ - TInt CreateServerProcess( const TDesC& aServerName , TUid aServerUid ); +private: /* * Constructor */ @@ -94,9 +78,22 @@ TUid iSSUid; HBufC* iHSName; HBufC* iSSName; - - CentrepMonitor* aHSMonitor; - CentrepMonitor* aSSMonitor; + /* Monitor to watch the centrep values of Harvester server status.owned*/ + CentrepMonitor* aHSStatusMonitor; + /* Monitor to watch the centrep values of Search server status.owned*/ + CentrepMonitor* aSSStatusMonitor; + /* Monitor to watch the centrep values of Harvester server Uid.owned*/ + CentrepMonitor* aHSUidMonitor; + /* Monitor to watch the centrep values of Search server Uid.owned*/ + CentrepMonitor* aSSUidMonitor; + /* Monitor to watch the centrep values of Harvester server Name.owned*/ + CentrepMonitor* aHSNameMonitor; + /* Monitor to watch the centrep values of Search server Name.owned*/ + CentrepMonitor* aSSNameMonitor; + /* Monitor to watch the existance of the Harvester server.owned*/ + CServerMonitor* iHarvesterMonitor; + /* Monitor to watch the existance of the Search server.owned*/ + CServerMonitor* iSearchMonitor; }; #endif /* CWDMONITOR_H */ diff -r 556534771396 -r d4d56f5e7c55 watchdog/inc/servermonitor.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/watchdog/inc/servermonitor.h Tue Oct 05 13:15:12 2010 +0530 @@ -0,0 +1,69 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Monitoring application for servers restarting & IAD +* +*/ + +#ifndef SERVERMONITOR_H +#define SERVERMONITOR_H + +#include + +class CServerMonitor : public CActive + { + public: + + enum TServerState + { + EIdle, + EWaitingRendezvous, + ERunning + }; + + static CServerMonitor* NewL( TDesC& aServerName , TUid aServerUid ); + virtual ~CServerMonitor(); + + // from base class CActive + void RunL(); + TInt RunError( TInt aError ); + void DoCancel(); + + void ShutdownServer(); + + private: + + CServerMonitor(); + + void ConstructL( TDesC& aServerName , TUid aServerUid ); + + void StartL(); + + void StartServerProcessL(); + + void CreateServerProcess(); + + private: // data + + TServerState iState; + + RProcess iProcess; + + HBufC* iServerName; + + TUid iServerUid; + + }; + + +#endif //SERVERMONITOR_H diff -r 556534771396 -r d4d56f5e7c55 watchdog/inc/watchdogcommon.h --- a/watchdog/inc/watchdogcommon.h Mon Sep 20 12:35:47 2010 +0530 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,40 +0,0 @@ -/* -* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef WATCHDOGCOMMON_H -#define WATCHDOGCOMMON_H - -// INCLUDE FILES -#include - -#define MONITORING_DELAY 60000000 // Nano seconds to delay the monitored object - -// CONSTANTS -_LIT(KHarvesterServer,"CPixHarvesterServer"); -_LIT(KSearchServer,"CPixSearchServer"); -_LIT( KSearchServerSemaphoreName, "CPixSearchServerSemaphore" ); -_LIT( KHarvesterServerSemaphoreName, "CPixHarvesterServerSemaphore" ); - -const TUid KHServerUid3 = { 0x2001F6FB }; -const TUid KSServerUid3 = { 0x2001F6F7 }; - -// DATA TYPES - - -#endif // WATCHDOGCOMMON_H -// End of file diff -r 556534771396 -r d4d56f5e7c55 watchdog/src/centrepmonitor.cpp --- a/watchdog/src/centrepmonitor.cpp Mon Sep 20 12:35:47 2010 +0530 +++ b/watchdog/src/centrepmonitor.cpp Tue Oct 05 13:15:12 2010 +0530 @@ -17,7 +17,6 @@ // Include Files -#include "WatchDogCommon.h" #include "centrepmonitor.h" #include #include diff -r 556534771396 -r d4d56f5e7c55 watchdog/src/cwdmonitor.cpp --- a/watchdog/src/cwdmonitor.cpp Mon Sep 20 12:35:47 2010 +0530 +++ b/watchdog/src/cwdmonitor.cpp Tue Oct 05 13:15:12 2010 +0530 @@ -16,12 +16,12 @@ */ #include "CWDmonitor.h" -#include "WatchDogCommon.h" #include "CWDTimer.h" #include #include #include #include "centrepmonitor.h" +#include "servermonitor.h" #include "OstTraceDefinitions.h" #ifdef OST_TRACE_COMPILER_IN_USE #include "cwdmonitorTraces.h" @@ -58,6 +58,14 @@ delete iHSName; delete iSSName; delete iWDTimer; + delete aHSStatusMonitor; + delete aSSStatusMonitor; + delete aHSUidMonitor; + delete aSSUidMonitor; + delete aHSNameMonitor; + delete aSSNameMonitor; + delete iHarvesterMonitor; + delete iSearchMonitor; } // ----------------------------------------------------------------------------- @@ -115,10 +123,19 @@ if ( iAllowHS || iAllowSS ) iWDTimer = CWDTimer::NewL( this ); - aHSMonitor = CentrepMonitor::NewL( this, KHarvesterServerKey); - aHSMonitor->StartNotifier(); - aSSMonitor = CentrepMonitor::NewL( this, KSearchServerKey); - aSSMonitor->StartNotifier(); + aHSStatusMonitor = CentrepMonitor::NewL( this, KHarvesterServerKey); + aHSStatusMonitor->StartNotifier(); + aSSStatusMonitor = CentrepMonitor::NewL( this, KSearchServerKey); + aSSStatusMonitor->StartNotifier(); + aHSUidMonitor = CentrepMonitor::NewL( this, KHarvesterServerUIDKey); + aHSUidMonitor->StartNotifier(); + aSSUidMonitor = CentrepMonitor::NewL( this, KSearchServerUIDKey); + aSSUidMonitor->StartNotifier(); + aHSNameMonitor = CentrepMonitor::NewL( this, KHarvesterServerNAMEKey); + aHSNameMonitor->StartNotifier(); + aSSNameMonitor = CentrepMonitor::NewL( this, KSearchServerNAMEKey); + aSSNameMonitor->StartNotifier(); + } // ----------------------------------------------------------------------------- @@ -129,27 +146,16 @@ { OstTrace0( TRACE_NORMAL, CWDMONITOR_HANDLEWDTIMERL, "CWDMonitor::HandleWDTimerL(): Check the servers" ); CPIXLOGSTRING("CWDMonitor::HandleWDTimerL(): Check the servers"); - TFindServer harvesterServer(*iHSName); - TFindServer searchServer(*iSSName); - - TFullName name; - - if ( iAllowHS && (harvesterServer.Next(name) != KErrNone) ) + + if ( !iHarvesterMonitor ) { - OstTrace0( TRACE_NORMAL, DUP1_CWDMONITOR_HANDLEWDTIMERL, "Harvester Server is down, Starting Harvester Server" ); - CPIXLOGSTRING("Harvester Server is down, Starting Harvester Server"); - //Harvester server is not running. - //Start Harvester server - StartServer( *iHSName , iHSUid ,KHarvesterServerSemaphoreName); + if ( iAllowHS ) + iHarvesterMonitor = CServerMonitor::NewL( *iHSName , iHSUid ); + iWDTimer->StartWDTimer(); + return; } - else if ( iAllowSS && (searchServer.Next( name ) != KErrNone) ) - { - OstTrace0( TRACE_NORMAL, DUP2_CWDMONITOR_HANDLEWDTIMERL, "Search Server is down, Starting Search Server" ); - CPIXLOGSTRING("Search Server is down, Starting Search Server"); - //Search server is not running. - //Start search server - StartServer( *iSSName , iSSUid ,KSearchServerSemaphoreName); - } + if ( iAllowSS ) + iSearchMonitor = CServerMonitor::NewL( *iSSName , iSSUid ); return; } // ----------------------------------------------------------------------------- @@ -163,55 +169,6 @@ iWDTimer->StartWDTimer(); OstTraceFunctionExit0( CWDMONITOR_STARTMONITOR_EXIT ); } - -// ----------------------------------------------------------------------------- -// CWDMonitor::StartServer() -// ----------------------------------------------------------------------------- -// -TInt CWDMonitor::StartServer( const TDesC& aServerName , TUid aServerUid , - const TDesC& aSemaphoreName) - { - RSemaphore semaphore; - TInt result = semaphore.CreateGlobal(aSemaphoreName, 0); - if (result != KErrNone) - { - return result; - } - - result = CreateServerProcess( aServerName , aServerUid); - if (result != KErrNone) - { - return result; - } - - semaphore.Wait(); - semaphore.Close(); - return result; - } - -// ----------------------------------------------------------------------------- -// CWDMonitor::CreateServerProcess() -// ----------------------------------------------------------------------------- -// -TInt CWDMonitor::CreateServerProcess( const TDesC& aServerName , TUid aServerUid ) - { - TInt result; - - const TUidType serverUid( KNullUid, KNullUid, aServerUid); - - RProcess server; - - result = server.Create(aServerName, KNullDesC, serverUid); - if (result != KErrNone) - { - return result; - } - - server.Resume(); - server.Close(); - return KErrNone; - } - // ----------------------------------------------------------------------------- // CWDMonitor::HandlecentrepL() // ----------------------------------------------------------------------------- @@ -222,12 +179,109 @@ if ( KHarvesterServerKey == aKey ) { // get the harvester server status - wdrepo->Get( KHarvesterServerKey , iAllowHS ); + wdrepo->Get( KHarvesterServerKey , iAllowHS ); + + if ( iAllowHS ) + { + //start the Harvester server and start monitoring + iHarvesterMonitor = CServerMonitor::NewL( *iHSName , iHSUid ); + } + else{ + // Shutdown the harvester server + iHarvesterMonitor->Cancel(); + iHarvesterMonitor->ShutdownServer(); + delete iHarvesterMonitor; + iHarvesterMonitor = NULL; + } } else if ( KSearchServerKey == aKey ) { // get the Search server status - wdrepo->Get( KSearchServerKey , iAllowSS ); + wdrepo->Get( KSearchServerKey , iAllowSS ); + + if ( iAllowSS ) + { + //Start the Search server and start monitoring + iSearchMonitor = CServerMonitor::NewL( *iSSName , iSSUid ); + } + else + { + //Shutdown the searchserver + iSearchMonitor->Cancel(); + iSearchMonitor->ShutdownServer(); + delete iSearchMonitor; + iSearchMonitor = NULL; + } + } + else if ( (KHarvesterServerUIDKey == aKey)||( KHarvesterServerNAMEKey == aKey ) ) + { + // Shutdown the existing server + iHarvesterMonitor->Cancel(); + iHarvesterMonitor->ShutdownServer(); + delete iHarvesterMonitor; + iHarvesterMonitor = NULL; + //read the new values + TBuf temp; + TInt64 value; + TLex uidvalue; + if ( KHarvesterServerUIDKey == aKey ) + { + //Read Harvester server UId value + if ( KErrNone == wdrepo->Get( KHarvesterServerUIDKey, temp ) ) + { + uidvalue.Assign(temp); + if (KErrNone == uidvalue.Val( value,EHex )) + iHSUid.iUid = value; + } + } + else + { + //read harvester server name + delete iHSName; + if ( KErrNone == wdrepo->Get( KHarvesterServerNAMEKey, temp )) + { + iHSName = HBufC::NewL( temp.Length() ); + TPtr hsname = iHSName->Des(); + hsname.Copy( temp ); + } + } + // Start the server with new values + iHarvesterMonitor = CServerMonitor::NewL( *iHSName , iHSUid ); + } + else if ( (KSearchServerUIDKey == aKey)||( KSearchServerNAMEKey == aKey ) ) + { + // Shutdown the existing server + iSearchMonitor->Cancel(); + iSearchMonitor->ShutdownServer(); + delete iSearchMonitor; + iSearchMonitor = NULL; + //read the new values + TBuf temp; + TInt64 value; + TLex uidvalue; + if ( KSearchServerUIDKey == aKey ) + { + //read search server uid + if ( KErrNone == wdrepo->Get( KSearchServerUIDKey, temp ) ) + { + uidvalue.Assign(temp); + if (KErrNone == uidvalue.Val( value,EHex )) + iSSUid.iUid = value; + } + } + else + { + //read search server name + delete iSSName; + if ( KErrNone == wdrepo->Get( KSearchServerNAMEKey, temp )) + { + iSSName = HBufC::NewL( temp.Length() ); + TPtr ssname = iSSName->Des(); + ssname.Copy( temp ); + } + } + // Start the server with new values + iSearchMonitor = CServerMonitor::NewL( *iSSName , iSSUid ); } delete wdrepo; } diff -r 556534771396 -r d4d56f5e7c55 watchdog/src/cwdtimer.cpp --- a/watchdog/src/cwdtimer.cpp Mon Sep 20 12:35:47 2010 +0530 +++ b/watchdog/src/cwdtimer.cpp Tue Oct 05 13:15:12 2010 +0530 @@ -17,7 +17,6 @@ #include "CWDTimer.h" -#include "WatchDogCommon.h" #include "MWDTimerHandler.h" #include #include "OstTraceDefinitions.h" @@ -25,6 +24,7 @@ #include "cwdtimerTraces.h" #endif +#define MONITORING_DELAY 60000000 // Nano seconds to delay the monitored object // ----------------------------------------------------------------------------- // CWDTimer::NewL // ----------------------------------------------------------------------------- @@ -101,14 +101,11 @@ if( iStatus.Int() == KErrNone ) { TInt err = KErrNone; - TRAP ( err , iWDTimerHandler->HandleWDTimerL() ); - if ( err == KErrNone) - { - //start the timer - iTimer.After( iStatus , MONITORING_DELAY ); // Wait 60 seconds before checking the servers - SetActive(); - } + TRAP ( err , iWDTimerHandler->HandleWDTimerL() ); } + // clean the timer + Cancel(); + iTimer.Close(); } // ----------------------------------------------------------------------------- diff -r 556534771396 -r d4d56f5e7c55 watchdog/src/servermonitor.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/watchdog/src/servermonitor.cpp Tue Oct 05 13:15:12 2010 +0530 @@ -0,0 +1,294 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Monitoring application for servers restarting & IAD +* +*/ + + +#include "servermonitor.h" + +_LIT(KStar , "*"); +_LIT(KExtension, ".exe"); +_LIT(KSemaphore, "Semaphore"); + +// ======== MEMBER FUNCTIONS ======== +// --------------------------------------------------------------------------- +// Constructor. +// --------------------------------------------------------------------------- +// +CServerMonitor* CServerMonitor::NewL( TDesC& aServerName , TUid aServerUid ) + { + CServerMonitor* self = new ( ELeave ) CServerMonitor(); + CleanupStack::PushL( self ); + self->ConstructL( aServerName , aServerUid ); + CleanupStack::Pop( self ); + + return self; + } + +// --------------------------------------------------------------------------- +// C++ constructor. +// --------------------------------------------------------------------------- +// +CServerMonitor::CServerMonitor() : + CActive( CActive::EPriorityStandard ), iState(EIdle) + { + // Add to active scheduler. + CActiveScheduler::Add( this ); + } + +// --------------------------------------------------------------------------- +// 2nd phase constructor. +// --------------------------------------------------------------------------- +// +void CServerMonitor::ConstructL( TDesC& aServerName , TUid aServerUid ) + { + + TFullName name; + //Update the member variables + iServerName = HBufC::NewL( aServerName.Length() ); + TPtr servernameptr = iServerName->Des(); + servernameptr.Copy( aServerName ); + + iServerUid.iUid = aServerUid.iUid; + // find Harvester Server + // Append * to the server name for the findprocess + HBufC* servername = HBufC::NewL( iServerName->Length() + 1 ); + TPtr nameptr = servername->Des(); + nameptr.Copy( aServerName ); + nameptr.Append( KStar ); + + TFindProcess findProcess( *servername ); + if ( findProcess.Next(name) == KErrNone ) + { + User::LeaveIfError( iProcess.Open(name) ); + iState = ERunning; + // logon to get termination signal + iProcess.Logon(iStatus); + SetActive(); + } + else + { + // start new Harvester + StartL(); + } + + delete servername; + + } + +void CServerMonitor::StartL() + { + + // Double check that harvester server is not already running + TFullName name; + TInt res( KErrNone ); + // Append * to the server name for the findprocess + HBufC* servername = HBufC::NewL( iServerName->Length() + 1 ); + TPtr servernameptr = servername->Des(); + servernameptr.Copy( *iServerName ); + servernameptr.Append( KStar ); + // find really Harvester Server, using TFindServer to avoid logon a dead process + TFindServer findServer( *servername ); + + if ( findServer.Next(name) == KErrNone ) + { + TFindProcess findProcess( *servername ); + if ( findProcess.Next(name) == KErrNone ) + { + iProcess.Close(); + res = iProcess.Open(name); + if ( res != KErrNone ) + { + delete servername; + return; + } + iState = EWaitingRendezvous; + SetActive(); + delete servername; + return; + } + } + + // close the panic process + TFindProcess findProcess( *servername ); + if ( findProcess.Next(name) == KErrNone ) + { + iProcess.Close(); + } + delete servername; + servername = NULL; + // Create the server process + StartServerProcessL(); + } + +// --------------------------------------------------------------------------- +// Destructor +// --------------------------------------------------------------------------- +// +CServerMonitor::~CServerMonitor() + { + delete iServerName; + Cancel(); + } + +// --------------------------------------------------------------------------- +// Active object's request handling. +// --------------------------------------------------------------------------- +// +void CServerMonitor::RunL() + { + switch (iState) + { + case EIdle: + { + break; + } + + case EWaitingRendezvous: + { + iState = ERunning; + // logon to get termination signal + TRAPD(err,iProcess.Logon(iStatus)); + if ( err == KErrNone ) + SetActive(); + break; + } + + case ERunning: + { + // server died unexpectedly, start it + StartL(); + break; + } + default: + break; + + } + + } + +// --------------------------------------------------------------------------- +// Active object's request error handling. +// --------------------------------------------------------------------------- +// +TInt CServerMonitor::RunError( TInt /*aError*/ ) + { + return KErrNone; + } + +// --------------------------------------------------------------------------- +// Cancel the request. +// --------------------------------------------------------------------------- +// +void CServerMonitor::DoCancel() + { + iProcess.LogonCancel(iStatus); + iProcess.Close(); + } + +// --------------------------------------------------------------------------- +// StartServerProcess +// --------------------------------------------------------------------------- +// +void CServerMonitor::StartServerProcessL() + { + RSemaphore semaphore; + HBufC* semaphorename = HBufC::NewL( iServerName->Length() + 10 ); + TPtr semptr = semaphorename->Des(); + semptr.Copy( *iServerName ); + semptr.Append( KSemaphore ); + + TInt result = semaphore.CreateGlobal( *semaphorename, 0 ); + if (result != KErrNone) + { + delete semaphorename; + return ; + } + + TRAP(result, CreateServerProcess()); + if (result != KErrNone) + { + return ; + } + + semaphore.Wait(); + semaphore.Close(); + delete semaphorename; + return ; + } + +// --------------------------------------------------------------------------- +// CreateServerProcess +// --------------------------------------------------------------------------- +// +void CServerMonitor::CreateServerProcess() + { + TInt result; + + const TUidType serverUid( KNullUid, KNullUid, iServerUid); + + HBufC* servernameext = HBufC::NewL( iServerName->Length() + 4 ); + TPtr ptr = servernameext->Des(); + ptr.Copy( *iServerName ); + ptr.Append( KExtension ); + //result = iProcess.Create( *iServerName, KNullDesC, serverUid); + result = iProcess.Create( *iServerName, KNullDesC); + if (result != KErrNone) + { + delete servernameext; + return ; + } + + + // start process and wait until it is constructed + iProcess.Rendezvous(iStatus); + + if( iStatus != KRequestPending ) + { + iProcess.Kill( 0 ); // abort startup + } + else + { + iProcess.Resume(); // logon OK - start the server + iState = EWaitingRendezvous; + SetActive(); + + } + delete servernameext; + return ; + } + +// --------------------------------------------------------------------------- +// CreateServerProcess +// --------------------------------------------------------------------------- +// +void CServerMonitor::ShutdownServer() + { + HBufC* servername = HBufC16::NewLC( iServerName->Length() + 5 ); + TPtr servernameptr = servername->Des(); + servernameptr.Copy( *iServerName ); + servernameptr.Append( KExtension ); + servernameptr.Append( KStar ); + TFindProcess processFinder( *servername ); + TFullName result; + RProcess processHandle; + while ( processFinder.Next(result) == KErrNone) + { + User::LeaveIfError(processHandle.Open ( processFinder, EOwnerThread)); + processHandle.Kill(KErrNone); + processHandle.Close(); + } + CleanupStack::PopAndDestroy( servername ); + }