201027
authorhgs
Mon, 12 Jul 2010 00:18:57 +0530
changeset 11 7c6f43cd91cf
parent 8 6547bf8ca13a
child 13 fcb2a58c181b
201027
qcpix/qcpixsearchclient.pro
qcpix/tsrc/qttestutil/copying
qcpix/tsrc/qttestutil/qttestutil.h
qcpix/tsrc/qttestutil/qttestutil.pri
qcpix/tsrc/qttestutil/readme
qcpix/tsrc/qttestutil/simplechecker.cpp
qcpix/tsrc/qttestutil/testregistration.h
qcpix/tsrc/qttestutil/testregistry.cpp
qcpix/tsrc/qttestutil/testregistry.h
searchengine/cpix/cpix/inc/public/appclass-hierarchy.txt
searcher/group/bld.inf
searcher/searchclient/group/searchclient.mmp
searchsrv_plat/cpix_utility_api/inc/cpixmaindefs.h
--- a/qcpix/qcpixsearchclient.pro	Mon Jun 28 10:34:53 2010 +0530
+++ b/qcpix/qcpixsearchclient.pro	Mon Jul 12 00:18:57 2010 +0530
@@ -34,7 +34,7 @@
 DEFINES += BUILD_DLL
 
 symbian{
-    TARGET.CAPABILITY = CAP_GENERAL_DLL -DRM
+    TARGET.CAPABILITY = CAP_GENERAL_DLL
     TARGET.EPOCALLOWDLLDATA = 1
     TARGET.UID3 = 0xE3B89364
     TARGET.VID = VID_DEFAULT
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qcpix/tsrc/qttestutil/copying	Mon Jul 12 00:18:57 2010 +0530
@@ -0,0 +1,21 @@
+The MIT License
+
+Copyright (c) 2008 Remko Tronçon
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qcpix/tsrc/qttestutil/qttestutil.h	Mon Jul 12 00:18:57 2010 +0530
@@ -0,0 +1,29 @@
+/*
+ * Copyright (C) 2008  Remko Troncon
+ * Licensed under the MIT license.
+ * See COPYING for license details.
+ */
+
+#ifndef QtTestUtil_H
+#define QtTestUtil_H
+
+#include "QtTestUtil/TestRegistration.h"
+
+/**
+ * A macro to register a test class.
+ *
+ * This macro will create a static variable which registers the
+ * testclass with the TestRegistry, and creates an instance of the 
+ * test class.
+ *
+ * Execute this macro in the body of your unit test's .cpp file, e.g.
+ *    class MyTest {
+ *          ...
+ *      };
+ *
+ *      QTTESTUTIL_REGISTER_TEST(MyTest)
+ */
+#define QTTESTUTIL_REGISTER_TEST(TestClass) \
+    static QtTestUtil::TestRegistration<TestClass> TestClass##Registration
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qcpix/tsrc/qttestutil/qttestutil.pri	Mon Jul 12 00:18:57 2010 +0530
@@ -0,0 +1,5 @@
+INCLUDEPATH *= $$PWD/..
+DEPAENDPATH *= $$PWD/..
+
+SOURCES += \
+        $$PWD/TestRegistry.cpp
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qcpix/tsrc/qttestutil/readme	Mon Jul 12 00:18:57 2010 +0530
@@ -0,0 +1,8 @@
+QtTestUtil
+----------
+
+Convenience classes for unit testing using QtTest.
+See Example/ for examples on using these classes.
+
+Remko Tronçon
+http://el-tramo.be
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qcpix/tsrc/qttestutil/simplechecker.cpp	Mon Jul 12 00:18:57 2010 +0530
@@ -0,0 +1,17 @@
+/*
+ * Copyright (C) 2008  Remko Troncon
+ * Licensed under the MIT license.
+ * See COPYING for license details.
+ */
+
+#include <QCoreApplication>
+
+#include "QtTestUtil/TestRegistry.h"
+
+/**
+ * Runs all tests registered with the QtTestUtil registry.
+ */
+int main(int argc, char* argv[]) {
+    QCoreApplication application(argc, argv);
+    return QtTestUtil::TestRegistry::getInstance()->runTests(argc, argv);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qcpix/tsrc/qttestutil/testregistration.h	Mon Jul 12 00:18:57 2010 +0530
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2008  Remko Troncon
+ * Licensed under the MIT license.
+ * See COPYING for license details.
+ */
+
+#ifndef QtTestUtil_TestRegistration_H
+#define QtTestUtil_TestRegistration_H
+
+#include "QtTestUtil/TestRegistry.h"
+
+namespace QtTestUtil {
+
+    /**
+     * A wrapper class around a test to manage registration and static
+     * creation of an instance of the test class.
+     * This class is used by QTTESTUTIL_REGISTER_TEST(), and you should not 
+     * use this class directly.
+     */
+    template<typename TestClass>
+    class TestRegistration {
+        public:
+            TestRegistration() {
+                test_ = new TestClass();
+                TestRegistry::getInstance()->registerTest(test_);
+            }
+
+            ~TestRegistration() {
+                delete test_;
+            }
+        
+        private:
+            TestClass* test_;
+    };
+
+}
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qcpix/tsrc/qttestutil/testregistry.cpp	Mon Jul 12 00:18:57 2010 +0530
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2008  Remko Troncon
+ * Licensed under the MIT license.
+ * See COPYING for license details.
+ */
+
+#include "QtTestUtil/TestRegistry.h"
+
+#include <QtTest/QtTest>
+
+namespace QtTestUtil {
+
+TestRegistry* TestRegistry::getInstance() {
+    static TestRegistry registry;
+    return &registry;
+}
+
+void TestRegistry::registerTest(QObject* test) {
+    tests_ += test;
+}
+
+int TestRegistry::runTests(int argc, char* argv[]) {
+    int result = 0;
+    foreach(QObject* test, tests_) {
+        result |= QTest::qExec(test, argc, argv);
+    }
+    return result;
+}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qcpix/tsrc/qttestutil/testregistry.h	Mon Jul 12 00:18:57 2010 +0530
@@ -0,0 +1,49 @@
+/*
+ * Copyright (C) 2008  Remko Troncon
+ * Licensed under the MIT license.
+ * See COPYING for license details.
+ */
+
+#ifndef QtTestUtil_TestRegistry_H
+#define QtTestUtil_TestRegistry_H
+
+#include <QList>
+
+class QObject;
+
+namespace QtTestUtil {
+    
+    /**
+     * A registry of QtTest test classes.
+     * All test classes registered with QTTESTUTIL_REGISTER_TEST add 
+     * themselves to this registry. All registered tests can then be run at 
+     * once using runTests().
+     */
+    class TestRegistry {
+        public:
+            /**
+             * Retrieve the single instance of the registry.
+             */
+            static TestRegistry* getInstance();
+
+            /**
+             * Register a QtTest test. 
+             * This method is called  by QTTESTUTIL_REGISTER_TEST, and you should 
+             * not use this method directly.
+             */
+            void registerTest(QObject*);
+
+            /**
+             * Run all registered tests using QTest::qExec()
+             */
+            int runTests(int argc, char* argv[]);
+
+        private:
+            TestRegistry() {}
+        
+        private:
+            QList<QObject*> tests_;
+    };
+}
+
+#endif
--- a/searchengine/cpix/cpix/inc/public/appclass-hierarchy.txt	Mon Jun 28 10:34:53 2010 +0530
+++ b/searchengine/cpix/cpix/inc/public/appclass-hierarchy.txt	Mon Jul 12 00:18:57 2010 +0530
@@ -23,13 +23,27 @@
     | [ _mimetype (opt) ]     {EStoreYes | EIndexNo}
     |
     +-- msg
-    | [ To         ]    {EStoreYes | EIndexTokenized | EIndexFreeText} 	{ExcerptYes, if present}
-    | [ From       ]    {EStoreYes | EIndexTokenized | EIndexFreeText} 	{ExcerptYes, if present}
-    | [ Body       ]    {EStoreYes | EIndexTokenized } 								 	{ExcerptYes}
-    | [ Folder     ]    {EStoreYes | EIndexNo}        									{ExcerptNA}
-    | [ Subject    ]    {EStoreYes | EIndexTokenized} 									{ExcperptNo}
-    | [ Attachment ]	{EStoreYes | EIndexTokenized}										{ExcperptNo}
-    |
+    |    |
+    |    |
+    |    +--smsmms
+    |    | [ To         ]    {EStoreYes | EIndexTokenized | EIndexFreeText} 	{ExcerptYes, if present}
+    |    | [ From       ]    {EStoreYes | EIndexTokenized | EIndexFreeText} 	{ExcerptYes, if present}
+    |    | [ Body       ]    {EStoreYes | EIndexTokenized } 								{ExcerptYes}
+    |    | [ Folder     ]    {EStoreYes | EIndexNo}        									{ExcerptNA}
+    |    | [ Subject    ]    {EStoreYes | EIndexTokenized} 									{ExcperptNo}
+    |    | [ Attachment ]	 {EStoreYes | EIndexTokenized}									{ExcperptNo}
+    |    |
+    |    +--email
+    |    | [ Sender    ]     {EStoreYes | EIndexTokenized | EIndexFreeText}                 {ExcperptNo}
+    |    | [ Subject   ]     {EStoreYes | EIndexTokenized } 								{ExcerptYes}
+    |    | [ Recipients]     {EStoreYes | EIndexTokenized | EIndexFreeText}                 {ExcperptNo}
+    |    | [ Body      ]     {EStoreYes | EIndexTokenized } 								{ExcerptYes}
+    |    | [ MailBoxId ]     {EStoreYes | EIndexUnTokenized | EAggregateNo}                 {ExcerptNA}
+    |    | [ FolderId  ]     {EStoreYes | EIndexUnTokenized | EAggregateNo}                 {ExcerptNA}
+    |    | [ Attachment ]    {EStoreYes | EIndexTokenized , if present}                     {ExcperptNo}
+    |    | [ MailBoxName ]   {EStoreYes | EIndexTokenized | EIndexFreeText}                 {ExcperptNo}
+    |    | [ SentTime ]      {EStoreYes | EIndexTokenized }                                 {ExcperptNo}
+    |    |
     +-- file
     |     |
     |     |
--- a/searcher/group/bld.inf	Mon Jun 28 10:34:53 2010 +0530
+++ b/searcher/group/bld.inf	Mon Jul 12 00:18:57 2010 +0530
@@ -22,5 +22,5 @@
 
 #include "../tsrc/RobustnessTest/group/bld.inf"
 #include "../tsrc/LogPlayer/group/bld.inf"
-#include "../tsrc/SymbianOsUnit/group/s60_3rd/bld.inf"
-//#include "../tsrc/cpixsearchertest/group/bld.inf"
\ No newline at end of file
+//#include "../tsrc/SymbianOsUnit/group/s60_3rd/bld.inf"
+#include "../tsrc/cpixsearchertest/group/bld.inf"
\ No newline at end of file
--- a/searcher/searchclient/group/searchclient.mmp	Mon Jun 28 10:34:53 2010 +0530
+++ b/searcher/searchclient/group/searchclient.mmp	Mon Jul 12 00:18:57 2010 +0530
@@ -41,6 +41,6 @@
 
 LIBRARY         flogger.lib 
 
-CAPABILITY        CAP_GENERAL_DLL -DRM
+CAPABILITY        CAP_GENERAL_DLL
 
 // End of File
--- a/searchsrv_plat/cpix_utility_api/inc/cpixmaindefs.h	Mon Jun 28 10:34:53 2010 +0530
+++ b/searchsrv_plat/cpix_utility_api/inc/cpixmaindefs.h	Mon Jul 12 00:18:57 2010 +0530
@@ -196,7 +196,7 @@
  */
 #define DEFAULT_CPIX_DIR "c:\\Data\\"
 #define DEFAULT_CLUCENE_LOCK_DIR "c:\\system\\temp"
-#define DEFAULT_RESOURCE_DIR "c:\\Data\\"
+#define DEFAULT_RESOURCE_DIR "z:\\resource\\cpix"