# HG changeset patch
# User hgs
# Date 1285591985 -10800
# Node ID fe894bb075c2a7a8488f8142e521ee0848fced2a
# Parent 87e65c44ff3ab8cb97ca1c6312dbb785dcccf45d
201035_1
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/content_listing_framework_collection_manager_api/content_listing_framework_collection_manager_api.metaxml
--- a/mds_plat/content_listing_framework_collection_manager_api/content_listing_framework_collection_manager_api.metaxml Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,18 +0,0 @@
-
-
- Content Listing Framework Collection Manager API
- An interface for managing media collections
- c++
- clfwrapper
-
-
-
-
-
-
-
-
- no
- no
-
-
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/content_listing_framework_collection_manager_api/group/bld.inf
--- a/mds_plat/content_listing_framework_collection_manager_api/group/bld.inf Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-/*
-* Copyright (c) 2006-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: File that exports the files belonging to
-: Content Listing Framework Collection Manager API
-*
-*/
-
-#include
-
-PRJ_PLATFORMS
-DEFAULT
-
-PRJ_EXPORTS
-
-../inc/mediacollectionmanager.h MW_LAYER_PLATFORM_EXPORT_PATH(mediacollectionmanager.h)
-
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/content_listing_framework_collection_manager_api/inc/mediacollectionmanager.h
--- a/mds_plat/content_listing_framework_collection_manager_api/inc/mediacollectionmanager.h Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,340 +0,0 @@
-/*
-* Copyright (c) 2006-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:
-* Description :
-*
-*/
-
-
-#ifndef MMEDIACOLLECTIONMANAGER_H
-#define MMEDIACOLLECTIONMANAGER_H
-
-
-#include
-
-/// Propertie flags for media collections
-enum TMediaCollectionProperties
- {
- /// Collection items are in Phone memory
- EMCPhoneMemoryCollection = 0x00000001,
- /// Collection items are in MMC
- EMCMmcCollection = 0x00000002
- };
-
-class MMediaCollectionManager;
-class MMediaCollectionInfoExt;
-class MMediaCollectionManagerExt;
-class MMediaCollectionObserverExt;
-
-/**
- * Factory for Media Collection Manager
- *
- * @lib MediaCollectionManager.lib
- * @since S60 3.2
- */
-class MediaCollectionManagerFactory
- {
-public: // New functions
-
- /**
- * Create new instance of Media Collection Manager
- * @return New instance of Media Collection Manager.
- * Ownership is transferred to the client application.
- */
- IMPORT_C static MMediaCollectionManager* CreateCollectionManagerL();
-
-private:
- // Prohibit C++ default constructor.
- MediaCollectionManagerFactory();
- // Prohibit Destructor.
- ~MediaCollectionManagerFactory();
- };
-
-/**
- * Media Collection Info interface,
- * use MMediaCollectionManager to get collections
- *
- * @lib N/A
- * @since S60 3.2
- */
-class MMediaCollectionInfo
- {
-public:
- virtual ~MMediaCollectionInfo() {}
-
-public:
- /**
- * Returns the name of the collection
- * @since S60 3.2
- * @return Name of the collection
- */
- virtual const TDesC& Name() const = 0;
-
- /**
- * Returns the id of the album
- * @since S60 3.2
- * @return The id of the album
- */
- virtual TInt Id() const = 0;
-
- /**
- * Returns list of media types that are defined for the collection.
- * See media types from CLFContentListing.hrh TCLFMediaType
- * @since S60 3.2
- * @return List of media types that are defined for the collection.
- */
- virtual const RArray& CollectionItemTypes() const = 0;
-
- /**
- * Returns collection propertie flags
- * Properties are defined in TMediaCollectionProperties
- * Should not be used in 5.0 or later!
- * @since S60 3.2, depricated in 5.0
- * @return Properties flags
- */
- virtual TInt32 Properties() const = 0;
-
-private: // Extension interface
-
- /**
- * This member is internal and not intended for use.
- */
- virtual MMediaCollectionInfoExt* Extension()
- { return NULL; }
- virtual const MMediaCollectionInfoExt* Extension() const
- { return NULL; }
- };
-
-
-/**
- * Observer interface to get notification about changes in
- * Media Collection Manager
- *
- * @lib N/A
- * @since S60 3.2
- */
-class MMediaCollectionObserver
- {
-public:
- /**
- * Collection manager uses this method to notify about
- * created/deleted/modified collections.
- * @since 3.2
- * @param aCollectionIdArray
- */
- virtual void CollectionChangedL(
- const TArray& aCollectionIdArray ) = 0;
-
- /**
- * Collection manager uses this method to notify about
- * possible errors.
- * @since 3.2
- * @param aError Collection manager error status
- * KErrCorrupt if collection manager is corrupted and
- * possible some data is lost
- */
- virtual void CollectionManagerErrorL(
- TInt aError ) = 0;
-
-protected:
-
- /**
- * Destructor.
- */
- virtual ~MMediaCollectionObserver() {}
-
-private: // Extension interface
-
- /**
- * This member is internal and not intended for use.
- */
- virtual MMediaCollectionObserverExt* Extension()
- { return NULL; }
- virtual const MMediaCollectionObserverExt* Extension() const
- { return NULL; }
- };
-
-/**
- * Media Collection Manager
- *
- * Use this class to get Media Collections, create new collections,
- * delete collections, rename collections, add files to collections,
- * remove files from collections.
- *
- * @lib N/A
- * @since S60 3.2
- */
-class MMediaCollectionManager
- {
-public:
- virtual ~MMediaCollectionManager() {}
-
-public: // New functions
-
- /**
- * Return collection info by index.
- * @since 3.2
- * @param aCollectionInfoArray Collection infos are added to this array
- */
- virtual void GetCollectionInfosL(
- RPointerArray&
- aCollectionInfoArray ) const = 0;
-
- /**
- * Return collection info by ID.
- * @since 3.2
- * @param aId Collection ID
- * @return Pointer to a MMediaCollectionInfo object
- * Ownership is transferred to client
- */
- virtual MMediaCollectionInfo* CollectionInfoByIdLC(
- TInt aId ) const = 0;
-
- /**
- * Create new collection.
- * @since 3.2
- * @param aName Name of the collection
- * @param aCollectionItemTypes List of media types that are
- * in the collection.
- * Use media types from CLFContentListing.hrh TCLFMediaType.
- * NOTE! that collection manager doesn't check is added item defined
- * mediatype. This is only for client(s) for grouping different
- * type folders.
- * @param aStorage In 3.2 See TMediaCollectionProperties
- * NOTE! If given propertie set is not supported then
- * function leaves with KErrNotSupported
- NOTE! In 5.0 Drive number where the collection is to be created!
- * @return ID of the creaded collection
- */
- virtual TInt CreateCollectionL(
- const TDesC& aName,
- const TArray& aCollectionItemTypes,
- TInt32 aStorage) = 0;
-
- /**
- * Delete collection.
- * NOTE! this doesn't delete items that are in collection.
- * @since 3.2
- * @param aId ID of the collection
- */
- virtual void DeleteCollectionL(
- TInt aId ) = 0;
-
- /**
- * Rename collection.
- * @since 3.2
- * @param aId ID of the collection.
- * If collection doesn't found then
- * function leaves with KErrNotFound
- * @param aNewName new name of the collection
- */
- virtual void RenameCollectionL(
- TInt aId,
- const TDesC& aNewName ) = 0;
-
- /**
- * Add item(s) to collection.
- * @since 3.2
- * @param aId Collection ID
- * If collection doesn't found then
- * function leaves with KErrNotFound
- * @param aItemArray
- * @param aRemoveFromOtherCollections Is item removed from other
- * available collections.
- */
- virtual void AddToCollectionL(
- TInt aId,
- const MDesCArray& aItemArray,
- TBool aRemoveFromOtherCollections = ETrue ) = 0;
-
- /**
- * Remove item(s) from collection.
- * @since 3.2
- * @param aId Collection ID
- * If collection doesn't found then
- * function leaves with KErrNotFound
- * @param aItemArray
- */
- virtual void RemoveFromCollectionL(
- TInt aId,
- const MDesCArray& aItemArray ) = 0;
-
- /**
- * Remove item(s) from all collections.
- * @since 3.2
- * @param aItemArray
- */
- virtual void RemoveFromAllCollectionsL(
- const MDesCArray& aItemArray ) = 0;
-
-
- /**
- * Get collection items.
- * @since 3.2
- * @param aId Collection ID
- * If collection doesn't found then
- * function leaves with KErrNotFound
- * @param aItemArray Item are added to the array
- */
- virtual void GetCollectionItemArrayL(
- TInt aId,
- CDesCArray& aItemArray ) const = 0;
-
- /**
- * Find collections IDs by item.
- * @since 3.2
- * @param aItem
- * @param aIdArray Possible collection IDs are added to the array
- */
- virtual void GetCollectionIdByItemL(
- const TDesC& aItem,
- RArray& aIdArray ) const = 0;
-
- /**
- * Add collection observer.
- * @since 3.2
- * @param aObserver
- */
- virtual void AddCollectionObserverL(
- MMediaCollectionObserver& aObserver ) = 0;
-
- /**
- * Remove collection observer.
- * @since 3.2
- * @param aObserver
- */
- virtual void RemoveCollectionObserverL(
- MMediaCollectionObserver& aObserver ) = 0;
-
- /**
- * Get the drivenumber of the drive where collection is located by collection id
- * @since 5.0
- * @param aId id of the collection
- * @return DriveNumber of the drive where collection is located
- */
- virtual TInt32 GetDriveByIdL( TInt aId ) = 0;
-
-private: // Extension interface
-
- /**
- * This member is internal and not intended for use.
- */
- virtual MMediaCollectionManagerExt* Extension()
- { return NULL; }
- virtual const MMediaCollectionManagerExt* Extension() const
- { return NULL; }
-
- };
-
-#endif // MMEDIACOLLECTIONMANAGER_H
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/content_listing_framework_collection_manager_api/tsrc/Bmarm/CollectionMangerTestu.def
--- a/mds_plat/content_listing_framework_collection_manager_api/tsrc/Bmarm/CollectionMangerTestu.def Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,2 +0,0 @@
-EXPORTS
- LibEntryL__FR13CTestModuleIf @ 1 NONAME R3UNUSED ; LibEntryL(CTestModuleIf &)
\ No newline at end of file
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/content_listing_framework_collection_manager_api/tsrc/Bwins/CollectionManagerTestu.def
--- a/mds_plat/content_listing_framework_collection_manager_api/tsrc/Bwins/CollectionManagerTestu.def Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,2 +0,0 @@
-EXPORTS
- ?LibEntryL@@YAPAVCScriptBase@@AAVCTestModuleIf@@@Z @ 1 NONAME ; class CScriptBase * __cdecl LibEntryL(class CTestModuleIf &)
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/content_listing_framework_collection_manager_api/tsrc/conf/CollectionManagerTest.cfg
--- a/mds_plat/content_listing_framework_collection_manager_api/tsrc/conf/CollectionManagerTest.cfg Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,146 +0,0 @@
-#
-# Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "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: CLF Collection Manager API tests
-#
-
-// ---------------------------------------------------------------------------
-// CLF Collection Manager API test cases
-// ---------------------------------------------------------------------------
-
-// These should be run in sequential mode if several cases are run at the same
-// time! Be adviced, this API is no longer used or supported, it is present only
-// because of it's association to Content Listing Framework.
-
-[StifSettings]
-TestThreadStackSize= 32768
-TestThreadMinHeap= 4096
-TestThreadMaxHeap= 16777216
-[EndStifSettings]
-
-[Test]
-title Create Collection Manager
-create CollectionManagerTest test
-test CreateCollectionManager
-test EndTestSession
-delete test
-[Endtest]
-
-[Test]
-title Get Collection Infos
-create CollectionManagerTest test
-test CreateCollectionManager
-test GetCollectionInfos
-test EndTestSession
-delete test
-[Endtest]
-
-[Test]
-title Get Collection Info By ID
-create CollectionManagerTest test
-test CreateCollectionManager
-test CollectionInfoById
-test EndTestSession
-delete test
-[Endtest]
-
-[Test]
-title Create Collection
-create CollectionManagerTest test
-test CreateCollectionManager
-test CreateCollection
-test EndTestSession
-delete test
-[Endtest]
-
-[Test]
-title Delete Collection
-create CollectionManagerTest test
-test CreateCollectionManager
-test DeleteCollection
-test EndTestSession
-delete test
-[Endtest]
-
-[Test]
-title Rename Collection
-create CollectionManagerTest test
-test CreateCollectionManager
-test RenameCollection
-test EndTestSession
-delete test
-[Endtest]
-
-[Test]
-title Add to Collection
-create CollectionManagerTest test
-test CreateCollectionManager
-test AddToCollection
-test EndTestSession
-delete test
-[Endtest]
-
-[Test]
-title Remove from Collection
-create CollectionManagerTest test
-test CreateCollectionManager
-test RemoveFromCollectionL
-test EndTestSession
-delete test
-[Endtest]
-
-[Test]
-title Get collection info array
-create CollectionManagerTest test
-test CreateCollectionManager
-test GetCollectionItemArray
-test EndTestSession
-delete test
-[Endtest]
-
-[Test]
-title Get collection ID by Item
-create CollectionManagerTest test
-test CreateCollectionManager
-test GetCollectionIdByItem
-test EndTestSession
-delete test
-[Endtest]
-
-[Test]
-title Add collection observer
-create CollectionManagerTest test
-test CreateCollectionManager
-test AddCollectionObserver
-test EndTestSession
-delete test
-[Endtest]
-
-[Test]
-title Remove collection observer
-create CollectionManagerTest test
-test CreateCollectionManager
-test RemoveCollectionObserver
-test EndTestSession
-delete test
-[Endtest]
-
-[Test]
-title Get drive by ID test
-create CollectionManagerTest test
-test CreateCollectionManager
-test GetDriveById
-test EndTestSession
-delete test
-[Endtest]
-
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/content_listing_framework_collection_manager_api/tsrc/eabi/CollectionManagerTestu.def
--- a/mds_plat/content_listing_framework_collection_manager_api/tsrc/eabi/CollectionManagerTestu.def Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-EXPORTS
- _Z9LibEntryLR13CTestModuleIf @ 1 NONAME
-
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/content_listing_framework_collection_manager_api/tsrc/group/CollectionManagerTest.mmp
--- a/mds_plat/content_listing_framework_collection_manager_api/tsrc/group/CollectionManagerTest.mmp Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-/*
-* Copyright (c) 2005-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: Project definition file
-*
-*/
-
-
-#include
-#include
-
-TARGET CollectionManagerTest.dll
-TARGETTYPE dll
-UID 0x1000008D 0x101FB3E3
-
-CAPABILITY ALL -TCB
-VENDORID VID_DEFAULT
-
-DEFFILE CollectionManagerTest.def
-
-SOURCEPATH ../src
-SOURCE CollectionManagerTest.cpp
-SOURCE CollectionManagerTestBlocks.cpp
-
-SYSTEMINCLUDE /epoc32/include/ecom
-USERINCLUDE ../inc ../../../../inc
-
-MW_LAYER_SYSTEMINCLUDE
-
-LIBRARY euser.lib
-LIBRARY stiftestinterface.lib
-LIBRARY stiftestengine.lib
-LIBRARY mediacollectionmanager.lib
-LIBRARY efsrv.lib
-LIBRARY bafl.lib
-
-
-
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/content_listing_framework_collection_manager_api/tsrc/group/CollectionManagerTest.pkg
--- a/mds_plat/content_listing_framework_collection_manager_api/tsrc/group/CollectionManagerTest.pkg Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-;
-; 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:
-;
-; Installation file for API test
-
-; Languages
-&EN
-
-; Header
-#{"CollectionManagerTest"},(0x101FB3E3),1,0,1,TYPE=SA
-
-; Localised Vendor name
-%{"Nokia-EN"}
-
-; Unique Vendor name
-:"Nokia"
-
-; Files
-"\epoc32\release\armv5\urel\CollectionManagerTest.dll" -"C:\sys\bin\CollectionManagerTest.dll"
-"..\init\CollectionManagerTest.ini" -"C:\testframework\CollectionManagerTest.ini"
-"..\conf\CollectionManagerTest.cfg" -"C:\testframework\CollectionManagerTest.cfg"
-
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/content_listing_framework_collection_manager_api/tsrc/group/bld.inf
--- a/mds_plat/content_listing_framework_collection_manager_api/tsrc/group/bld.inf Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-/*
-* Copyright (c) 2005-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: Build information file
-*
-*/
-
-
-PRJ_PLATFORMS
- DEFAULT
-
-PRJ_EXPORTS
-
-PRJ_MMPFILES
-
-PRJ_TESTMMPFILES
-CollectionManagerTest.mmp
-
-PRJ_TESTEXPORTS
-../conf/CollectionManagerTest.cfg /epoc32/winscw/c/TestFramework/CollectionManagerTest.cfg
-../init/CollectionManagerTest.ini /epoc32/winscw/c/TestFramework/CollectionManagerTest.ini
-
-// End of File
-
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/content_listing_framework_collection_manager_api/tsrc/inc/CollectionManagerTest.h
--- a/mds_plat/content_listing_framework_collection_manager_api/tsrc/inc/CollectionManagerTest.h Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,107 +0,0 @@
-/*
-* Copyright (c) 2008-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:
-*
-*/
-
-
-#ifndef CONTEXTENGINEPLUGINTEST_H
-#define CONTEXTENGINEPLUGINTEST_H
-
-// INCLUDES
-#include
-#include
-#include
-#include
-
-// Logging path
-_LIT( KCollectionManagerTestLogPath, "\\logs\\testframework\\CollectionManagerTest\\" );
-// Log file
-_LIT( KCollectionManagerTestLogFile, "CollectionManagerTest.txt" );
-_LIT( KCollectionManagerTestLogFileWithTitle, "CollectionManagerTest_[%S].txt" );
-
-// FORWARD DECLARATIONS
-class CCollectionManagerTest;
-
-// CLASS DECLARATION
-NONSHARABLE_CLASS(CCollectionManagerTest) : public CScriptBase,
- public MMediaCollectionObserver
-
- {
- public: // Constructors and destructor
-
- /**
- * Two-phased constructor.
- */
- static CCollectionManagerTest* NewL( CTestModuleIf& aTestModuleIf );
-
- /**
- * Destructor.
- */
- virtual ~CCollectionManagerTest();
-
- public: // Functions from base classes
-
- virtual TInt RunMethodL( CStifItemParser& aItem );
-
- void CollectionChangedL( const TArray& aCollectionIdArray );
- void CollectionManagerErrorL( TInt aError );
-
- private:
-
- /**
- * C++ default constructor.
- */
- CCollectionManagerTest( CTestModuleIf& aTestModuleIf );
-
- /**
- * By default Symbian 2nd phase constructor is private.
- */
- void ConstructL();
-
- /**
- * Frees all resources allocated from test methods.
- */
- void Delete();
-
- /**
- * Test methods are listed below.
- */
-
- // engine
- virtual TInt CreateCollectionManagerL( CStifItemParser& aItem );
- virtual TInt GetCollectionInfosL( CStifItemParser& aItem );
- virtual TInt CollectionInfoByIdL( CStifItemParser& aItem );
- virtual TInt CreateCollectionL( CStifItemParser& aItem );
- virtual TInt DeleteCollectionL( CStifItemParser& aItem );
- virtual TInt RenameCollectionL( CStifItemParser& aItem );
- virtual TInt AddToCollectionL( CStifItemParser& aItem );
- virtual TInt RemoveFromCollectionL( CStifItemParser& aItem );
- virtual TInt RemoveFromAllCollectionsL( CStifItemParser& aItem );
- virtual TInt GetCollectionItemArrayL( CStifItemParser& aItem );
- virtual TInt GetCollectionIdByItemL( CStifItemParser& aItem );
- virtual TInt AddCollectionObserverL( CStifItemParser& aItem );
- virtual TInt RemoveCollectionObserverL( CStifItemParser& aItem );
- virtual TInt GetDriveByIdL( CStifItemParser& aItem );
- virtual TInt EndTestSessionL( CStifItemParser& aItem );
-
- private: // Data
-
- MMediaCollectionManager* iCollectionManager;
-
- };
-
-#endif // CONTEXTENGINEPLUGINTEST_H
-
-// End of File
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/content_listing_framework_collection_manager_api/tsrc/init/CollectionManagerTest.ini
--- a/mds_plat/content_listing_framework_collection_manager_api/tsrc/init/CollectionManagerTest.ini Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,80 +0,0 @@
-#
-# Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "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:
-#
-
-[Engine_Defaults]
-
-TestReportMode= FullReport # Possible values are: 'Empty', 'Summary', 'Environment',
- 'TestCases' or 'FullReport'
-
-CreateTestReport= YES # Possible values: YES or NO
-
-TestReportFilePath= C:\LOGS\TestFramework\
-TestReportFileName= ContextEnginePluginTestLog
-
-TestReportFormat= TXT # Possible values: TXT or HTML
-TestReportOutput= FILE # Possible values: FILE or RDEBUG
-TestReportFileCreationMode= OVERWRITE # Possible values: OVERWRITE or APPEND
-
-DeviceResetDllName= StifResetForNokia.dll # e.g. 'StifHWResetStub.dll' for user specific reseting
-
-DisableMeasurement= stifmeasurementdisablenone # Possible values are:
- # 'stifmeasurementdisablenone', 'stifmeasurementdisableall'
- # 'stifmeasurementplugin01', 'stifmeasurementplugin02',
- # 'stifmeasurementplugin03', 'stifmeasurementplugin04',
- # 'stifmeasurementplugin05' or 'stifbappeaprofiler'
-
-Timeout= 600000 # Default timeout value for each test case. In milliseconds
-#UITestingSupport= YES # Possible values: YES or NO
-#SeparateProcesses= YES # Possible values: YES or NO (default: NO)
-[End_Defaults]
-
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-
-[New_Module]
-ModuleName= TestScripter
-TestCaseFile= c:\testframework\CollectionManagerTest.cfg
-[End_Module]
-
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-
-[Logger_Defaults]
-
-#NOTE: If you want to set Logger using next setting(s) remove comment(s)'#'
-#NOTE: TestEngine and TestServer logging settings cannot change here
-
-CreateLogDirectories= YES # Possible values: YES or NO
-
-#EmulatorBasePath= C:\LOGS\TestFramework\
-#EmulatorFormat= HTML # Possible values: TXT or HTML
-#EmulatorOutput= FILE # Possible values: FILE or RDEBUG
-
-HardwareBasePath= C:\
-#HardwareFormat= HTML # Possible values: TXT or HTML
-#HardwareOutput= FILE # Possible values: FILE or RDEBUG
-
-#FileCreationMode= OVERWRITE # Possible values: OVERWRITE or APPEND
-
-#ThreadIdToLogFile= YES # Possible values: YES or NO
-#WithTimeStamp= YES # Possible values: YES or NO
-#WithLineBreak= YES # Possible values: YES or NO
-#WithEventRanking= YES # Possible values: YES or NO
-
-#FileUnicode= YES # Possible values: YES or NO
-AddTestCaseTitle= YES # Possible values: YES or NO
-[End_Logger_Defaults]
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-
-# End of file
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/content_listing_framework_collection_manager_api/tsrc/src/CollectionManagerTest.cpp
--- a/mds_plat/content_listing_framework_collection_manager_api/tsrc/src/CollectionManagerTest.cpp Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,130 +0,0 @@
-/*
-* Copyright (c) 2008-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:
-*
-*/
-
-
-// INCLUDE FILES
-#include
-#include "CollectionManagerTest.h"
-#include
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CCollectionManagerTest::CCollectionManagerTest
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-//
-CCollectionManagerTest::CCollectionManagerTest(
- CTestModuleIf& aTestModuleIf ):
- CScriptBase( aTestModuleIf )
- {
- }
-
-// -----------------------------------------------------------------------------
-// CCollectionManagerTest::ConstructL
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-//
-void CCollectionManagerTest::ConstructL()
- {
- //Read logger settings to check whether test case name is to be
- //appended to log file name.
- RSettingServer settingServer;
- TInt ret = settingServer.Connect();
- if(ret != KErrNone)
- {
- User::Leave(ret);
- }
- // Struct to StifLogger settigs.
- TLoggerSettings loggerSettings;
- // Parse StifLogger defaults from STIF initialization file.
- ret = settingServer.GetLoggerSettings(loggerSettings);
- if(ret != KErrNone)
- {
- User::Leave(ret);
- }
- // Close Setting server session
- settingServer.Close();
-
- TFileName logFileName;
-
- if(loggerSettings.iAddTestCaseTitle)
- {
- TName title;
- TestModuleIf().GetTestCaseTitleL(title);
- logFileName.Format(KCollectionManagerTestLogFileWithTitle, &title);
- }
- else
- {
- logFileName.Copy(KCollectionManagerTestLogFile);
- }
-
- iLog = CStifLogger::NewL( KCollectionManagerTestLogPath,
- logFileName,
- CStifLogger::ETxt,
- CStifLogger::EFile,
- EFalse );
-
- }
-
-// -----------------------------------------------------------------------------
-// CCollectionManagerTest::NewL
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-//
-CCollectionManagerTest* CCollectionManagerTest::NewL(
- CTestModuleIf& aTestModuleIf )
- {
- CCollectionManagerTest* self = new (ELeave) CCollectionManagerTest( aTestModuleIf );
-
- CleanupStack::PushL( self );
- self->ConstructL();
- CleanupStack::Pop( self );
-
- return self;
-
- }
-
-// Destructor
-CCollectionManagerTest::~CCollectionManagerTest()
- {
-
- // Delete resources allocated from test methods
- Delete();
-
- // Delete logger
- delete iLog;
-
- }
-
-// ========================== OTHER EXPORTED FUNCTIONS =========================
-
-// -----------------------------------------------------------------------------
-// LibEntryL is a polymorphic Dll entry point.
-// Returns: CScriptBase: New CScriptBase derived object
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CScriptBase* LibEntryL(
- CTestModuleIf& aTestModuleIf ) // Backpointer to STIF Test Framework
- {
-
- return ( CScriptBase* ) CCollectionManagerTest::NewL( aTestModuleIf );
-
- }
-
-// End of File
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/content_listing_framework_collection_manager_api/tsrc/src/CollectionManagerTestBlocks.cpp
--- a/mds_plat/content_listing_framework_collection_manager_api/tsrc/src/CollectionManagerTestBlocks.cpp Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,710 +0,0 @@
-/*
-* Copyright (c) 2008-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:
-*
-*/
-
-
-// [INCLUDE FILES] - do not remove
-#include
-#include
-#include
-#include
-#include
-#include
-#include "CollectionManagerTest.h"
-
-#include "mdsutils.h"
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CCollectionManagerTest::Delete
-// Delete here all resources allocated and opened from test methods.
-// Called from destructor.
-// -----------------------------------------------------------------------------
-//
-void CCollectionManagerTest::Delete()
- {
-
- }
-
-// -----------------------------------------------------------------------------
-// CCollectionManagerTest::RunMethodL
-// Run specified method. Contains also table of test mothods and their names.
-// -----------------------------------------------------------------------------
-//
-TInt CCollectionManagerTest::RunMethodL(
- CStifItemParser& aItem )
- {
-
- static TStifFunctionInfo const KFunctions[] =
- {
- // Copy this line for every implemented function.
- // First string is the function name used in TestScripter script file.
- // Second is the actual implementation member function.
-
- // engine
- ENTRY( "CreateCollectionManager", CCollectionManagerTest::CreateCollectionManagerL ),
- ENTRY( "GetCollectionInfos", CCollectionManagerTest::GetCollectionInfosL ),
- ENTRY( "CollectionInfoById", CCollectionManagerTest::CollectionInfoByIdL ),
- ENTRY( "CreateCollection", CCollectionManagerTest::CreateCollectionL ),
- ENTRY( "DeleteCollection", CCollectionManagerTest::DeleteCollectionL ),
- ENTRY( "RenameCollection", CCollectionManagerTest::RenameCollectionL ),
- ENTRY( "AddToCollection", CCollectionManagerTest::AddToCollectionL ),
- ENTRY( "RemoveFromCollectionL", CCollectionManagerTest::RemoveFromCollectionL ),
- ENTRY( "GetCollectionItemArray", CCollectionManagerTest::GetCollectionItemArrayL ),
- ENTRY( "GetCollectionIdByItem", CCollectionManagerTest::GetCollectionIdByItemL ),
- ENTRY( "AddCollectionObserver", CCollectionManagerTest::AddCollectionObserverL ),
- ENTRY( "RemoveCollectionObserver", CCollectionManagerTest::RemoveCollectionObserverL ),
- ENTRY( "GetDriveById", CCollectionManagerTest::GetDriveByIdL ),
- ENTRY( "EndTestSession", CCollectionManagerTest::EndTestSessionL )
- };
-
- const TInt count = sizeof( KFunctions ) /
- sizeof( TStifFunctionInfo );
-
- return RunInternalL( KFunctions, count, aItem );
-
- }
-
-// -----------------------------------------------------------------------------
-// CCollectionManagerTest::CollectionChangedL
-// -----------------------------------------------------------------------------
-//
-void CCollectionManagerTest::CollectionChangedL( const TArray& /*aCollectionIdArray*/ )
- {
- // This is not going to be called
- }
-
-// -----------------------------------------------------------------------------
-// CCollectionManagerTest::CollectionManagerErrorL
-// -----------------------------------------------------------------------------
-//
-void CCollectionManagerTest::CollectionManagerErrorL( TInt /*aError*/ )
- {
- // This is not going to be called
- }
-
-
-// -----------------------------------------------------------------------------
-// CCollectionManagerTest::CreateCollectionManagerLL
-// -----------------------------------------------------------------------------
-//
-TInt CCollectionManagerTest::CreateCollectionManagerL( CStifItemParser& /* aItem */ )
- {
- iCollectionManager = MediaCollectionManagerFactory::CreateCollectionManagerL( );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CCollectionManagerTest::GetCollectionInfosL
-// -----------------------------------------------------------------------------
-//
-TInt CCollectionManagerTest::GetCollectionInfosL( CStifItemParser& /* aItem */ )
- {
- _LIT( KMsg1, "Enter GetCollectionInfosL" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- TInt error( KErrNone );
-
- if( iCollectionManager )
- {
- RPointerArray collectionInfoArray;
- TRAP( error, iCollectionManager->GetCollectionInfosL( collectionInfoArray ) );
- if( error != KErrNotSupported && error != KErrNone )
- {
- return error;
- }
- error = KErrNone;
- const TInt infoArrayCount( collectionInfoArray.Count() );
- if( infoArrayCount > 0 )
- {
- error = KErrUnknown;
- }
- }
- else
- {
- error = KErrUnknown;
- }
-
- _LIT( KMsg2, "Exit GetCollectionInfosL" );
- iLog->Log( KMsg2 );
- RDebug::Print( KMsg2 );
-
- return error;
- }
-
-// -----------------------------------------------------------------------------
-// CCollectionManagerTest::CollectionInfoByIdL
-// -----------------------------------------------------------------------------
-//
-TInt CCollectionManagerTest::CollectionInfoByIdL( CStifItemParser& /*aItem*/ )
- {
- _LIT( KMsg1, "Enter CollectionInfoByIdL" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- TInt collectionID( KErrNotFound );
- TInt error( KErrNone );
- MMediaCollectionInfo* mci = NULL;
- if( !iCollectionManager )
- {
- return KErrUnknown;
- }
-
- TRAP( error, mci = iCollectionManager->CollectionInfoByIdLC( collectionID ) );
- if( error != KErrNotSupported && error != KErrNone )
- {
- return error;
- }
-
- if( mci )
- {
- return KErrCorrupt;
- }
-
- TRAP( error, mci = iCollectionManager->CollectionInfoByIdLC( 0 ) );
- if( error != KErrNotSupported && error != KErrNone )
- {
- return error;
- }
-
- if( mci )
- {
- return KErrCorrupt;
- }
-
- _LIT( KMsg2, "Exit CollectionInfoByIdL" );
- iLog->Log( KMsg2 );
- RDebug::Print( KMsg2 );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CCollectionManagerTest::CreateCollectionL
-// -----------------------------------------------------------------------------
-//
-TInt CCollectionManagerTest::CreateCollectionL( CStifItemParser& /* aItem */ )
- {
- _LIT( KMsg1, "Enter CreateCollectionL" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- if( !iCollectionManager )
- {
- return KErrUnknown;
- }
-
- _LIT( KTestAlbumName, "TestAlbum" );
- HBufC* collectionName = KTestAlbumName().AllocL();
- RArray types;
- types.AppendL( 1 );
- TInt32 properties = EMCPhoneMemoryCollection;
-
- TInt collectionId( KErrNotFound );
- TInt error( KErrNone );
- TRAP( error, collectionId = iCollectionManager->CreateCollectionL( *collectionName, types.Array(), properties ) );
- if( error != KErrNotSupported && error != KErrNone )
- {
- delete collectionName;
- collectionName = NULL;
- return error;
- }
-
- properties = EMCMmcCollection;
- TRAP( error, collectionId = iCollectionManager->CreateCollectionL( *collectionName, types.Array(), properties ) );
- if( error != KErrNotSupported && error != KErrNone )
- {
- delete collectionName;
- collectionName = NULL;
- return error;
- }
-
- MMediaCollectionInfo* mci = NULL;
- TRAP( error, iCollectionManager->CollectionInfoByIdLC( collectionId ) );
- if( error != KErrNotSupported && error != KErrNone )
- {
- delete collectionName;
- collectionName = NULL;
- return error;
- }
-
- if( mci )
- {
- delete collectionName;
- collectionName = NULL;
- return KErrCorrupt;
- }
-
- delete collectionName;
- collectionName = NULL;
-
- _LIT( KMsg2, "Exit CreateCollectionL" );
- iLog->Log( KMsg2 );
- RDebug::Print( KMsg2 );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CCollectionManagerTest::DeleteCollectionL
-// -----------------------------------------------------------------------------
-//
-TInt CCollectionManagerTest::DeleteCollectionL( CStifItemParser& /* aItem */ )
- {
- _LIT( KMsg1, "Enter DeleteCollectionL" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- if( !iCollectionManager )
- {
- return KErrUnknown;
- }
-
- TInt collectionId( KErrNotFound );
- TInt error( KErrNone );
- TRAP( error, iCollectionManager->DeleteCollectionL( collectionId ) );
- if( error != KErrNotSupported && error != KErrNone )
- {
- return error;
- }
-
- collectionId = 0;
- TRAP( error, iCollectionManager->DeleteCollectionL( collectionId ) );
- if( error != KErrNotSupported && error != KErrNone )
- {
- return error;
- }
-
- _LIT( KMsg2, "Exit DeleteCollectionL" );
- iLog->Log( KMsg2 );
- RDebug::Print( KMsg2 );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CCollectionManagerTest::RenameCollectionL
-// -----------------------------------------------------------------------------
-//
-TInt CCollectionManagerTest::RenameCollectionL( CStifItemParser& /* aItem */ )
- {
- _LIT( KMsg1, "Enter RenameCollectionL" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- if( !iCollectionManager )
- {
- return KErrUnknown;
- }
-
- TInt collectionId( KErrNotFound );
- TInt error( KErrNone );
-
- _LIT( KTestAlbumName, "NewTestAlbum" );
- HBufC* collectionNewName = KTestAlbumName().AllocL();
-
- TRAP( error, iCollectionManager->RenameCollectionL( collectionId, *collectionNewName ) );
- if( error != KErrNotSupported && error != KErrNone )
- {
- delete collectionNewName;
- collectionNewName = NULL;
- return error;
- }
-
- MMediaCollectionInfo* mci = NULL;
-
- TRAP( error, mci= iCollectionManager->CollectionInfoByIdLC( collectionId ) );
- if( error != KErrNotSupported && error != KErrNone )
- {
- delete collectionNewName;
- collectionNewName = NULL;
- return error;
- }
-
- if( mci )
- {
- delete collectionNewName;
- collectionNewName = NULL;
- return KErrCorrupt;
- }
-
- delete collectionNewName;
- collectionNewName = NULL;
-
- _LIT( KMsg2, "Exit RenameCollectionL" );
- iLog->Log( KMsg2 );
- RDebug::Print( KMsg2 );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CCollectionManagerTest::AddToCollectionL
-// -----------------------------------------------------------------------------
-//
-TInt CCollectionManagerTest::AddToCollectionL( CStifItemParser& /* aItem */ )
- {
- _LIT( KMsg1, "Enter AddToCollectionL" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- if( !iCollectionManager )
- {
- return KErrUnknown;
- }
-
- const TInt itemCount( 500 );
- CDesCArray* newItemArray = new (ELeave) CDesCArrayFlat( itemCount );
-
- for( TInt i = 0 ; i < itemCount ; ++i )
- {
- TBuf<40> b;
- b.Num( i );
- b.Append( _L("TestItem") );
- newItemArray->AppendL( b );
- }
-
- TInt collectionId( KErrNotFound );
- TInt error( KErrNone );
- TRAP( error, iCollectionManager->AddToCollectionL( collectionId, *newItemArray, ETrue ) );
- if( error != KErrNotSupported && error != KErrNone )
- {
- delete newItemArray;
- newItemArray = NULL;
- return error;
- }
-
- TRAP( error, iCollectionManager->AddToCollectionL( collectionId, *newItemArray, EFalse ) );
- if( error != KErrNotSupported && error != KErrNone )
- {
- delete newItemArray;
- newItemArray = NULL;
- return error;
- }
-
- delete newItemArray;
- newItemArray = NULL;
-
- _LIT( KMsg2, "Exit AddToCollectionL" );
- iLog->Log( KMsg2 );
- RDebug::Print( KMsg2 );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CCollectionManagerTest::RemoveFromCollectionL
-// -----------------------------------------------------------------------------
-//
-TInt CCollectionManagerTest::RemoveFromCollectionL( CStifItemParser& /* aItem */ )
- {
- _LIT( KMsg1, "Enter RemoveFromCollectionL" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- if( !iCollectionManager )
- {
- return KErrUnknown;
- }
-
- const TInt itemCount( 500 );
- CDesCArray* removeItemArray = new (ELeave) CDesCArrayFlat( itemCount );
-
- for( TInt i = 0 ; i < itemCount ; ++i )
- {
- TBuf<40> b;
- b.Num( i );
- b.Append( _L("TestItem") );
- removeItemArray->AppendL( b );
- }
-
- TInt collectionId( KErrNotFound );
- TInt error( KErrNone );
- TRAP( error, iCollectionManager->RemoveFromCollectionL( collectionId, *removeItemArray ) );
- if( error != KErrNotSupported && error != KErrNone )
- {
- delete removeItemArray;
- removeItemArray = NULL;
- return error;
- }
-
- delete removeItemArray;
- removeItemArray = NULL;
-
- _LIT( KMsg2, "Exit RemoveFromCollectionL" );
- iLog->Log( KMsg2 );
- RDebug::Print( KMsg2 );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CCollectionManagerTest::RemoveFromAllCollectionsL
-// -----------------------------------------------------------------------------
-//
-TInt CCollectionManagerTest::RemoveFromAllCollectionsL( CStifItemParser& /*aItem*/ )
- {
- _LIT( KMsg1, "Enter RemoveFromAllCollectionsL" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- if( !iCollectionManager )
- {
- return KErrUnknown;
- }
-
- const TInt itemCount( 500 );
- CDesCArray* removeItemArray = new (ELeave) CDesCArrayFlat( itemCount );
- CleanupStack::PushL( removeItemArray );
-
- for( TInt i = 0 ; i < itemCount ; ++i )
- {
- TBuf<40> b;
- b.Num( i );
- b.Append( _L("TestItem") );
- removeItemArray->AppendL( b );
- }
-
- TInt error( KErrNone );
- TRAP( error, iCollectionManager->RemoveFromAllCollectionsL( *removeItemArray ) );
- if( error != KErrNotSupported && error != KErrNone )
- {
- CleanupStack::PopAndDestroy( removeItemArray );
- removeItemArray = NULL;
- return error;
- }
-
- CleanupStack::PopAndDestroy( removeItemArray );
- removeItemArray = NULL;
-
- _LIT( KMsg2, "Exit RemoveFromAllCollectionsL" );
- iLog->Log( KMsg2 );
- RDebug::Print( KMsg2 );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CCollectionManagerTest::GetCollectionItemArrayL
-// -----------------------------------------------------------------------------
-//
-TInt CCollectionManagerTest::GetCollectionItemArrayL( CStifItemParser& /*aItem*/ )
- {
- _LIT( KMsg1, "Enter GetCollectionItemArrayL" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- if( !iCollectionManager )
- {
- return KErrUnknown;
- }
-
- CDesCArraySeg* collectionItemArray = new (ELeave) CDesCArraySeg( 4 );
- CleanupStack::PushL( collectionItemArray );
-
- TInt collectionId( KErrNotFound );
- TInt error( KErrNone );
- TRAP( error, iCollectionManager->GetCollectionItemArrayL( collectionId, *collectionItemArray ) );
- if( error != KErrNotSupported && error != KErrNone )
- {
- CleanupStack::PopAndDestroy(collectionItemArray);
- return error;
- }
-
- if( collectionItemArray->Count() > 0 )
- {
- CleanupStack::PopAndDestroy(collectionItemArray);
- return KErrUnknown;
- }
-
- CleanupStack::PopAndDestroy(collectionItemArray);
-
- _LIT( KMsg2, "Exit GetCollectionItemArrayL" );
- iLog->Log( KMsg2 );
- RDebug::Print( KMsg2 );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CCollectionManagerTest::GetCollectionIdByItemL
-// -----------------------------------------------------------------------------
-//
-TInt CCollectionManagerTest::GetCollectionIdByItemL( CStifItemParser& /* aItem */ )
- {
- _LIT( KMsg1, "Enter GetCollectionIdByItemL" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- if( !iCollectionManager )
- {
- return KErrUnknown;
- }
-
- _LIT( KTestItemName, "GetCollectionIdByItemTestItem");
- HBufC* getCollectionIdByItemTestItemName = KTestItemName().AllocL();
-
- RArray idArray;
- CleanupClosePushL( idArray );
- TInt error( KErrNone );
- TRAP( error, iCollectionManager->GetCollectionIdByItemL( *getCollectionIdByItemTestItemName, idArray ) );
- if( error != KErrNotSupported && error != KErrNone )
- {
- CleanupStack::PopAndDestroy(&idArray);
- delete getCollectionIdByItemTestItemName;
- getCollectionIdByItemTestItemName = NULL;
- return error;
- }
-
- const TInt idArrayCount( idArray.Count() );
- if( idArrayCount > 0 )
- {
- CleanupStack::PopAndDestroy(&idArray);
- delete getCollectionIdByItemTestItemName;
- getCollectionIdByItemTestItemName = NULL;
- return KErrUnknown;
- }
-
- CleanupStack::PopAndDestroy(&idArray);
-
- delete getCollectionIdByItemTestItemName;
- getCollectionIdByItemTestItemName = NULL;
-
- _LIT( KMsg2, "Enter GetCollectionIdByItemL" );
- iLog->Log( KMsg2 );
- RDebug::Print( KMsg2 );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CCollectionManagerTest::AddCollectionObserverL
-// -----------------------------------------------------------------------------
-//
-TInt CCollectionManagerTest::AddCollectionObserverL( CStifItemParser& /* aItem */ )
- {
- _LIT( KMsg1, "Enter AddCollectionObserverL" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- if( !iCollectionManager )
- {
- return KErrUnknown;
- }
-
- TInt err( KErrNone );
- TRAP( err, iCollectionManager->AddCollectionObserverL( *this ) );
- if( err != KErrNotSupported && err != KErrNone )
- {
- return err;
- }
-
- _LIT( KMsg2, "Exit AddCollectionObserverL" );
- iLog->Log( KMsg2 );
- RDebug::Print( KMsg2 );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CCollectionManagerTest::RemoveCollectionObserverL
-// -----------------------------------------------------------------------------
-//
-TInt CCollectionManagerTest::RemoveCollectionObserverL( CStifItemParser& /* aItem */ )
- {
- _LIT( KMsg1, "Enter RemoveCollectionObserverL" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- if( !iCollectionManager )
- {
- return KErrUnknown;
- }
-
- TInt err( KErrNone );
- TRAP( err, iCollectionManager->AddCollectionObserverL( *this ) );
- if( err != KErrNotSupported && err != KErrNone )
- {
- return err;
- }
-
- TRAP( err, iCollectionManager->RemoveCollectionObserverL( *this ) );
- if( err != KErrNotSupported && err != KErrNone )
- {
- return err;
- }
-
- _LIT( KMsg2, "Exit RemoveCollectionObserverL" );
- iLog->Log( KMsg2 );
- RDebug::Print( KMsg2 );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CCollectionManagerTest::GetDriveByIdL
-// -----------------------------------------------------------------------------
-//
-TInt CCollectionManagerTest::GetDriveByIdL( CStifItemParser& /* aItem */ )
- {
- _LIT( KMsg1, "Enter GetDriveByIdL" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- if( !iCollectionManager )
- {
- return KErrUnknown;
- }
-
- TInt collectionId( KErrNotFound );
-
- TInt32 drive( 100 );
- TInt error( KErrNone );
-
- TRAP( error, drive = iCollectionManager->GetDriveByIdL( collectionId ) );
- if( error != KErrNotSupported && error != KErrNone )
- {
- return error;
- }
-
- if( drive != 100 )
- {
- return KErrUnknown;
- }
-
- _LIT( KMsg2, "Exit GetDriveByIdL" );
- iLog->Log( KMsg2 );
- RDebug::Print( KMsg2 );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CCollectionManagerTest::EndTestSessionL
-// -----------------------------------------------------------------------------
-//
-TInt CCollectionManagerTest::EndTestSessionL( CStifItemParser& /* aItem */ )
- {
- delete iCollectionManager;
- iCollectionManager = NULL;
-
- return KErrNone;
- }
-
-// [End of File] - Do not remove
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/content_listing_framework_extended_api/content_listing_framework_extended_api.metaxml
--- a/mds_plat/content_listing_framework_extended_api/content_listing_framework_extended_api.metaxml Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,18 +0,0 @@
-
-
- Content Listing Framework Extended API
- An extended interface for Content Listing Framework
- c++
- clfwrapper
-
-
-
-
-
-
-
-
- no
- no
-
-
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/content_listing_framework_extended_api/group/bld.inf
--- a/mds_plat/content_listing_framework_extended_api/group/bld.inf Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-/*
-* Copyright (c) 2006-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: File that exports the files belonging to
-: Content Listing Framework Extended API
-*
-*/
-
-#include
-
-PRJ_PLATFORMS
-DEFAULT
-
-PRJ_EXPORTS
-
-../inc/CLFContentListingExtended.hrh MW_LAYER_PLATFORM_EXPORT_PATH(CLFContentListingExtended.hrh)
-
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/content_listing_framework_extended_api/inc/CLFContentListingExtended.hrh
--- a/mds_plat/content_listing_framework_extended_api/inc/CLFContentListingExtended.hrh Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,69 +0,0 @@
-/*
-* Copyright (c) 2002-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: S60 internal CLF field IDs
-*
-*/
-
-
-#ifndef CLFCONTENTLISTINGEXTENDED_HRH
-#define CLFCONTENTLISTINGEXTENDED_HRH
-
-#include
-
-// DATA TYPES
-
-/**
-* Content Listing Framework list model media types.
-* Last default media type is 0x7FFFFFFF,
-* Custom media type range 0x80000000 0xFFFFFFFF
-*/
-enum TCLFMediaTypeExtended
- {
- /// Gallery collections
- ECLFMediaTypeCollection = 0x7
- };
-
-/**
-* S60 internal Content Listing Framework item field IDs.
-* Last default field ID is 0x7FFFFFFF,
-* Custom field ID range 0x80000000 - 0xFFFFFFFF
-*/
-enum TCLFExtendedFieldId
- {
- /// Media gallery collection name:
- /// descriptor
- ECLFFieldIdCollectionName = 0x00002000,
- /// Media gallery collection ID:
- /// integer
- ECLFFieldIdCollectionId = 0x00002001,
- /// Media gallery collection type:
- /// integer
- ECLFFieldIdCollectionType = 0x00002002,
- /// Media gallery collection memory:
- /// integer
- ECLFFieldIdCollectionMemory = 0x00002003,
- /// Media gallery collection properties:
- /// integer
- ECLFFieldIdCollectionProperties = 0x00002004,
- /// Media gallery collection files:
- /// descriptor
- ECLFFieldIdCollectionFiles = 0x00002005,
- /// Media gallery item count of the collection:
- /// integer
- ECLFFieldIdCollectionItemCount = 0x00002006
- };
-
-#endif
-
-// End of File
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/context_engine_plugin_api/context_engine_plugin_api.metaxml
--- a/mds_plat/context_engine_plugin_api/context_engine_plugin_api.metaxml Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,15 +0,0 @@
-
-
-context engine plugin api
-Context engine plugin api
-c++
-contextengine
-
-
-
-
-
-no
-no
-
-
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/context_engine_plugin_api/group/bld.inf
--- a/mds_plat/context_engine_plugin_api/group/bld.inf Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-/*
-* Copyright (c) 2005-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: Build information file
-*
-*/
-
-
-#include
-
-PRJ_PLATFORMS
- DEFAULT
-
-PRJ_EXPORTS
-../inc/contextplugin.h MW_LAYER_PLATFORM_EXPORT_PATH(contextplugin.h)
-../inc/contextengine.h MW_LAYER_PLATFORM_EXPORT_PATH(contextengine.h)
-
-PRJ_MMPFILES
-
-PRJ_TESTMMPFILES
-
-PRJ_TESTEXPORTS
-
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/context_engine_plugin_api/inc/contextengine.h
--- a/mds_plat/context_engine_plugin_api/inc/contextengine.h Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,224 +0,0 @@
-/*
-* Copyright (c) 2006-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: An engine to collect context related metadata.
-*
-*/
-
-// Statically linked dll
-
-#ifndef CCONTEXTENGINE_H
-#define CCONTEXTENGINE_H
-
-#include
-#include
-
-//forward declarations
-
-class CMdEObject;
-class CContextEngineAO;
-class CContextSnapshotItem;
-class CMdESession;
-class CHarvesterData;
-
-/**
-* An interface for observer that wants to be informed about
-* context engine initialization completion and
-* snapshot completion.
-*/
-class MContextInitializationObserver
- {
- public:
- /**
- * Pure virtual method. Intended to inform about
- * context engine initialization completion.
- *
- * @param aErrorCode Error code for error occurred during initialization
- */
- virtual void ContextInitializationStatus( TInt aErrorCode ) = 0;
- };
-
-/**
-* An interface for observers that want to be informed about context snapshot completion.
-*/
-class MContextSnapshotObserver
- {
- public:
- /**
- * Pure virtual method. Intended to inform about context snapshot taking completion.
- *
- * @param aErrorCode Error code for error occurred while taking the snapshot.
- */
- virtual void ContextSnapshotStatus( CHarvesterData* aHD ) = 0;
- };
-
-/**
-* An engine to collect context metadata with available context plugins.
-* CContextEngineAO is used to do the actual work.
-* This class is implemented as a Singleton.
-*/
-NONSHARABLE_CLASS( CContextEngine ) : public CBase, public MContextSnapshotObserver
- {
- public:
-
- /**
- * Destroys the implementation. This is virtual method
- * and this class is not intended for derivation, so not exported.
- */
- virtual ~CContextEngine();
-
- /**
- * Gets an instance to CContextEngine singleton.
- * A new object is created if needed.
- * If an observer object to notify is given, context plugins are initialized
- * asyncronously and observer is notified when ready.
- *
- * @param aObserver an interface class for callback or NULL
- * @return A pointer to the context engine implementation
- */
- IMPORT_C static CContextEngine* GetInstanceL( MContextInitializationObserver* aObserver = NULL );
-
- /**
- * Release an instance of this singleton.
- */
- IMPORT_C void ReleaseInstance();
-
- /**
- * Ignores the reference count and destroys this singleton.
- * THINK BEFORE USING! Should be used only instead of reference counting
- * if clients are not calling ReleaseInstance() (which they should).
- */
- IMPORT_C void Destroy();
-
- /**
- * Set a pointer to MdESession. The pointer is given forward to context plugins.
- * Session must be set in order to successfully harvest context data.
- *
- * @param aSession Session pointer to set.
- */
- IMPORT_C void SetMdeSession( CMdESession* aSession );
-
- /**
- * Context snapshot. This takes the snapshot using plug-ins.
- *
- * @param aObserver an interface class for callback.
- * @param aMetadataObject MdE object the snapshot is taken to.
- */
- IMPORT_C void ContextSnapshot( MContextSnapshotObserver& aObserver,
- CHarvesterData& aHD );
-
- /**
- * Context snapshot. This takes the snapshot using plug-ins.
- *
- * @param aObserver an interface class for callback.
- * @param aMetadataObjectArray An array of MdE objects the snapshot is taken to.
- */
- IMPORT_C void ContextSnapshot( MContextSnapshotObserver& aObserver,
- RPointerArray& aMetadataObjectArray );
-
- /**
- * Method used to clarify amount of plug-ins.
- *
- * @return Amount of plug-ins. Intended for test purposes only.
- */
- IMPORT_C TInt PluginCount();
-
- /**
- * From MContextEngineObserver.
- * Method is called by CContextEngineAO when a context snapshot is finished
- * or an error has occured.
- *
- * @param aErrorCode Error code for error occurred during snapshot.
- */
- void ContextSnapshotStatus( CHarvesterData* aHD );
-
- private:
-
- /**
- * C++ constructor - not exported;
- * implicitly called from GetInstance()
- *
- */
- CContextEngine();
-
- /**
- * 2nd phase construction, called by GetInstance()
- *
- * @param aObserver object/callback to notify when initialization is ready.
- */
- void ConstructL( MContextInitializationObserver* aObserver );
-
- /**
- * Add a new observer and metadata items to a queue.
- * These observers need to be informed when a snapshot is ready
- * and items need a context snapshot.
- *
- * @param aItem An item to add.
- */
- void QueueSnapshotItem( CContextSnapshotItem* aItem );
-
- private: // data
-
- /**
- * This active object is used to handle queued snapshot requests.
- */
- CContextEngineAO* iContextEngineAO;
-
- /**
- * Array of observers and related metadata objects that need
- * a context snapshot.
- * Related observer is informed about snapshot completion.
- */
- RPointerArray iSnapshotQueue;
-
- /**
- * In case array of objects for snapshot were passed,
- * variable to store the amount of items to be processed.
- */
- TInt iArrayCount;
-
- /**
- * In case array of objects for snapshot were passed,
- * variable to store the amount of items that have been processed.
- */
- TInt iProcessedArrayCount;
- };
-
-
-/**
-* A helper class to store this singleton's static data.
-*/
-NONSHARABLE_CLASS( CContextEngineStaticData ): public CBase
- {
- friend class CContextEngine;
-
- public:
-
- CContextEngineStaticData( CContextEngine* aContextEngine ) : iContextEngine(aContextEngine)
- {
- iRefCount = 1;
- }
-
- virtual ~CContextEngineStaticData()
- {
- delete iContextEngine;
- }
-
- protected:
-
- CContextEngine* iContextEngine;
- TInt iRefCount;
- };
-
-
-#endif // CCONTEXTENGINE_H
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/context_engine_plugin_api/inc/contextplugin.h
--- a/mds_plat/context_engine_plugin_api/inc/contextplugin.h Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,128 +0,0 @@
-/*
-* Copyright (c) 2006-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: Definition of the Context plug-in ECom interface.
-*
-*/
-
-#ifndef CCONTEXTPLUGIN_H
-#define CCONTEXTPLUGIN_H
-
-#include
-#include
-
-// forward declarations
-class CMdEObject;
-class CMdESession;
-class CHarvesterData;
-
-/** Uid for this interface */
-const TUid KCContextPluginInterfaceUid = { 0x200009F7 };
-
-class MContextPluginObserver
- {
-public:
- /**
- * A pure virtual method intended to inform about completion of context
- * plug-in initialization. Symbian error codes are used.
- *
- * @param aErrorCode Error code for error occurred during initialization.
- */
- virtual void PluginInitializationStatus( TInt aErrorCode ) = 0;
-
- /**
- * A pure virtual method intended to inform about context snapshot taking completion.
- * Symbian error codes are used.
- *
- * @param aErrorCode Error code for error occurred while taking the snapshot.
- */
- virtual void PluginSnapshotStatus( CHarvesterData* aHD ) = 0;
- };
-
-
-/**
-* This class implements the context plugin interface.
-*/
-class CContextPlugin : public CBase
- {
-public:
-
- /**
- * Creates an implementation of a desired implementation defined by the parameter.
- *
- * @param aUid
- * @return A pointer to the created plug-in.
- */
- IMPORT_C static CContextPlugin* NewL( const TUid& aUid );
-
- /**
- * Destroys the implementation. This is virtual method
- * and this class is not intended for derivation, so not exported.
- */
- IMPORT_C virtual ~CContextPlugin();
-
- /**
- * Lists all available implementations which implement this interface.
- *
- * @param[out] aImplInfoArray A list of existing implementations of the interface.
- */
- IMPORT_C static void ListImplementationsL( RImplInfoPtrArray& aImplInfoArray );
-
- /**
- * A pure virtual interface method to initialize the plug-in.
- *
- * @param aObserver An interface class to inform about initialization completion.
- */
- virtual void Init( MContextPluginObserver& aObserver ) = 0;
-
- /**
- * Set a pointer to MdESession.
- * Session is used to store harvested context data.
- *
- * @param aSession Session pointer to set.
- */
- virtual void SetMdeSession( CMdESession& aSession ) = 0;
-
- /**
- * This pure virtual method takes the context snapshot for one metadata object
- * and writes the information to the object received as parameter.
- * The observer will be informed about the status of the operation.
- *
- * @param aObserver An interface class to inform about finishing context snapshot.
- * @param aMetadataObject An object to take the snapshot for.
- */
- virtual void ContextSnapshot( MContextPluginObserver& aObserver, CHarvesterData& aHD ) = 0;
-
- /**
- * This pure virtual method takes the context snapshot for several
- * metadata object and writes the information to the all the objects received as parameter.
- * The observer will be informed about the status of the operation.
- *
- * @param aObserver An interface class to inform about finishing context snapshot.
- * @param aMetadataObjectArray Array of objects to take the snapshot for.
- */
- virtual void ContextSnapshot( MContextPluginObserver& aObserver,
- RPointerArray& aHDArray ) = 0;
-
-private: // data
-
- /**
- * Instance identifier key. When instance of an implementation is created
- * by ECOM framework, the framework will assign UID for it.
- * The UID is used in destructor to notify framework that this instance is
- * being destroyed and resources can be released.
- */
- TUid iDtor_ID_Key;
- };
-
-#endif // CCONTEXTPLUGIN_H
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/context_engine_plugin_api/tsrc/Bmarm/ContextEnginePluginTestu.def
--- a/mds_plat/context_engine_plugin_api/tsrc/Bmarm/ContextEnginePluginTestu.def Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-EXPORTS
- LibEntryL__FR13CTestModuleIf @ 1 NONAME R3UNUSED ; LibEntryL(CTestModuleIf &)
-
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/context_engine_plugin_api/tsrc/Bwins/ContextEnginePluginTestu.def
--- a/mds_plat/context_engine_plugin_api/tsrc/Bwins/ContextEnginePluginTestu.def Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-EXPORTS
- ?LibEntryL@@YAPAVCScriptBase@@AAVCTestModuleIf@@@Z @ 1 NONAME ; class CScriptBase * __cdecl LibEntryL(class CTestModuleIf &)
-
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/context_engine_plugin_api/tsrc/conf/ContextEnginePluginTest.cfg
--- a/mds_plat/context_engine_plugin_api/tsrc/conf/ContextEnginePluginTest.cfg Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,207 +0,0 @@
-#
-# Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "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: Context Engine Plugin API tests
-#
-
-// ---------------------------------------------------------------------------
-// Context Engine Plugin API test cases
-// ---------------------------------------------------------------------------
-
-// These should be run in sequential mode if several cases are run at the same
-// time!
-
-[StifSettings]
-TestThreadStackSize= 32768
-TestThreadMinHeap= 4096
-TestThreadMaxHeap= 16777216
-[EndStifSettings]
-
-[Test]
-title Get ContextEngine instance with observer
-create ContextEnginePluginTest test
-request Session
-test BeginTestSession
-wait Session
-request Init
-test CreateContextEngineWithObserver
-wait Init
-test EndTestSession
-delete test
-[Endtest]
-
-[Test]
-title Get ContextEngine instance without observer
-create ContextEnginePluginTest test
-request Session
-test BeginTestSession
-wait Session
-test CreateContextEngineWithoutObserver
-test EndTestSession
-delete test
-[Endtest]
-
-[Test]
-title Release ContextEngine instance
-create ContextEnginePluginTest test
-request Session
-test BeginTestSession
-wait Session
-test CreateContextEngineWithoutObserver
-test ReleaseContextEngineInstance
-test EndTestSession
-delete test
-[Endtest]
-
-[Test]
-title Set MdE session test
-create ContextEnginePluginTest test
-request Session
-test BeginTestSession
-wait Session
-request Init
-test SetMdESessionTest
-wait Init
-test EndTestSession
-delete test
-[Endtest]
-
-[Test]
-title Context Engine Snapshots
-create ContextEnginePluginTest test
-request Session
-test BeginTestSession
-wait Session
-test CreateObjects 3 e:\testing\data\Jpg.jpg e:\testing\data\Animated.gif e:\testing\data\H263.3gp
-request Init
-test CreateContextEngineWithObserver
-wait Init
-request Snapshot
-test ContextSnapshots engine
-wait Snapshot
-wait Snapshot
-wait Snapshot
-wait Snapshot
-wait Snapshot
-wait Snapshot
-wait Snapshot
-wait Snapshot
-wait Snapshot
-test DeleteObjects
-test EndTestSession
-delete test
-[Endtest]
-
-[Test]
-title Context Engine Multiple Snapshots
-create ContextEnginePluginTest test
-request Session
-test BeginTestSession
-wait Session
-test CreateObjects 3 e:\testing\data\Jpg.jpg e:\testing\data\Animated.gif e:\testing\data\H263.3gp
-request Init
-test CreateContextEngineWithObserver
-wait Init
-request Snapshot
-test MultipleSnapshots engine
-wait Snapshot
-wait Snapshot
-test DeleteObjects
-test EndTestSession
-delete test
-[Endtest]
-
-[Test]
-title Context Engine Plugin Count
-create ContextEnginePluginTest test
-request Session
-test BeginTestSession
-wait Session
-request Init
-test CreateContextEngineWithObserver
-wait Init
-test PluginCount
-test EndTestSession
-delete test
-[Endtest]
-
-[Test]
-title Context Engine Static Data
-create ContextEnginePluginTest test
-request Session
-test BeginTestSession
-wait Session
-test CreateContextEngineWithoutObserver
-test ContextEngineStaticData
-test EndTestSession
-delete test
-[Endtest]
-
-[Test]
-title Context Plugin Startup/Shutdown
-create ContextEnginePluginTest test
-request Session
-test BeginTestSession
-wait Session
-request Init
-test LoadPlugin
-wait Init
-test EndTestSession
-delete test
-[Endtest]
-
-[Test]
-title Context Plugin Snapshots
-create ContextEnginePluginTest test
-request Session
-test BeginTestSession
-wait Session
-test CreateObjects 3 e:\testing\data\Jpg.jpg e:\testing\data\Animated.gif e:\testing\data\H263.3gp
-request Init
-test LoadPlugin
-wait Init
-test ContextSnapshots plugin
-test DeleteObjects
-test EndTestSession
-delete test
-[Endtest]
-
-[Test]
-title Context Plugin Array Snapshots
-create ContextEnginePluginTest test
-request Session
-test BeginTestSession
-wait Session
-test CreateObjects 3 e:\testing\data\Jpg.jpg e:\testing\data\Animated.gif e:\testing\data\H263.3gp
-request Init
-test LoadPlugin
-wait Init
-test MultipleSnapshots plugin
-test DeleteObjects
-test EndTestSession
-delete test
-[Endtest]
-
-[Test]
-title Context Engine Destroy
-create ContextEnginePluginTest test
-request Session
-test BeginTestSession
-wait Session
-request Init
-test CreateContextEngineWithObserver
-wait Init
-test Destroy
-test EndTestSession
-delete test
-[Endtest]
\ No newline at end of file
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/context_engine_plugin_api/tsrc/data/mmc/ContextEnginePluginTest/Animated.gif
Binary file mds_plat/context_engine_plugin_api/tsrc/data/mmc/ContextEnginePluginTest/Animated.gif has changed
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/context_engine_plugin_api/tsrc/data/mmc/ContextEnginePluginTest/H263.3gp
Binary file mds_plat/context_engine_plugin_api/tsrc/data/mmc/ContextEnginePluginTest/H263.3gp has changed
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/context_engine_plugin_api/tsrc/data/mmc/ContextEnginePluginTest/Jpg.jpg
Binary file mds_plat/context_engine_plugin_api/tsrc/data/mmc/ContextEnginePluginTest/Jpg.jpg has changed
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/context_engine_plugin_api/tsrc/data/mmc/ContextEnginePluginTest/Thumbs.db
Binary file mds_plat/context_engine_plugin_api/tsrc/data/mmc/ContextEnginePluginTest/Thumbs.db has changed
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/context_engine_plugin_api/tsrc/eabi/ContextEnginePluginTestu.def
--- a/mds_plat/context_engine_plugin_api/tsrc/eabi/ContextEnginePluginTestu.def Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-EXPORTS
- _Z9LibEntryLR13CTestModuleIf @ 1 NONAME
-
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/context_engine_plugin_api/tsrc/group/ContextEnginePluginTest.mmp
--- a/mds_plat/context_engine_plugin_api/tsrc/group/ContextEnginePluginTest.mmp Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-/*
-* Copyright (c) 2005-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: Project definition file
-*
-*/
-
-
-#include
-#include
-
-TARGET ContextEnginePluginTest.dll
-TARGETTYPE dll
-UID 0x1000008D 0x101FB3E3
-
-CAPABILITY ALL -TCB
-VENDORID VID_DEFAULT
-
-DEFFILE ContextEnginePluginTest.DEF
-
-SOURCEPATH ../src
-SOURCE ContextEnginePluginTest.cpp
-SOURCE ContextEnginePluginTestBlocks.cpp
-
-SYSTEMINCLUDE /epoc32/include/ecom
-USERINCLUDE ../inc ../../../../inc
-
-MW_LAYER_SYSTEMINCLUDE
-
-LIBRARY euser.lib
-LIBRARY stiftestinterface.lib
-LIBRARY stiftestengine.lib
-LIBRARY contextengine.lib
-LIBRARY contextplugininterface.lib
-LIBRARY mdeclient.lib
-LIBRARY ecom.lib
-LIBRARY harvesterdata.lib
-
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/context_engine_plugin_api/tsrc/group/ContextEnginePluginTest.pkg
--- a/mds_plat/context_engine_plugin_api/tsrc/group/ContextEnginePluginTest.pkg Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +0,0 @@
-;
-; 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:
-;
-; Installation file for API test
-
-; Languages
-&EN
-
-; Header
-#{"ContextEnginePluginTest"},(0x101FB3E3),1,0,1,TYPE=SA
-
-; Localised Vendor name
-%{"Nokia-EN"}
-
-; Unique Vendor name
-:"Nokia"
-
-; Files
-"\epoc32\release\armv5\urel\ContextEnginePluginTest.dll" -"C:\sys\bin\ContextEnginePluginTest.dll"
-"..\init\ContextEnginePluginTest.ini" -"C:\testframework\ContextEnginePluginTest.ini"
-"..\conf\ContextEnginePluginTest.cfg" -"C:\testframework\ContextEnginePluginTest.cfg"
-
-"..\data\mmc\ContextEnginePluginTest\Jpg.jpg" -"E:\testing\data\Jpg.jpg"
-"..\data\mmc\ContextEnginePluginTest\Animated.gif" -"E:\testing\data\Animated.gif"
-"..\data\mmc\ContextEnginePluginTest\H263.3gp" -"E:\testing\data\H263.3gp"
-
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/context_engine_plugin_api/tsrc/group/bld.inf
--- a/mds_plat/context_engine_plugin_api/tsrc/group/bld.inf Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-/*
-* Copyright (c) 2005-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: Build information file
-*
-*/
-
-
-PRJ_PLATFORMS
- DEFAULT
-
-PRJ_EXPORTS
-
-PRJ_MMPFILES
-
-PRJ_TESTMMPFILES
-ContextEnginePluginTest.mmp
-
-PRJ_TESTEXPORTS
-../conf/ContextEnginePluginTest.cfg /epoc32/winscw/c/TestFramework/ContextEnginePluginTest.cfg
-../init/ContextEnginePluginTest.ini /epoc32/winscw/c/TestFramework/ContextEnginePluginTest.ini
-../data/mmc/ContextEnginePluginTest/Jpg.jpg /epoc32/WINSCW/C/Data/Jpg.jpg
-../data/mmc/ContextEnginePluginTest/Jpg.jpg /epoc32/WINSCW/C/Data/Animated.gif
-../data/mmc/ContextEnginePluginTest/H263.3gp /epoc32/WINSCW/C/Data/H263.3gp
-
-// End of File
-
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/context_engine_plugin_api/tsrc/inc/ContextEnginePluginTest.h
--- a/mds_plat/context_engine_plugin_api/tsrc/inc/ContextEnginePluginTest.h Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,140 +0,0 @@
-/*
-* Copyright (c) 2008-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:
-*
-*/
-
-
-#ifndef CONTEXTENGINEPLUGINTEST_H
-#define CONTEXTENGINEPLUGINTEST_H
-
-// INCLUDES
-#include
-#include
-#include
-
-#include
-#include
-#include
-
-// Logging path
-_LIT( KContextEnginePluginTestLogPath, "\\logs\\testframework\\ContextEnginePluginTest\\" );
-// Log file
-_LIT( KContextEnginePluginTestLogFile, "ContextEnginePluginTest.txt" );
-_LIT( KContextEnginePluginTestLogFileWithTitle, "ContextEnginePluginTest_[%S].txt" );
-
-// FORWARD DECLARATIONS
-class CContextEnginePluginTest;
-
-// CLASS DECLARATION
-NONSHARABLE_CLASS(CContextEnginePluginTest) : public CScriptBase,
- public MMdESessionObserver,
- public MContextInitializationObserver,
- public MContextSnapshotObserver,
- public MContextPluginObserver
-
- {
- public: // Constructors and destructor
-
- /**
- * Two-phased constructor.
- */
- static CContextEnginePluginTest* NewL( CTestModuleIf& aTestModuleIf );
-
- /**
- * Destructor.
- */
- virtual ~CContextEnginePluginTest();
-
- public: // Functions from base classes
-
- virtual TInt RunMethodL( CStifItemParser& aItem );
-
- private: // Functions from base classes
-
- void HandleSessionOpened(CMdESession& aSession, TInt aError);
- void HandleSessionError(CMdESession& aSession, TInt aError);
- void ContextInitializationStatus( TInt aError );
- void ContextSnapshotStatus( CHarvesterData* aHD );
- void PluginInitializationStatus( TInt aError );
- void PluginSnapshotStatus( CHarvesterData* aHD );
-
- private:
-
- /**
- * C++ default constructor.
- */
- CContextEnginePluginTest( CTestModuleIf& aTestModuleIf );
-
- /**
- * By default Symbian 2nd phase constructor is private.
- */
- void ConstructL();
-
- /**
- * Frees all resources allocated from test methods.
- */
- void Delete();
-
- void ActiveWait( TInt aTimeout );
-
- /**
- * Test methods are listed below.
- */
-
- // engine
- virtual TInt BeginTestSessionL( CStifItemParser& aItem );
- virtual TInt EndTestSession( CStifItemParser& aItem );
- virtual TInt CreateObjectsL( CStifItemParser& aItem );
- virtual TInt DeleteObjectsL( CStifItemParser& aItem );
- virtual TInt CreateContextEngine1L( CStifItemParser& aItem );
- virtual TInt CreateContextEngine2L( CStifItemParser& aItem );
- virtual TInt ReleaseInstanceL( CStifItemParser& aItem );
- virtual TInt SetMdeSessionL( CStifItemParser& aItem );
- virtual TInt ContextSnapshotsL( CStifItemParser& aItem );
- virtual TInt MultipleSnapshotsL( CStifItemParser& aItem );
- virtual TInt PluginCount( CStifItemParser& aItem );
- virtual TInt Destroy( CStifItemParser& aItem );
- virtual TInt ContextEngineStaticData( CStifItemParser& aItem );
-
- // plugin
- virtual TInt LoadPluginL( CStifItemParser& aItem );
-
- private: // Data
-
- CMdESession* iMdEClient;
- CContextEngine* iContextEngine;
- CHarvesterData* iHD;
-
- RPointerArray iObjectArray;
- RArray iIds;
-
- CContextPlugin* iPlugin;
- CContextPlugin* iLocationPlugin;
- CContextPlugin* iCalendarPlugin;
-
- TInt iErrorCode;
-
- TInt iInitCount;
- TInt iSnapshotCount;
- TInt iInitTarget;
- TInt iSnapshotTarget;
-
- TBool iPluginSet;
-
- };
-
-#endif // CONTEXTENGINEPLUGINTEST_H
-
-// End of File
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/context_engine_plugin_api/tsrc/init/ContextEnginePluginTest.ini
--- a/mds_plat/context_engine_plugin_api/tsrc/init/ContextEnginePluginTest.ini Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,81 +0,0 @@
-#
-# Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "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:
-#
-
-
-[Engine_Defaults]
-
-TestReportMode= FullReport # Possible values are: 'Empty', 'Summary', 'Environment',
- 'TestCases' or 'FullReport'
-
-CreateTestReport= YES # Possible values: YES or NO
-
-TestReportFilePath= C:\LOGS\TestFramework\
-TestReportFileName= ContextEnginePluginTestLog
-
-TestReportFormat= TXT # Possible values: TXT or HTML
-TestReportOutput= FILE # Possible values: FILE or RDEBUG
-TestReportFileCreationMode= OVERWRITE # Possible values: OVERWRITE or APPEND
-
-DeviceResetDllName= StifResetForNokia.dll # e.g. 'StifHWResetStub.dll' for user specific reseting
-
-DisableMeasurement= stifmeasurementdisablenone # Possible values are:
- # 'stifmeasurementdisablenone', 'stifmeasurementdisableall'
- # 'stifmeasurementplugin01', 'stifmeasurementplugin02',
- # 'stifmeasurementplugin03', 'stifmeasurementplugin04',
- # 'stifmeasurementplugin05' or 'stifbappeaprofiler'
-
-Timeout= 600000 # Default timeout value for each test case. In milliseconds
-#UITestingSupport= YES # Possible values: YES or NO
-#SeparateProcesses= YES # Possible values: YES or NO (default: NO)
-[End_Defaults]
-
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-
-[New_Module]
-ModuleName= TestScripter
-TestCaseFile= c:\testframework\ContextEnginePluginTest.cfg
-[End_Module]
-
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-
-[Logger_Defaults]
-
-#NOTE: If you want to set Logger using next setting(s) remove comment(s)'#'
-#NOTE: TestEngine and TestServer logging settings cannot change here
-
-CreateLogDirectories= YES # Possible values: YES or NO
-
-#EmulatorBasePath= C:\LOGS\TestFramework\
-#EmulatorFormat= HTML # Possible values: TXT or HTML
-#EmulatorOutput= FILE # Possible values: FILE or RDEBUG
-
-HardwareBasePath= C:\
-#HardwareFormat= HTML # Possible values: TXT or HTML
-#HardwareOutput= FILE # Possible values: FILE or RDEBUG
-
-#FileCreationMode= OVERWRITE # Possible values: OVERWRITE or APPEND
-
-#ThreadIdToLogFile= YES # Possible values: YES or NO
-#WithTimeStamp= YES # Possible values: YES or NO
-#WithLineBreak= YES # Possible values: YES or NO
-#WithEventRanking= YES # Possible values: YES or NO
-
-#FileUnicode= YES # Possible values: YES or NO
-AddTestCaseTitle= YES # Possible values: YES or NO
-[End_Logger_Defaults]
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-
-# End of file
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/context_engine_plugin_api/tsrc/src/ContextEnginePluginTest.cpp
--- a/mds_plat/context_engine_plugin_api/tsrc/src/ContextEnginePluginTest.cpp Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,130 +0,0 @@
-/*
-* Copyright (c) 2008-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:
-*
-*/
-
-
-// INCLUDE FILES
-#include
-#include "ContextEnginePluginTest.h"
-#include
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CContextEnginePluginTest::CContextEnginePluginTest
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-//
-CContextEnginePluginTest::CContextEnginePluginTest(
- CTestModuleIf& aTestModuleIf ):
- CScriptBase( aTestModuleIf )
- {
- }
-
-// -----------------------------------------------------------------------------
-// CContextEnginePluginTest::ConstructL
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-//
-void CContextEnginePluginTest::ConstructL()
- {
- //Read logger settings to check whether test case name is to be
- //appended to log file name.
- RSettingServer settingServer;
- TInt ret = settingServer.Connect();
- if(ret != KErrNone)
- {
- User::Leave(ret);
- }
- // Struct to StifLogger settigs.
- TLoggerSettings loggerSettings;
- // Parse StifLogger defaults from STIF initialization file.
- ret = settingServer.GetLoggerSettings(loggerSettings);
- if(ret != KErrNone)
- {
- User::Leave(ret);
- }
- // Close Setting server session
- settingServer.Close();
-
- TFileName logFileName;
-
- if(loggerSettings.iAddTestCaseTitle)
- {
- TName title;
- TestModuleIf().GetTestCaseTitleL(title);
- logFileName.Format(KContextEnginePluginTestLogFileWithTitle, &title);
- }
- else
- {
- logFileName.Copy(KContextEnginePluginTestLogFile);
- }
-
- iLog = CStifLogger::NewL( KContextEnginePluginTestLogPath,
- logFileName,
- CStifLogger::ETxt,
- CStifLogger::EFile,
- EFalse );
-
- }
-
-// -----------------------------------------------------------------------------
-// CContextEnginePluginTest::NewL
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-//
-CContextEnginePluginTest* CContextEnginePluginTest::NewL(
- CTestModuleIf& aTestModuleIf )
- {
- CContextEnginePluginTest* self = new (ELeave) CContextEnginePluginTest( aTestModuleIf );
-
- CleanupStack::PushL( self );
- self->ConstructL();
- CleanupStack::Pop( self );
-
- return self;
-
- }
-
-// Destructor
-CContextEnginePluginTest::~CContextEnginePluginTest()
- {
-
- // Delete resources allocated from test methods
- Delete();
-
- // Delete logger
- delete iLog;
-
- }
-
-// ========================== OTHER EXPORTED FUNCTIONS =========================
-
-// -----------------------------------------------------------------------------
-// LibEntryL is a polymorphic Dll entry point.
-// Returns: CScriptBase: New CScriptBase derived object
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CScriptBase* LibEntryL(
- CTestModuleIf& aTestModuleIf ) // Backpointer to STIF Test Framework
- {
-
- return ( CScriptBase* ) CContextEnginePluginTest::NewL( aTestModuleIf );
-
- }
-
-// End of File
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/context_engine_plugin_api/tsrc/src/ContextEnginePluginTestBlocks.cpp
--- a/mds_plat/context_engine_plugin_api/tsrc/src/ContextEnginePluginTestBlocks.cpp Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,981 +0,0 @@
-/*
-* Copyright (c) 2008-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:
-*
-*/
-
-
-// [INCLUDE FILES] - do not remove
-#include
-#include
-#include
-#include
-#include
-#include "ContextEnginePluginTest.h"
-
-#include
-#include "mdsutils.h"
-#include "mdeconstants.h"
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CContextEnginePluginTest::Delete
-// Delete here all resources allocated and opened from test methods.
-// Called from destructor.
-// -----------------------------------------------------------------------------
-//
-void CContextEnginePluginTest::Delete()
- {
-
- }
-
-// -----------------------------------------------------------------------------
-// CContextEnginePluginTest::RunMethodL
-// Run specified method. Contains also table of test mothods and their names.
-// -----------------------------------------------------------------------------
-//
-TInt CContextEnginePluginTest::RunMethodL(
- CStifItemParser& aItem )
- {
-
- static TStifFunctionInfo const KFunctions[] =
- {
- // Copy this line for every implemented function.
- // First string is the function name used in TestScripter script file.
- // Second is the actual implementation member function.
-
- // engine
- ENTRY( "BeginTestSession", CContextEnginePluginTest::BeginTestSessionL ),
- ENTRY( "EndTestSession", CContextEnginePluginTest::EndTestSession ),
- ENTRY( "CreateObjects", CContextEnginePluginTest::CreateObjectsL ),
- ENTRY( "DeleteObjects", CContextEnginePluginTest::DeleteObjectsL ),
- ENTRY( "CreateContextEngineWithObserver", CContextEnginePluginTest::CreateContextEngine1L ),
- ENTRY( "CreateContextEngineWithoutObserver", CContextEnginePluginTest::CreateContextEngine2L ),
- ENTRY( "ReleaseContextEngineInstance", CContextEnginePluginTest::ReleaseInstanceL ),
- ENTRY( "SetMdESessionTest", CContextEnginePluginTest::SetMdeSessionL ),
- ENTRY( "PluginCount", CContextEnginePluginTest::PluginCount ),
- ENTRY( "Destroy", CContextEnginePluginTest::Destroy ),
- ENTRY( "ContextEngineStaticData", CContextEnginePluginTest::ContextEngineStaticData ),
-
- ENTRY( "ContextSnapshots", CContextEnginePluginTest::ContextSnapshotsL ),
- ENTRY( "MultipleSnapshots", CContextEnginePluginTest::MultipleSnapshotsL ),
-
- // plugin
- ENTRY( "LoadPlugin", CContextEnginePluginTest::LoadPluginL ),
-
- };
-
- const TInt count = sizeof( KFunctions ) /
- sizeof( TStifFunctionInfo );
-
- return RunInternalL( KFunctions, count, aItem );
-
- }
-
-// -----------------------------------------------------------------------------
-// CContextEnginePluginTest::HandleSessionOpened
-// -----------------------------------------------------------------------------
-//
-void CContextEnginePluginTest::HandleSessionOpened( CMdESession& /*aClient*/, TInt aError )
- {
- _LIT( KMsg, "CallBck HandleSessionOpened - Error code : %d" );
- TBuf <100> msg;
- msg.Format(KMsg, aError);
- iLog->Log( msg );
- RDebug::Print( msg );
-
- // session event
- TEventIf event( TEventIf::ESetEvent, _L("Session") );
- TestModuleIf().Event( event );
- }
-
-// -----------------------------------------------------------------------------
-// CContextEnginePluginTest::HandleSessionError
-// -----------------------------------------------------------------------------
-//
-void CContextEnginePluginTest::HandleSessionError( CMdESession& /*aClient*/, TInt aError )
- {
- _LIT( KMsg, "CallBck HandleSessionError - Error code : %d" );
- TBuf <100> msg;
- msg.Format(KMsg, aError);
- iLog->Log( msg );
- RDebug::Print( msg );
-
- // session event
- TEventIf event( TEventIf::ESetEvent, _L("Session") );
- TestModuleIf().Event( event );
- }
-
-// -----------------------------------------------------------------------------
-// CContextEnginePluginTest::ContextInitializationStatus
-// -----------------------------------------------------------------------------
-//
-void CContextEnginePluginTest::ContextInitializationStatus( TInt aError )
- {
- _LIT( KMsg, "CallBck ContextInitializationStatus - Error code : %d" );
- TBuf <100> msg;
- msg.Format(KMsg, aError);
- iLog->Log( msg );
- RDebug::Print( msg );
-
- iInitCount++;
-
- // session event
- TEventIf event( TEventIf::ESetEvent, _L("Init") );
- TestModuleIf().Event( event );
- }
-
-// -----------------------------------------------------------------------------
-// CContextEnginePluginTest::ContextSnapshotStatus
-// -----------------------------------------------------------------------------
-//
-void CContextEnginePluginTest::ContextSnapshotStatus( CHarvesterData* aHD )
- {
- _LIT( KMsg1, "Enter ContextSnapshotStatus" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- _LIT( KMsg, "CallBck ContextSnapshotStatus - Error code : %d" );
- TBuf <100> msg;
- msg.Format(KMsg, aHD->ErrorCode());
- iLog->Log( msg );
- RDebug::Print( msg );
-
- if( !aHD )
- {
- iErrorCode = KErrUnknown;
- }
-
- if( aHD && iErrorCode == KErrNone )
- {
- iErrorCode = aHD->ErrorCode();
- }
-
- iSnapshotCount++;
-
- // session event
- TEventIf event( TEventIf::ESetEvent, _L("Snapshot") );
- TestModuleIf().Event( event );
-
- _LIT( KMsg2, "Exit ContextSnapshotStatus" );
- iLog->Log( KMsg2 );
- RDebug::Print( KMsg2 );
- }
-
-// -----------------------------------------------------------------------------
-// CContextEnginePluginTest::PluginInitializationStatus
-// -----------------------------------------------------------------------------
-//
-void CContextEnginePluginTest::PluginInitializationStatus( TInt aError )
- {
- _LIT( KMsg, "CallBck PluginInitializationStatus - Error code : %d" );
- TBuf <100> msg;
- msg.Format(KMsg, aError);
- iLog->Log( msg );
- RDebug::Print( msg );
-
- iInitCount++;
-
- // session event
- TEventIf event( TEventIf::ESetEvent, _L("Init") );
- TestModuleIf().Event( event );
- }
-
-// -----------------------------------------------------------------------------
-// CContextEnginePluginTest::PluginSnapshotStatus
-// -----------------------------------------------------------------------------
-//
-void CContextEnginePluginTest::PluginSnapshotStatus( CHarvesterData* aHD )
- {
- _LIT( KMsg1, "Enter PluginSnapshotStatus" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- _LIT( KMsg, "CallBck PluginSnapshotStatus - Error code : %d" );
- TBuf <100> msg;
- msg.Format(KMsg, aHD->ErrorCode());
- iLog->Log( msg );
- RDebug::Print( msg );
-
- if( !aHD )
- {
- iErrorCode = KErrUnknown;
- }
-
- if( aHD && iErrorCode == KErrNone )
- {
- iErrorCode = aHD->ErrorCode();
- }
-
- iSnapshotCount++;
-
- // session event
- TEventIf event( TEventIf::ESetEvent, _L("Snapshot") );
- TestModuleIf().Event( event );
-
- _LIT( KMsg2, "Exit PluginSnapshotStatus" );
- iLog->Log( KMsg2 );
- RDebug::Print( KMsg2 );
- }
-
-// -----------------------------------------------------------------------------
-// CContextEnginePluginTest::ActiveWait
-// -----------------------------------------------------------------------------
-//
-void CContextEnginePluginTest::ActiveWait( TInt aTimeout )
- {
- _LIT( KMsg1, "Enter ActiveWait" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- TTimeIntervalMicroSeconds32 timeout( aTimeout );
- RTimer timer;
- TRequestStatus status;
-
- timer.CreateLocal();
- timer.After(status,timeout);
-
- User::WaitForAnyRequest();
-
- timer.Close();
-
- _LIT( KMsg2, "Exit ActiveWait" );
- iLog->Log( KMsg2 );
- RDebug::Print( KMsg2 );
- }
-
-// -----------------------------------------------------------------------------
-// CContextEnginePluginTest::BeginTestSessionL
-// -----------------------------------------------------------------------------
-//
-TInt CContextEnginePluginTest::BeginTestSessionL( CStifItemParser& /* aItem */ )
- {
- iMdEClient = NULL;
- TRAPD( error, iMdEClient = CMdESession::NewL( *this ) );
- iErrorCode = KErrNone;
-
- _LIT( KMsg, "Exit BeginTestSession - Error code : %d" );
- TBuf <100> msg;
- msg.Format(KMsg, error);
- iLog->Log( msg );
- RDebug::Print( msg );
-
- iInitCount = 0;
- iSnapshotCount = 0;
- iInitTarget = 0;
- iSnapshotTarget = 0;
-
- iPluginSet = EFalse;
-
- User::LeaveIfError( error );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CContextEnginePluginTest::EndTestSession
-// -----------------------------------------------------------------------------
-//
-TInt CContextEnginePluginTest::EndTestSession( CStifItemParser& /* aItem */ )
- {
- _LIT( KMsg1, "Enter EndTestSession" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- iIds.Close();
- iObjectArray.Close();
-
- if ( iContextEngine )
- {
- iContextEngine->ReleaseInstance();
- iContextEngine = NULL;
- }
-
- if ( iPlugin )
- {
- delete iPlugin;
- iPlugin = NULL;
- }
-
- if ( iLocationPlugin && !iPluginSet )
- {
- delete iLocationPlugin;
- iLocationPlugin = NULL;
- }
-
- if ( iCalendarPlugin )
- {
- delete iCalendarPlugin;
- iCalendarPlugin = NULL;
- }
-
- if ( iMdEClient )
- {
- delete iMdEClient;
- iMdEClient = NULL;
- }
-
- iHD = NULL;
-
- REComSession::FinalClose();
-
- if( iInitCount != iInitTarget )
- {
- return KErrUnknown;
- }
-
- if( iSnapshotCount != iSnapshotTarget )
- {
- return KErrUnknown;
- }
-
- _LIT( KMsg2, "Exit EndTestSession" );
- iLog->Log( KMsg2 );
- RDebug::Print( KMsg2 );
-
- return iErrorCode;
- }
-
-// -----------------------------------------------------------------------------
-// CContextEnginePluginTest::CreateObjects
-// -----------------------------------------------------------------------------
-//
-TInt CContextEnginePluginTest::CreateObjectsL( CStifItemParser& aItem )
- {
- CMdENamespaceDef& defaultNamespace = iMdEClient->GetDefaultNamespaceDefL();
- CMdEObjectDef& imageDef = defaultNamespace.GetObjectDefL( MdeConstants::Image::KImageObject );
-
- // Mandatory parameters for any object.
- CMdEPropertyDef& creationDef = imageDef.GetPropertyDefL( MdeConstants::Object::KCreationDateProperty );
- CMdEPropertyDef& modifiedDef = imageDef.GetPropertyDefL( MdeConstants::Object::KLastModifiedDateProperty );
- CMdEPropertyDef& sizeDef = imageDef.GetPropertyDefL( MdeConstants::Object::KSizeProperty );
- CMdEPropertyDef& itemTypeDef = imageDef.GetPropertyDefL( MdeConstants::Object::KItemTypeProperty );
-
- CMdEPropertyDef& descriptionPropertyDef = imageDef.GetPropertyDefL( MdeConstants::MediaObject::KDescriptionProperty );
- CMdEPropertyDef& widthDef = imageDef.GetPropertyDefL( MdeConstants::MediaObject::KWidthProperty );
- CMdEPropertyDef& heightDef = imageDef.GetPropertyDefL( MdeConstants::MediaObject::KHeightProperty );
- CMdEPropertyDef& makeDef = imageDef.GetPropertyDefL( MdeConstants::Image::KMakeProperty );
- CMdEPropertyDef& modelDef = imageDef.GetPropertyDefL( MdeConstants::Image::KModelProperty );
-
- CMdEObject* object = NULL;
- TItemId objectId(0);
- TTime currTime;
- TPtrC inputFile;
- TInt count(0);
- TBuf <100> msg;
-
- iIds.Reset();
-
- User::LeaveIfError( aItem.GetNextInt( count ));
-
- for ( TInt i = 0; i < count; ++i )
- {
- User::LeaveIfError( aItem.GetNextString( inputFile ));
-
- // create object
- iMdEClient->RemoveObjectL(inputFile);
- object = iMdEClient->NewObjectLC(imageDef, inputFile);
-
- currTime.HomeTime();
- object->AddTimePropertyL(creationDef, currTime);
- object->AddTimePropertyL(modifiedDef, currTime);
- object->AddUint32PropertyL( sizeDef, 0 );
- object->AddTextPropertyL( itemTypeDef, MdeConstants::Image::KImageObject );
-
- objectId = iMdEClient->AddObjectL(*object);
- iIds.Append(objectId);
-
- CleanupStack::PopAndDestroy(object);
- object = NULL;
-
- // open object for modification
- TRAPD( openError, object = iMdEClient->OpenObjectL(objectId) );
-
- if ( !object || openError != KErrNone )
- {
- _LIT( KOpenErr, " ModifyObjects - Open error : %d" );
- msg.Format(KOpenErr, openError);
- iLog->Log( msg );
- RDebug::Print(msg);
-
- User::LeaveIfError(openError);
- }
-
- CleanupStack::PushL( object );
-
- // add properties
- CMdEProperty* property = NULL;
-
- // Description
- _LIT( KDesc, "Description" );
- object->Property( descriptionPropertyDef, property );
-
- if ( property )
- {
- property->SetTextValueL( KDesc );
- }
- else
- {
- object->AddTextPropertyL( descriptionPropertyDef, KDesc );
- }
-
- property = NULL;
-
- // Width
- object->Property( widthDef, property );
-
- if ( property )
- {
- property->SetUint16ValueL( 100 );
- }
- else
- {
- object->AddUint16PropertyL( widthDef, 100 );
- }
-
- property = NULL;
-
- // Height
- object->Property( heightDef, property );
-
- if ( property )
- {
- property->SetUint16ValueL( 100 );
- }
- else
- {
- object->AddUint16PropertyL( heightDef, 100 );
- }
-
- property = NULL;
-
- // Maker
- object->Property( makeDef, property );
-
- _LIT( KOnkia, "Maker" );
- if ( property )
- {
- property->SetTextValueL( KOnkia );
- }
- else
- {
- object->AddTextPropertyL( makeDef, KOnkia );
- }
-
- property = NULL;
-
- // Model
- object->Property( modelDef, property );
- _LIT( KModel, "Model" );
- if ( property )
- {
- property->SetTextValueL( KModel );
- }
- else
- {
- object->AddTextPropertyL( modelDef, KModel );
- }
-
- // Commit object
- TRAPD( commitError, iMdEClient->CommitObjectL(*object) );
- if ( commitError != KErrNone )
- {
- _LIT( KCommErr, " CreateObjects - Commit error : %d" );
- msg.Format(KCommErr, commitError);
- iLog->Log( msg );
- RDebug::Print(msg);
-
- User::LeaveIfError(commitError);
- }
-
- CleanupStack::PopAndDestroy(object);
- object = NULL;
- }
-
- _LIT( KMsg, "Exit EndCreateObjects" );
- iLog->Log( KMsg );
- RDebug::Print( KMsg );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CContextEnginePluginTest::DeleteObjects
-// -----------------------------------------------------------------------------
-//
-TInt CContextEnginePluginTest::DeleteObjectsL( CStifItemParser& /* aItem */ )
- {
- ActiveWait( 2000000 );
-
- _LIT( KMsg1, "Enter EndDeleteObjects" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- TInt count(0);
- count = iIds.Count();
-
- for ( TInt i = 0; i < count; ++i )
- {
- TInt id = iIds[i];
- iMdEClient->RemoveObjectL( id );
- }
-
- iIds.Reset();
-
- _LIT( KMsg2, "Exit EndDeleteObjects" );
- iLog->Log( KMsg2 );
- RDebug::Print( KMsg2 );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CContextEnginePluginTest::CreateContextEngine1L
-// -----------------------------------------------------------------------------
-//
-TInt CContextEnginePluginTest::CreateContextEngine1L( CStifItemParser& /* aItem */ )
- {
- _LIT( KMsg1, "Enter CreateContextEngine" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- iInitTarget = 1;
-
- iContextEngine = NULL;
- iContextEngine = CContextEngine::GetInstanceL( this );
-
- if( !iContextEngine )
- {
- User::Leave( KErrUnknown );
- }
-
- _LIT( KMsg2, "Exit CreateContextEngine" );
- iLog->Log( KMsg2 );
- RDebug::Print( KMsg2 );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CContextEnginePluginTest::CreateContextEngine2L
-// -----------------------------------------------------------------------------
-//
-TInt CContextEnginePluginTest::CreateContextEngine2L( CStifItemParser& /* aItem */ )
- {
- _LIT( KMsg1, "Enter CreateContextEngine" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- iContextEngine = NULL;
- iContextEngine = CContextEngine::GetInstanceL();
-
- // 4 seconds
- TTimeIntervalMicroSeconds32 timeout(4000000);
- RTimer timer;
- TRequestStatus status;
-
- timer.CreateLocal();
- timer.After( status,timeout );
-
- User::WaitForAnyRequest();
-
- timer.Close();
-
- if( !iContextEngine )
- {
- User::Leave( KErrUnknown );
- }
-
- _LIT( KMsg2, "Exit CreateContextEngine" );
- iLog->Log( KMsg2 );
- RDebug::Print( KMsg2 );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CContextEnginePluginTest::CreateContextEngine2L
-// -----------------------------------------------------------------------------
-//
-TInt CContextEnginePluginTest::ReleaseInstanceL( CStifItemParser& /* aItem */ )
- {
- _LIT( KMsg1, "Enter ReleaseInstanceL" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- if( !iContextEngine )
- {
- User::Leave( KErrUnknown );
- }
-
- iContextEngine->ReleaseInstance();
-
- iContextEngine = NULL;
-
- _LIT( KMsg2, "Exit ReleaseInstanceL" );
- iLog->Log( KMsg2 );
- RDebug::Print( KMsg2 );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CContextEnginePluginTest::CreateContextEngine2L
-// -----------------------------------------------------------------------------
-//
-TInt CContextEnginePluginTest::SetMdeSessionL( CStifItemParser& /* aItem */ )
- {
- _LIT( KMsg1, "Enter SetMdeSessionL" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- iInitTarget = 1;
-
- iContextEngine = NULL;
- iContextEngine = CContextEngine::GetInstanceL( this );
-
- if( !iContextEngine )
- {
- User::Leave( KErrUnknown );
- }
-
- iContextEngine->SetMdeSession( iMdEClient );
-
- if( !iContextEngine || !iMdEClient )
- {
- User::Leave( KErrUnknown );
- }
-
- iContextEngine->SetMdeSession( NULL );
-
- if( !iContextEngine )
- {
- User::Leave( KErrUnknown );
- }
-
- _LIT( KMsg2, "Exit SetMdeSessionL" );
- iLog->Log( KMsg2 );
- RDebug::Print( KMsg2 );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CContextEnginePluginTest::ContextSnapshots
-// -----------------------------------------------------------------------------
-//
-TInt CContextEnginePluginTest::ContextSnapshotsL( CStifItemParser& aItem )
- {
- _LIT( KMsg1, "Enter ContextSnapshots" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- iSnapshotTarget = 9;
-
- const TInt KLoopCount = 3;
- TInt count = iIds.Count();
-
- CMdEObject* mdeObject;
- iObjectArray.Reset();
-
- // choose if plugin tested, otherwise engine
- TPtrC testPlugin;
- TBool plugin = EFalse;
- User::LeaveIfError( aItem.GetNextString( testPlugin ));
- _LIT( pluginString, "plugin" );
- if( testPlugin == pluginString )
- {
- plugin = ETrue;
- }
-
- // get object
- mdeObject = iMdEClient->GetObjectL( iIds[0] );
-
- HBufC* uriBuf = mdeObject->Uri().AllocLC();
- iHD = CHarvesterData::NewL( uriBuf );
- iHD->SetMdeObject( mdeObject );
- CleanupStack::Pop( uriBuf );
-
- // snapshots
- for ( TInt i = 0; i < KLoopCount; i++ )
- {
- if (plugin)
- {
- iPlugin->ContextSnapshot( *this, *iHD );
- }
- else
- {
- iContextEngine->ContextSnapshot( *this, *iHD );
- }
- }
- mdeObject = NULL;
-
- mdeObject = iMdEClient->GetObjectL( iIds[1] );
- uriBuf = mdeObject->Uri().AllocLC();
- iHD = CHarvesterData::NewL( uriBuf );
- iHD->SetMdeObject( mdeObject );
- CleanupStack::Pop( uriBuf );
-
- // snapshots
- for ( TInt i = 0; i < KLoopCount; i++ )
- {
- if (plugin)
- {
- iPlugin->ContextSnapshot( *this, *iHD );
- }
- else
- {
- iContextEngine->ContextSnapshot( *this, *iHD );
- }
- }
- mdeObject = NULL;
-
- mdeObject = iMdEClient->GetObjectL( iIds[2] );
- uriBuf = mdeObject->Uri().AllocLC();
- iHD = CHarvesterData::NewL( uriBuf );
- iHD->SetMdeObject( mdeObject );
- CleanupStack::Pop( uriBuf );
-
- // snapshots
- for ( TInt i = 0; i < KLoopCount; i++ )
- {
- if (plugin)
- {
- iPlugin->ContextSnapshot( *this, *iHD );
- }
- else
- {
- iContextEngine->ContextSnapshot( *this, *iHD );
- }
- }
-
- _LIT( KMsg2, "Exit ContextSnapshots" );
- iLog->Log( KMsg2 );
- RDebug::Print( KMsg2 );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CContextEnginePluginTest::MultipleSnapshots
-// -----------------------------------------------------------------------------
-//
-TInt CContextEnginePluginTest::MultipleSnapshotsL( CStifItemParser& aItem )
- {
- _LIT( KMsg1, "Enter MultipleSnapshots" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- iSnapshotTarget = 3;
-
- TInt count = iIds.Count();
-
- CMdEObject* mdeObject;
- iObjectArray.Reset();
-
- // choose if plugin tested, otherwise engine
- TPtrC testPlugin;
- TBool plugin = EFalse;
- User::LeaveIfError( aItem.GetNextString( testPlugin ));
- _LIT( pluginString, "plugin" );
- if( testPlugin == pluginString )
- {
- plugin = ETrue;
- }
-
- // multiple objects
- for ( TInt i = 0; i < count; ++i )
- {
- iHD = NULL;
- mdeObject = NULL;
-
- mdeObject = iMdEClient->GetObjectL( iIds[i] );
- HBufC* uriBuf = mdeObject->Uri().AllocLC();
- iHD = CHarvesterData::NewL( uriBuf );
- iHD->SetMdeObject( mdeObject );
- CleanupStack::Pop( uriBuf );
-
- iObjectArray.Append( iHD );
- }
-
- // snapshots
- if( plugin )
- {
- iPlugin->ContextSnapshot( *this, iObjectArray );
- }
- else
- {
- iContextEngine->ContextSnapshot( *this, iObjectArray );
- }
-
- _LIT( KMsg2, "Exit MultipleSnapshots" );
- iLog->Log( KMsg2 );
- RDebug::Print( KMsg2 );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CContextEnginePluginTest::PluginCount
-// -----------------------------------------------------------------------------
-//
-TInt CContextEnginePluginTest::PluginCount( CStifItemParser& /* aItem */ )
- {
- _LIT( KMsg1, "Enter PluginCount" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- TInt count(0);
- count = iContextEngine->PluginCount();
-
- if( count != 2 )
- {
- return KErrNotFound;
- }
-
- _LIT( KMsg, "Exit PluginCount : %d" );
- TBuf <100> msg;
- msg.Format(KMsg, count);
- iLog->Log( msg );
- RDebug::Print(msg);
-
- _LIT( KMsg2, "Enter PluginCount" );
- iLog->Log( KMsg2 );
- RDebug::Print( KMsg2 );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CContextEnginePluginTest::Destroy
-// -----------------------------------------------------------------------------
-//
-TInt CContextEnginePluginTest::Destroy( CStifItemParser& /* aItem */ )
- {
- _LIT( KMsg1, "Enter Destroy" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- iContextEngine->Destroy();
-
- _LIT( KMsg2, "Exit Destroy" );
- iLog->Log( KMsg2 );
- RDebug::Print( KMsg2 );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CContextEnginePluginTest::ContextEngineStaticData
-// -----------------------------------------------------------------------------
-//
-TInt CContextEnginePluginTest::ContextEngineStaticData( CStifItemParser& /* aItem */ )
- {
- _LIT( KMsg1, "Enter ContextEngineStaticData" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- const TInt KContextEngineTLSKey = 0x200009f6;
-
- CContextEngineStaticData* data = static_cast(
- UserSvr::DllTls(KContextEngineTLSKey) );
-
- if( !data )
- {
- return KErrUnknown;
- }
-
- _LIT( KMsg2, "Exit ContextEngineStaticData" );
- iLog->Log( KMsg2 );
- RDebug::Print( KMsg2 );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CContextEnginePluginTest::LoadPluginL
-// -----------------------------------------------------------------------------
-//
-TInt CContextEnginePluginTest::LoadPluginL( CStifItemParser& /* aItem */ )
- {
- _LIT( KMsg1, "Enter LoadPlugins" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- iInitTarget = 2;
-
- TUid calendarContextUID = { 0x102823CB }; // calendar context plugin uid
- TUid locationContextUID = { 0x200071D0 }; // location context plugin uid
-
- RImplInfoPtrArray infoArray;
-
- TCleanupItem cleanupItem( MdsUtils::CleanupEComArray, &infoArray );
- CleanupStack::PushL( cleanupItem );
-
- CContextPlugin::ListImplementationsL( infoArray );
- TInt count( 0 );
- count = infoArray.Count();
-
- TBool locationPluginFound( EFalse );
- TBool calendarPluginFound( EFalse );
- for ( TInt i=0; i < count; i++ )
- {
- TUid uid = infoArray[i]->ImplementationUid();
-
- // context plugin found
- if( uid == locationContextUID )
- {
- iLocationPlugin = CContextPlugin::NewL( uid );
- iLocationPlugin->SetMdeSession(*iMdEClient);
- iLocationPlugin->Init(*this);
- locationPluginFound = ETrue;
- iPlugin = iLocationPlugin;
- iPluginSet = ETrue;
- }
- else if( uid == calendarContextUID )
- {
- iCalendarPlugin = CContextPlugin::NewL( uid );
- iCalendarPlugin->SetMdeSession(*iMdEClient);
- iCalendarPlugin->Init(*this);
- calendarPluginFound = ETrue;
- }
- }
-
- CleanupStack::PopAndDestroy( &infoArray ); // infoArray, results in a call to CleanupEComArray
-
- if( !locationPluginFound )
- {
- _LIT( KLocation, "Location context plugin not found" );
- iLog->Log( KLocation );
- RDebug::Print( KLocation );
- return KErrNotFound;
- }
-
- if( !calendarPluginFound )
- {
- _LIT( KCalendar, "Calendar context plugin not found" );
- iLog->Log( KCalendar );
- RDebug::Print( KCalendar );
- return KErrNotFound;
- }
-
- _LIT( KMsg2, "Exit LoadPlugins" );
- iLog->Log( KMsg2 );
- RDebug::Print( KMsg2 );
-
- return KErrNone;
- }
-
-// [End of File] - Do not remove
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/group/bld.inf
--- a/mds_plat/group/bld.inf Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +0,0 @@
-/*
-* Copyright (c) 2005-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: Build information file
-*
-*/
-
-
-#include "../context_engine_plugin_api/group/bld.inf"
-#include "../harvester_framework_api/group/bld.inf"
-#include "../location_manager_api/group/bld.inf"
-#include "../metadata_engine_api/group/bld.inf"
-#ifdef RD_MDS_2_5
-#include "../content_listing_framework_collection_manager_api/group/bld.inf"
-#include "../content_listing_framework_extended_api/group/bld.inf"
-#endif
-
-PRJ_PLATFORMS
- DEFAULT
-
-PRJ_EXPORTS
-
-PRJ_MMPFILES
-
-PRJ_TESTMMPFILES
-
-PRJ_TESTEXPORTS
-
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/harvester_framework_api/group/bld.inf
--- a/mds_plat/harvester_framework_api/group/bld.inf Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-/*
-* Copyright (c) 2005-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: Build information file
-*
-*/
-
-
-#include
-
-PRJ_PLATFORMS
- DEFAULT
-
-PRJ_EXPORTS
-../inc/composerplugin.h MW_LAYER_PLATFORM_EXPORT_PATH(composerplugin.h)
-../inc/harvesterclient.h MW_LAYER_PLATFORM_EXPORT_PATH(harvesterclient.h)
-../inc/harvesterclientdata.h MW_LAYER_PLATFORM_EXPORT_PATH(harvesterclientdata.h)
-../inc/placeholderdata.h MW_LAYER_PLATFORM_EXPORT_PATH(placeholderdata.h)
-../inc/harvesterdata.h MW_LAYER_PLATFORM_EXPORT_PATH(harvesterdata.h)
-../inc/harvesterplugin.h MW_LAYER_PLATFORM_EXPORT_PATH(harvesterplugin.h)
-../inc/monitorplugin.h MW_LAYER_PLATFORM_EXPORT_PATH(monitorplugin.h)
-../inc/harvestereventenum.h MW_LAYER_PLATFORM_EXPORT_PATH(harvestereventenum.h)
-../inc/harvesterpauseps.h MW_LAYER_PLATFORM_EXPORT_PATH(harvesterpauseps.h)
-
-PRJ_MMPFILES
-
-PRJ_TESTMMPFILES
-
-PRJ_TESTEXPORTS
-
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/harvester_framework_api/harvester_framework_api.metaxml
--- a/mds_plat/harvester_framework_api/harvester_framework_api.metaxml Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,17 +0,0 @@
-
-
-harvester_framework_api
-harvester framework api
-c++
-harvester
-
-
-
-
-
-
-
-no
-no
-
-
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/harvester_framework_api/inc/composerplugin.h
--- a/mds_plat/harvester_framework_api/inc/composerplugin.h Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,151 +0,0 @@
-/*
-* Copyright (c) 2006-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: Composer Plug-in ECom interface
-*
-*/
-
-#ifndef __CCOMPOSERPLUGIN_H__
-#define __CCOMPOSERPLUGIN_H__
-
-#include
-#include
-#include
-
-#include
-
-/** @var Uid for this interface */
-const TUid KCComposerPluginInterfaceUid = { 0x2000717E };
-
- /**
- * Composer Plug-in ECom interface definition. Composer plug-in implementation
- * needs to inherit this class and implement the pure virtual methods which exist
- * in this interface.
- *
- * Example:
- *
- * class CMyVideoComposerPlugin: public CComposerPlugin
- * {
- * protected:
- * void SetObservers();
- * void RemoveObservers();
- *
- * // Because CComposerPlugin inherits MMdEObjectObserver
- * void HandleObjectNotification(CMdESession& aSession,
- * TObserverNotificationType aType,
- * const RArray& aObjectIdArray);
- *
- * private:
- * // Active object which does the actual binary writing
- * // so that this interface and its observers remain responsive
- * CMyVideoComposerAO* iVideoComposerAO;
- * }
- *
- * void SetObservers()
- * {
- * // We want to listen to changes in Video metadata objects
- * // and setup an observer for this
- * CMdENamespaceDef& defaultNamespace = iSession->GetDefaultNamespaceDefL();
- * CMdEObjectDef& videoDef =
- * defaultNamespace.GetObjectDefL( MdeConstants::Video::KVideoObject );
- * CMdELogicCondition* condition = CMdELogicCondition::NewL( ELogicConditionOperatorAnd );
- * condition->AddObjectConditionL( videoDef );
- *
- * // iSession is reference to CMdESession which is always set in CComposerPlugin::SetSession()
- * iSession->AddObjectObserverL( *this, condition, ENotifyModify, &defaultNamespace );
- * }
- *
- * void RemoveObservers()
- * {
- * iSession->RemoveObjectObserverL( *this )
- * }
- *
- * void CComposerImagePlugin::HandleObjectNotification(CMdESession& aSession,
- * TObserverNotificationType aType, const RArray& aObjectIdArray)
- * {
- * // We give ID-array of changed Video objects to our active object
- * // which adds then to a its internal queue and processes them one-by-one
- * // with different RunL-calls so that we don't stuck the thread by composing
- * // for example 1000 binary files in a row.
- * iVideoComposerAO->AddToQueue( aObjectIdArray );
- * }
- */
-class CComposerPlugin : public CBase, public MMdEObjectObserver
- {
- public:
-
- /**
- * Construction.
- *
- * @param aUid Implementation UID which plug-in to invoke.
- */
- IMPORT_C static CComposerPlugin* NewL( const TUid& aUid );
-
- /**
- * Lists all available implementations which satisfy this given interface.
- *
- * @param aImplInfoArray Reference to a list which will be populated with
- * plug-in implementation details.
- */
- IMPORT_C static void ListImplementationsL(RImplInfoPtrArray& aImplInfoArray);
-
- /**
- * Destructor.
- */
- IMPORT_C virtual ~CComposerPlugin();
-
- /**
- * Sets Mde session to be used.
- *
- * @param aSession Open MdE session to utilize in the Composer plug-in
- */
- IMPORT_C void SetSession( CMdESession& aSession );
-
- /**
- * Unsets Mde session.
- */
- IMPORT_C void RemoveSession();
-
- /**
- * Checks if composing is completed.
- *
- * @return Whether composing is on-going
- */
- virtual TBool IsComposingComplete() = 0;
-
- protected:
-
- /**
- * Sets observers to be notified. Called by the interface itself when
- * SetSession method is called from Harvester server side.
- */
- virtual void SetObservers() = 0;
-
- /**
- * Unsets observers. Called by the interface itself when
- * RemoveSession method is called from Harvester server side.
- */
- virtual void RemoveObservers() = 0;
-
- protected:
-
- /* Pointer to Mde session used by the plugin */
- CMdESession* iSession;
-
- private:
-
- /* Identification on cleanup */
- TUid iDtor_ID_Key;
- };
-
-#endif // __CCOMPOSERPLUGIN_H__
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/harvester_framework_api/inc/harvesterclient.h
--- a/mds_plat/harvester_framework_api/inc/harvesterclient.h Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,385 +0,0 @@
-/*
-* Copyright (c) 2006-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: Harvester client header
-*
-*/
-
-
-#ifndef __HARVESTER_CLIENT_H__
-#define __HARVESTER_CLIENT_H__
-
-#include
-
-#include
-#include
-#include
-
-// forward declarations
-class CHarvesterClientAO;
-class CHarvesterSessionAsyncHandler;
-class CHarvesterEventObserverAO;
-class MHarvesterEventObserver;
-class CHarvesterRequestActive;
-class CHarvesterRequestQueue;
-class MHarvesterSessionObserver;
-class CHarvesterSessionWatcher;
-
-// default event interval for MHarvesterEventObserver
-const TInt KHarvesterEventInterval = 20;
-
-/**
- * Observer interface to inform when fast harvesting is completed
- * with the HarvestingComplete callback.
- *
- * Example of MHarvestObserver and RHarvesterClient::HarvestFile usage:
- *
- * Client application (like Camera) which wants to observe the completion of
- * harvesting requests (issued with RHarvesterClient::Harvestile method) needs
- * implement the interface MHarvestObserver::HarvestingComplete. Callback
- * HarvestingComplete provides the name of the harvested file (aURI) and also possible
- * error code (aError).
- *
- * class CHarvestingObserver : public MHarvestObserver
- * {
- * void HarvestingComplete( TDesC& aURI, TInt aError ); // from MHarvestObserver
- * void IssueHarvestingRequests();
- *
- * RHarvesterClient iHClient;
- * }
- *
- * void CHarvestObserver::ConstructL()
- * {
- * // connecting to Harvester server
- * iHClient.Connect();
- * }
- *
- * void CHarvestObserver::IssueHarvestingRequests()
- * {
- * // new harvesting request data
- * _LIT( KNewFile, "C:\\Data\\ThisIsANewFile1.jpg" );
- * RArray defaultPhotoAlbums;
- * defaultPhotoAlbums.Append( 123 );
- * defaultPhotoAlbums.Append( 456 );
- * defaultPhotoAlbums.Append( 789 );
- *
- * // setting this class as the observer for the fast harvesting calls
- * iHClient.SetObserver(this);
- *
- * // issué new harvesting request and requesting location data to be harvested
- * iHClient.HarvestFile( KNewFile, defaultPhotoAlbums, ETrue );
- * }
- *
- * void CHarvestObserver::HarvestingComplete( TDesC& aURI, TInt aError )
- * {
- * _LIT( KExpectedFile, "C:\\Data\\ThisIsANewFile1.jpg" );
- *
- * // Checking if an error occurred and if this was the expected file
- * if ((aError == KErrNone) && (aURI.CompareC(KExpectedFile) == 0))
- * {
- * // do something
- * }
- * }
- *
- */
-class MHarvestObserver
- {
-public:
- /**
- * Callback to inform when fast harvesting of a file is complete.
- *
- * @param aURI URI of the harvested file.
- * @param aError Error code of the fast harvesting. KErrNone
is
- * expected if fast harvesting succeeded. Otherwise some
- * system wide error code.
- *
- */
- virtual void HarvestingComplete( TDesC& aURI, TInt aError ) = 0;
- };
-
-/**
- * Observer interface to inform about events that happen inside the observer framework
- *
- * Example of MHarvesterEventObserver, RHarvesterClient::AddHarvesterEventObserver and
- * RHarvesterClient::RemoveHarvesterEventObserver usage:
- *
- * void CHarvestObserver::ConstructL()
- * {
- * // iHClient is instance of RHarvesterClient
- * iHClient.Connect();
- *
- * // Listen to placeholder changes to "full" metadata objects - request notification
- * // after 100 items have changed.
- * TInt err = iHClient.AddHarvesterEventObserver( *this, EHEObserverTypePlaceholder, 100 );
- * if (err == KErrNone)
- * {
- * // do something now that event observer is setup
- * }
- * }
- *
- * void CHarvestObserver::HarvestingUpdated( HarvesterEventObserverType aHEObserverType,
- * HarvesterEventState aHarvesterEventState, TInt aItemsLeft )
- * {
- * // Check the observer notification type
- * if (aHEObserverType == EHEObserverTypePlaceholder)
- * {
- * // Checking if there are more than 1000 items left to process
- * if (aItemsLeft > 1000)
- * {
- * // do something since there are some many items still placeholders
- * }
- * if (aItemsLeft == 0)
- * {
- // all placeholders changed to "full" objects - do something...
- * }
- * }
- * }
- *
- * CHarvestObserver::~CHarvestObserver()
- * {
- * // Removing the observer in destructor
- * iHClient.RemoveHarvesterEventObserver( *this );
- * }
- */
-
-
-class MHarvesterEventObserver
- {
-public:
- /**
- * Callback interface which informs about harvesting changes based on the observers
- * that the end user has setup/registered.
- *
- * @param aHEObserverType Defines the observer type to which this events is related
- * @param aHarvesterEventState Event that occurred
- * @param aItemsLeft Number of items left regarding the harvesting procedure (defined
- * by aHEObserverType)
- * @see RHarvesterClient::AddHarvesterEventObserver
- * @see RHarvesterClient::RemoveHarvesterEventObserver
- */
- virtual void HarvestingUpdated(
- HarvesterEventObserverType aHEObserverType,
- HarvesterEventState aHarvesterEventState,
- TInt aItemsLeft ) = 0;
- };
-
-class MHarvesterSessionObserver
- {
-public:
-
- /**
- * Called to notify the observer that harvester server has been terminated,
- * thus harvester server sessions created are now invalid and new connection
- * needs to be established
- * NOTE! Cliens still have to call Close() on the session to release client side
- * resources.
- */
- virtual void HarvesterServerTerminated() = 0;
- };
-
-/**
- * Harvester client session class which provides also means to:
- * - Pause/resume the Harvesting framework
- * - Fast harvest files and observe when they have been harvested
- * - Setup observers to observe the harvesting progress
- */
-NONSHARABLE_CLASS( RHarvesterClient ) : public RSessionBase
- {
- friend class CHarvesterSessionAsyncHandler;
- friend class CHarvesterEventObserverAO;
-
- public:
-
- /**
- * Constructor
- */
- IMPORT_C RHarvesterClient();
-
- /**
- * Public method to connect Harvester server.
- *
- * @return Symbian OS error code.
- */
- IMPORT_C TInt Connect();
-
- /**
- * Public method to pause the operation
- * of the Harvester framework.
- *
- * @return Symbian OS error code.
- */
- IMPORT_C TInt Pause();
-
- /**
- * Public method to resume the operation
- * of the Harvester framework.
- *
- * @return Symbian OS error code.
- */
- IMPORT_C TInt Resume();
-
- /**
- * Public method to close session to Harvester server.
- */
- IMPORT_C void Close();
-
- /**
- * Public method to set observer for fast harvesting.
- * Only one observer is currently supported.
- *
- * @param aObserver Pointer to the observer
- */
- IMPORT_C void SetObserver( MHarvestObserver* aObserver);
-
- /**
- * Public method to remove observer for fast harvesting.
- *
- * @param aObserver Pointer to the observer
- */
- IMPORT_C void RemoveObserver( MHarvestObserver* aObserver);
-
- /**
- * Public method for doing fast harvesting. These files
- * are handled first before the ones that are in the harvesting
- * queue inside the Harvesting framework.
- *
- * @param aURI Uri of the file to be harvested
- * @param aAlbumIds Array of album id's that the harvested file
- * will be included in
- * @param aAddLocation Should location information be added to item
- */
- IMPORT_C void HarvestFile( const TDesC& aURI, RArray &aAlbumIds, TBool aAddLocation );
-
- /**
- * Method for adding observer for harvester framework events
- *
- * @param aHarvesterEventObserver class to implement MHarvesterEventObserver interface
- * @param aHEObserverType Harvester event observer type (EPlaceholderState,
- * EMMCState, EOverallState)
- * @param aEventInterval Interval of harvester events as item amount
- *
- * @return Symbian OS wide error code.
- */
- IMPORT_C TInt AddHarvesterEventObserver(
- MHarvesterEventObserver& aHarvesterEventObserver,
- TInt aHEObserverType,
- TInt aEventInterval = KHarvesterEventInterval );
-
- /**
- * Method for removing observer for harvester framework events. Please note that
- * removing any of the event observers will remove all observers which are registered
- * by the given parameter aHarvesterEventObserver (= observer class).
- *
- * @param aHarvesterEventObserver class to implement MHarvesterEventObserver interface
- *
- * @return Symbian OS wide error code.
- */
- IMPORT_C TInt RemoveHarvesterEventObserver( MHarvesterEventObserver& aHarvesterEventObserver );
-
- /**
- * Public method for doing fast harvesting. These files
- * are handled first before the ones that are in the harvesting
- * queue.
- *
- * @param aURI Uri of the file to be harvested
- * @param aAlbumIds Array of album id's that the harvested file will be included in
- * @param aAddLocation Should location information be added to image
- * @param aUid Uid of the originating application for the object
- */
- IMPORT_C void HarvestFileWithUID( const TDesC& aURI,
- RArray &aAlbumIds,
- TBool aAddLocation,
- TUid aUid );
-
- /**
- * Public method to set observer for notifications about harvester server termination.
- * Only one observer at a time is currently supported.
- *
- * @param aObserver Pointer to the observer
- */
- IMPORT_C void AddSessionObserverL( MHarvesterSessionObserver& aObserver );
-
- /**
- * Public method to remove harvester session observer
- */
- IMPORT_C void RemoveSessionObserver();
-
- /**
- * Requests a harvest complete event from harvester server.
- * On return, aURI is the URI of the harvested file.
- *
- * @param aURI Harvested image uri what server
- * @param aStatus Reference to a request indicator
- */
- void RegisterHarvestComplete( TDes& aURI, TRequestStatus& aStatus );
-
- /**
- * Cancels the harvest complete notification request.
- */
- void UnregisterHarvestComplete( );
-
- /**
- * Private method for doing fast harvesting. These files
- * are handled first before the ones that are in the harvesting
- * queue.
- *
- * @param aService Service request which to execute on server side
- * @param aArgs Parameters for harvesting
- * @param aStatus Status of the asunchronous call
- */
- void HarvestFile( TInt& aService, TIpcArgs& aArgs, TRequestStatus& aStatus );
-
- /**
- * Restricted method for doing fast harvesting. These files
- * are handled first before the ones that are in the harvesting
- * queue. This version forces the file to be harvested immidiately.
- *
- * @param aService Service request which to execute on server side
- * @param aArgs Parameters for harvesting
- */
- void ForceHarvestFile( TInt& aService, TIpcArgs& aArgs );
-
- private:
-
- /**
- * Observer of the class
- */
- MHarvestObserver* iObserver;
-
- /**
- * Private method for version.
- */
- TVersion Version() const;
-
- /**
- * Harvester client active object.
- */
- CHarvesterClientAO* iHarvesterClientAO;
-
- /**
- * Pointer to Harvester event observer active object.
- */
- CHarvesterEventObserverAO* iHEO;
-
- /**
- * Request queue processor.
- */
- CHarvesterRequestQueue* iRequestQueue;
-
- /**
- * Harvester session observer AO.
- */
- CHarvesterSessionWatcher* iSessionWatcher;
- };
-
-#endif // __HARVESTER_CLIENT_H__
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/harvester_framework_api/inc/harvesterclientdata.h
--- a/mds_plat/harvester_framework_api/inc/harvesterclientdata.h Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,76 +0,0 @@
-/*
-* Copyright (c) 2006-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: Data transfer object for harvest client data
- *
-*/
-
-
-#ifndef HARVESTERCLIENTDATA_H
-#define HARVESTERCLIENTDATA_H
-
-// INCLUDES
-#include
-#include
-
-#include
-
-// FORWARD DECLARATIONS
-
-// ENUMERATIONS
-
-
-/**
- * CHarvestClientData
- */
-NONSHARABLE_CLASS( CHarvestClientData ) : public CBase
- {
- public:
- /**
- * New.
- * @return Pointer to newly created object.
- */
- IMPORT_C static CHarvestClientData* New();
-
- /**
- * NewL.
- * Leaving version of New().
- *
- * @return Pointer to newly created object.
- */
- IMPORT_C static CHarvestClientData* NewL();
-
- /**
- * Destructor.
- */
- ~CHarvestClientData();
-
- /**
- * Set album ids.
- *
- * @param aAlbumIds Array of album ids to set.
- */
- IMPORT_C void SetAlbumIds( const RArray& aAlbumIds );
-
- private:
- /**
- * Constructor.
- */
- CHarvestClientData();
-
- public: // data
- RArray iAlbumIds;
- };
-
-#endif // HARVESTERCLIENTDATA_H
-
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/harvester_framework_api/inc/harvesterdata.h
--- a/mds_plat/harvester_framework_api/inc/harvesterdata.h Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,382 +0,0 @@
-/*
-* Copyright (c) 2006-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: Data transfer object for harvest data
- *
-*/
-
-
-#ifndef HARVESTERDATA_H
-#define HARVESTERDATA_H
-
-// INCLUDES
-#include
-#include
-#include
-#include
-#include
-
-#include
-#include
-
-#include "mdeconstants.h"
-
-// FORWARD DECLARATIONS
-class CContextEngine;
-class CHarvesterBlacklist;
-class CMdEObject;
-class CHarvesterPluginInfo;
-class CHarvesterData;
-
-// ENUMERATIONS
-enum THarvesterEventType
- {
- EHarvesterAdd, // New item to harvest
- EHarvesterEdit, // Re-harvest existing item
- EHarvesterDelete, // Delete item
- EHarvesterUnknown // Unknown command
- };
-
-enum THarvesterObjectType
- {
- ENormal, // Normal harvesting
- EPlaceholder, // Placeholder harvesting
- EFastHarvest // Fast harvesting - Harvester client request
- };
-
-/**
- * Observer interface for notifications of harvesting completion from Harvesting
- * plug-ins to Harvester server side
- */
-class MHarvesterPluginObserver
- {
- public:
- /**
- * Called when harvesting of a file/item is completed
- *
- * @param aHarvesterData Pointer to harvesting related data/harvesting request data
- */
- virtual void HarvestingCompleted( CHarvesterData* aHarvesterData ) = 0;
- };
-
-/**
- * Observer interface for adding new harvesting requests to Harvester server queue from
- * Monitor plug-ins
- */
-class MMonitorPluginObserver
- {
- public:
- /**
- * Method which is called by the monitor plug-in when event is monitored/
- * new harvesting request inserted to Harvester server queue.
- *
- * @param aHarvesterData harvester data type
- */
- virtual void MonitorEvent( CHarvesterData* aHarvesterData ) = 0;
-
- /**
- * Method which is called by the monitor plug-in when event is monitored/
- * new harvesting request inserted to Harvester server queue.
- *
- * @param aHarvesterDataArray Pointer to an array of harvesting related
- * data/harvesting request data
- */
- virtual void MonitorEvent( RPointerArray& aHarvesterDataArray ) = 0;
- };
-
-/**
- * Class that encapsulates harvesting related data/harvesting request data. These instances
- * are moved around the MdS Harvesting framework and this class encapsulates all information
- * needed when harvesting a file/item.
- *
- */
-NONSHARABLE_CLASS( CHarvesterData ) : public CBase
- {
- public:
-
- /**
- * Destructor.
- */
- ~CHarvesterData();
-
- /**
- * Two-phased constructor.
- *
- * @param aUri URI of the file, usually filename. With messages can be messageID.
- */
- IMPORT_C static CHarvesterData* NewL(const HBufC* aUri);
-
- /**
- * Two-phased constructor.
- *
- * @param aUri URI of the file, usually filename. With messages can be messageID.
- */
- IMPORT_C static CHarvesterData* NewLC(const HBufC* aUri);
-
- /**
- * Method returns the URI.
- *
- * @return URI.
- */
- IMPORT_C const TDesC& Uri();
-
- /**
- * Method returns error code of harvesting.
- *
- * @return harvesting error code.
- */
- IMPORT_C TInt ErrorCode();
-
- /**
- * Method sets the error code for harvesting.
- *
- * @param aErrorCode Error code for harvesting
- */
- IMPORT_C void SetErrorCode(TInt aErrorCode);
-
- /**
- * Method sets harvesting type.
- *
- * @param aEventType Harvesting type
- */
- IMPORT_C void SetEventType(THarvesterEventType aEventType);
-
- /**
- * Method returns harvesting type.
- *
- * @return Harvesting type
- */
- IMPORT_C THarvesterEventType EventType();
-
- /**
- * Method sets observer for this harvesting request (Harvester server)
- *
- * @param aObserver Pointer to the harvesting observer in the harvesting FW
- */
- IMPORT_C void SetPluginObserver(MHarvesterPluginObserver& aObserver);
-
- /**
- * Method returns pointer to the harvesting observer (Harvester server).
- *
- * @return Pointer to harvesting observer
- */
- IMPORT_C MHarvesterPluginObserver* PluginObserver();
-
- /**
- * Method sets the origin information for the file/item.
- *
- * @param aOrigin Origin of the file/item.
- */
- IMPORT_C void SetOrigin(TOrigin aOrigin);
-
- /**
- * Method returns origin of the file/item.
- *
- * @return Origin of the file/item.
- */
- IMPORT_C TOrigin Origin();
-
- /**
- * Method sets flag whether Context snapshot (with Context Engine)
- * is required during harvesting.
- *
- * @param aTakeSnapshot Whether Context snapshot is required or not.
- */
- IMPORT_C void SetTakeSnapshot(TBool aTakeSnapshot);
-
- /**
- * Method returns whether Context snapshot is required or not.
- *
- * @return Whether Context snapshot is required or not.
- */
- IMPORT_C TBool TakeSnapshot();
-
- /**
- * Method sets (object) type of the harvesting procedure.
- *
- * @param aObjectType Type of the harvesting procedure.
- */
- IMPORT_C void SetObjectType(THarvesterObjectType aObjectType);
-
- /**
- * Method retursn the (object) type of the harvesting procedure.
- *
- * @return Type of the harvesting procedure.
- */
- IMPORT_C THarvesterObjectType ObjectType();
-
- /**
- * Method sets the custom harvesting data from client.
- *
- * @param aClientData Custom harvesting data from client.
- */
- IMPORT_C void SetClientData(CBase* aClientData);
-
- /**
- * Method returns the custom harvesting data (received from client)
- *
- * @return Custom harvesting data (received from client)
- */
- IMPORT_C CBase* ClientData();
-
- /**
- * Method sets metadata object which will be used to store the metadata
- * in the harvesting plug-in.
- *
- * @param aMdeObject Pointer to the metadata object that will be used
- * to store the metadata from the file/item.
- */
- IMPORT_C void SetMdeObject( CMdEObject* aMdeObject );
-
- /**
- * Method returns the metadata objects which is used to store the metadata
- * from the file/item that is harvested.
- *
- * @return Metadata object that is used to store the metadata.
- */
- IMPORT_C CMdEObject& MdeObject();
-
- /**
- * Method sets location metadadata (GPS).
- *
- * @param aLD Pointer to the location metadata structure.
- */
- IMPORT_C void SetLocationData( TLocationData* aLD );
-
- /**
- * Method returns the location metadata structure.
- *
- * @return Location metadata structure.
- */
- IMPORT_C TLocationData* LocationData();
-
- /**
- * Method sets the client application UID.
- *
- * @param aClientId Client application UID.
- */
- IMPORT_C void SetClientId(TUid aClientId);
-
- /**
- * Method returns the client application UID.
- *
- * @return Client application UID.
- */
- IMPORT_C TUid ClientId();
-
- /**
- * Method returns whether location data should be added to
- * MdE DB or not.
- *
- * @return Flag which defines whether location data needs to
- * be added or not.
- */
- IMPORT_C TBool AddLocation();
-
- /**
- * Method sets a flag which defines whether location data
- * should be added to MdE DB or not.
- *
- * @param aAdd Client application UID.
- */
- IMPORT_C void SetAddLocation( TBool aAdd );
-
- /**
- * Method sets harvesting plug-in information which
- * is needed to carry out the harvesting procedure
- *
- * @param aPluginInfo Pointer to harvester plug-in info structure.
- */
- IMPORT_C void SetHarvesterPluginInfo( CHarvesterPluginInfo* aPluginInfo );
-
- /**
- * Method returns harvester plug-in info structure.
- *
- * @return Harvester plug-in info structure.
- */
- IMPORT_C CHarvesterPluginInfo* HarvesterPluginInfo();
-
- /**
- * Method returns whether item in harvesting is a binary file.
- *
- * @return Whether item in harvesting is a binary file.
- */
- IMPORT_C TBool IsBinary();
-
- /**
- * Method sets a flag determinning
- *
- * @param aPluginInfo Pointer to harvester plug-in info structure.
- */
- IMPORT_C void SetBinary( TBool aValue );
-
-
- private:
-
- /**
- * Constructor for performing 1st stage construction
- *
- * @param aUri URI of the item ie. filename.
- */
- CHarvesterData(const HBufC* aUri);
-
- /**
- * Default constructor for performing 2nd stage construction
- */
- void ConstructL();
-
- /* URI descriptor */
- const HBufC* iUri;
-
- /* Harvesting error code */
- TInt iErrorCode;
-
- /* Harvesting event type */
- THarvesterEventType iEventType;
-
- /* Harvesting observer ie. Harvester server */
- MHarvesterPluginObserver* iObserver;
-
- /* Origin of the file/item */
- TOrigin iOrigin;
-
- /* Whether Context snapshot is needed */
- TBool iTakeSnapshot;
-
- /* Object type for harvesting */
- THarvesterObjectType iObjectType;
-
- /* Custom client data */
- CBase* iClientData;
-
- /* Pointer to metadata object */
- CMdEObject* iMdeObject;
-
- /* Harvesting plug-in info */
- CHarvesterPluginInfo* iPluginInfo;
-
- /* GPS and other location related data */
- TLocationData* iLocationData;
-
- /* Whether location data needs to be added to DB */
- TBool iAddLocation;
-
- /* Whether item to harvest is a binary file */
- TBool iIsBinary;
-
- /* Executable UID which created the binary file */
- TUid iClientId;
- };
-
-#endif // HARVESTERDATA_H
-
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/harvester_framework_api/inc/harvestereventenum.h
--- a/mds_plat/harvester_framework_api/inc/harvestereventenum.h Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +0,0 @@
-/*
-* 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:
-*
-*/
-
-#ifndef HARVESTEREVENTENUM_H_
-#define HARVESTEREVENTENUM_H_
-
-enum HarvesterEventObserverType
- {
- EHEObserverTypePlaceholder = 1, // Observing placeholder changes to normal object
- EHEObserverTypeMMC = 2, // Observing MMC handling start and stop
- EHEObserverTypeOverall = 4 // Observing overall status of the harvesting
- };
-
-enum HarvesterEventState
- {
- EHEStateStarted, // Harvesting starting
- EHEStateHarvesting, // Harvesting on-going
- EHEStateFinished, // Harvesting finished
- EHEStateUninitialized, // Harvesting not initialized
- EHEStatePaused, // Harvesting paused
- EHEStateResumed // Harvesting resumed
- };
-
-#endif /*HARVESTEREVENTENUM_H_*/
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/harvester_framework_api/inc/harvesterpauseps.h
--- a/mds_plat/harvester_framework_api/inc/harvesterpauseps.h Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-/*
-* Copyright (c) 2008-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: P&S key for harvester server pause
-*
-*/
-
-#ifndef HARVESTERPAUSEPS_H_
-#define HARVESTERPAUSEPS_H_
-
-const TUid KPsHarvesterPauseCategory = { 0x200009F5 };
-
-// observed by harvester server
-const TUint KPsHarvesterPauseKey = 0x00000001;
-
-enum TPsHarvesterPauseState
- {
- EPsHarvesterPauseResume = 0, // Resume harvesting
- EPsHarvesterPausePause // Pause harvesting
- };
-
-#endif /*HARVESTERPAUSEPS_H_*/
-
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/harvester_framework_api/inc/harvesterplugin.h
--- a/mds_plat/harvester_framework_api/inc/harvesterplugin.h Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,277 +0,0 @@
-/*
-* Copyright (c) 2006-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: Definition of the Harvester plug-in ECom interface.*
-*/
-
-#ifndef __CHARVESTERPLUGIN_H__
-#define __CHARVESTERPLUGIN_H__
-
-#include
-#include
-
-// forward declarations
-class CMdESession;
-class CHarvesterBlacklist;
-class CHarvesterData;
-class CMdEPropertyDef;
-class CHarvesterPluginFactory;
-
-// Uid for this interface
-const TUid KCHarvesterPluginInterfaceUid = { 0x200009F8 };
-
-struct THarvestResult
- {
- HBufC16* iUri; // URI of the file/item
- TInt iErrorCode; // Harvesting error code
- };
-
-/**
- * Harvester Plug-in ECom interface definition. Harvester plug-in implementation
- * needs to inherit this class and implement the pure virtual method (HarvestL) which exist
- * in this interface.
- *
- * Example:
- *
- * class CMyHarvesterPlugin: public CHarvesterPlugin
- * {
- * public:
- *
- * // This method should also be overwritten in the plug-in
- * void GetObjectType( const TDesC& aUri, TDes& aObjectType );
- *
- * void HarvestL( CHarvesterData* aHD );
- * }
- *
- * void GetObjectType( const TDesC& aUri, TDes& aObjectType )
- * {
- * // Idea in this method is that it MUST return one of the object types
- * // supported by the MdE DB - for example "Image", "Video" or "Audio".
- * // If plug-in supports only one type of objects then it can just return
- * // always that like:
- * // TPtrC ptrImage( KImage );
- * // aObjectType.Copy( KImage ); return;
- * //
- * // However if multiple MdE object types are supported then file content
- * // needs to be checked for example from file MIME-type like here:
- *
- * TRAPD( err, content = CContent::NewL( aUri ) );
- * if (err == KErrNone)
- * {
- * err = content->GetStringAttribute( EMimeType, mime );
- * delete content;
- * }
- *
- * TPtrC ptrImage( KImage );
- *
- * // MdsUtils::Find tries to find word "image" from the MIME-type
- * // so that we know the file is an image
- * if( MdsUtils::Find( mime, ptrImage ) != KErrNotFound )
- * {
- * WRITELOG1( "CHarvesterOMADRMPlugin::GetObjectType - mimetype %S. Object type changed to Image", &mime );
- * aObjectType.Copy( KImage );
- * return;
- * }
- *
- * TPtrC ptrVideo( KVideo );
- * if( MdsUtils::Find( mime, ptrVideo ) != KErrNotFound )
- * {
- * WRITELOG1( "CHarvesterOMADRMPlugin::GetObjectType - mimetype %S. Object type changed to Video", &mime );
- * aObjectType.Copy( KVideo );
- * return;
- * }
- * }
- *
- * void HarvestL( CHarvesterData* aHD )
- * {
- * CMdEObject& mdeObject = aHD->MdeObject();
- *
- * CMdeObjectWrapper* wrapper = CMdeObjectWrapper::NewL();
- * }
- */
-class CHarvesterPlugin : public CActive
- {
-public:
-
- enum THarvesterState
- {
- EHarvesterIdle = 0, // No harvesting requests to process
- EHarvesterGathering, // Harvesting a file
- };
-
- /**
- * Construction
- */
- IMPORT_C static CHarvesterPlugin* NewL( const TUid& aUid );
-
- /**
- * Lists all available implementations which satisfy this given interface.
- *
- * @param aImplInfoArray Reference to a list which will be populated with
- * plug-in implementation details.
- */
- IMPORT_C static void ListImplementationsL( RImplInfoPtrArray& aImplInfoArray );
-
- /**
- * Destructor - virtual and class not intended
- * for derivation, so not exported.
- */
- IMPORT_C virtual ~CHarvesterPlugin();
-
- /**
- * Method sets the Harvesting queue to the plug-in.
- *
- * @param aQueue Queue which contains harvesting requests.
- */
- IMPORT_C virtual void SetQueue( RPointerArray& aQueue );
-
- /**
- * Method which starts the harvesting of the file. Called by the
- * harvesting framework from CHarvesterPluginFactory::HarvestL.
- */
- IMPORT_C virtual void StartHarvest();
-
- /**
- * Method which returns the MdE object type to harvesting FW when passing the file
- * name to this method (aURI). The harvesting plug-in should overwrite method. In the
- * case there are more than one plug-ins which support same file extension atleast
- * one of these plug-ins needs to read the binary file for determining the valid MdE
- * object type for the file.
- *
- * @param aUri URI of the file/item.
- * @param aObjectType Reference to an object type which will returned to the FW
- * from the plug-in
- */
- IMPORT_C virtual void GetObjectType( const TDesC& aUri, TDes& aObjectType );
-
- /**
- * Method for setting the blacklisting functionality for the plug-in.
- *
- * @param aBlacklist Reference to blacklisting component.
- */
- IMPORT_C virtual void SetBlacklist( CHarvesterBlacklist& aBlacklist );
-
- /**
- * Method to stop harvester plugin if needed.
- */
- IMPORT_C virtual void StopHarvest();
-
-protected:
-
- /**
- * The method which does the actual harvesting. Harvesting plug-in MUST
- * implelemt this method.
- *
- * @param aHD Pointer to harvesting data/request.
- */
- IMPORT_C virtual void HarvestL( CHarvesterData* aHD ) = 0;
-
- /**
- * Active object RunL implementation.
- */
- IMPORT_C virtual void RunL();
-
- /**
- * Active object DoCancel implementation.
- */
- IMPORT_C virtual void DoCancel();
-
- /**
- * Active object RunError implementation.
- */
- IMPORT_C virtual TInt RunError( TInt aError );
-
- /**
- * Construction of the interface class
- */
- void ConstructL();
-
- /**
- * Constuctor
- */
- IMPORT_C CHarvesterPlugin();
-
-public:
-
- /**
- * Method for getting the mime type for given uri
- */
- IMPORT_C virtual void GetMimeType( const TDesC& aUri, TDes& aMimeType );
-
- /**
- * Method for adding reference to harvester plugin factory
- */
- IMPORT_C void SetHarvesterPluginFactory( CHarvesterPluginFactory& aFactory );
-
- /**
- * Method for checking if the plugin is in idle state
- */
- IMPORT_C TBool PluginInIdleState();
-
-private:
-
- /**
- * Sets next state for the active object
- *
- * @param aState Next state to execute with RunL.
- */
- void SetNextRequest( THarvesterState aState );
-
- /**
- * Method sets some default properties to the metadata object
- *
- * @param aData Pointer to harvesting data/request.
- */
- void SetDefaultPropertiesL(CHarvesterData& aData);
-
-protected:
-
- /**
- * Handle to File server session.
- */
- RFs iFs;
-
- /**
- * State of this active object.
- */
- THarvesterState iState;
-
- /**
- * Pointer to Harvesting request queue.
- */
- RPointerArray* iQueue;
-
- /**
- * Pointer to blacklisting functionality
- */
- CHarvesterBlacklist* iBlacklist;
-
- // Not own
- CHarvesterPluginFactory* iFactory;
-
- TBool iFastModeEnabled;
-
-private:
-
- /* Identification on cleanup */
- TUid iDtor_ID_Key;
-
- CMdEPropertyDef* iOriginPropertyDef;
- CMdEPropertyDef* iTitlePropertyDef;
-
- TBool iHarvesting;
- TBool iPaused;
-
- };
-
-#endif // __CHARVESTERPLUGIN_H__
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/harvester_framework_api/inc/monitorplugin.h
--- a/mds_plat/harvester_framework_api/inc/monitorplugin.h Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,191 +0,0 @@
-/*
-* Copyright (c) 2006-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: Definition of the Monitor plug-in ECom interface.*
-*/
-
-#ifndef __MONITORPLUGIN_H__
-#define __MONITORPLUGIN_H__
-
-#include
-#include
-
-#include
-
-// FORWARD DECLARATION
-class CMdESession;
-class CContextEngine;
-class CHarvesterPluginFactory;
-
-// Uid for this interface
-const TUid KMonitorPluginInterfaceUid = { 0x20007181 };
-
-class TMountData
- {
- public:
- enum TMountType
- {
- EMount, // Drive was mounted
- EUnmount, // Drive was unmounted
- EFormat // Drive was formatted
- };
-
- TMountType iMountType; // See above
- TUint32 iMediaID; // Storage MediaID - TVolumeInfo::iUniqueID
- TBuf<2> iDrivePath; // Drive letter
- };
-
-/**
- * Monitor Plug-in ECom interface definition. Monitor plug-in implementation
- * needs to inherit this class and implement the pure virtual methods which exist
- * in this interface. All monitor plug-ins are provided a reference to the Harvester
- * server (MMonitorPluginObserver) which hanles the new harvesting requests, open session
- * to MdE for DB maintenance operations, pointer to ContextEngine and a pointer Harvester
- * plug-in factory.
- *
- * Example:
- *
- * // interface for notifying Monitor plug-in about new files
- * class MMonitorNotifier
- * {
- * public:
- * /**
- * * Called when we notice a new file/item
- * *
- * * @param aHarvesterData Pointer to harvesting related data/harvesting request data
- * *
- * virtual void NewFile( CHarvesterData* aHarvesterData ) = 0;
- * }
- *
- * // Monitor plug-in implementation
- * class CMyMonitorPlugin: public CMonitorPlugin, public MMonitorNotifier
- * {
- * public:
- * TBool StartMonitoring(MMonitorPluginObserver& aObserver, CMdESession* aMdEClient,
- * CContextEngine* aCtxEngine, CHarvesterPluginFactory* aHarvesterPluginFactory );
- * TBool StopMonitoring();
- * TBool ResumeMonitoring( MMonitorPluginObserver& aObserver, CMdESession* aMdEClient,
- * CContextEngine* aCtxEngine, CHarvesterPluginFactory* aHarvesterPluginFactory );
- * TBool PauseMonitoring();
- * void NewFile( CHarvesterData* aHarvesterData );
- *
- * private:
- * MMonitorPluginObserver* iObserver;
- * CMyActiveObjectNotifier* iNotifier;
- * }
- *
- * TBool CMyMonitorPlugin::StartMonitoring(MMonitorPluginObserver& aObserver, CMdESession* aMdEClient,
- * CContextEngine* aCtxEngine, CHarvesterPluginFactory* aHarvesterPluginFactory )
- * {
- * iObserver = &aObserver;
- *
- * // Active object which observes the system and notices new files/items in the system
- * iNotifier = CMyActiveObjectNotifier::NewL(*this);
- * }
- * TBool CMyMonitorPlugin::StopMonitoring()
- * {
- * iNotifier->StopNotifying();
- * }
- *
- * TBool CMyMonitorPlugin::ResumeMonitoring( MMonitorPluginObserver& aObserver, CMdESession* aMdEClient,
- * CContextEngine* aCtxEngine, CHarvesterPluginFactory* aHarvesterPluginFactory )
- * {
- * // Do what needs to be done when operation is resumed - for example handle
- * // events received through callback CMyMonitorPlugin::NewFile during pause.
- * }
- *
- * TBool CMyMonitorPlugin::PauseMonitoring()
- * {
- * // Do what needs to be done during pause - for example buffer all events coming
- * // through callback CMyMonitorPlugin::NewFile
- * }
- *
- * void CMyMonitorPlugin::NewFile( CHarvesterData* aHarvesterData )
- * {
- * // Our CMyActiveObjectNotifier notifies us about new file and we notify the Harvester server about it.
- * // Before this CMyActiveObjectNotifier has filled the need data to aHarvesterData like:
- * aHarvesterData->SetEventType( EHarvesterAdd );
- * aHarvesterData->SetOrigin( aOrigin );
- * iObserver->MonitorEvent( aHarvesterData );
- * }
- */
-class CMonitorPlugin : public CBase
- {
- public:
- /**
- * Creates and constructs a new instance of CMonitorPlugin.
- *
- * @param aUid An UID of desired implementation.
- * @return A pointer to the new instance of CMonitorPlugin.
- */
- IMPORT_C static CMonitorPlugin* NewL(const TUid& aUid);
-
- /**
- * A static method which list all available implementations which satisfy this given interface.
- *
- * @param aImplInfoArray On return this contains information about all available implementations.
- */
- IMPORT_C static void ListImplementationsL(RImplInfoPtrArray& aImplInfoArray);
-
- /**
- * Destructor
- */
- IMPORT_C virtual ~CMonitorPlugin();
-
- /**
- * A pure virtual method which starts the monitoring.
- *
- * @param aObserver All events are notified via the aObserver.
- * @param aMdEClient A pointer to MdE client.
- * @param aCtxEngine A pointer to context engine.
- * @param aHarvesterPluginFactory A pointer to harvester plugin factory.
- * @return ETrue if success, EFalse if not.
- */
- virtual TBool StartMonitoring(MMonitorPluginObserver& aObserver, CMdESession* aMdEClient,
- CContextEngine* aCtxEngine, CHarvesterPluginFactory* aHarvesterPluginFactory ) = 0;
-
- /**
- * A pure virtual method which stops the monitoring.
- *
- * @return ETrue if success, EFalse if not.
- */
- virtual TBool StopMonitoring() = 0;
-
- /**
- * A pure virtual method which resumes the paused plug-in.
- *
- * @param aObserver All events are notified via the aObserver.
- * @param aMdEClient A pointer to MdE client.
- * @param aCtxEngine A pointer to context engine.
- * @param aHarvesterPluginFactory A pointer to harvester plugin factory.
- * @return ETrue if success, EFalse if not.
- */
- virtual TBool ResumeMonitoring(MMonitorPluginObserver& aObserver, CMdESession* aMdEClient,
- CContextEngine* aCtxEngine, CHarvesterPluginFactory* aHarvesterPluginFactory ) = 0;
-
- /**
- * A pure virtual method which pauses the plug-in.
- *
- * @return ETrue if success, EFalse if not.
- */
- virtual TBool PauseMonitoring() = 0;
-
- private:
-
- /**
- * Identification on cleanup.
- */
- TUid iDtor_ID_Key;
- };
-
-#endif // __MONITORPLUGIN_H__
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/harvester_framework_api/inc/placeholderdata.h
--- a/mds_plat/harvester_framework_api/inc/placeholderdata.h Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,163 +0,0 @@
-/*
-* Copyright (c) 2006-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: Data transfer object for placeholder data
-*
-*/
-
-
-#ifndef PLACEHOLDERDATA_H
-#define PLACEHOLDERDATA_H
-
-// INCLUDES
-#include
-#include
-#include
-#include
-
-
-/**
- * A helper class which encapsulates data needed for
- * creating placeholder objects.
- */
-NONSHARABLE_CLASS( CPlaceholderData ) : public CBase
- {
- public:
-
- /**
- * Second phase construction
- */
- IMPORT_C static CPlaceholderData* NewL();
-
- /**
- * Destructor.
- */
- virtual ~CPlaceholderData();
-
- /**
- * Returns modification time - equals RFs::Modified()
- *
- * @param Last modification time
- */
- IMPORT_C TTime Modified();
-
- /**
- * Sets modification time - should be RFs::Modified()
- * for binary files
- *
- * @return Last modification time
- */
- IMPORT_C void SetModified( TTime aModified );
-
- /**
- * Returns URI of the file/item.
- *
- * @return URI
- */
- IMPORT_C TPtr16 Uri();
-
- /**
- * Sets URI of the file/item.
- *
- * @param aUri URI of the file
- */
- IMPORT_C void SetUri( const TDesC& aUri );
-
- /**
- * Returns file size bytes.
- *
- * @return File size in bytes.
- */
- IMPORT_C TUint32 FileSize();
-
- /**
- * Sets file size bytes.
- *
- * @param aUri File size bytes.
- */
- IMPORT_C void SetFileSize( TUint32 aFileSize );
-
- /**
- * Returns MediaID which identifies the volume/drive where
- * the file is located. Equals to TVolumeInfo::iUniqueID.
- *
- * @return MediaID
- */
- IMPORT_C TUint MediaId();
-
- /**
- * Sets MediaID which identifies the volume/drive where
- * the file is located. Equals to TVolumeInfo::iUniqueID.
- *
- * @param aMediaId MediaID of the volume.
- */
- IMPORT_C void SetMediaId( TUint aMediaId );
-
- /**
- * Returns present state for the file.
- *
- * @return Present state.
- */
- IMPORT_C TInt PresentState();
-
- /**
- * Sets present state for the file
- *
- * @param aState Present state.
- */
- IMPORT_C void SetPresentState( TInt aState );
-
- /**
- * Returns whether file is pre-installed or not.
- *
- * @return Whether file is pre-installed or not.
- */
- IMPORT_C TInt Preinstalled();
-
- /**
- * Sets whether file is pre-installed or not.
- *
- * @param aValue Whether file is pre-installed or not.
- */
- IMPORT_C void SetPreinstalled( TInt aValue );
-
- protected:
-
- /**
- * Constructor
- */
- void ConstructL();
-
- private:
-
- /* URI of the placeholder */
- HBufC* iUri;
-
- /* Last modified time - RFs::Modified() */
- TTime iModified;
-
- /* File size in bytes */
- TUint32 iFileSize;
-
- /* Volume/Drive ID where file - TVolumeInfo::iUniqueID*/
- TUint32 iMediaId;
-
- /* Present/not present state */
- TInt iPresentState;
-
- /* Whether file is pre-installed or not */
- TInt iPreinstalled;
- };
-
-#endif // PLACEHOLDERDATA_H
-
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/harvester_framework_api/tsrc/ComposerPluginTest/Bmarm/ComposerPluginTestu.def
--- a/mds_plat/harvester_framework_api/tsrc/ComposerPluginTest/Bmarm/ComposerPluginTestu.def Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-EXPORTS
- LibEntryL__FR13CTestModuleIf @ 1 NONAME R3UNUSED ; LibEntryL(CTestModuleIf &)
-
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/harvester_framework_api/tsrc/ComposerPluginTest/Bwins/ComposerPluginTestu.def
--- a/mds_plat/harvester_framework_api/tsrc/ComposerPluginTest/Bwins/ComposerPluginTestu.def Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-EXPORTS
- ?LibEntryL@@YAPAVCScriptBase@@AAVCTestModuleIf@@@Z @ 1 NONAME ; class CScriptBase * __cdecl LibEntryL(class CTestModuleIf &)
-
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/harvester_framework_api/tsrc/ComposerPluginTest/conf/ComposerPluginTest.cfg
--- a/mds_plat/harvester_framework_api/tsrc/ComposerPluginTest/conf/ComposerPluginTest.cfg Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,122 +0,0 @@
-#
-# Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "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: Composer Plugin API tests
-#
-
-// ---------------------------------------------------------------------------
-// Composer Plugin API test cases
-// ---------------------------------------------------------------------------
-
-// These should be run in sequential mode if several cases are run at the same
-// time!
-
-[StifSettings]
-TestThreadStackSize= 32768
-TestThreadMinHeap= 4096
-TestThreadMaxHeap= 16777216
-[EndStifSettings]
-
-[Test]
-title Startup and Shutdown
-create ComposerPluginTest test
-request Session
-test BeginComposerSession
-wait Session
-test LoadPlugins
-test SetSessions
-test ActiveWait
-test RemoveSessions
-test EndComposerSession
-delete test
-[Endtest]
-
-[Test]
-title Modify Object 1
-create ComposerPluginTest test
-request Session
-test BeginComposerSession
-wait Session
-test LoadPlugins
-test SetSessions
-test ModifyObjects 1 e:\testing\data\Jpg.jpg
-test WaitComposingComplete
-test DeleteObject e:\testing\data\Jpg.jpg
-test RemoveSessions
-test EndComposerSession
-delete test
-[Endtest]
-
-[Test]
-title Modify Object 2
-create ComposerPluginTest test
-request Session
-test BeginComposerSession
-wait Session
-test LoadPlugins
-test SetSessions
-test ModifyObjects 1 e:\testing\data\Animated.gif
-test WaitComposingComplete
-test DeleteObject e:\testing\data\Animated.gif
-test RemoveSessions
-test EndComposerSession
-delete test
-[Endtest]
-
-[Test]
-title Modify Object 3
-create ComposerPluginTest test
-request Session
-test BeginComposerSession
-wait Session
-test LoadPlugins
-test SetSessions
-test ModifyObjects 1 e:\testing\data\H263.3gp
-test WaitComposingComplete
-test DeleteObject e:\testing\data\H263.3gp
-test RemoveSessions
-test EndComposerSession
-delete test
-[Endtest]
-
-[Test]
-title Modify Object 4
-create ComposerPluginTest test
-request Session
-test BeginComposerSession
-wait Session
-test LoadPlugins
-test SetSessions
-test ModifyObjects 1 e:\testing\data\Wtf.wtf
-test WaitComposingComplete
-test DeleteObject e:\testing\data\Wtf.wtf
-test RemoveSessions
-test EndComposerSession
-delete test
-[Endtest]
-
-[Test]
-title Modify Multiple Objects
-create ComposerPluginTest test
-request Session
-test BeginComposerSession
-wait Session
-test LoadPlugins
-test SetSessions
-test ModifyObjects 100
-test WaitComposingComplete
-test DeleteObjects 100
-test RemoveSessions
-test EndComposerSession
-delete test
-[Endtest]
\ No newline at end of file
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/harvester_framework_api/tsrc/ComposerPluginTest/eabi/ComposerPluginTestu.def
--- a/mds_plat/harvester_framework_api/tsrc/ComposerPluginTest/eabi/ComposerPluginTestu.def Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-EXPORTS
- _Z9LibEntryLR13CTestModuleIf @ 1 NONAME
-
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/harvester_framework_api/tsrc/ComposerPluginTest/group/ComposerPluginTest.mmp
--- a/mds_plat/harvester_framework_api/tsrc/ComposerPluginTest/group/ComposerPluginTest.mmp Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +0,0 @@
-/*
-* Copyright (c) 2005-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: Project definition file
-*
-*/
-
-#include
-#include
-
-TARGET ComposerPluginTest.dll
-TARGETTYPE dll
-UID 0x1000008D 0x101FB3E3
-
-CAPABILITY ALL -TCB
-VENDORID VID_DEFAULT
-
-DEFFILE ComposerPluginTest.DEF
-
-SOURCEPATH ../src
-SOURCE ComposerPluginTest.cpp
-SOURCE ComposerPluginTestBlocks.cpp
-
-USERINCLUDE ../inc
-USERINCLUDE ../../../../../inc
-SYSTEMINCLUDE /epoc32/include/ecom
-
-MW_LAYER_SYSTEMINCLUDE
-
-LIBRARY euser.lib
-LIBRARY stiftestinterface.lib
-LIBRARY stiftestengine.lib
-LIBRARY ecom.lib
-LIBRARY composerplugininterface.lib
-LIBRARY mdeclient.lib
-
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/harvester_framework_api/tsrc/ComposerPluginTest/group/ComposerPluginTest.pkg
--- a/mds_plat/harvester_framework_api/tsrc/ComposerPluginTest/group/ComposerPluginTest.pkg Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-;
-; 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: Installation file for API test
-;
-
-; Languages
-&EN
-
-; Header
-#{"ComposerPluginTest"},(0x101FB3E3),1,0,0,TYPE=SA
-
-; Localised Vendor name
-%{"Nokia"}
-
-; Unique Vendor name
-:"Nokia"
-
-; Install files
-"\epoc32\release\armv5\urel\ComposerPluginTest.dll" - "c:\sys\bin\ComposerPluginTest.dll"
-"..\conf\ComposerPluginTest.cfg" - "c:\TestFramework\ComposerPluginTest.cfg"
-"..\init\ComposerPluginTest.ini" - "c:\TestFramework\ComposerPluginTest.ini"
-
-"..\..\data\mmc\HarvesterTest\Jpg.jpg" -"E:\testing\data\Jpg.jpg"
-"..\..\data\mmc\HarvesterTest\Animated.gif" -"E:\testing\data\Animated.gif"
-"..\..\data\mmc\HarvesterTest\Temp1.jpg" -"E:\testing\data\Temp1.jpg"
-"..\..\data\mmc\HarvesterTest\Temp2.jpg" -"E:\testing\data\Temp2.jpg"
-"..\..\data\mmc\HarvesterTest\Temp3.jpg" -"E:\testing\data\Temp3.jpg"
-"..\..\data\mmc\HarvesterTest\H263.3gp" -"E:\testing\data\H263.3gp"
-"..\..\data\mmc\HarvesterTest\bmp_burst.bmp" -"E:\testing\data\bmp_burst.bmp"
-"..\..\data\mmc\HarvesterTest\GIF87testimage.gif" -"E:\testing\data\GIF87testimage.gif"
-"..\..\data\mmc\HarvesterTest\gif89a_onemeg.gif" -"E:\testing\data\gif89a_onemeg.gif"
-"..\..\data\mmc\HarvesterTest\Liverpool.jpg" -"E:\testing\data\Liverpool.jpg"
-"..\..\data\mmc\HarvesterTest\MBMtestimage.mbm" -"E:\testing\data\MBMtestimage.mbm"
-"..\..\data\mmc\HarvesterTest\wbmp_skull.wbmp" -"E:\testing\data\wbmp_skull.wbmp"
-"..\..\data\mmc\HarvesterTest\ota_bmpiso.ota" -"E:\testing\data\ota_bmpiso.ota"
-"..\..\data\mmc\HarvesterTest\PNGtestimage.png" -"E:\testing\data\PNGtestimage.png"
-"..\..\data\mmc\HarvesterTest\G4.TIF" -"E:\testing\data\G4.TIF"
-"..\..\data\mmc\HarvesterTest\G31D.TIF" -"E:\testing\data\G31D.TIF"
-"..\..\data\mmc\HarvesterTest\PSRETRO.WMF" -"E:\testing\data\PSRETRO.WMF"
-"..\..\data\mmc\HarvesterTest\Animated.gif" -"E:\testing\data\Animated.gif"
-"..\..\data\mmc\HarvesterTest\Mbm.mbm" -"E:\testing\data\Mbm.mbm"
-"..\..\data\mmc\HarvesterTest\MPEG4.3gp" -"E:\testing\data\MPEG4.3gp"
-"..\..\data\mmc\HarvesterTest\MPEG4.mp4" -"E:\testing\data\MPEG4.mp4"
-"..\..\data\mmc\HarvesterTest\00001.mp3" -"E:\testing\data\00001.mp3"
-
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/harvester_framework_api/tsrc/ComposerPluginTest/group/bld.inf
--- a/mds_plat/harvester_framework_api/tsrc/ComposerPluginTest/group/bld.inf Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,55 +0,0 @@
-/*
-* Copyright (c) 2005-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: Build information file
-*
-*/
-
-PRJ_PLATFORMS
- DEFAULT
-
-PRJ_EXPORTS
-
-PRJ_MMPFILES
-
-PRJ_TESTMMPFILES
-ComposerPluginTest.mmp
-
-PRJ_TESTEXPORTS
-
-../conf/ComposerPluginTest.cfg /epoc32/winscw/c/TestFramework/ComposerPluginTest.cfg
-../init/ComposerPluginTest.ini /epoc32/winscw/c/TestFramework/ComposerPluginTest.ini
-
-../../data/mmc/HarvesterTest/bmp_burst.bmp /epoc32/WINSCW/C/Data/bmp_burst.bmp
-../../data/mmc/HarvesterTest/G31D.TIF /epoc32/WINSCW/C/Data/G31D.TIF
-../../data/mmc/HarvesterTest/G4.TIF /epoc32/WINSCW/C/Data/G4.TIF
-../../data/mmc/HarvesterTest/GIF87testimage.gif /epoc32/WINSCW/C/Data/GIF87testimage.gif
-../../data/mmc/HarvesterTest/gif89a_onemeg.gif /epoc32/WINSCW/C/Data/gif89a_onemeg.gif
-../../data/mmc/HarvesterTest/Liverpool.jpg /epoc32/WINSCW/C/Data/Liverpool.jpg
-../../data/mmc/HarvesterTest/MBMtestimage.mbm /epoc32/WINSCW/C/Data/MBMtestimage.mbm
-../../data/mmc/HarvesterTest/ota_bmpiso.ota /epoc32/WINSCW/C/Data/ota_bmpiso.ota
-../../data/mmc/HarvesterTest/PNGtestimage.png /epoc32/WINSCW/C/Data/PNGtestimage.png
-../../data/mmc/HarvesterTest/PSRETRO.WMF /epoc32/WINSCW/C/Data/PSRETRO.WMF
-../../data/mmc/HarvesterTest/wbmp_skull.wbmp /epoc32/WINSCW/C/Data/wbmp_skull.wbmp
-../../data/mmc/HarvesterTest/Jpg.jpg /epoc32/WINSCW/C/Data/Jpg.jpg
-../../data/mmc/HarvesterTest/Animated.gif /epoc32/WINSCW/C/Data/Animated.gif
-../../data/mmc/HarvesterTest/Mbm.mbm /epoc32/WINSCW/C/Data/Mbm.mbm
-../../data/mmc/HarvesterTest/H263.3gp /epoc32/WINSCW/C/Data/H263.3gp
-../../data/mmc/HarvesterTest/MPEG4.mp4 /epoc32/WINSCW/C/Data/MPEG4.mp4
-../../data/mmc/HarvesterTest/MPEG4.3gp /epoc32/WINSCW/C/Data/MPEG4.3gp
-../../data/mmc/HarvesterTest/Temp1.jpg /epoc32/WINSCW/C/Data/Temp1.jpg
-../../data/mmc/HarvesterTest/Temp2.jpg /epoc32/WINSCW/C/Data/Temp2.jpg
-../../data/mmc/HarvesterTest/Temp3.jpg /epoc32/WINSCW/C/Data/Temp3.jpg
-../../data/mmc/HarvesterTest/00001.mp3 /epoc32/WINSCW/C/Data/00001.mp3
-
-
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/harvester_framework_api/tsrc/ComposerPluginTest/inc/ComposerPluginTest.h
--- a/mds_plat/harvester_framework_api/tsrc/ComposerPluginTest/inc/ComposerPluginTest.h Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,106 +0,0 @@
-/*
-* Copyright (c) 2008-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: ?Description
-*
-*/
-
-
-#ifndef COMPOSERPLUGINTEST_H
-#define COMPOSERPLUGINTEST_H
-
-// INCLUDES
-#include
-#include
-#include
-
-#include
-#include
-
-// CONSTANTS
-
-_LIT( KComposerPluginTestLogPath, "\\logs\\testframework\\ComposerPluginTest\\" );
-// Log file
-_LIT( KComposerPluginTestLogFile, "ComposerPluginTest.txt" );
-_LIT( KComposerPluginTestLogFileWithTitle, "ComposerPluginTest_[%S].txt" );
-
-// FORWARD DECLARATIONS
-class CComposerPluginTest;
-
-// CLASS DECLARATION
-NONSHARABLE_CLASS(CComposerPluginTest) : public CScriptBase,
- public MMdESessionObserver
- {
- public: // Constructors and destructor
-
- /**
- * Two-phased constructor.
- */
- static CComposerPluginTest* NewL( CTestModuleIf& aTestModuleIf );
-
- /**
- * Destructor.
- */
- virtual ~CComposerPluginTest();
-
- public: // Functions from base classes
-
- virtual TInt RunMethodL( CStifItemParser& aItem );
-
- private: // Functions from base classes
-
- void HandleSessionOpened(CMdESession& aSession, TInt aError);
- void HandleSessionError(CMdESession& aSession, TInt aError);
-
- private:
-
- /**
- * C++ default constructor.
- */
- CComposerPluginTest( CTestModuleIf& aTestModuleIf );
-
- /**
- * By default Symbian 2nd phase constructor is private.
- */
- void ConstructL();
-
- /**
- * Frees all resources allocated from test methods.
- */
- void Delete();
-
- /**
- * Test methods are listed below.
- */
- //[TestMethods] - Do not remove
- virtual TInt ActiveWait( CStifItemParser& aItem );
- virtual TInt BeginComposerSessionL( CStifItemParser& aItem );
- virtual TInt EndComposerSession( CStifItemParser& aItem );
- virtual TInt LoadPluginsL( CStifItemParser& aItem );
- virtual TInt SetSessions( CStifItemParser& aItem );
- virtual TInt RemoveSessions( CStifItemParser& aItem );
- virtual TInt ModifyObjectsL( CStifItemParser& aItem );
- virtual TInt DeleteObjectL( CStifItemParser& aItem );
- virtual TInt DeleteObjectsL( CStifItemParser& aItem );
- virtual TInt WaitComposingComplete( CStifItemParser& aItem );
-
- private: // Data
-
- CMdESession* iMdEClient;
-
- RPointerArray iPluginArray;
- };
-
-#endif // COMPOSERPLUGINTEST_H
-
-// End of File
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/harvester_framework_api/tsrc/ComposerPluginTest/init/ComposerPluginTest.ini
--- a/mds_plat/harvester_framework_api/tsrc/ComposerPluginTest/init/ComposerPluginTest.ini Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,81 +0,0 @@
-#
-# Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "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:
-#
-
-
-[Engine_Defaults]
-
-TestReportMode= FullReport # Possible values are: 'Empty', 'Summary', 'Environment',
- 'TestCases' or 'FullReport'
-
-CreateTestReport= YES # Possible values: YES or NO
-
-TestReportFilePath= C:\LOGS\TestFramework\
-TestReportFileName= ComposerPluginTestLog
-
-TestReportFormat= TXT # Possible values: TXT or HTML
-TestReportOutput= FILE # Possible values: FILE or RDEBUG
-TestReportFileCreationMode= OVERWRITE # Possible values: OVERWRITE or APPEND
-
-DeviceResetDllName= StifResetForNokia.dll # e.g. 'StifHWResetStub.dll' for user specific reseting
-
-DisableMeasurement= stifmeasurementdisablenone # Possible values are:
- # 'stifmeasurementdisablenone', 'stifmeasurementdisableall'
- # 'stifmeasurementplugin01', 'stifmeasurementplugin02',
- # 'stifmeasurementplugin03', 'stifmeasurementplugin04',
- # 'stifmeasurementplugin05' or 'stifbappeaprofiler'
-
-Timeout= 600000 # Default timeout value for each test case. In milliseconds
-#UITestingSupport= YES # Possible values: YES or NO
-#SeparateProcesses= YES # Possible values: YES or NO (default: NO)
-[End_Defaults]
-
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-
-[New_Module]
-ModuleName= TestScripter
-TestCaseFile= c:\testframework\ComposerPluginTest.cfg
-[End_Module]
-
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-
-[Logger_Defaults]
-
-#NOTE: If you want to set Logger using next setting(s) remove comment(s)'#'
-#NOTE: TestEngine and TestServer logging settings cannot change here
-
-CreateLogDirectories= YES # Possible values: YES or NO
-
-#EmulatorBasePath= C:\LOGS\TestFramework\
-#EmulatorFormat= HTML # Possible values: TXT or HTML
-#EmulatorOutput= FILE # Possible values: FILE or RDEBUG
-
-HardwareBasePath= C:\
-#HardwareFormat= HTML # Possible values: TXT or HTML
-#HardwareOutput= FILE # Possible values: FILE or RDEBUG
-
-#FileCreationMode= OVERWRITE # Possible values: OVERWRITE or APPEND
-
-#ThreadIdToLogFile= YES # Possible values: YES or NO
-#WithTimeStamp= YES # Possible values: YES or NO
-#WithLineBreak= YES # Possible values: YES or NO
-#WithEventRanking= YES # Possible values: YES or NO
-
-#FileUnicode= YES # Possible values: YES or NO
-AddTestCaseTitle= YES # Possible values: YES or NO
-[End_Logger_Defaults]
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-
-# End of file
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/harvester_framework_api/tsrc/ComposerPluginTest/src/ComposerPluginTest.cpp
--- a/mds_plat/harvester_framework_api/tsrc/ComposerPluginTest/src/ComposerPluginTest.cpp Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,131 +0,0 @@
-/*
-* Copyright (c) 2002-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: ?Description
-*
-*/
-
-
-// INCLUDE FILES
-#include
-#include "ComposerPluginTest.h"
-#include
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CComposerPluginTest::CComposerPluginTest
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-//
-CComposerPluginTest::CComposerPluginTest(
- CTestModuleIf& aTestModuleIf ):
- CScriptBase( aTestModuleIf )
- {
- }
-
-// -----------------------------------------------------------------------------
-// CComposerPluginTest::ConstructL
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-//
-void CComposerPluginTest::ConstructL()
- {
- //Read logger settings to check whether test case name is to be
- //appended to log file name.
- RSettingServer settingServer;
- TInt ret = settingServer.Connect();
- if(ret != KErrNone)
- {
- User::Leave(ret);
- }
- // Struct to StifLogger settigs.
- TLoggerSettings loggerSettings;
- // Parse StifLogger defaults from STIF initialization file.
- ret = settingServer.GetLoggerSettings(loggerSettings);
- if(ret != KErrNone)
- {
- User::Leave(ret);
- }
- // Close Setting server session
- settingServer.Close();
-
- TFileName logFileName;
-
- if(loggerSettings.iAddTestCaseTitle)
- {
- TName title;
- TestModuleIf().GetTestCaseTitleL(title);
- logFileName.Format(KComposerPluginTestLogFileWithTitle, &title);
- }
- else
- {
- logFileName.Copy(KComposerPluginTestLogFile);
- }
-
- iLog = CStifLogger::NewL( KComposerPluginTestLogPath,
- logFileName,
- CStifLogger::ETxt,
- CStifLogger::EFile,
- EFalse );
-
- }
-
-// -----------------------------------------------------------------------------
-// CComposerPluginTest::NewL
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-//
-CComposerPluginTest* CComposerPluginTest::NewL(
- CTestModuleIf& aTestModuleIf )
- {
- CComposerPluginTest* self = new (ELeave) CComposerPluginTest( aTestModuleIf );
-
- CleanupStack::PushL( self );
- self->ConstructL();
- CleanupStack::Pop( self );
-
- return self;
-
- }
-
-// Destructor
-CComposerPluginTest::~CComposerPluginTest()
- {
-
- // Delete resources allocated from test methods
- Delete();
-
- // Delete logger
- delete iLog;
-
- }
-
-// ========================== OTHER EXPORTED FUNCTIONS =========================
-
-// -----------------------------------------------------------------------------
-// LibEntryL is a polymorphic Dll entry point.
-// Returns: CScriptBase: New CScriptBase derived object
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CScriptBase* LibEntryL(
- CTestModuleIf& aTestModuleIf ) // Backpointer to STIF Test Framework
- {
-
- return ( CScriptBase* ) CComposerPluginTest::NewL( aTestModuleIf );
-
- }
-
-
-// End of File
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/harvester_framework_api/tsrc/ComposerPluginTest/src/ComposerPluginTestBlocks.cpp
--- a/mds_plat/harvester_framework_api/tsrc/ComposerPluginTest/src/ComposerPluginTestBlocks.cpp Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,1035 +0,0 @@
-/*
-* Copyright (c) 2002-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:
-*
-*/
-
-
-// [INCLUDE FILES] - do not remove
-#include
-#include
-#include
-#include
-#include "ComposerPluginTest.h"
-
-#include "mdsutils.h"
-#include "mdeconstants.h"
-
-using namespace MdeConstants;
-
-_LIT( KOpenErr, " ModifyObjects - Open error : %d" );
-_LIT( KCommErr, " ModifyObjects - Commit error : %d" );
-_LIT( KNull, " ModifyObjects - NULL object" );
-_LIT( KCommit, " ModifyObjects - Object committed" );
-_LIT( KUri, "C:\\Data\\Images\\Temp%d.jpg" );
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CComposerPluginTest::Delete
-// Delete here all resources allocated and opened from test methods.
-// Called from destructor.
-// -----------------------------------------------------------------------------
-//
-void CComposerPluginTest::Delete()
- {
-
- }
-
-// -----------------------------------------------------------------------------
-// CComposerPluginTest::RunMethodL
-// Run specified method. Contains also table of test mothods and their names.
-// -----------------------------------------------------------------------------
-//
-TInt CComposerPluginTest::RunMethodL(
- CStifItemParser& aItem )
- {
-
- static TStifFunctionInfo const KFunctions[] =
- {
- // Copy this line for every implemented function.
- // First string is the function name used in TestScripter script file.
- // Second is the actual implementation member function.
-
- ENTRY( "ActiveWait", CComposerPluginTest::ActiveWait ),
- ENTRY( "BeginComposerSession", CComposerPluginTest::BeginComposerSessionL ),
- ENTRY( "EndComposerSession", CComposerPluginTest::EndComposerSession ),
- ENTRY( "LoadPlugins", CComposerPluginTest::LoadPluginsL ),
- ENTRY( "SetSessions", CComposerPluginTest::SetSessions ),
- ENTRY( "RemoveSessions", CComposerPluginTest::RemoveSessions ),
- ENTRY( "ModifyObjects", CComposerPluginTest::ModifyObjectsL ),
- ENTRY( "DeleteObject", CComposerPluginTest::DeleteObjectL ),
- ENTRY( "DeleteObjects", CComposerPluginTest::DeleteObjectsL ),
- ENTRY( "WaitComposingComplete", CComposerPluginTest::WaitComposingComplete ),
-
- };
-
- const TInt count = sizeof( KFunctions ) /
- sizeof( TStifFunctionInfo );
-
- return RunInternalL( KFunctions, count, aItem );
-
- }
-
-// -----------------------------------------------------------------------------
-// CComposerPluginTest::HandleSessionOpened
-// -----------------------------------------------------------------------------
-//
-void CComposerPluginTest::HandleSessionOpened( CMdESession& /*aClient*/, TInt aError )
- {
- _LIT( KMsg, "CallBck HandleSessionOpened - Error code : %d" );
- TBuf <100> msg;
- msg.Format(KMsg, aError);
- iLog->Log( msg );
- RDebug::Print(msg);
-
- // session event
- TEventIf event( TEventIf::ESetEvent, _L("Session") );
- TestModuleIf().Event( event );
- }
-
-// -----------------------------------------------------------------------------
-// CComposerPluginTest::HandleSessionError
-// -----------------------------------------------------------------------------
-//
-void CComposerPluginTest::HandleSessionError( CMdESession& /*aClient*/, TInt aError )
- {
- _LIT( KMsg, "CallBck HandleSessionError - Error code : %d" );
- TBuf <100> msg;
- msg.Format(KMsg, aError);
- iLog->Log( msg );
- RDebug::Print(msg);
-
- // session event
- TEventIf event( TEventIf::ESetEvent, _L("Session") );
- TestModuleIf().Event( event );
- }
-
-// -----------------------------------------------------------------------------
-// CComposerPluginTest::ActiveWait
-// -----------------------------------------------------------------------------
-//
-TInt CComposerPluginTest::ActiveWait( CStifItemParser& /* aItem */ )
- {
- TTimeIntervalMicroSeconds32 timeout(2500000);
- RTimer timer;
- TRequestStatus status;
-
- timer.CreateLocal();
- timer.After(status,timeout);
-
- User::WaitForAnyRequest();
-
- timer.Close();
-
- _LIT( KMsg1, "Exit ActiveWait" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CComposerPluginTest::BeginComposerSessionL
-// -----------------------------------------------------------------------------
-//
-TInt CComposerPluginTest::BeginComposerSessionL( CStifItemParser& /* aItem */ )
- {
- iMdEClient = NULL;
- TRAPD( error, iMdEClient = CMdESession::NewL( *this ) );
-
- _LIT( KMsg, "Exit BeginComposerSession - Error code : %d" );
- TBuf <100> msg;
- msg.Format(KMsg, error);
- iLog->Log( msg );
- RDebug::Print(msg);
-
- User::LeaveIfError(error);
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CComposerPluginTest::EndComposerSession
-// -----------------------------------------------------------------------------
-//
-TInt CComposerPluginTest::EndComposerSession( CStifItemParser& /* aItem */ )
- {
- iPluginArray.ResetAndDestroy();
- iPluginArray.Close();
-
- if ( iMdEClient )
- {
- delete iMdEClient;
- iMdEClient = NULL;
- }
-
- REComSession::FinalClose();
-
- _LIT( KMsg, "Exit EndComposerSession" );
- iLog->Log( KMsg );
- RDebug::Print( KMsg );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CComposerPluginTest::LoadPluginsL
-// -----------------------------------------------------------------------------
-//
-TInt CComposerPluginTest::LoadPluginsL( CStifItemParser& /* aItem */ )
- {
- _LIT( KMsg1, "Enter LoadPlugins" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- TUid imageComposerUID = { 0x20007185 }; // MDS image composer plugin
-
- RImplInfoPtrArray infoArray;
-
- TCleanupItem cleanupItem( MdsUtils::CleanupEComArray, &infoArray );
- CleanupStack::PushL( cleanupItem );
-
- CComposerPlugin::ListImplementationsL( infoArray );
- TInt count( 0 );
- count = infoArray.Count();
-
- for ( TInt i=0; i < count; i++ )
- {
- TUid uid = infoArray[i]->ImplementationUid(); // Create the plug-ins
- if( uid == imageComposerUID )
- {
- iPluginArray.AppendL( CComposerPlugin::NewL( uid ) ); // and add them to array
- }
- }
-
- CleanupStack::PopAndDestroy( &infoArray ); // infoArray, results in a call to CleanupEComArray
-
- if( iPluginArray.Count() == 0 )
- {
- return KErrNotFound;
- }
-
-
- _LIT( KMsg2, "Exit LoadPlugins" );
- iLog->Log( KMsg2 );
- RDebug::Print( KMsg2 );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CComposerPluginTest::SetSessions
-// -----------------------------------------------------------------------------
-//
-TInt CComposerPluginTest::SetSessions( CStifItemParser& /*aItem*/ )
- {
- _LIT( KMsg1, "Enter SetSessions" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- if( !iMdEClient )
- {
- return KErrUnknown;
- }
-
- for ( TInt i = 0; i < iPluginArray.Count(); ++i )
- {
- iPluginArray[i]->SetSession( *iMdEClient );
- }
-
- _LIT( KMsg2, "Exit SetSessions" );
- iLog->Log( KMsg2 );
- RDebug::Print( KMsg2 );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CComposerPluginTest::RemoveSessions
-// -----------------------------------------------------------------------------
-//
-TInt CComposerPluginTest::RemoveSessions( CStifItemParser& /* aItem */ )
- {
- _LIT( KMsg1, "Enter RemoveSessions" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- for(TInt i = 0; i < iPluginArray.Count(); ++i)
- {
- iPluginArray[i]->RemoveSession();
- }
-
- _LIT( KMsg2, "Exit RemoveSessions" );
- iLog->Log( KMsg2 );
- RDebug::Print( KMsg2 );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CComposerPluginTest::ModifyObjectsL
-// -----------------------------------------------------------------------------
-//
-TInt CComposerPluginTest::ModifyObjectsL( CStifItemParser& aItem )
- {
- _LIT( KMsg1, "Enter ModifyObjects" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- CMdENamespaceDef& defaultNamespace = iMdEClient->GetDefaultNamespaceDefL();
- CMdEObjectDef& imageDef = defaultNamespace.GetObjectDefL( Image::KImageObject );
-
- // Mandatory parameters for any object.
- CMdEPropertyDef& creationDef = imageDef.GetPropertyDefL( Object::KCreationDateProperty );
- CMdEPropertyDef& modifiedDef = imageDef.GetPropertyDefL( Object::KLastModifiedDateProperty );
- CMdEPropertyDef& sizeDef = imageDef.GetPropertyDefL( Object::KSizeProperty );
- CMdEPropertyDef& itemTypeDef = imageDef.GetPropertyDefL( Object::KItemTypeProperty );
-
- CMdEPropertyDef& descriptionPropertyDef = imageDef.GetPropertyDefL( MediaObject::KDescriptionProperty );
- CMdEPropertyDef& widthDef = imageDef.GetPropertyDefL( MediaObject::KWidthProperty );
- CMdEPropertyDef& heightDef = imageDef.GetPropertyDefL( MediaObject::KHeightProperty );
- CMdEPropertyDef& commentDef = imageDef.GetPropertyDefL( MediaObject::KCommentProperty );
- CMdEPropertyDef& lastModifiedDateDef = imageDef.GetPropertyDefL( Image::KDateTimeProperty );
- CMdEPropertyDef& dateTimeDigitizedDef = imageDef.GetPropertyDefL( Image::KDateTimeDigitizedProperty );
- CMdEPropertyDef& makeDef = imageDef.GetPropertyDefL( Image::KMakeProperty );
- CMdEPropertyDef& modelDef = imageDef.GetPropertyDefL( Image::KModelProperty );
- CMdEPropertyDef& artistDef = imageDef.GetPropertyDefL( MediaObject::KArtistProperty ); // Ei toimi
- CMdEPropertyDef& orientationDef = imageDef.GetPropertyDefL( Image::KOrientationProperty );
- CMdEPropertyDef& yCbCrPosDef = imageDef.GetPropertyDefL( Image::KYCbCrPositioningProperty );
- CMdEPropertyDef& resolutionDef = imageDef.GetPropertyDefL( MediaObject::KResolutionUnitProperty );
- CMdEPropertyDef& isoSpeedDef = imageDef.GetPropertyDefL( Image::KISOSpeedRatingsProperty );
- CMdEPropertyDef& soundFileDef = imageDef.GetPropertyDefL( Image::KRelatedSoundFileProperty );
- CMdEPropertyDef& exposureTimeDef = imageDef.GetPropertyDefL( Image::KExposureTimeProperty );
- CMdEPropertyDef& apertureDef = imageDef.GetPropertyDefL( Image::KApertureValueProperty );
- CMdEPropertyDef& colourSpaceDef = imageDef.GetPropertyDefL( Image::KColourSpaceProperty );
- CMdEPropertyDef& exposureBiasDef = imageDef.GetPropertyDefL( Image::KExposureBiasValueProperty );
- CMdEPropertyDef& meteringDef = imageDef.GetPropertyDefL( Image::KMeteringModeProperty );
- CMdEPropertyDef& exifVersionDef = imageDef.GetPropertyDefL( Image::KExifVersionProperty );
- CMdEPropertyDef& flashPixVersionDef = imageDef.GetPropertyDefL( Image::KFlashPixVersionProperty );
- CMdEPropertyDef& thumbXDef = imageDef.GetPropertyDefL( Image::KThumbXResolutionProperty );
- CMdEPropertyDef& thumbYDef = imageDef.GetPropertyDefL( Image::KThumbYResolutionProperty );
- CMdEPropertyDef& thumbResolutionUnitDef = imageDef.GetPropertyDefL( Image::KThumbResolutionUnitProperty );
- CMdEPropertyDef& thumbCompressionDef = imageDef.GetPropertyDefL( Image::KThumbCompressionProperty );
- CMdEPropertyDef& shutterSpeedDef = imageDef.GetPropertyDefL( Image::KShutterSpeedValueProperty );
- CMdEPropertyDef& componentsDef = imageDef.GetPropertyDefL( Image::KComponentsConfigurationProperty );
- CMdEPropertyDef& xResolutionDef = imageDef.GetPropertyDefL( Image::KXResolutionProperty );
- CMdEPropertyDef& yResolutionDef = imageDef.GetPropertyDefL( Image::KYResolutionProperty );
- CMdEPropertyDef& fNumberDef = imageDef.GetPropertyDefL( Image::KFNumberProperty );
- CMdEPropertyDef& focalLengthDef = imageDef.GetPropertyDefL( Image::KFocalLengthProperty );
- CMdEPropertyDef& focalIn35Def = imageDef.GetPropertyDefL( Image::KFocalLengthIn35mmFilmProperty );
-
- TBuf <100> msg;
-
- TInt count( 0 );
-
- User::LeaveIfError( aItem.GetNextInt( count ) );
-
- if ( count == 1 )
- {
- TItemId objectId(0);
- TTime currTime;
- currTime.HomeTime();
- TPtrC inputFile;
-
- User::LeaveIfError( aItem.GetNextString( inputFile ));
-
- // create object
- iMdEClient->RemoveObjectL(inputFile);
- CMdEObject* object = iMdEClient->NewObjectLC(imageDef, inputFile);
-
- object->AddTimePropertyL(creationDef, currTime);
- object->AddTimePropertyL(modifiedDef, currTime);
- object->AddUint32PropertyL( sizeDef, 0 );
- object->AddTextPropertyL( itemTypeDef, Image::KImageObject );
-
- objectId = iMdEClient->AddObjectL(*object);
-
- CleanupStack::PopAndDestroy( object );
- object = NULL;
-
- // open object for modification
- TRAPD( openError, object = iMdEClient->OpenObjectL(objectId) );
-
- if ( !object || openError != KErrNone )
- {
- msg.Format(KOpenErr, openError);
- iLog->Log( msg );
- RDebug::Print(msg);
-
- User::LeaveIfError(openError);
- }
-
- CleanupStack::PushL( object );
-
- CMdEProperty* property = NULL;
-
-
- // Modified date
- object->Property( lastModifiedDateDef, property );
-
- if ( property )
- {
- CMdETimeProperty* modTimeProperty = (CMdETimeProperty*)property;
-
- modTimeProperty->SetValueL( 1 );
- }
- else
- {
- object->AddTimePropertyL( lastModifiedDateDef, 1 );
- }
-
- property = NULL;
-
- // Date & time digitized
- object->Property( dateTimeDigitizedDef, property );
-
- if ( property )
- {
- CMdETimeProperty* digiTimeProperty = (CMdETimeProperty*)property;
-
- digiTimeProperty->SetValueL( 9959267210000000 );
- }
- else
- {
- object->AddTimePropertyL( dateTimeDigitizedDef, 9959267210000000 );
- }
-
- property = NULL;
-
- // Title
- _LIT( KDesc, "Description" );
- object->Property( descriptionPropertyDef, property );
-
- if ( property )
- {
- property->SetTextValueL( KDesc );
- }
- else
- {
- object->AddTextPropertyL( descriptionPropertyDef, KDesc );
- }
-
- property = NULL;
-
- // Comment
- _LIT( KNoComment, "Comment" );
- object->Property( commentDef, property );
-
- if ( property )
- {
- property->SetTextValueL( KNoComment );
- }
- else
- {
- object->AddTextPropertyL( commentDef, KNoComment );
- }
-
- property = NULL;
-
- // Maker
- object->Property( makeDef, property );
-
- _LIT( KOnkia, "Maker" );
- if ( property )
- {
- property->SetTextValueL( KOnkia );
- }
- else
- {
- object->AddTextPropertyL( makeDef, KOnkia );
- }
-
- property = NULL;
-
- // Model
- object->Property( modelDef, property );
- _LIT( KModel, "Model" );
- if ( property )
- {
- property->SetTextValueL( KModel );
- }
- else
- {
- object->AddTextPropertyL( modelDef, KModel );
- }
-
- property = NULL;
-
- // Width
- object->Property( widthDef, property );
-
- if ( property )
- {
- property->SetUint16ValueL( 100 );
- }
- else
- {
- object->AddUint16PropertyL( widthDef, 100 );
- }
-
- property = NULL;
-
- // Height
- object->Property( heightDef, property );
-
- if ( property )
- {
- property->SetUint16ValueL( 100 );
- }
- else
- {
- object->AddUint16PropertyL( heightDef, 100 );
- }
-
- property = NULL;
-
- // Orientation
- object->Property( orientationDef, property );
-
- if ( property )
- {
- property->SetUint16ValueL( 8 );
- }
- else
- {
- object->AddUint16PropertyL( orientationDef, 8 );
- }
-
- property = NULL;
-
- // YCbCr positioning
- object->Property( yCbCrPosDef, property );
-
- if ( property )
- {
- property->SetUint16ValueL( 2 );
- }
- else
- {
- object->AddUint16PropertyL( yCbCrPosDef, 2 );
- }
-
- property = NULL;
-
- // ISO speed
- object->Property( isoSpeedDef, property );
-
- if ( property )
- {
- property->SetUint16ValueL( 1600 );
- }
- else
- {
- object->AddUint16PropertyL( isoSpeedDef, 1600 );
- }
-
- property = NULL;
-
- // Related soundfile
- _LIT(KWavName, "Wav.wav");
- object->Property( soundFileDef, property);
-
- if(property)
- {
- property->SetTextValueL( KWavName );
- }
- else
- {
- object->AddTextPropertyL( soundFileDef, KWavName );
- }
-
- property = NULL;
-
- // Exposure time
- object->Property( exposureTimeDef, property);
-
- if(property)
- {
- property->SetReal32ValueL( 99.1f );
- }
- else
- {
- object->AddReal32PropertyL( exposureTimeDef, 99.1f );
- }
-
- property = NULL;
-
- // Aperture
- object->Property( apertureDef, property);
-
- if(property)
- {
- property->SetReal32ValueL( 5.0f );
- }
- else
- {
- object->AddReal32PropertyL( apertureDef, 5.0f );
- }
-
- property = NULL;
-
- // Colour space
- object->Property( colourSpaceDef, property);
-
- if (property)
- {
- property->SetUint16ValueL( 65535 );
- }
- else
- {
- object->AddUint16PropertyL( colourSpaceDef, 65535 );
- }
-
- property = NULL;
-
- // Exposure bias
- object->Property( exposureBiasDef, property);
-
- if(property)
- {
- property->SetReal32ValueL( 0.0f );
- }
- else
- {
- object->AddReal32PropertyL( exposureBiasDef, 0.0f );
- }
-
- property = NULL;
-
- // Metering mode
- object->Property( meteringDef, property);
-
- if (property)
- {
- property->SetUint16ValueL( 4 );
- }
- else
- {
- object->AddUint16PropertyL( meteringDef, 4 );
- }
-
- property = NULL;
-
- // Thumb X
- object->Property( thumbXDef, property);
-
- if(property)
- {
- property->SetUint32ValueL( 64 );
- }
- else
- {
- object->AddUint32PropertyL( thumbXDef, 64 );
- }
-
- property = NULL;
-
- // Thumb Y
- object->Property( thumbYDef, property);
-
- if(property)
- {
- property->SetUint32ValueL( 64 );
- }
- else
- {
- object->AddUint32PropertyL( thumbYDef, 64 );
- }
-
- property = NULL;
-
- // Thumbnail resolution unit
- object->Property( thumbResolutionUnitDef, property );
-
- if ( property )
- {
- property->SetUint16ValueL( 2 );
- }
- else
- {
- object->AddUint16PropertyL( thumbResolutionUnitDef, 2 );
- }
-
- property = NULL;
-
- // Thumbnail compression
- object->Property( thumbCompressionDef, property );
-
- if ( property )
- {
- property->SetUint16ValueL( 6 );
- }
- else
- {
- object->AddUint16PropertyL( thumbCompressionDef, 6 );
- }
-
- property = NULL;
-
- // Shutter speed
- object->Property( shutterSpeedDef, property );
-
- if ( property )
- {
- property->SetReal32ValueL( 9.0f );
- }
- else
- {
- object->AddReal32PropertyL( shutterSpeedDef, 9.0f );
- }
-
- property = NULL;
-
- // Components configuration
- object->Property( componentsDef, property );
-
- if ( property )
- {
- property->SetUint32ValueL( 197121 );
- }
- else
- {
- object->AddUint32PropertyL( componentsDef, 197121 );
- }
-
- property = NULL;
-
- // X resolution
- object->Property( xResolutionDef, property );
-
- if ( property )
- {
- property->SetReal32ValueL( 300.0f );
- }
- else
- {
- object->AddReal32PropertyL( xResolutionDef, 300.0f );
- }
-
- property = NULL;
-
- // Y resolution
- object->Property( yResolutionDef, property );
-
- if ( property )
- {
- property->SetReal32ValueL( 300.0f );
- }
- else
- {
- object->AddReal32PropertyL( yResolutionDef, 300.0f );
- }
-
- property = NULL;
-
- // F number
- object->Property( fNumberDef, property );
-
- if ( property )
- {
- property->SetReal32ValueL( 2.8f );
- }
- else
- {
- object->AddReal32PropertyL( fNumberDef, 2.8f );
- }
-
- property = NULL;
-
- // Focal length
- object->Property( focalLengthDef, property );
-
- if ( property )
- {
- property->SetReal32ValueL( 9.0f );
- }
- else
- {
- object->AddReal32PropertyL( focalLengthDef, 9.0f );
- }
-
- property = NULL;
-
- // Focal length in 35 mm film
- object->Property( focalIn35Def, property );
-
- if ( property )
- {
- property->SetUint16ValueL( 120 );
- }
- else
- {
- object->AddUint16PropertyL( focalIn35Def, 120 );
- }
-
- // Commit object
- TRAPD( commitError, iMdEClient->CommitObjectL(*object) );
- if ( commitError != KErrNone )
- {
- msg.Format(KCommErr, commitError);
- iLog->Log( msg );
- RDebug::Print(msg);
-
- User::LeaveIfError(commitError);
- }
-
- iLog->Log( KCommit );
- RDebug::Print(KCommit);
-
- CleanupStack::PopAndDestroy( object );
- }
-
- // modify more than one object
- else if ( count > 1 )
- {
- RPointerArray objectArray;
- CleanupClosePushL( objectArray );
-
- CMdEObject* object = NULL;
- TItemId objectId(0);
- TTime currTime;
- TBuf <100> uri;
-
- for ( TInt i = 0; i < count; ++i )
- {
- uri.Format(KUri, i+1);
-
- // create object
- iMdEClient->RemoveObjectL(uri);
- object = iMdEClient->NewObjectLC(imageDef, uri);
-
- currTime.HomeTime();
- object->AddTimePropertyL(creationDef, currTime);
- object->AddTimePropertyL(modifiedDef, currTime);
- object->AddUint32PropertyL( sizeDef, 0 );
- object->AddTextPropertyL( itemTypeDef, Image::KImageObject );
-
- objectId = iMdEClient->AddObjectL(*object);
-
- CleanupStack::PopAndDestroy(object);
- object = NULL;
-
- // open for modification
- TRAPD( openError, object = iMdEClient->OpenObjectL(objectId) )
-
- if ( !object || openError != KErrNone )
- {
-
- if (openError != KErrNone)
- {
- msg.Format(KOpenErr, openError);
- iLog->Log( msg );
- RDebug::Print(msg);
-
- User::LeaveIfError(openError);
- }
- else
- {
- iLog->Log( KNull );
- RDebug::Print(KNull);
- }
-
- continue;
- }
-
- CMdEProperty* property = NULL;
-
- // Description
- _LIT( KDesc, "Description" );
- object->Property( descriptionPropertyDef, property );
-
- if ( property )
- {
- property->SetTextValueL( KDesc );
- }
- else
- {
- object->AddTextPropertyL( descriptionPropertyDef, KDesc );
- }
-
- property = NULL;
-
- // Width
- object->Property( widthDef, property );
-
- if ( property )
- {
- property->SetUint16ValueL( 100 );
- }
- else
- {
- object->AddUint16PropertyL( widthDef, 100 );
- }
-
- property = NULL;
-
- // Height
- object->Property( heightDef, property );
-
- if ( property )
- {
- property->SetUint16ValueL( 100 );
- }
- else
- {
- object->AddUint16PropertyL( heightDef, 100 );
- }
-
- property = NULL;
-
- // Maker
- object->Property( makeDef, property );
-
- _LIT( KOnkia, "Maker" );
- if ( property )
- {
- property->SetTextValueL( KOnkia );
- }
- else
- {
- object->AddTextPropertyL( makeDef, KOnkia );
- }
-
- property = NULL;
-
- // Model
- object->Property( modelDef, property );
- _LIT( KModel, "Model" );
- if ( property )
- {
- property->SetTextValueL( KModel );
- }
- else
- {
- object->AddTextPropertyL( modelDef, KModel );
- }
-
- objectArray.Append( object );
- }
-
- TRAPD( commitError, iMdEClient->CommitObjectsL(objectArray) );
- if ( commitError != KErrNone )
- {
- msg.Format(KCommErr, commitError);
- iLog->Log( msg );
- RDebug::Print(msg);
-
- User::LeaveIfError(commitError);
- }
-
- iLog->Log( KCommit );
- RDebug::Print(KCommit);
-
- objectArray.ResetAndDestroy();
- CleanupStack::PopAndDestroy( &objectArray );
- }
-
- _LIT( KMsg2, "Exit ModifyObjects" );
- iLog->Log( KMsg2 );
- RDebug::Print( KMsg2 );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CComposerPluginTest::DeleteObject
-// -----------------------------------------------------------------------------
-//
-TInt CComposerPluginTest::DeleteObjectL( CStifItemParser& aItem )
- {
- _LIT( KMsg1, "Enter DeleteObject" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- TPtrC inputFile;
- User::LeaveIfError( aItem.GetNextString( inputFile ));
-
- iMdEClient->RemoveObjectL(inputFile);
-
- _LIT( KMsg2, "Exit DeleteObject" );
- iLog->Log( KMsg2 );
- RDebug::Print( KMsg2 );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CComposerPluginTest::DeleteObjects
-// -----------------------------------------------------------------------------
-//
-TInt CComposerPluginTest::DeleteObjectsL( CStifItemParser& aItem )
- {
- TInt count(0);
- TBuf <100> uri;
-
- User::LeaveIfError( aItem.GetNextInt( count ) );
-
- for ( TInt i = 0; i < count; ++i )
- {
- uri.Format(KUri, i+1);
-
- iMdEClient->RemoveObjectL(uri);
- }
-
- _LIT( KMsg, "Exit DeleteObjects" );
- iLog->Log( KMsg );
- RDebug::Print(KMsg);
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CComposerPluginTest::WaitComposingComplete
-// -----------------------------------------------------------------------------
-//
-TInt CComposerPluginTest::WaitComposingComplete( CStifItemParser& aItem )
- {
- _LIT( KMsg1, "Enter WaitComposingComplete" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- TBool complete = ETrue;
- TBool waitingForComposingToEnd = ETrue;
-
- while( waitingForComposingToEnd )
- {
- complete = ETrue;
-
- for(TInt i = 0; i < iPluginArray.Count(); ++i)
- {
- if( iPluginArray[i]->IsComposingComplete() == EFalse )
- {
- complete = EFalse;
- }
- }
-
- if( complete )
- {
- waitingForComposingToEnd = EFalse;
- }
- else
- {
- ActiveWait( aItem );
- }
- }
-
- _LIT( KMsg2, "Exit WaitComposingComplete" );
- iLog->Log( KMsg2 );
- RDebug::Print( KMsg2 );
-
- return KErrNone;
- }
-
-// [End of File] - Do not remove
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/harvester_framework_api/tsrc/HarvesterClientTest/Bmarm/HarvesterClientTestScripteru.def
--- a/mds_plat/harvester_framework_api/tsrc/HarvesterClientTest/Bmarm/HarvesterClientTestScripteru.def Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-EXPORTS
- LibEntryL__FR13CTestModuleIf @ 1 NONAME R3UNUSED ; LibEntryL(CTestModuleIf &)
-
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/harvester_framework_api/tsrc/HarvesterClientTest/Bwins/HarvesterClientTestScripteru.def
--- a/mds_plat/harvester_framework_api/tsrc/HarvesterClientTest/Bwins/HarvesterClientTestScripteru.def Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-EXPORTS
- ?LibEntryL@@YAPAVCScriptBase@@AAVCTestModuleIf@@@Z @ 1 NONAME ; class CScriptBase * __cdecl LibEntryL(class CTestModuleIf &)
-
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/harvester_framework_api/tsrc/HarvesterClientTest/conf/HarvesterClientTestScripter.cfg
--- a/mds_plat/harvester_framework_api/tsrc/HarvesterClientTest/conf/HarvesterClientTestScripter.cfg Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,424 +0,0 @@
-#
-# Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "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: Harvester Client API tests
-#
-
-// ---------------------------------------------------------------------------
-// Harvester Client API test cases
-// ---------------------------------------------------------------------------
-
-// These should be run in sequential mode if several cases are run at the same
-// time!
-
-[StifSettings]
-TestThreadStackSize= 32768
-TestThreadMinHeap= 4096
-TestThreadMaxHeap= 16777216
-[EndStifSettings]
-
-[Test]
-title Harvester Client Connect/Disconnect
-timeout 180000
-create HarvesterClientTestScripter test
-request Session
-test SetUp
-wait Session
-test HarvesterClientConnect
-test HarvesterClientClose
-test TearDown
-delete test
-[Endtest]
-
-[Test]
-title Harvester Client Pause/Resume
-timeout 180000
-create HarvesterClientTestScripter test
-request Session
-test SetUp
-wait Session
-test HarvesterClientConnect
-test HarvesterClientPause
-test HarvesterClientResume
-test HarvesterClientPause
-test HarvesterClientResume
-test HarvesterClientClose
-test TearDown
-delete test
-[Endtest]
-
-[Test]
-title Set/Remove Harvester Observer
-timeout 180000
-create HarvesterClientTestScripter test
-request Session
-test SetUp
-wait Session
-test HarvesterClientConnect
-test SetHarvesterObserver
-test RemoveHarvesterObserver
-test SetHarvesterObserver
-test SetHarvesterObserver
-test RemoveHarvesterObserver
-test HarvesterClientClose
-test TearDown
-delete test
-[Endtest]
-
-[Test]
-title Add/Remove Harvester Event Observer
-timeout 180000
-create HarvesterClientTestScripter test
-request Session
-test SetUp
-wait Session
-test HarvesterClientConnect
-test AddHarvesterEventObserver 3
-test AddHarvesterEventObserver 6
-test RemoveHarvesterEventObserver 5
-test HarvesterClientClose
-test TearDown
-delete test
-[Endtest]
-
-[Test]
-title HarvestFile 1
-timeout 500000
-create HarvesterClientTestScripter test
-request Session
-test SetUp
-wait Session
-test HarvesterClientConnect
-test SetHarvesterObserver
-test AddHarvesterEventObserver 1
-test AddObjectObserver
-test SetUpHarvesting e:\testing\data\bmp_burst.bmp
-request Continue
-test HarvestFile e:\testing\data\bmp_burst.bmp
-wait Continue
-test EndHarvesterSession
-request Query
-test QueryImageObjectByIdIndex 0
-wait Query
-test RemoveObject e:\testing\data\bmp_burst.bmp
-test Results
-test RemoveHarvesterEventObserver 1
-test RemoveHarvesterObserver
-test RemoveObjectObserver
-test HarvesterClientClose
-test TearDown
-delete test
-[Endtest]
-
-[Test]
-title HarvestFile 2
-timeout 500000
-create HarvesterClientTestScripter test
-request Session
-test SetUp
-wait Session
-test HarvesterClientConnect
-test SetHarvesterObserver
-test AddHarvesterEventObserver 1
-test AddObjectObserver
-test SetUpHarvesting e:\testing\data\G4.TIF
-request Continue
-test HarvestFile e:\testing\data\G4.TIF
-wait Continue
-test EndHarvesterSession
-request Query
-test QueryImageObjectByIdIndex 0
-wait Query
-test RemoveObject e:\testing\data\G4.TIF
-test Results
-test RemoveHarvesterEventObserver 1
-test RemoveHarvesterObserver
-test RemoveObjectObserver
-test HarvesterClientClose
-test TearDown
-delete test
-[Endtest]
-
-[Test]
-title HarvestFile 3
-timeout 500000
-create HarvesterClientTestScripter test
-request Session
-test SetUp
-wait Session
-test HarvesterClientConnect
-test SetHarvesterObserver
-test AddHarvesterEventObserver 1
-test AddObjectObserver
-test SetUpHarvesting e:\testing\data\GIF87testimage.gif
-request Continue
-test HarvestFile e:\testing\data\GIF87testimage.gif
-wait Continue
-test EndHarvesterSession
-request Query
-test QueryImageObjectByIdIndex 0
-wait Query
-test RemoveObject e:\testing\data\GIF87testimage.gif
-test Results
-test RemoveHarvesterEventObserver 1
-test RemoveHarvesterObserver
-test RemoveObjectObserver
-test HarvesterClientClose
-test TearDown
-delete test
-[Endtest]
-
-[Test]
-title HarvestFile 4
-timeout 500000
-create HarvesterClientTestScripter test
-request Session
-test SetUp
-wait Session
-test HarvesterClientConnect
-test SetHarvesterObserver
-test AddHarvesterEventObserver 1
-test AddObjectObserver
-test SetUpHarvesting e:\testing\data\Liverpool.jpg
-test SetLocationInfo
-request Continue
-test HarvestFile e:\testing\data\Liverpool.jpg
-wait Continue
-test EndHarvesterSession
-request Query
-test QueryImageObjectByIdIndex 0
-wait Query
-test RemoveObject e:\testing\data\Liverpool.jpg
-test Results
-test RemoveHarvesterEventObserver 1
-test RemoveHarvesterObserver
-test RemoveObjectObserver
-test HarvesterClientClose
-test TearDown
-delete test
-[Endtest]
-
-[Test]
-title HarvestFile 5
-timeout 500000
-create HarvesterClientTestScripter test
-request Session
-test SetUp
-wait Session
-test HarvesterClientConnect
-test SetHarvesterObserver
-test AddHarvesterEventObserver 1
-test AddObjectObserver
-test SetUpHarvesting e:\testing\data\MBMtestimage.mbm
-request Continue
-test HarvestFile e:\testing\data\MBMtestimage.mbm
-wait Continue
-test EndHarvesterSession
-request Query
-test QueryImageObjectByIdIndex 0
-wait Query
-test RemoveObject e:\testing\data\MBMtestimage.mbm
-test Results
-test RemoveHarvesterEventObserver 1
-test RemoveHarvesterObserver
-test RemoveObjectObserver
-test HarvesterClientClose
-test TearDown
-delete test
-[Endtest]
-
-[Test]
-title HarvestFile 6
-timeout 500000
-create HarvesterClientTestScripter test
-request Session
-test SetUp
-wait Session
-test HarvesterClientConnect
-test SetHarvesterObserver
-test AddHarvesterEventObserver 1
-test AddObjectObserver
-test SetUpHarvesting e:\testing\data\PNGtestimage.png
-request Continue
-test HarvestFile e:\testing\data\PNGtestimage.png
-wait Continue
-test EndHarvesterSession
-request Query
-test QueryImageObjectByIdIndex 0
-wait Query
-test RemoveObject e:\testing\data\PNGtestimage.png
-test Results
-test RemoveHarvesterEventObserver 1
-test RemoveHarvesterObserver
-test RemoveObjectObserver
-test HarvesterClientClose
-test TearDown
-delete test
-[Endtest]
-
-[Test]
-title HarvestFileWithUID 1
-timeout 500000
-create HarvesterClientTestScripter test
-request Session
-test SetUp
-wait Session
-test HarvesterClientConnect
-test SetHarvesterObserver
-test AddHarvesterEventObserver 1
-test AddObjectObserver
-test SetUpHarvesting e:\testing\data\ota_bmpiso.ota
-test SetLocationInfo
-request Continue
-test HarvestFileWithUID e:\testing\data\ota_bmpiso.ota
-wait Continue
-test EndHarvesterSession
-request Query
-test QueryImageObjectByIdIndex 0
-wait Query
-test RemoveObject e:\testing\data\ota_bmpiso.ota
-test Results
-test RemoveHarvesterEventObserver 1
-test RemoveHarvesterObserver
-test RemoveObjectObserver
-test HarvesterClientClose
-test TearDown
-delete test
-[Endtest]
-
-[Test]
-title HarvestFileWithUID 2
-timeout 500000
-create HarvesterClientTestScripter test
-request Session
-test SetUp
-wait Session
-test HarvesterClientConnect
-test SetHarvesterObserver
-test AddHarvesterEventObserver 1
-test AddObjectObserver
-test SetUpHarvesting e:\testing\data\00001.mp3
-request Continue
-test HarvestFileWithUID e:\testing\data\00001.mp3
-wait Continue
-test EndHarvesterSession
-request Query
-test QueryAudioObjectByIdIndex 0
-wait Query
-test RemoveObject e:\testing\data\00001.mp3
-test Results
-test RemoveHarvesterEventObserver 1
-test RemoveHarvesterObserver
-test RemoveObjectObserver
-test HarvesterClientClose
-test TearDown
-delete test
-[Endtest]
-
-[Test]
-title Harvester Event Basic Test
-timeout 180000
-create HarvesterClientTestScripter test
-request Session
-test SetUp
-wait Session
-test HarvesterClientConnect
-test AddHarvesterEventObserver 1
-test SetUpHarvesting e:\testing\data\bmp_burst.bmp
-test SetUpHarvesting e:\testing\data\G4.TIF
-test SetUpHarvesting e:\testing\data\PNGtestimage.png
-test SetUpHarvesting e:\testing\data\GIF87testimage.gif
-test SetUpHarvesting e:\testing\data\ota_bmpiso.ota
-test SetUpHarvesting e:\testing\data\MBMtestimage.mbm
-test SetUpHarvesting e:\testing\data\Liverpool.jpg
-test SetUpHarvesting e:\testing\data\00001.mp3
-test HarvestFile e:\testing\data\bmp_burst.bmp
-test HarvestFile e:\testing\data\G4.TIF
-test HarvestFile e:\testing\data\PNGtestimage.png
-test HarvestFile e:\testing\data\GIF87testimage.gif
-test HarvestFile e:\testing\data\ota_bmpiso.ota
-test HarvestFile e:\testing\data\MBMtestimage.mbm
-test HarvestFile e:\testing\data\Liverpool.jpg
-test HarvestFileWithUID e:\testing\data\00001.mp3
-test EndHarvesterSession
-test RemoveObject e:\testing\data\bmp_burst.bmp
-test RemoveObject e:\testing\data\G4.TIF
-test RemoveObject e:\testing\data\PNGtestimage.png
-test RemoveObject e:\testing\data\GIF87testimage.gif
-test RemoveObject e:\testing\data\ota_bmpiso.ota
-test RemoveObject e:\testing\data\MBMtestimage.mbm
-test RemoveObject e:\testing\data\Liverpool.jpg
-test RemoveObject e:\testing\data\00001.mp3
-test RemoveHarvesterEventObserver 1
-test HarvesterClientClose
-test TearDown
-delete test
-[Endtest]
-
-[Test]
-title Harvester Client Long Session
-timeout 500000
-create HarvesterClientTestScripter test
-request Session
-test SetUp
-wait Session
-test HarvesterClientConnect
-test SetHarvesterObserver
-test AddHarvesterEventObserver 1
-test AddObjectObserver
-test SetUpHarvesting e:\testing\data\GIF87testimage.gif
-request Continue
-test HarvestFile e:\testing\data\GIF87testimage.gif
-wait Continue
-test EndHarvesterSession
-test HarvesterClientPause
-test HarvesterClientResume
-request Query
-test QueryImageObjectByIdIndex 0
-wait Query
-test RemoveObject e:\testing\data\GIF87testimage.gif
-test Results
-test SetUpHarvesting e:\testing\data\bmp_burst.bmp
-test SetUpHarvesting e:\testing\data\MBMtestimage.mbm
-test HarvestFile e:\testing\data\bmp_burst.bmp
-test HarvestFile e:\testing\data\MBMtestimage.mbm
-test HarvestFileWithUID e:\testing\data\00001.mp3
-test EndHarvesterSession
-test RemoveObject e:\testing\data\bmp_burst.bmp
-test RemoveObject e:\testing\data\G4.TIF
-test RemoveObject e:\testing\data\PNGtestimage.png
-test RemoveObject e:\testing\data\GIF87testimage.gif
-test RemoveObject e:\testing\data\ota_bmpiso.ota
-test RemoveObject e:\testing\data\MBMtestimage.mbm
-test RemoveObject e:\testing\data\Liverpool.jpg
-test RemoveObject e:\testing\data\00001.mp3
-test RemoveHarvesterEventObserver 1
-test RemoveHarvesterObserver
-test RemoveObjectObserver
-test HarvesterClientClose
-test TearDown
-delete test
-[Endtest]
-
-[Test]
-title Harvester Blacklist Test
-timeout 180000
-create HarvesterClientTestScripter test
-test SetUpBlacklist
-test AddFileToBlacklist e:\testing\data\corrupt.jpg
-test CheckBlacklist e:\testing\data\corrupt.jpg
-test RemoveFileFromBlacklist e:\testing\data\corrupt.jpg
-test TearDownBlacklist
-delete test
-[Endtest]
-
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/harvester_framework_api/tsrc/HarvesterClientTest/eabi/HarvesterClientTestScripteru.def
--- a/mds_plat/harvester_framework_api/tsrc/HarvesterClientTest/eabi/HarvesterClientTestScripteru.def Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-EXPORTS
- _Z9LibEntryLR13CTestModuleIf @ 1 NONAME
-
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/harvester_framework_api/tsrc/HarvesterClientTest/group/HarvesterClientTestScripter.mmp
--- a/mds_plat/harvester_framework_api/tsrc/HarvesterClientTest/group/HarvesterClientTestScripter.mmp Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-/*
-* Copyright (c) 2005-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: Project definition file
-*
-*/
-
-
-#include
-#include
-
-TARGET HarvesterClientTestScripter.dll
-TARGETTYPE dll
-UID 0x1000008D 0x101FB3E7
-
-CAPABILITY ALL -TCB
-VENDORID VID_DEFAULT
-
-DEFFILE HarvesterClientTestScripter.DEF
-
-SOURCEPATH ../src
-SOURCE HarvesterClientTestScripter.cpp
-SOURCE HarvesterClientTestScripterBlocks.cpp
-
-USERINCLUDE ../inc
-USERINCLUDE ../../../../../inc
-USERINCLUDE ../../../../../harvester/common/inc/
-USERINCLUDE ../../../../../harvester/blacklistclient/inc/
-
-MW_LAYER_SYSTEMINCLUDE
-
-LIBRARY euser.lib
-LIBRARY harvesterclient.lib
-LIBRARY mdeclient.lib
-LIBRARY stiftestinterface.lib
-LIBRARY stiftestengine.lib
-LIBRARY harvestercommon.lib
-LIBRARY blacklistclient.lib
-LIBRARY efsrv.lib
-
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/harvester_framework_api/tsrc/HarvesterClientTest/group/HarvesterClientTestScripter.pkg
--- a/mds_plat/harvester_framework_api/tsrc/HarvesterClientTest/group/HarvesterClientTestScripter.pkg Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,57 +0,0 @@
-;
-; 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: Installation file for API test
-;
-
-; Languages
-&EN
-
-; Header
-#{"HarvesterClientTestScripter"},(0x101FB3E3),1,0,0,TYPE=SA
-
-; Localised Vendor name
-%{"Nokia"}
-
-; Unique Vendor name
-:"Nokia"
-
-; Install files
-"\epoc32\release\armv5\urel\HarvesterClientTestScripter.dll" - "c:\sys\bin\HarvesterClientTestScripter.dll"
-"..\conf\HarvesterClientTestScripter.cfg" - "c:\TestFramework\HarvesterClientTestScripter.cfg"
-"..\init\HarvesterClientTestScripter.ini" - "c:\TestFramework\HarvesterClientTestScripter.ini"
-
-"..\..\data\mmc\HarvesterTest\Jpg.jpg" -"E:\testing\data\Jpg.jpg"
-"..\..\data\mmc\HarvesterTest\Animated.gif" -"E:\testing\data\Animated.gif"
-"..\..\data\mmc\HarvesterTest\Temp1.jpg" -"E:\testing\data\Temp1.jpg"
-"..\..\data\mmc\HarvesterTest\Temp2.jpg" -"E:\testing\data\Temp2.jpg"
-"..\..\data\mmc\HarvesterTest\Temp3.jpg" -"E:\testing\data\Temp3.jpg"
-"..\..\data\mmc\HarvesterTest\H263.3gp" -"E:\testing\data\H263.3gp"
-"..\..\data\mmc\HarvesterTest\bmp_burst.bmp" -"E:\testing\data\bmp_burst.bmp"
-"..\..\data\mmc\HarvesterTest\GIF87testimage.gif" -"E:\testing\data\GIF87testimage.gif"
-"..\..\data\mmc\HarvesterTest\gif89a_onemeg.gif" -"E:\testing\data\gif89a_onemeg.gif"
-"..\..\data\mmc\HarvesterTest\Liverpool.jpg" -"E:\testing\data\Liverpool.jpg"
-"..\..\data\mmc\HarvesterTest\MBMtestimage.mbm" -"E:\testing\data\MBMtestimage.mbm"
-"..\..\data\mmc\HarvesterTest\wbmp_skull.wbmp" -"E:\testing\data\wbmp_skull.wbmp"
-"..\..\data\mmc\HarvesterTest\ota_bmpiso.ota" -"E:\testing\data\ota_bmpiso.ota"
-"..\..\data\mmc\HarvesterTest\PNGtestimage.png" -"E:\testing\data\PNGtestimage.png"
-"..\..\data\mmc\HarvesterTest\G4.TIF" -"E:\testing\data\G4.TIF"
-"..\..\data\mmc\HarvesterTest\G31D.TIF" -"E:\testing\data\G31D.TIF"
-"..\..\data\mmc\HarvesterTest\PSRETRO.WMF" -"E:\testing\data\PSRETRO.WMF"
-"..\..\data\mmc\HarvesterTest\Animated.gif" -"E:\testing\data\Animated.gif"
-"..\..\data\mmc\HarvesterTest\Mbm.mbm" -"E:\testing\data\Mbm.mbm"
-"..\..\data\mmc\HarvesterTest\MPEG4.3gp" -"E:\testing\data\MPEG4.3gp"
-"..\..\data\mmc\HarvesterTest\MPEG4.mp4" -"E:\testing\data\MPEG4.mp4"
-"..\..\data\mmc\HarvesterTest\00001.mp3" -"E:\testing\data\00001.mp3"
-"..\..\data\mmc\HarvesterTest\corrupt.jpg" -"E:\testing\data\corrupt.jpg"
-
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/harvester_framework_api/tsrc/HarvesterClientTest/group/bld.inf
--- a/mds_plat/harvester_framework_api/tsrc/HarvesterClientTest/group/bld.inf Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-/*
-* Copyright (c) 2005-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: Build information file
-*
-*/
-
-PRJ_PLATFORMS
- DEFAULT
-
-PRJ_EXPORTS
-
-PRJ_MMPFILES
-
-PRJ_TESTMMPFILES
-HarvesterClientTestScripter.mmp
-
-PRJ_TESTEXPORTS
-
-../conf/HarvesterClientTestScripter.cfg /epoc32/winscw/c/TestFramework/HarvesterClientTestScripter.cfg
-../init/HarvesterClientTestScripter.ini /epoc32/winscw/c/TestFramework/HarvesterClientTestScripter.ini
-
-../../data/mmc/HarvesterTest/bmp_burst.bmp /epoc32/WINSCW/C/Data/bmp_burst.bmp
-../../data/mmc/HarvesterTest/G31D.TIF /epoc32/WINSCW/C/Data/G31D.TIF
-../../data/mmc/HarvesterTest/G4.TIF /epoc32/WINSCW/C/Data/G4.TIF
-../../data/mmc/HarvesterTest/GIF87testimage.gif /epoc32/WINSCW/C/Data/GIF87testimage.gif
-../../data/mmc/HarvesterTest/gif89a_onemeg.gif /epoc32/WINSCW/C/Data/gif89a_onemeg.gif
-../../data/mmc/HarvesterTest/Liverpool.jpg /epoc32/WINSCW/C/Data/Liverpool.jpg
-../../data/mmc/HarvesterTest/MBMtestimage.mbm /epoc32/WINSCW/C/Data/MBMtestimage.mbm
-../../data/mmc/HarvesterTest/ota_bmpiso.ota /epoc32/WINSCW/C/Data/ota_bmpiso.ota
-../../data/mmc/HarvesterTest/PNGtestimage.png /epoc32/WINSCW/C/Data/PNGtestimage.png
-../../data/mmc/HarvesterTest/PSRETRO.WMF /epoc32/WINSCW/C/Data/PSRETRO.WMF
-../../data/mmc/HarvesterTest/wbmp_skull.wbmp /epoc32/WINSCW/C/Data/wbmp_skull.wbmp
-../../data/mmc/HarvesterTest/Jpg.jpg /epoc32/WINSCW/C/Data/Jpg.jpg
-../../data/mmc/HarvesterTest/Animated.gif /epoc32/WINSCW/C/Data/Animated.gif
-../../data/mmc/HarvesterTest/Mbm.mbm /epoc32/WINSCW/C/Data/Mbm.mbm
-../../data/mmc/HarvesterTest/H263.3gp /epoc32/WINSCW/C/Data/H263.3gp
-../../data/mmc/HarvesterTest/MPEG4.mp4 /epoc32/WINSCW/C/Data/MPEG4.mp4
-../../data/mmc/HarvesterTest/MPEG4.3gp /epoc32/WINSCW/C/Data/MPEG4.3gp
-../../data/mmc/HarvesterTest/Temp1.jpg /epoc32/WINSCW/C/Data/Temp1.jpg
-../../data/mmc/HarvesterTest/Temp2.jpg /epoc32/WINSCW/C/Data/Temp2.jpg
-../../data/mmc/HarvesterTest/Temp3.jpg /epoc32/WINSCW/C/Data/Temp3.jpg
-../../data/mmc/HarvesterTest/00001.mp3 /epoc32/WINSCW/C/Data/00001.mp3
-../../data/mmc/HarvesterTest/corrupt.jpg /epoc32/WINSCW/C/Data/corrupt.jpg
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/harvester_framework_api/tsrc/HarvesterClientTest/inc/HarvesterClientTestScripter.h
--- a/mds_plat/harvester_framework_api/tsrc/HarvesterClientTest/inc/HarvesterClientTestScripter.h Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,180 +0,0 @@
-/*
-* Copyright (c) 2002-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: ?Description
-*
-*/
-
-
-#ifndef HARVESTERCLIENTTESTSCRIPTER_H
-#define HARVESTERCLIENTTESTSCRIPTER_H
-
-// INCLUDES
-#include
-#include
-#include
-#include "harvesterclient.h"
-#include "mdccommon.h"
-#include "mdesession.h"
-#include "mdequery.h"
-#include "harvestermediaidutil.h"
-#include "blacklistclient.h"
-
-// CONSTANTS
-
-// MACROS
-// Logging path
-_LIT( KHarvesterClientTestScripterLogPath, "\\logs\\testframework\\HarvesterClientTestScripter\\" );
-// Log file
-_LIT( KHarvesterClientTestScripterLogFile, "HarvesterClientTestScripter.txt" );
-_LIT( KHarvesterClientTestScripterLogFileWithTitle, "HarvesterClientTestScripter_[%S].txt" );
-
-// FORWARD DECLARATIONS
-class CMdEHarvesterSession;
-class CHarvesterClientTestScripter;
-
-// CLASS DECLARATION
-
-/**
-* CHarvesterClientTestScripter test class for STIF Test Framework TestScripter.
-* ?other_description_lines
-*
-* @lib ?library
-* @since ?Series60_version
-*/
-NONSHARABLE_CLASS(CHarvesterClientTestScripter) : public CScriptBase,
- public MMdESessionObserver,
- public MHarvestObserver,
- public MMdEQueryObserver,
- public MMdEObjectObserver,
- public MHarvesterEventObserver
- {
- public: // Constructors and destructor
-
- /**
- * Two-phased constructor.
- */
- static CHarvesterClientTestScripter* NewL( CTestModuleIf& aTestModuleIf );
-
- /**
- * Destructor.
- */
- virtual ~CHarvesterClientTestScripter();
-
- public: // Functions from base classes
-
- /**
- * From CScriptBase Runs a script line.
- * @since ?Series60_version
- * @param aItem Script line containing method name and parameters
- * @return Symbian OS error code
- */
- virtual TInt RunMethodL( CStifItemParser& aItem );
-
- private: // Functions from base classes
- void HandleSessionOpened(CMdESession& aSession, TInt aError);
- void HandleSessionError(CMdESession& aSession, TInt aError);
- void HandleObjectNotification(CMdESession& aSession,
- TObserverNotificationType aType,
- const RArray& aObjectIdArray);
- void HandleQueryNewResults(CMdEQuery& aQuery,
- TInt aFirstNewItemIndex,
- TInt aNewItemCount);
- void HandleQueryCompleted(CMdEQuery& aQuery, TInt aError);
-
- void HarvestingComplete( TDesC& aURI, TInt aError );
- void HarvestingUpdated( HarvesterEventObserverType aHEObserverType,
- HarvesterEventState aHarvesterEventState,
- TInt aItemsLeft );
-
- private:
-
- /**
- * C++ default constructor.
- */
- CHarvesterClientTestScripter( CTestModuleIf& aTestModuleIf );
-
- /**
- * By default Symbian 2nd phase constructor is private.
- */
- void ConstructL();
-
- /**
- * Frees all resources allocated from test methods.
- * @since ?Series60_version
- */
- void Delete();
-
- void CheckComplete();
- /**
- * Test helper methods are listed below.
- */
- virtual TInt AddObjectObserverL( CStifItemParser& aItem );
- virtual TInt RemoveObjectObserverL( CStifItemParser& aItem );
- virtual TInt BeginHarvesterSessionL( CStifItemParser& aItem );
- virtual TInt EndHarvesterSessionL( CStifItemParser& aItem );
-
- /**
- * Test methods are listed below.
- */
- virtual TInt SetUp( CStifItemParser& aItem );
- virtual TInt TearDown( CStifItemParser& aItem );
- virtual TInt HarvesterClientConnectL( CStifItemParser& aItem );
- virtual TInt HarvesterClientCloseL( CStifItemParser& aItem );
- virtual TInt HarvesterClientPauseL( CStifItemParser& aItem );
- virtual TInt HarvesterClientResumeL( CStifItemParser& aItem );
- virtual TInt SetHarvesterObserverL( CStifItemParser& aItem );
- virtual TInt RemoveHarvesterObserverL( CStifItemParser& aItem );
- virtual TInt SetLocationInfoL( CStifItemParser& aItem );
- virtual TInt HarvestFileL( CStifItemParser& aItem );
- virtual TInt HarvestFileWithUIDL( CStifItemParser& aItem );
- virtual TInt QueryImageObjectByIdIndexL( CStifItemParser& aItem );
- virtual TInt QueryAudioObjectByIdIndexL( CStifItemParser& aItem );
- virtual TInt RemoveObjectL( CStifItemParser& aItem );
- virtual TInt Results( CStifItemParser& aItem );
- virtual TInt AddHarvesterEventObserverL( CStifItemParser& aItem );
- virtual TInt RemoveHarvesterEventObserverL( CStifItemParser& aItem );
- virtual TInt SetUpBlacklistL( CStifItemParser& aItem );
- virtual TInt TearDownBlacklistL( CStifItemParser& aItem );
- virtual TInt AddFileToBlacklistL( CStifItemParser& aItem );
- virtual TInt CheckBlacklistL( CStifItemParser& aItem );
- virtual TInt RemoveFileFromBlacklistL( CStifItemParser& aItem );
-
- private: // Data
- // Status booleans
- TBool iHarvestingComplete;
- TBool iPlaceholderComplete;
- TBool iNewObjectComplete;
- TBool iQuerySuccess;
- TBool iObjectNotification;
- TBool iSetLocation;
-
- // Test helper classes
- CMdESession* iMdeSession;
- CMdEHarvesterSession* iHarvesterSession;
- CMdEQuery* iQuery;
-
- RHarvesterClient iHc;
- RArray iAlbumIds;
- RArray iObjectIdArray;
-
- TFileName iUri;
-
- RBlacklistClient iBlacklistClient;
- CHarvesterMediaIdUtil* iMediaIdUtil;
- RFs iFs;
- };
-
-#endif // HARVESTERCLIENTTESTSCRIPTER_H
-
-// End of File
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/harvester_framework_api/tsrc/HarvesterClientTest/init/HarvesterClientTestScripter.ini
--- a/mds_plat/harvester_framework_api/tsrc/HarvesterClientTest/init/HarvesterClientTestScripter.ini Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,81 +0,0 @@
-#
-# Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "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:
-#
-
-
-[Engine_Defaults]
-
-TestReportMode= FullReport # Possible values are: 'Empty', 'Summary', 'Environment',
- 'TestCases' or 'FullReport'
-
-CreateTestReport= YES # Possible values: YES or NO
-
-TestReportFilePath= C:\LOGS\TestFramework\
-TestReportFileName= HarvesterClientTestScripterLog
-
-TestReportFormat= TXT # Possible values: TXT or HTML
-TestReportOutput= FILE # Possible values: FILE or RDEBUG
-TestReportFileCreationMode= OVERWRITE # Possible values: OVERWRITE or APPEND
-
-DeviceResetDllName= StifResetForNokia.dll # e.g. 'StifHWResetStub.dll' for user specific reseting
-
-DisableMeasurement= stifmeasurementdisablenone # Possible values are:
- # 'stifmeasurementdisablenone', 'stifmeasurementdisableall'
- # 'stifmeasurementplugin01', 'stifmeasurementplugin02',
- # 'stifmeasurementplugin03', 'stifmeasurementplugin04',
- # 'stifmeasurementplugin05' or 'stifbappeaprofiler'
-
-Timeout= 600000 # Default timeout value for each test case. In milliseconds
-#UITestingSupport= YES # Possible values: YES or NO
-#SeparateProcesses= YES # Possible values: YES or NO (default: NO)
-[End_Defaults]
-
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-
-[New_Module]
-ModuleName= TestScripter
-TestCaseFile= c:\testframework\HarvesterClientTestScripter.cfg
-[End_Module]
-
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-
-[Logger_Defaults]
-
-#NOTE: If you want to set Logger using next setting(s) remove comment(s)'#'
-#NOTE: TestEngine and TestServer logging settings cannot change here
-
-CreateLogDirectories= YES # Possible values: YES or NO
-
-#EmulatorBasePath= C:\LOGS\TestFramework\
-#EmulatorFormat= HTML # Possible values: TXT or HTML
-#EmulatorOutput= FILE # Possible values: FILE or RDEBUG
-
-HardwareBasePath= C:\
-#HardwareFormat= HTML # Possible values: TXT or HTML
-#HardwareOutput= FILE # Possible values: FILE or RDEBUG
-
-#FileCreationMode= OVERWRITE # Possible values: OVERWRITE or APPEND
-
-#ThreadIdToLogFile= YES # Possible values: YES or NO
-#WithTimeStamp= YES # Possible values: YES or NO
-#WithLineBreak= YES # Possible values: YES or NO
-#WithEventRanking= YES # Possible values: YES or NO
-
-#FileUnicode= YES # Possible values: YES or NO
-AddTestCaseTitle= YES # Possible values: YES or NO
-[End_Logger_Defaults]
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-
-# End of file
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/harvester_framework_api/tsrc/HarvesterClientTest/src/HarvesterClientTestScripter.cpp
--- a/mds_plat/harvester_framework_api/tsrc/HarvesterClientTest/src/HarvesterClientTestScripter.cpp Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,116 +0,0 @@
-/*
-* Copyright (c) 2002-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: ?Description
-*
-*/
-
-
-// INCLUDE FILES
-#include
-#include "HarvesterClientTestScripter.h"
-
-// EXTERNAL DATA STRUCTURES
-
-// EXTERNAL FUNCTION PROTOTYPES
-
-// CONSTANTS
-
-// MACROS
-
-// LOCAL CONSTANTS AND MACROS
-
-// MODULE DATA STRUCTURES
-
-// LOCAL FUNCTION PROTOTYPES
-
-// FORWARD DECLARATIONS
-
-// ============================= LOCAL FUNCTIONS ===============================
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CHarvesterClientTestScripter::CHarvesterClientTestScripter
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-//
-CHarvesterClientTestScripter::CHarvesterClientTestScripter(
- CTestModuleIf& aTestModuleIf ):
- CScriptBase( aTestModuleIf )
- {
- }
-
-// -----------------------------------------------------------------------------
-// CHarvesterClientTestScripter::ConstructL
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-//
-void CHarvesterClientTestScripter::ConstructL()
- {
- iLog = CStifLogger::NewL( KHarvesterClientTestScripterLogPath,
- KHarvesterClientTestScripterLogFile,
- CStifLogger::ETxt,
- CStifLogger::EFile,
- EFalse );
-
- }
-
-// -----------------------------------------------------------------------------
-// CHarvesterClientTestScripter::NewL
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-//
-CHarvesterClientTestScripter* CHarvesterClientTestScripter::NewL(
- CTestModuleIf& aTestModuleIf )
- {
- CHarvesterClientTestScripter* self = new (ELeave) CHarvesterClientTestScripter( aTestModuleIf );
-
- CleanupStack::PushL( self );
- self->ConstructL();
- CleanupStack::Pop( self );
-
- return self;
-
- }
-
-// Destructor
-CHarvesterClientTestScripter::~CHarvesterClientTestScripter()
- {
-
- // Delete resources allocated from test methods
- Delete();
-
- // Delete logger
- delete iLog;
-
- }
-
-// ========================== OTHER EXPORTED FUNCTIONS =========================
-
-// -----------------------------------------------------------------------------
-// LibEntryL is a polymorphic Dll entry point.
-// Returns: CScriptBase: New CScriptBase derived object
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CScriptBase* LibEntryL(
- CTestModuleIf& aTestModuleIf ) // Backpointer to STIF Test Framework
- {
-
- return ( CScriptBase* ) CHarvesterClientTestScripter::NewL( aTestModuleIf );
-
- }
-
-
-// End of File
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/harvester_framework_api/tsrc/HarvesterClientTest/src/HarvesterClientTestScripterBlocks.cpp
--- a/mds_plat/harvester_framework_api/tsrc/HarvesterClientTest/src/HarvesterClientTestScripterBlocks.cpp Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,807 +0,0 @@
-/*
-* Copyright (c) 2002-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:
-*
-*/
-
-// INCLUDE FILES
-#include
-#include
-#include
-#include
-#include "HarvesterClientTestScripter.h"
-#include "mdcserializationbuffer.h"
-#include "mdeharvestersession.h"
-#include "mdsutils.h"
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CHarvesterClientTestScripter::Delete
-// Delete here all resources allocated and opened from test methods.
-// Called from destructor.
-// -----------------------------------------------------------------------------
-//
-void CHarvesterClientTestScripter::Delete()
- {
-
- }
-
-// -----------------------------------------------------------------------------
-// CHarvesterClientTestScripter::RunMethodL
-// Run specified method. Contains also table of test mothods and their names.
-// -----------------------------------------------------------------------------
-//
-TInt CHarvesterClientTestScripter::RunMethodL(
- CStifItemParser& aItem )
- {
- static TStifFunctionInfo const KFunctions[] =
- {
- // Copy this line for every implemented function.
- // First string is the function name used in TestScripter script file.
- // Second is the actual implementation member function.
-
- ENTRY( "SetUp", CHarvesterClientTestScripter::SetUp ),
- ENTRY( "TearDown", CHarvesterClientTestScripter::TearDown ),
-
- // Test helper methods
- ENTRY( "AddObjectObserver", CHarvesterClientTestScripter::AddObjectObserverL ),
- ENTRY( "RemoveObjectObserver", CHarvesterClientTestScripter::RemoveObjectObserverL ),
- ENTRY( "SetUpHarvesting", CHarvesterClientTestScripter::BeginHarvesterSessionL ),
- ENTRY( "EndHarvesterSession", CHarvesterClientTestScripter::EndHarvesterSessionL ),
-
- // Harvester tests
- ENTRY( "HarvesterClientConnect", CHarvesterClientTestScripter::HarvesterClientConnectL ),
- ENTRY( "HarvesterClientClose", CHarvesterClientTestScripter::HarvesterClientCloseL ),
- ENTRY( "HarvesterClientPause", CHarvesterClientTestScripter::HarvesterClientPauseL ),
- ENTRY( "HarvesterClientResume", CHarvesterClientTestScripter::HarvesterClientResumeL ),
- ENTRY( "SetHarvesterObserver", CHarvesterClientTestScripter::SetHarvesterObserverL ),
- ENTRY( "RemoveHarvesterObserver", CHarvesterClientTestScripter::RemoveHarvesterObserverL ),
- ENTRY( "SetLocationInfo", CHarvesterClientTestScripter::SetLocationInfoL ),
- ENTRY( "HarvestFile", CHarvesterClientTestScripter::HarvestFileL ),
- ENTRY( "HarvestFileWithUID", CHarvesterClientTestScripter::HarvestFileWithUIDL ),
- ENTRY( "QueryImageObjectByIdIndex", CHarvesterClientTestScripter::QueryImageObjectByIdIndexL ),
- ENTRY( "QueryAudioObjectByIdIndex", CHarvesterClientTestScripter::QueryAudioObjectByIdIndexL ),
- ENTRY( "RemoveObject", CHarvesterClientTestScripter::RemoveObjectL ),
- ENTRY( "Results", CHarvesterClientTestScripter::Results ),
- ENTRY( "AddHarvesterEventObserver", CHarvesterClientTestScripter::AddHarvesterEventObserverL ),
- ENTRY( "RemoveHarvesterEventObserver", CHarvesterClientTestScripter::RemoveHarvesterEventObserverL ),
- ENTRY( "SetUpBlacklist", CHarvesterClientTestScripter::SetUpBlacklistL ),
- ENTRY( "TearDownBlacklist", CHarvesterClientTestScripter::TearDownBlacklistL ),
- ENTRY( "AddFileToBlacklist", CHarvesterClientTestScripter::AddFileToBlacklistL ),
- ENTRY( "CheckBlacklist", CHarvesterClientTestScripter::CheckBlacklistL ),
- ENTRY( "RemoveFileFromBlacklist", CHarvesterClientTestScripter::RemoveFileFromBlacklistL ),
- };
-
- const TInt count = sizeof( KFunctions ) / sizeof( TStifFunctionInfo );
-
- return RunInternalL( KFunctions, count, aItem );
- }
-
-// -----------------------------------------------------------------------------
-// CHarvesterClientTest::SetUp
-// Set up test.
-// -----------------------------------------------------------------------------
-//
-TInt CHarvesterClientTestScripter::SetUp( CStifItemParser& /* aItem */ )
- {
- _LIT( KMsg1, "SetUp" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- iHarvestingComplete = EFalse;
- iPlaceholderComplete = EFalse;
- iNewObjectComplete = EFalse;
- iObjectNotification = EFalse;
- iSetLocation = EFalse;
- iObjectIdArray.Reset();
- TRAP_IGNORE( iMdeSession = CMdESession::NewL( *this ) );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CHarvesterClientTest::TearDown
-// Tear down test.
-// -----------------------------------------------------------------------------
-//
-TInt CHarvesterClientTestScripter::TearDown( CStifItemParser& /* aItem */ )
- {
- _LIT( KMsg1, "TearDown" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- delete iHarvesterSession;
- iHarvesterSession = NULL;
- delete iMdeSession;
- iMdeSession = NULL;
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CHarvesterClientTest::HarvesterClientConnectL
-// -----------------------------------------------------------------------------
-//
-TInt CHarvesterClientTestScripter::HarvesterClientConnectL( CStifItemParser& /*aItem*/ )
- {
- _LIT( KMsg1, "HarvesterClientConnectL" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- User::LeaveIfError( iHc.Connect() );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CHarvesterClientTest::HarvesterClientCloseL
-// -----------------------------------------------------------------------------
-//
-TInt CHarvesterClientTestScripter::HarvesterClientCloseL( CStifItemParser& /*aItem*/ )
- {
- _LIT( KMsg1, "HarvesterClientCloseL" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- iHc.Close();
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CHarvesterClientTest::HarvesterClientPauseL
-// -----------------------------------------------------------------------------
-//
-TInt CHarvesterClientTestScripter::HarvesterClientPauseL( CStifItemParser& /*aItem*/ )
- {
- _LIT( KMsg1, "Enter HarvesterClientPauseL" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- User::LeaveIfError( iHc.Pause() );
-
- _LIT( KMsg2, "Exit HarvesterClientPauseL" );
- iLog->Log( KMsg2 );
- RDebug::Print( KMsg2 );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CHarvesterClientTest::HarvesterClientResumeL
-// -----------------------------------------------------------------------------
-//
-TInt CHarvesterClientTestScripter::HarvesterClientResumeL( CStifItemParser& /*aItem*/ )
- {
- _LIT( KMsg1, "Enter HarvesterClientResumeL" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- User::LeaveIfError( iHc.Resume() );
-
- _LIT( KMsg2, "Exit HarvesterClientResumeL" );
- iLog->Log( KMsg2 );
- RDebug::Print( KMsg2 );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CHarvesterClientTest::SetHarvesterObserverL
-// -----------------------------------------------------------------------------
-//
-TInt CHarvesterClientTestScripter::SetHarvesterObserverL( CStifItemParser& /*aItem*/ )
- {
- _LIT( KMsg1, "SetHarvesterObserverL" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- iHc.SetObserver( this );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CHarvesterClientTest::RemoveHarvesterObserverL
-// -----------------------------------------------------------------------------
-//
-TInt CHarvesterClientTestScripter::RemoveHarvesterObserverL( CStifItemParser& /*aItem*/ )
- {
- _LIT( KMsg1, "RemoveHarvesterObserverL" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- iHc.RemoveObserver( this );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CHarvesterClientTest::AddObjectObserverL
-// -----------------------------------------------------------------------------
-//
-TInt CHarvesterClientTestScripter::AddObjectObserverL( CStifItemParser& /* aItem */ )
- {
- _LIT( KMsg1, "AddObjectObserverL" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- iMdeSession->AddObjectObserverL( *this );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CHarvesterClientTest::AddObjectObserverL
-// -----------------------------------------------------------------------------
-//
-TInt CHarvesterClientTestScripter::RemoveObjectObserverL( CStifItemParser& /* aItem */ )
- {
- _LIT( KMsg1, "RemoveObjectObserverL" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- TRAP_IGNORE( iMdeSession->RemoveObjectObserverL( *this ) );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CHarvesterClientTest::AddObjectObserverL
-// -----------------------------------------------------------------------------
-//
-TInt CHarvesterClientTestScripter::SetLocationInfoL( CStifItemParser& /* aItem */ )
- {
- iSetLocation = ETrue;
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CHarvesterClientTest::StartHarvesterSessionL
-// -----------------------------------------------------------------------------
-//
-TInt CHarvesterClientTestScripter::BeginHarvesterSessionL( CStifItemParser& aItem )
- {
- _LIT( KMsg1, "Enter BeginHarvesterSessionL" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- TPtrC inputFile;
- User::LeaveIfError( aItem.GetNextString( inputFile ));
-
- TRAP_IGNORE( iMdeSession->RemoveObjectL(inputFile) );
-
- _LIT( KMsg2, "Exit BeginHarvesterSessionL" );
- iLog->Log( KMsg2 );
- RDebug::Print( KMsg2 );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CHarvesterClientTest::HarvestFileTestL
-// -----------------------------------------------------------------------------
-//
-TInt CHarvesterClientTestScripter::HarvestFileL( CStifItemParser& aItem )
- {
- _LIT( KMsg1, "Enter HarvestFileL" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- TPtrC inputFile;
- User::LeaveIfError( aItem.GetNextString( inputFile ));
- iAlbumIds.Append( 1 );
- iQuerySuccess = EFalse;
-
- iUri = inputFile;
- iHc.HarvestFile( inputFile, iAlbumIds, iSetLocation );
-
- _LIT( KMsg2, "Exit HarvestFileL" );
- iLog->Log( KMsg2 );
- RDebug::Print( KMsg2 );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CHarvesterClientTest::HarvestFileTestL
-// -----------------------------------------------------------------------------
-//
-TInt CHarvesterClientTestScripter::HarvestFileWithUIDL( CStifItemParser& aItem )
- {
- _LIT( KMsg1, "Enter HarvestFileWithUIDL" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- TUid uid( KNullUid );
-
- TPtrC inputFile;
- User::LeaveIfError( aItem.GetNextString( inputFile ));
- iAlbumIds.Append( 1 );
- iQuerySuccess = EFalse;
-
- iUri = inputFile;
- iHc.HarvestFileWithUID( inputFile, iAlbumIds, EFalse, uid );
-
- _LIT( KMsg2, "Exit HarvestFileWithUIDL" );
- iLog->Log( KMsg2 );
- RDebug::Print( KMsg2 );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CHarvesterClientTest::HarvestingCompleteL
-// -----------------------------------------------------------------------------
-//
-TInt CHarvesterClientTestScripter::EndHarvesterSessionL( CStifItemParser& /* aItem */ )
- {
- _LIT( KMsg1, "EndHarvesterSessionL" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- iAlbumIds.Close();
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CHarvesterClientTest::QueryObjectByIdIndexL
-// -----------------------------------------------------------------------------
-//
-TInt CHarvesterClientTestScripter::QueryImageObjectByIdIndexL( CStifItemParser& aItem )
- {
- _LIT( KMsg1, "QueryImageObjectByIdIndexL" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- TInt index;
- User::LeaveIfError( aItem.GetNextInt( index ));
-
- CMdENamespaceDef& defNS = iMdeSession->GetDefaultNamespaceDefL();
- CMdEObjectDef& objDef = defNS.GetObjectDefL( MdeConstants::Image::KImageObject );
- iQuery = iMdeSession->NewObjectQueryL( defNS, objDef, this );
-
- iQuery->SetResultMode( EQueryResultModeItem );
-
- iQuery->FindL();
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CHarvesterClientTest::QueryObjectByIdIndexL
-// -----------------------------------------------------------------------------
-//
-TInt CHarvesterClientTestScripter::QueryAudioObjectByIdIndexL( CStifItemParser& aItem )
- {
- _LIT( KMsg1, "QueryAudioObjectByIdIndexL" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- TInt index;
- User::LeaveIfError( aItem.GetNextInt( index ));
-
- CMdENamespaceDef& defNS = iMdeSession->GetDefaultNamespaceDefL();
- CMdEObjectDef& objDef = defNS.GetObjectDefL( MdeConstants::Audio::KAudioObject );
- iQuery = iMdeSession->NewObjectQueryL( defNS, objDef, this );
-
- iQuery->SetResultMode( EQueryResultModeItem );
-
- iQuery->FindL();
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CHarvesterClientTest::RemoveObjectL
-// -----------------------------------------------------------------------------
-//
-TInt CHarvesterClientTestScripter::RemoveObjectL( CStifItemParser& aItem )
- {
- _LIT( KMsg1, "RemoveObjectL" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- TPtrC inputFile;
- User::LeaveIfError( aItem.GetNextString( inputFile ));
-
- TRAP_IGNORE( iMdeSession->RemoveObjectL( inputFile ) );
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CHarvesterClientTest::Results
-// -----------------------------------------------------------------------------
-//
-TInt CHarvesterClientTestScripter::Results( CStifItemParser& /*aItem*/ )
- {
- _LIT( KMsg1, "Enter Results" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- if( !iQuerySuccess )
- {
- return KErrNotFound;
- }
-
- if( !iHarvestingComplete )
- {
- return KErrUnknown;
- }
-
- _LIT( KMsg2, "Enter Results" );
- iLog->Log( KMsg2 );
- RDebug::Print( KMsg2 );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CHarvesterClientTest::AddHarvesterEventObserver
-// -----------------------------------------------------------------------------
-//
-TInt CHarvesterClientTestScripter::AddHarvesterEventObserverL( CStifItemParser& aItem )
- {
- _LIT( KMsg1, "AddHarvesterEventObserverL" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- TInt testCount( 0 );
- User::LeaveIfError( aItem.GetNextInt( testCount ) );
- for( TInt i = 0; i < testCount; i++ )
- {
- TInt err = iHc.AddHarvesterEventObserver( *this, EHEObserverTypePlaceholder, 3 );
- TL( err == KErrNone );
- }
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CHarvesterClientTest::RemoveHarvesterEventObserver
-// -----------------------------------------------------------------------------
-//
-TInt CHarvesterClientTestScripter::RemoveHarvesterEventObserverL( CStifItemParser& aItem )
- {
- _LIT( KMsg1, "RemoveHarvesterEventObserverL" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- TInt testCount( 0 );
- User::LeaveIfError( aItem.GetNextInt( testCount ) );
-
- for( TInt i = 0; i < testCount; i++ )
- {
- TInt err = iHc.RemoveHarvesterEventObserver( *this );
- TL( err == KErrNone );
- }
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CHarvesterClientTest::SetUpBlacklistL
-// -----------------------------------------------------------------------------
-//
-TInt CHarvesterClientTestScripter::SetUpBlacklistL( CStifItemParser& /*aItem*/ )
- {
- _LIT( KMsg1, "Enter SetUpBlacklistL" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- User::LeaveIfError( iBlacklistClient.Connect() );
- iBlacklistClient.LoadBlacklistL();
- iMediaIdUtil = &RMediaIdUtil::GetInstanceL();
- User::LeaveIfError( iFs.Connect() );
-
- _LIT( KMsg2, "Exit SetUpBlacklistL" );
- iLog->Log( KMsg2 );
- RDebug::Print( KMsg2 );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CHarvesterClientTest::TearDownBlacklistL
-// -----------------------------------------------------------------------------
-//
-TInt CHarvesterClientTestScripter::TearDownBlacklistL( CStifItemParser& /*aItem*/ )
- {
- _LIT( KMsg1, "Enter TearDownBlacklistL" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- iBlacklistClient.CloseDBL();
- iBlacklistClient.Close();
- RMediaIdUtil::ReleaseInstance();
- iMediaIdUtil = NULL;
- iFs.Close();
-
- _LIT( KMsg2, "Exit TearDownBlacklistL" );
- iLog->Log( KMsg2 );
- RDebug::Print( KMsg2 );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CHarvesterClientTest::AddFileToBlacklistL
-// -----------------------------------------------------------------------------
-//
-TInt CHarvesterClientTestScripter::AddFileToBlacklistL( CStifItemParser& aItem )
- {
- _LIT( KMsg1, "Enter AddFileToBlacklistL" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- TPtrC inputFile;
- User::LeaveIfError( aItem.GetNextString( inputFile ));
-
- TUint32 mediaId( 0 );
- TTime modified ( 0 );
-
- TRAPD( err, iBlacklistClient.AddL( inputFile, mediaId, modified ) );
- if( err != KErrNone )
- {
- return err;
- }
-
- _LIT( KMsg2, "Exit AddFileToBlacklistL" );
- iLog->Log( KMsg2 );
- RDebug::Print( KMsg2 );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CHarvesterClientTest::CheckBlacklistL
-// -----------------------------------------------------------------------------
-//
-TInt CHarvesterClientTestScripter::CheckBlacklistL( CStifItemParser& aItem )
- {
- _LIT( KMsg1, "Enter CheckBlacklistL" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- TPtrC inputFile;
- User::LeaveIfError( aItem.GetNextString( inputFile ));
-
- TUint32 mediaId( 0 );
- TTime modified ( 0 );
-
- TBool isBlacklisted( EFalse );
- TRAP_IGNORE( isBlacklisted = iBlacklistClient.IsBlacklistedL( inputFile, mediaId, modified ) );
- if( !isBlacklisted )
- {
- return KErrNotFound;
- }
-
- _LIT( KMsg2, "Exit CheckBlacklistL" );
- iLog->Log( KMsg2 );
- RDebug::Print( KMsg2 );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CHarvesterClientTest::RemoveFileFromBlacklistL
-// -----------------------------------------------------------------------------
-//
-TInt CHarvesterClientTestScripter::RemoveFileFromBlacklistL( CStifItemParser& aItem )
- {
- _LIT( KMsg1, "Enter CheckBlacklistL" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- TPtrC inputFile;
- User::LeaveIfError( aItem.GetNextString( inputFile ));
-
- TUint32 mediaId( 0 );
- TTime modified ( 0 );
-
- TRAPD( err, iBlacklistClient.RemoveL( inputFile, mediaId ) );
- if( err != KErrNone )
- {
- return err;
- }
-
- _LIT( KMsg2, "Exit CheckBlacklistL" );
- iLog->Log( KMsg2 );
- RDebug::Print( KMsg2 );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CHarvesterClientTest::HarvestingUpdated
-// -----------------------------------------------------------------------------
-//
-void CHarvesterClientTestScripter::HarvestingUpdated(
- HarvesterEventObserverType /*aHEObserverType*/,
- HarvesterEventState /*aHarvesterEventState*/,
- TInt /*aItemsLeft*/ )
- {
- _LIT( KMsg1, "CallBck HarvestingUpdated" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
- }
-
-// -----------------------------------------------------------------------------
-// CHarvesterClientTest::HarvestingComplete
-// -----------------------------------------------------------------------------
-//
-void CHarvesterClientTestScripter::HarvestingComplete( TDesC& aURI, TInt aError )
- {
- _LIT( KMsg, "CallBck HarvestingComplete - Error code : %d" );
- TBuf <100> msg;
- msg.Format(KMsg, aError);
- iLog->Log( msg );
- RDebug::Print( msg );
-
- if( MdsUtils::Compare( aURI, iUri ) == 0 )
- {
- if( iObjectNotification )
- {
- iHarvestingComplete = ETrue;
- // session event
- TEventIf event( TEventIf::ESetEvent, _L("Continue") );
- TestModuleIf().Event( event );
- }
- else
- {
- iHarvestingComplete = ETrue;
- }
- }
- }
-
-// -----------------------------------------------------------------------------
-// CHarvesterClientTest::HandleSessionOpened
-// -----------------------------------------------------------------------------
-//
-void CHarvesterClientTestScripter::HandleSessionOpened( CMdESession& /* aSession */, TInt aError )
- {
- _LIT( KMsg, "CallBck HandleSessionOpened - Error code : %d" );
- TBuf <100> msg;
- msg.Format(KMsg, aError);
- iLog->Log( msg );
- RDebug::Print( msg );
-
- // session event
- TEventIf event( TEventIf::ESetEvent, _L("Session") );
- TestModuleIf().Event( event );
- }
-
-// -----------------------------------------------------------------------------
-// CHarvesterClientTest::HandleSessionError
-// -----------------------------------------------------------------------------
-//
-void CHarvesterClientTestScripter::HandleSessionError( CMdESession& /* aSession */, TInt aError )
- {
- _LIT( KMsg, "CallBck HandleSessionError - Error code : %d" );
- TBuf <100> msg;
- msg.Format(KMsg, aError);
- iLog->Log( msg );
- RDebug::Print( msg );
-
- // session event
- TEventIf event( TEventIf::ESetEvent, _L("Session") );
- TestModuleIf().Event( event );
- }
-
-// -----------------------------------------------------------------------------
-// CHarvesterClientTest::HandleObjectNotification
-// -----------------------------------------------------------------------------
-//
-void CHarvesterClientTestScripter::HandleObjectNotification(
- CMdESession& /* aSession */,
- TObserverNotificationType aType,
- const RArray& aObjectIdArray )
- {
- _LIT( KMsg1, "CallBck HandleObjectNotification" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- switch( aType )
- {
- case ENotifyAdd:
- {
- iPlaceholderComplete = ETrue;
- break;
- }
- case ENotifyModify:
- {
- iNewObjectComplete = ETrue;
- break;
- }
- case ENotifyRemove:
- {
- break;
- }
- }
-
- CMdEObject* temp = NULL;
- TRAP_IGNORE( temp = iMdeSession->GetObjectL( iUri ) );
- if( temp && iHarvestingComplete )
- {
- for ( TInt i = 0; i < aObjectIdArray.Count(); ++i )
- {
- iObjectIdArray.Append( aObjectIdArray[i] );
- }
- // session event
- TEventIf event( TEventIf::ESetEvent, _L("Continue") );
- TestModuleIf().Event( event );
- iObjectNotification = ETrue;
- }
- else if( temp )
- {
- for ( TInt i = 0; i < aObjectIdArray.Count(); ++i )
- {
- iObjectIdArray.Append( aObjectIdArray[i] );
- }
- iObjectNotification = ETrue;
- }
- }
-
-// -----------------------------------------------------------------------------
-// CHarvesterClientTest::HandleQueryNewResults
-// -----------------------------------------------------------------------------
-//
-void CHarvesterClientTestScripter::HandleQueryNewResults( CMdEQuery& /* aQuery */,
- TInt /* aFirstNewItemIndex */,
- TInt /* aNewItemCount */ )
- {
- _LIT( KMsg1, "CallBck HandleQueryNewResults" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
- }
-
-// -----------------------------------------------------------------------------
-// CHarvesterClientTest::HandleQueryCompleted
-// -----------------------------------------------------------------------------
-//
-void CHarvesterClientTestScripter::HandleQueryCompleted( CMdEQuery& aQuery, TInt aError)
- {
- _LIT( KMsg, "CallBck HandleQueryCompleted - Error code : %d" );
- TBuf <100> msg;
- msg.Format(KMsg, aError);
- iLog->Log( msg );
- RDebug::Print( msg );
-
- if( iQuery && iQuery == &aQuery )
- {
- for( TInt i = 0; i < aQuery.Count(); i++ )
- {
- TInt id = aQuery.ResultItem( i ).Id();
- CMdEObject* temp = NULL;
- TRAP_IGNORE( temp = iMdeSession->GetFullObjectL( id ) );
- if( MdsUtils::Compare( temp->Uri(), iUri ) == 0 )
- {
- iQuerySuccess = ETrue;
- break;
- }
- }
- }
-
- if( iQuerySuccess )
- {
- // session event
- TEventIf event( TEventIf::ESetEvent, _L("Query") );
- TestModuleIf().Event( event );
- }
- }
-
-// End of File
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/harvester_framework_api/tsrc/HarvesterDataTest/Bmarm/HarvesterDataTestu.def
--- a/mds_plat/harvester_framework_api/tsrc/HarvesterDataTest/Bmarm/HarvesterDataTestu.def Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-EXPORTS
- LibEntryL__FR13CTestModuleIf @ 1 NONAME R3UNUSED ; LibEntryL(CTestModuleIf &)
-
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/harvester_framework_api/tsrc/HarvesterDataTest/Bwins/HarvesterDataTestu.def
--- a/mds_plat/harvester_framework_api/tsrc/HarvesterDataTest/Bwins/HarvesterDataTestu.def Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-EXPORTS
- ?LibEntryL@@YAPAVCScriptBase@@AAVCTestModuleIf@@@Z @ 1 NONAME ; class CScriptBase * __cdecl LibEntryL(class CTestModuleIf &)
-
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/harvester_framework_api/tsrc/HarvesterDataTest/conf/HarvesterDataTest.cfg
--- a/mds_plat/harvester_framework_api/tsrc/HarvesterDataTest/conf/HarvesterDataTest.cfg Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,61 +0,0 @@
-#
-# Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "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: Harvester Data API tests
-#
-
-// ---------------------------------------------------------------------------
-// Harvester Data API test cases
-// ---------------------------------------------------------------------------
-
-// These should be run in sequential mode if several cases are run at the same
-// time!
-
-[StifSettings]
-TestThreadStackSize= 32768
-TestThreadMinHeap= 4096
-TestThreadMaxHeap= 16777216
-[EndStifSettings]
-
-[Test]
-title Harvest Client Data Tests
-create HarvesterDataTest test
-request Session
-test BeginTestSession
-wait Session
-test HarvestClientDataTests
-test EndTestSession
-delete test
-[Endtest]
-
-[Test]
-title Placeholder Data Tests
-create HarvesterDataTest test
-request Session
-test BeginTestSession
-wait Session
-test PlaceholderDataTests
-test EndTestSession
-delete test
-[Endtest]
-
-[Test]
-title Harvester Data Tests
-create HarvesterDataTest test
-request Session
-test BeginTestSession
-wait Session
-test HarvesterDataTests
-test EndTestSession
-delete test
-[Endtest]
\ No newline at end of file
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/harvester_framework_api/tsrc/HarvesterDataTest/eabi/HarvesterDataTestu.def
--- a/mds_plat/harvester_framework_api/tsrc/HarvesterDataTest/eabi/HarvesterDataTestu.def Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-EXPORTS
- _Z9LibEntryLR13CTestModuleIf @ 1 NONAME
-
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/harvester_framework_api/tsrc/HarvesterDataTest/group/HarvesterDataTest.mmp
--- a/mds_plat/harvester_framework_api/tsrc/HarvesterDataTest/group/HarvesterDataTest.mmp Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-/*
-* Copyright (c) 2005-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: Project definition file
-*
-*/
-
-
-#include
-#include
-
-TARGET HarvesterDataTest.dll
-TARGETTYPE dll
-UID 0x1000008D 0x101FB3E3
-
-CAPABILITY ALL -TCB
-VENDORID VID_DEFAULT
-
-DEFFILE HarvesterDataTest.DEF
-
-SOURCEPATH ../src
-SOURCE HarvesterDataTest.cpp
-SOURCE HarvesterDataTestBlocks.cpp
-
-USERINCLUDE ../inc
-USERINCLUDE ../../../../../inc
-USERINCLUDE ../../../../../locationmanager/locationtrail/inc
-SYSTEMINCLUDE /epoc32/include/ecom
-
-MW_LAYER_SYSTEMINCLUDE
-
-LIBRARY euser.lib
-LIBRARY stiftestinterface.lib
-LIBRARY stiftestengine.lib
-LIBRARY ecom.lib
-LIBRARY harvesterdata.lib
-LIBRARY mdeclient.lib
-LIBRARY etel3rdparty.lib
-LIBRARY Lbs.lib
-
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/harvester_framework_api/tsrc/HarvesterDataTest/group/HarvesterDataTest.pkg
--- a/mds_plat/harvester_framework_api/tsrc/HarvesterDataTest/group/HarvesterDataTest.pkg Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-;
-; 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: Installation file for API test
-;
-
-; Languages
-&EN
-
-; Header
-#{"HarvesterDataTest"},(0x101FB3E3),1,0,0,TYPE=SA
-
-; Localised Vendor name
-%{"Nokia"}
-
-; Unique Vendor name
-:"Nokia"
-
-; Install files
-"\epoc32\release\armv5\urel\HarvesterDataTest.dll" - "c:\sys\bin\HarvesterDataTest.dll"
-"..\conf\HarvesterDataTest.cfg" - "c:\TestFramework\HarvesterDataTest.cfg"
-"..\init\HarvesterDataTest.ini" - "c:\TestFramework\HarvesterDataTest.ini"
-
-"..\..\data\mmc\HarvesterTest\Jpg.jpg" -"E:\testing\data\Jpg.jpg"
-"..\..\data\mmc\HarvesterTest\Animated.gif" -"E:\testing\data\Animated.gif"
-"..\..\data\mmc\HarvesterTest\Temp1.jpg" -"E:\testing\data\Temp1.jpg"
-"..\..\data\mmc\HarvesterTest\Temp2.jpg" -"E:\testing\data\Temp2.jpg"
-"..\..\data\mmc\HarvesterTest\Temp3.jpg" -"E:\testing\data\Temp3.jpg"
-"..\..\data\mmc\HarvesterTest\H263.3gp" -"E:\testing\data\H263.3gp"
-"..\..\data\mmc\HarvesterTest\bmp_burst.bmp" -"E:\testing\data\bmp_burst.bmp"
-"..\..\data\mmc\HarvesterTest\GIF87testimage.gif" -"E:\testing\data\GIF87testimage.gif"
-"..\..\data\mmc\HarvesterTest\gif89a_onemeg.gif" -"E:\testing\data\gif89a_onemeg.gif"
-"..\..\data\mmc\HarvesterTest\Liverpool.jpg" -"E:\testing\data\Liverpool.jpg"
-"..\..\data\mmc\HarvesterTest\MBMtestimage.mbm" -"E:\testing\data\MBMtestimage.mbm"
-"..\..\data\mmc\HarvesterTest\wbmp_skull.wbmp" -"E:\testing\data\wbmp_skull.wbmp"
-"..\..\data\mmc\HarvesterTest\ota_bmpiso.ota" -"E:\testing\data\ota_bmpiso.ota"
-"..\..\data\mmc\HarvesterTest\PNGtestimage.png" -"E:\testing\data\PNGtestimage.png"
-"..\..\data\mmc\HarvesterTest\G4.TIF" -"E:\testing\data\G4.TIF"
-"..\..\data\mmc\HarvesterTest\G31D.TIF" -"E:\testing\data\G31D.TIF"
-"..\..\data\mmc\HarvesterTest\PSRETRO.WMF" -"E:\testing\data\PSRETRO.WMF"
-"..\..\data\mmc\HarvesterTest\Animated.gif" -"E:\testing\data\Animated.gif"
-"..\..\data\mmc\HarvesterTest\Mbm.mbm" -"E:\testing\data\Mbm.mbm"
-"..\..\data\mmc\HarvesterTest\MPEG4.3gp" -"E:\testing\data\MPEG4.3gp"
-"..\..\data\mmc\HarvesterTest\MPEG4.mp4" -"E:\testing\data\MPEG4.mp4"
-"..\..\data\mmc\HarvesterTest\00001.mp3" -"E:\testing\data\00001.mp3"
-
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/harvester_framework_api/tsrc/HarvesterDataTest/group/bld.inf
--- a/mds_plat/harvester_framework_api/tsrc/HarvesterDataTest/group/bld.inf Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-/*
-* Copyright (c) 2005-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: Build information file
-*
-*/
-
-PRJ_PLATFORMS
- DEFAULT
-
-PRJ_EXPORTS
-
-PRJ_MMPFILES
-
-PRJ_TESTMMPFILES
-HarvesterDataTest.mmp
-
-PRJ_TESTEXPORTS
-
-../conf/HarvesterDataTest.cfg /epoc32/winscw/c/TestFramework/HarvesterDataTest.cfg
-../init/HarvesterDataTest.ini /epoc32/winscw/c/TestFramework/HarvesterDataTest.ini
-
-../../data/mmc/HarvesterTest/bmp_burst.bmp /epoc32/WINSCW/C/Data/bmp_burst.bmp
-../../data/mmc/HarvesterTest/G31D.TIF /epoc32/WINSCW/C/Data/G31D.TIF
-../../data/mmc/HarvesterTest/G4.TIF /epoc32/WINSCW/C/Data/G4.TIF
-../../data/mmc/HarvesterTest/GIF87testimage.gif /epoc32/WINSCW/C/Data/GIF87testimage.gif
-../../data/mmc/HarvesterTest/gif89a_onemeg.gif /epoc32/WINSCW/C/Data/gif89a_onemeg.gif
-../../data/mmc/HarvesterTest/Liverpool.jpg /epoc32/WINSCW/C/Data/Liverpool.jpg
-../../data/mmc/HarvesterTest/MBMtestimage.mbm /epoc32/WINSCW/C/Data/MBMtestimage.mbm
-../../data/mmc/HarvesterTest/ota_bmpiso.ota /epoc32/WINSCW/C/Data/ota_bmpiso.ota
-../../data/mmc/HarvesterTest/PNGtestimage.png /epoc32/WINSCW/C/Data/PNGtestimage.png
-../../data/mmc/HarvesterTest/PSRETRO.WMF /epoc32/WINSCW/C/Data/PSRETRO.WMF
-../../data/mmc/HarvesterTest/wbmp_skull.wbmp /epoc32/WINSCW/C/Data/wbmp_skull.wbmp
-../../data/mmc/HarvesterTest/Jpg.jpg /epoc32/WINSCW/C/Data/Jpg.jpg
-../../data/mmc/HarvesterTest/Animated.gif /epoc32/WINSCW/C/Data/Animated.gif
-../../data/mmc/HarvesterTest/Mbm.mbm /epoc32/WINSCW/C/Data/Mbm.mbm
-../../data/mmc/HarvesterTest/H263.3gp /epoc32/WINSCW/C/Data/H263.3gp
-../../data/mmc/HarvesterTest/MPEG4.mp4 /epoc32/WINSCW/C/Data/MPEG4.mp4
-../../data/mmc/HarvesterTest/MPEG4.3gp /epoc32/WINSCW/C/Data/MPEG4.3gp
-../../data/mmc/HarvesterTest/Temp1.jpg /epoc32/WINSCW/C/Data/Temp1.jpg
-../../data/mmc/HarvesterTest/Temp2.jpg /epoc32/WINSCW/C/Data/Temp2.jpg
-../../data/mmc/HarvesterTest/Temp3.jpg /epoc32/WINSCW/C/Data/Temp3.jpg
-../../data/mmc/HarvesterTest/00001.mp3 /epoc32/WINSCW/C/Data/00001.mp3
-
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/harvester_framework_api/tsrc/HarvesterDataTest/inc/HarvesterDataTest.h
--- a/mds_plat/harvester_framework_api/tsrc/HarvesterDataTest/inc/HarvesterDataTest.h Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,117 +0,0 @@
-/*
-* Copyright (c) 2002-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: ?Description
-*
-*/
-
-
-
-#ifndef HARVESTERDATATEST_H
-#define HARVESTERDATATEST_H
-
-// INCLUDES
-#include
-#include
-#include
-
-#include
-#include
-#include
-
-// Logging path
-_LIT( KHarvesterDataTestLogPath, "\\logs\\testframework\\HarvesterDataTest\\" );
-// Log file
-_LIT( KHarvesterDataTestLogFile, "HarvesterDataTest.txt" );
-_LIT( KHarvesterDataTestLogFileWithTitle, "HarvesterDataTest_[%S].txt" );
-
-// FORWARD DECLARATIONS
-class CHarvesterDataTest;
-
-// CLASS DECLARATION
-NONSHARABLE_CLASS(CHarvesterDataTest) : public CScriptBase,
- public MMdESessionObserver,
- public MHarvesterPluginObserver,
- public MMonitorPluginObserver
- {
- public: // Constructors and destructor
-
- /**
- * Two-phased constructor.
- */
- static CHarvesterDataTest* NewL( CTestModuleIf& aTestModuleIf );
-
- /**
- * Destructor.
- */
- virtual ~CHarvesterDataTest();
-
- public: // Functions from base classes
-
- /**
- * From CScriptBase Runs a script line.
- * @since ?Series60_version
- * @param aItem Script line containing method name and parameters
- * @return Symbian OS error code
- */
- virtual TInt RunMethodL( CStifItemParser& aItem );
-
- private: // Functions from base classes
-
- void HandleSessionOpened(CMdESession& aSession, TInt aError);
- void HandleSessionError(CMdESession& aSession, TInt aError);
- void HarvestingCompleted( CHarvesterData* aHarvesterData );
- void MonitorEvent( CHarvesterData* aHarvesterData );
- void MonitorEvent( RPointerArray& aHarvesterDataArray );
-
- private:
-
- /**
- * C++ default constructor.
- */
- CHarvesterDataTest( CTestModuleIf& aTestModuleIf );
-
- /**
- * By default Symbian 2nd phase constructor is private.
- */
- void ConstructL();
-
- /**
- * Frees all resources allocated from test methods.
- * @since ?Series60_version
- */
- void Delete();
-
- /**
- * Test methods are listed below.
- */
-
- virtual TInt ActiveWait( CStifItemParser& aItem );
- virtual TInt BeginTestSessionL( CStifItemParser& aItem );
- virtual TInt EndTestSession( CStifItemParser& aItem );
- virtual TInt HarvestClientDataTestsL( CStifItemParser& aItem );
- virtual TInt PlaceholderDataTestsL( CStifItemParser& aItem );
- virtual TInt HarvesterDataTestsL( CStifItemParser& aItem );
-
- //[TestMethods] - Do not remove
-
- private: // Data
-
- CMdESession* iMdEClient;
-
- RArray iAlbumIds;
- };
-
-#endif // HARVESTERDATATEST_H
-
-// End of File
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/harvester_framework_api/tsrc/HarvesterDataTest/init/HarvesterDataTest.ini
--- a/mds_plat/harvester_framework_api/tsrc/HarvesterDataTest/init/HarvesterDataTest.ini Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,81 +0,0 @@
-#
-# Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "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:
-#
-
-
-[Engine_Defaults]
-
-TestReportMode= FullReport # Possible values are: 'Empty', 'Summary', 'Environment',
- 'TestCases' or 'FullReport'
-
-CreateTestReport= YES # Possible values: YES or NO
-
-TestReportFilePath= C:\LOGS\TestFramework\
-TestReportFileName= HarvesterDataTestLog
-
-TestReportFormat= TXT # Possible values: TXT or HTML
-TestReportOutput= FILE # Possible values: FILE or RDEBUG
-TestReportFileCreationMode= OVERWRITE # Possible values: OVERWRITE or APPEND
-
-DeviceResetDllName= StifResetForNokia.dll # e.g. 'StifHWResetStub.dll' for user specific reseting
-
-DisableMeasurement= stifmeasurementdisablenone # Possible values are:
- # 'stifmeasurementdisablenone', 'stifmeasurementdisableall'
- # 'stifmeasurementplugin01', 'stifmeasurementplugin02',
- # 'stifmeasurementplugin03', 'stifmeasurementplugin04',
- # 'stifmeasurementplugin05' or 'stifbappeaprofiler'
-
-Timeout= 600000 # Default timeout value for each test case. In milliseconds
-#UITestingSupport= YES # Possible values: YES or NO
-#SeparateProcesses= YES # Possible values: YES or NO (default: NO)
-[End_Defaults]
-
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-
-[New_Module]
-ModuleName= TestScripter
-TestCaseFile= c:\testframework\HarvesterDataTest.cfg
-[End_Module]
-
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-
-[Logger_Defaults]
-
-#NOTE: If you want to set Logger using next setting(s) remove comment(s)'#'
-#NOTE: TestEngine and TestServer logging settings cannot change here
-
-CreateLogDirectories= YES # Possible values: YES or NO
-
-#EmulatorBasePath= C:\LOGS\TestFramework\
-#EmulatorFormat= HTML # Possible values: TXT or HTML
-#EmulatorOutput= FILE # Possible values: FILE or RDEBUG
-
-HardwareBasePath= C:\
-#HardwareFormat= HTML # Possible values: TXT or HTML
-#HardwareOutput= FILE # Possible values: FILE or RDEBUG
-
-#FileCreationMode= OVERWRITE # Possible values: OVERWRITE or APPEND
-
-#ThreadIdToLogFile= YES # Possible values: YES or NO
-#WithTimeStamp= YES # Possible values: YES or NO
-#WithLineBreak= YES # Possible values: YES or NO
-#WithEventRanking= YES # Possible values: YES or NO
-
-#FileUnicode= YES # Possible values: YES or NO
-AddTestCaseTitle= YES # Possible values: YES or NO
-[End_Logger_Defaults]
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-
-# End of file
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/harvester_framework_api/tsrc/HarvesterDataTest/src/HarvesterDataTest.cpp
--- a/mds_plat/harvester_framework_api/tsrc/HarvesterDataTest/src/HarvesterDataTest.cpp Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,131 +0,0 @@
-/*
-* Copyright (c) 2002-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:
-*
-*/
-
-
-// INCLUDE FILES
-#include
-#include "HarvesterDataTest.h"
-#include
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CHarvesterDataTest::CHarvesterDataTest
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-//
-CHarvesterDataTest::CHarvesterDataTest(
- CTestModuleIf& aTestModuleIf ):
- CScriptBase( aTestModuleIf )
- {
- }
-
-// -----------------------------------------------------------------------------
-// CHarvesterDataTest::ConstructL
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-//
-void CHarvesterDataTest::ConstructL()
- {
- //Read logger settings to check whether test case name is to be
- //appended to log file name.
- RSettingServer settingServer;
- TInt ret = settingServer.Connect();
- if(ret != KErrNone)
- {
- User::Leave(ret);
- }
- // Struct to StifLogger settigs.
- TLoggerSettings loggerSettings;
- // Parse StifLogger defaults from STIF initialization file.
- ret = settingServer.GetLoggerSettings(loggerSettings);
- if(ret != KErrNone)
- {
- User::Leave(ret);
- }
- // Close Setting server session
- settingServer.Close();
-
- TFileName logFileName;
-
- if(loggerSettings.iAddTestCaseTitle)
- {
- TName title;
- TestModuleIf().GetTestCaseTitleL(title);
- logFileName.Format(KHarvesterDataTestLogFileWithTitle, &title);
- }
- else
- {
- logFileName.Copy(KHarvesterDataTestLogFile);
- }
-
- iLog = CStifLogger::NewL( KHarvesterDataTestLogPath,
- logFileName,
- CStifLogger::ETxt,
- CStifLogger::EFile,
- EFalse );
-
- }
-
-// -----------------------------------------------------------------------------
-// CHarvesterDataTest::NewL
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-//
-CHarvesterDataTest* CHarvesterDataTest::NewL(
- CTestModuleIf& aTestModuleIf )
- {
- CHarvesterDataTest* self = new (ELeave) CHarvesterDataTest( aTestModuleIf );
-
- CleanupStack::PushL( self );
- self->ConstructL();
- CleanupStack::Pop( self );
-
- return self;
-
- }
-
-// Destructor
-CHarvesterDataTest::~CHarvesterDataTest()
- {
-
- // Delete resources allocated from test methods
- Delete();
-
- // Delete logger
- delete iLog;
-
- }
-
-// ========================== OTHER EXPORTED FUNCTIONS =========================
-
-// -----------------------------------------------------------------------------
-// LibEntryL is a polymorphic Dll entry point.
-// Returns: CScriptBase: New CScriptBase derived object
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CScriptBase* LibEntryL(
- CTestModuleIf& aTestModuleIf ) // Backpointer to STIF Test Framework
- {
-
- return ( CScriptBase* ) CHarvesterDataTest::NewL( aTestModuleIf );
-
- }
-
-
-// End of File
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/harvester_framework_api/tsrc/HarvesterDataTest/src/HarvesterDataTestBlocks.cpp
--- a/mds_plat/harvester_framework_api/tsrc/HarvesterDataTest/src/HarvesterDataTestBlocks.cpp Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,568 +0,0 @@
-/*
-* Copyright (c) 2002-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:
-*
-*/
-
-
-// [INCLUDE FILES] - do not remove
-#include
-#include
-#include
-#include
-#include
-#include "HarvesterDataTest.h"
-
-#include
-#include "cnetworkinfo.h"
-#include "mdsutils.h"
-#include "mdeconstants.h"
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CHarvesterDataTest::Delete
-// Delete here all resources allocated and opened from test methods.
-// Called from destructor.
-// -----------------------------------------------------------------------------
-//
-void CHarvesterDataTest::Delete()
- {
-
- }
-
-// -----------------------------------------------------------------------------
-// CHarvesterDataTest::RunMethodL
-// Run specified method. Contains also table of test mothods and their names.
-// -----------------------------------------------------------------------------
-//
-TInt CHarvesterDataTest::RunMethodL(
- CStifItemParser& aItem )
- {
-
- static TStifFunctionInfo const KFunctions[] =
- {
- // Copy this line for every implemented function.
- // First string is the function name used in TestScripter script file.
- // Second is the actual implementation member function.
-
- ENTRY( "ActiveWait", CHarvesterDataTest::ActiveWait ),
- ENTRY( "BeginTestSession", CHarvesterDataTest::BeginTestSessionL ),
- ENTRY( "EndTestSession", CHarvesterDataTest::EndTestSession ),
- ENTRY( "HarvestClientDataTests", CHarvesterDataTest::HarvestClientDataTestsL ),
- ENTRY( "PlaceholderDataTests", CHarvesterDataTest::PlaceholderDataTestsL ),
- ENTRY( "HarvesterDataTests", CHarvesterDataTest::HarvesterDataTestsL ),
-
- };
-
- const TInt count = sizeof( KFunctions ) /
- sizeof( TStifFunctionInfo );
-
- return RunInternalL( KFunctions, count, aItem );
-
- }
-
-// -----------------------------------------------------------------------------
-// CHarvesterDataTest::HandleSessionOpened
-// -----------------------------------------------------------------------------
-//
-void CHarvesterDataTest::HandleSessionOpened( CMdESession& /*aClient*/, TInt aError )
- {
- _LIT( KMsg, "CallBck HandleSessionOpened - Error code : %d" );
- TBuf <100> msg;
- msg.Format(KMsg, aError);
- iLog->Log( msg );
- RDebug::Print(msg);
-
- // session event
- TEventIf event( TEventIf::ESetEvent, _L("Session") );
- TestModuleIf().Event( event );
- }
-
-// -----------------------------------------------------------------------------
-// CHarvesterDataTest::HandleSessionError
-// -----------------------------------------------------------------------------
-//
-void CHarvesterDataTest::HandleSessionError( CMdESession& /*aClient*/, TInt aError )
- {
- _LIT( KMsg, "CallBck HandleSessionError - Error code : %d" );
- TBuf <100> msg;
- msg.Format(KMsg, aError);
- iLog->Log( msg );
- RDebug::Print(msg);
-
- // session event
- TEventIf event( TEventIf::ESetEvent, _L("Session") );
- TestModuleIf().Event( event );
- }
-
-// -----------------------------------------------------------------------------
-// CHarvesterDataTest::HarvestingCompleted
-// -----------------------------------------------------------------------------
-//
-void CHarvesterDataTest::HarvestingCompleted( CHarvesterData* /* aHarvesterData */ )
- {
- }
-
-// -----------------------------------------------------------------------------
-// CHarvesterDataTest::MonitorEvent
-// -----------------------------------------------------------------------------
-//
-void CHarvesterDataTest::MonitorEvent( CHarvesterData* /* aHarvesterData */ )
- {
- }
-
-// -----------------------------------------------------------------------------
-// CHarvesterDataTest::MonitorEvent
-// -----------------------------------------------------------------------------
-//
-void CHarvesterDataTest::MonitorEvent( RPointerArray& /* aHarvesterDataArray */ )
- {
- }
-
-// -----------------------------------------------------------------------------
-// CHarvesterDataTest::ActiveWait
-// -----------------------------------------------------------------------------
-//
-TInt CHarvesterDataTest::ActiveWait( CStifItemParser& /* aItem */ )
- {
- // 2,5 seconds
- TTimeIntervalMicroSeconds32 timeout(2500000);
- RTimer timer;
- TRequestStatus status;
-
- timer.CreateLocal();
- timer.After(status,timeout);
-
- User::WaitForAnyRequest();
-
- timer.Close();
-
- _LIT( KMsg, "Exit ActiveWait" );
- iLog->Log( KMsg );
- RDebug::Print(KMsg);
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CHarvesterDataTest::BeginTestSessionL
-// -----------------------------------------------------------------------------
-//
-TInt CHarvesterDataTest::BeginTestSessionL( CStifItemParser& /* aItem */ )
- {
- TRAPD( error, iMdEClient = CMdESession::NewL( *this ) );
-
- _LIT( KMsg, "Exit BeginTestSession - Error code : %d" );
- TBuf <100> msg;
- msg.Format(KMsg, error);
- iLog->Log( msg );
- RDebug::Print(msg);
-
- User::LeaveIfError(error);
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CHarvesterDataTest::EndTestSession
-// -----------------------------------------------------------------------------
-//
-TInt CHarvesterDataTest::EndTestSession( CStifItemParser& /* aItem */ )
- {
- iAlbumIds.Close();
-
- REComSession::FinalClose();
-
- if ( iMdEClient )
- {
- delete iMdEClient;
- iMdEClient = NULL;
- }
-
- _LIT( KMsg, "Exit EndTestSession" );
- iLog->Log( KMsg );
- RDebug::Print(KMsg);
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CHarvesterDataTest::HarvestClientDataTests
-// -----------------------------------------------------------------------------
-//
-TInt CHarvesterDataTest::HarvestClientDataTestsL( CStifItemParser& /* aItem */ )
- {
- _LIT( KMsg1, "Enter HarvestClientDataTestsL" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- CHarvestClientData* data = NULL;
- data = CHarvestClientData::NewL();
-
- iAlbumIds.Reset();
- iAlbumIds.Append(55555);
- iAlbumIds.Append(1);
- iAlbumIds.Append(22);
- iAlbumIds.Append(333);
- iAlbumIds.Append(4444);
-
- data->SetAlbumIds( iAlbumIds );
-
- delete data;
- data = NULL;
-
- data = CHarvestClientData::New();
-
- if( !data )
- {
- User::Leave( KErrUnknown );
- }
-
- iAlbumIds.Reset();
- iAlbumIds.Append(1);
- iAlbumIds.Append(22);
- iAlbumIds.Append(333);
- iAlbumIds.Append(4444);
- iAlbumIds.Append(55555);
-
- data->SetAlbumIds( iAlbumIds );
-
- delete data;
- data = NULL;
-
- _LIT( KMsg2, "Exit HarvestClientDataTestsL" );
- iLog->Log( KMsg2 );
- RDebug::Print( KMsg2 );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CHarvesterDataTest::PlaceholderDataTests
-// -----------------------------------------------------------------------------
-//
-TInt CHarvesterDataTest::PlaceholderDataTestsL( CStifItemParser& /* aItem */ )
- {
- _LIT( KMsg1, "Enter PlaceholderDataTestsL" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- TTime time;
- TUint32 size;
- TUint id;
- TBuf<100> tmp;
- TInt state;
- TInt preinstalled;
- _LIT( KUri, "C:\\Data\\Images\\Jpg.jpg" );
-
- CPlaceholderData* data = CPlaceholderData::NewL();
- CleanupStack::PushL( data );
-
- // modified
- _LIT( KMsg2, "modified" );
- iLog->Log( KMsg2 );
- RDebug::Print( KMsg2 );
- time.HomeTime();
- data->SetModified( time );
- TTime time2 = data->Modified();
- if( time != time2 )
- {
- return KErrBadDescriptor;
- }
-
- // uri
- _LIT( KMsg3, "uri" );
- iLog->Log( KMsg3 );
- RDebug::Print( KMsg3 );
- data->SetUri( KUri );
- tmp = data->Uri();
- if( !(MdsUtils::Compare( tmp, KUri ) == 0) )
- {
- return KErrBadDescriptor;
- }
-
- // filesize
- _LIT( KMsg4, "filesize" );
- iLog->Log( KMsg4 );
- RDebug::Print( KMsg4 );
- size = 8192;
- data->SetFileSize( size );
- TUint32 size2 = data->FileSize();
- if( size != size2 )
- {
- return KErrBadDescriptor;
- }
-
- // mediaid
- _LIT( KMsg5, "mediaid" );
- iLog->Log( KMsg5 );
- RDebug::Print( KMsg5 );
- id = 64;
- data->SetMediaId( id );
- TUint32 id2 = data->MediaId();
- if( id != id2 )
- {
- return KErrBadDescriptor;
- }
-
- // state
- _LIT( KMsg6, "state" );
- iLog->Log( KMsg6 );
- RDebug::Print( KMsg6 );
- state = 0;
- data->SetPresentState( state );
- TInt state2 = data->PresentState();
- if( state != state2 )
- {
- return KErrBadDescriptor;
- }
-
- // preinstalled
- _LIT( KMsg7, "preinstalled" );
- iLog->Log( KMsg7 );
- RDebug::Print( KMsg7 );
- preinstalled = 0;
- data->SetPreinstalled( preinstalled );
- TInt preinstalled2 = data->Preinstalled();
- if( preinstalled != preinstalled2 )
- {
- return KErrBadDescriptor;
- }
-
- CleanupStack::PopAndDestroy( data );
-
- _LIT( KMsg8, "Exit PlaceholderDataTestsL" );
- iLog->Log( KMsg8 );
- RDebug::Print( KMsg8 );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CHarvesterDataTest::HarvestClientDataTests
-// -----------------------------------------------------------------------------
-//
-TInt CHarvesterDataTest::HarvesterDataTestsL( CStifItemParser& /* aItem */ )
- {
- _LIT( KMsg1, "Enter HarvesterDataTestsL" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- TInt errorcode;
- THarvesterEventType event;
- MHarvesterPluginObserver* pluginobs;
- TOrigin origin;
- TBool snap;
- THarvesterObjectType type;
- TAny* client;
- CMdEObject* object;
- TLocationData* location;
- TUid uid;
- TBool add;
- CHarvesterPluginInfo* pluginInfo;
- TBool binary;
-
- _LIT( KUri, "C:\\Data\\Images\\Jpg.jpg" );
-
- // mdeobject
- CMdENamespaceDef& defaultNamespace = iMdEClient->GetDefaultNamespaceDefL();
- CMdEObjectDef& imageDef = defaultNamespace.GetObjectDefL( MdeConstants::Image::KImageObject );
-
- iMdEClient->RemoveObjectL( KUri );
- object = iMdEClient->NewObjectL( imageDef, KUri );
-
- // harvesterdata object
- HBufC* uriBuf = object->Uri().AllocLC();
- CHarvesterData* data = CHarvesterData::NewL( uriBuf );
- CleanupStack::Pop( uriBuf );
-
- // uri
- _LIT( KMsg2, "uri" );
- iLog->Log( KMsg2 );
- RDebug::Print( KMsg2 );
- TDesC uri2 = data->Uri();
-
-
- // errorcode
- _LIT( KMsg3, "errorcode" );
- iLog->Log( KMsg3 );
- RDebug::Print( KMsg3 );
- errorcode = -1;
- data->SetErrorCode( errorcode );
- TInt ret = data->ErrorCode();
- if( ret != errorcode )
- {
- return KErrBadDescriptor;
- }
-
- // eventtype
- _LIT( KMsg4, "eventtype" );
- iLog->Log( KMsg4 );
- RDebug::Print( KMsg4 );
- event = EHarvesterAdd;
- data->SetEventType(event);
- THarvesterEventType event2 = data->EventType();
- if( event2 != event )
- {
- return KErrBadDescriptor;
- }
-
- // pluginobserver
- _LIT( KMsg5, "pluginobserver" );
- iLog->Log( KMsg5 );
- RDebug::Print( KMsg5 );
- pluginobs = this;
- data->SetPluginObserver( *pluginobs );
- MHarvesterPluginObserver* pluginobs2 = data->PluginObserver();
- if( pluginobs != pluginobs2 )
- {
- return KErrBadDescriptor;
- }
- pluginobs = NULL;
-
- // origin
- _LIT( KMsg6, "origin" );
- iLog->Log( KMsg6 );
- RDebug::Print( KMsg6 );
- origin = MdeConstants::Object::EDownloaded;
- data->SetOrigin( origin );
- TOrigin origin2 = data->Origin();
- if( origin != origin2 )
- {
- return KErrBadDescriptor;
- }
-
- // takesnapshot
- _LIT( KMsg7, "takesnapshot" );
- iLog->Log( KMsg7 );
- RDebug::Print( KMsg7 );
- snap = ETrue;
- data->SetTakeSnapshot( snap );
- TBool snap2 = data->TakeSnapshot();
- if( !(snap && snap2) )
- {
- return KErrBadDescriptor;
- }
-
- // objecttype
- _LIT( KMsg8, "objecttype" );
- iLog->Log( KMsg8 );
- RDebug::Print( KMsg8 );
- type = ENormal;
- data->SetObjectType(type);
- THarvesterObjectType type2 = data->ObjectType();
- if( type != type2 )
- {
- return KErrBadDescriptor;
- }
-
- // clientdata
- _LIT( KMsg9, "clientdata" );
- iLog->Log( KMsg9 );
- RDebug::Print( KMsg9 );
- client = NULL;
- data->SetClientData( NULL );
- TAny* client2 = data->ClientData();
- if( client != client2 )
- {
- return KErrBadDescriptor;
- }
- client = NULL;
-
- // mdeobject
- _LIT( KMsg10, "mdeobject" );
- iLog->Log( KMsg10 );
- RDebug::Print( KMsg10 );
- data->SetMdeObject( object );
- CMdEObject* object2 = &data->MdeObject();
- if( object != object2 )
- {
- return KErrBadDescriptor;
- }
- data->SetMdeObject( NULL );
-
- // locationdata
- _LIT( KMsg11, "locationdata" );
- iLog->Log( KMsg11 );
- RDebug::Print( KMsg11 );
- location = new ( ELeave ) TLocationData;
- location->iQuality = 0;
- data->SetLocationData( location );
- TLocationData* location2 = data->LocationData();
- if( location != location2 )
- {
- return KErrBadDescriptor;
- }
-
- // clientid
- _LIT( KMsg12, "clientid" );
- iLog->Log( KMsg12 );
- RDebug::Print( KMsg12 );
- uid = KNullUid;
- data->SetClientId( uid );
- TUid uid2 = data->ClientId();
- if( uid2 != uid )
- {
- return KErrBadDescriptor;
- }
-
- // add location
- _LIT( KMsg13, "add location" );
- iLog->Log( KMsg13 );
- RDebug::Print( KMsg13 );
- add = ETrue;
- data->SetAddLocation( add );
- TBool add2 = data->AddLocation();
- if( !(add && add2) )
- {
- return KErrBadDescriptor;
- }
-
- // harvesterplugininfo
- _LIT( KMsg14, "pluginobserver" );
- iLog->Log( KMsg14 );
- RDebug::Print( KMsg14 );
- pluginInfo = NULL;
- data->SetHarvesterPluginInfo( pluginInfo );
- CHarvesterPluginInfo* pluginInfo2 = data->HarvesterPluginInfo();
- if( pluginInfo != pluginInfo2 )
- {
- return KErrBadDescriptor;
- }
- pluginInfo = NULL;
-
- // binary
- _LIT( KMsg15, "binary" );
- iLog->Log( KMsg15 );
- RDebug::Print( KMsg15 );
- binary = ETrue;
- data->SetBinary( binary );
- TBool binary2 = data->IsBinary();
- if( !(binary && binary2) )
- {
- return KErrBadDescriptor;
- }
-
- delete data;
- data = NULL;
-
- _LIT( KMsg16, "Exit HarvesterDataTestsL" );
- iLog->Log( KMsg16 );
- RDebug::Print( KMsg16 );
-
- return KErrNone;
- }
-
-// [End of File] - Do not remove
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/harvester_framework_api/tsrc/HarvesterPluginTest/Bmarm/HarvesterPluginTestu.def
--- a/mds_plat/harvester_framework_api/tsrc/HarvesterPluginTest/Bmarm/HarvesterPluginTestu.def Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-EXPORTS
- LibEntryL__FR13CTestModuleIf @ 1 NONAME R3UNUSED ; LibEntryL(CTestModuleIf &)
-
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/harvester_framework_api/tsrc/HarvesterPluginTest/Bwins/HarvesterPluginTestu.def
--- a/mds_plat/harvester_framework_api/tsrc/HarvesterPluginTest/Bwins/HarvesterPluginTestu.def Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-EXPORTS
- ?LibEntryL@@YAPAVCScriptBase@@AAVCTestModuleIf@@@Z @ 1 NONAME ; class CScriptBase * __cdecl LibEntryL(class CTestModuleIf &)
-
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/harvester_framework_api/tsrc/HarvesterPluginTest/conf/HarvesterPluginTest.cfg
--- a/mds_plat/harvester_framework_api/tsrc/HarvesterPluginTest/conf/HarvesterPluginTest.cfg Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +0,0 @@
-#
-# Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "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: Harvester Plugin API tests
-#
-
-// ---------------------------------------------------------------------------
-// Harvester Plugin API test cases
-// ---------------------------------------------------------------------------
-
-// These should be run in sequential mode if several cases are run at the same
-// time!
-
-[StifSettings]
-TestThreadStackSize= 32768
-TestThreadMinHeap= 4096
-TestThreadMaxHeap= 16777216
-[EndStifSettings]
-
-[Test]
-title Test Harvester Plugins
-create HarvesterPluginTest test
-request Session
-test BeginTestSession
-wait Session
-test LoadPlugins
-test TestFunctions e:\testing\data\Jpg.jpg
-test TestFunctions e:\testing\data\Animated.gif
-test TestFunctions e:\testing\data\Mbm.mbm
-test TestFunctions e:\testing\data\H263.3gp
-test TestFunctions e:\testing\data\MPEG4.3gp
-test TestFunctions e:\testing\data\MPEG4.mp4
-test TestFunctions e:\testing\data\00001.mp3
-test EndTestSession
-delete test
-[Endtest]
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/harvester_framework_api/tsrc/HarvesterPluginTest/eabi/HarvesterPluginTestu.def
--- a/mds_plat/harvester_framework_api/tsrc/HarvesterPluginTest/eabi/HarvesterPluginTestu.def Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-EXPORTS
- _Z9LibEntryLR13CTestModuleIf @ 1 NONAME
- _ZTI17CMdeObjectHandler @ 2 NONAME ; ##
- _ZTV17CMdeObjectHandler @ 3 NONAME ; ##
-
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/harvester_framework_api/tsrc/HarvesterPluginTest/group/HarvesterPluginTest.mmp
--- a/mds_plat/harvester_framework_api/tsrc/HarvesterPluginTest/group/HarvesterPluginTest.mmp Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-/*
-* Copyright (c) 2005-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: Project definition file
-*
-*/
-
-#include
-#include
-
-TARGET HarvesterPluginTest.dll
-TARGETTYPE dll
-UID 0x1000008D 0x101FB3E3
-
-CAPABILITY ALL -TCB
-VENDORID VID_DEFAULT
-
-DEFFILE HarvesterPluginTest.DEF
-
-SOURCEPATH ../src
-SOURCE HarvesterPluginTest.cpp
-SOURCE HarvesterPluginTestBlocks.cpp
-
-SOURCEPATH ../../../../../harvester/server/src
-SOURCE mdeobjecthandler.cpp
-
-SYSTEMINCLUDE /epoc32/include/ecom
-USERINCLUDE ../inc
-USERINCLUDE ../../../../../inc
-USERINCLUDE ../../../../../harvester/common/inc
-USERINCLUDE ../../../../../harvester/server/inc
-
-MW_LAYER_SYSTEMINCLUDE
-
-LIBRARY euser.lib
-LIBRARY efsrv.lib
-LIBRARY stiftestinterface.lib
-LIBRARY stiftestengine.lib
-LIBRARY mdeclient.lib
-LIBRARY ecom.lib
-LIBRARY contextengine.lib
-LIBRARY contextplugininterface.lib
-LIBRARY harvesterplugininterface.lib
-LIBRARY harvesterdata.lib
-LIBRARY mdccommon.lib
-LIBRARY harvestercommon.lib
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/harvester_framework_api/tsrc/HarvesterPluginTest/group/HarvesterPluginTest.pkg
--- a/mds_plat/harvester_framework_api/tsrc/HarvesterPluginTest/group/HarvesterPluginTest.pkg Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-;
-; 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: Installation file for API test
-;
-
-; Languages
-&EN
-
-; Header
-#{"HarvesterPluginTest"},(0x101FB3E3),1,0,0,TYPE=SA
-
-; Localised Vendor name
-%{"Nokia"}
-
-; Unique Vendor name
-:"Nokia"
-
-; Install files
-"\epoc32\release\armv5\urel\HarvesterPluginTest.dll" - "c:\sys\bin\HarvesterPluginTest.dll"
-"..\conf\HarvesterPluginTest.cfg" - "c:\TestFramework\HarvesterPluginTest.cfg"
-"..\init\HarvesterPluginTest.ini" - "c:\TestFramework\HarvesterPluginTest.ini"
-
-"..\..\data\mmc\HarvesterTest\Jpg.jpg" -"E:\testing\data\Jpg.jpg"
-"..\..\data\mmc\HarvesterTest\Animated.gif" -"E:\testing\data\Animated.gif"
-"..\..\data\mmc\HarvesterTest\Temp1.jpg" -"E:\testing\data\Temp1.jpg"
-"..\..\data\mmc\HarvesterTest\Temp2.jpg" -"E:\testing\data\Temp2.jpg"
-"..\..\data\mmc\HarvesterTest\Temp3.jpg" -"E:\testing\data\Temp3.jpg"
-"..\..\data\mmc\HarvesterTest\H263.3gp" -"E:\testing\data\H263.3gp"
-"..\..\data\mmc\HarvesterTest\bmp_burst.bmp" -"E:\testing\data\bmp_burst.bmp"
-"..\..\data\mmc\HarvesterTest\GIF87testimage.gif" -"E:\testing\data\GIF87testimage.gif"
-"..\..\data\mmc\HarvesterTest\gif89a_onemeg.gif" -"E:\testing\data\gif89a_onemeg.gif"
-"..\..\data\mmc\HarvesterTest\Liverpool.jpg" -"E:\testing\data\Liverpool.jpg"
-"..\..\data\mmc\HarvesterTest\MBMtestimage.mbm" -"E:\testing\data\MBMtestimage.mbm"
-"..\..\data\mmc\HarvesterTest\wbmp_skull.wbmp" -"E:\testing\data\wbmp_skull.wbmp"
-"..\..\data\mmc\HarvesterTest\ota_bmpiso.ota" -"E:\testing\data\ota_bmpiso.ota"
-"..\..\data\mmc\HarvesterTest\PNGtestimage.png" -"E:\testing\data\PNGtestimage.png"
-"..\..\data\mmc\HarvesterTest\G4.TIF" -"E:\testing\data\G4.TIF"
-"..\..\data\mmc\HarvesterTest\G31D.TIF" -"E:\testing\data\G31D.TIF"
-"..\..\data\mmc\HarvesterTest\PSRETRO.WMF" -"E:\testing\data\PSRETRO.WMF"
-"..\..\data\mmc\HarvesterTest\Animated.gif" -"E:\testing\data\Animated.gif"
-"..\..\data\mmc\HarvesterTest\Mbm.mbm" -"E:\testing\data\Mbm.mbm"
-"..\..\data\mmc\HarvesterTest\MPEG4.3gp" -"E:\testing\data\MPEG4.3gp"
-"..\..\data\mmc\HarvesterTest\MPEG4.mp4" -"E:\testing\data\MPEG4.mp4"
-"..\..\data\mmc\HarvesterTest\00001.mp3" -"E:\testing\data\00001.mp3"
-
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/harvester_framework_api/tsrc/HarvesterPluginTest/group/bld.inf
--- a/mds_plat/harvester_framework_api/tsrc/HarvesterPluginTest/group/bld.inf Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-/*
-* Copyright (c) 2005-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: Build information file
-*
-*/
-
-
-PRJ_PLATFORMS
- DEFAULT
-
-PRJ_EXPORTS
-
-PRJ_MMPFILES
-
-PRJ_TESTMMPFILES
-HarvesterPluginTest.mmp
-
-PRJ_TESTEXPORTS
-
-../conf/HarvesterPluginTest.cfg /epoc32/winscw/c/TestFramework/HarvesterPluginTest.cfg
-../init/HarvesterPluginTest.ini /epoc32/winscw/c/TestFramework/HarvesterPluginTest.ini
-
-../../data/mmc/HarvesterTest/bmp_burst.bmp /epoc32/WINSCW/C/Data/bmp_burst.bmp
-../../data/mmc/HarvesterTest/G31D.TIF /epoc32/WINSCW/C/Data/G31D.TIF
-../../data/mmc/HarvesterTest/G4.TIF /epoc32/WINSCW/C/Data/G4.TIF
-../../data/mmc/HarvesterTest/GIF87testimage.gif /epoc32/WINSCW/C/Data/GIF87testimage.gif
-../../data/mmc/HarvesterTest/gif89a_onemeg.gif /epoc32/WINSCW/C/Data/gif89a_onemeg.gif
-../../data/mmc/HarvesterTest/Liverpool.jpg /epoc32/WINSCW/C/Data/Liverpool.jpg
-../../data/mmc/HarvesterTest/MBMtestimage.mbm /epoc32/WINSCW/C/Data/MBMtestimage.mbm
-../../data/mmc/HarvesterTest/ota_bmpiso.ota /epoc32/WINSCW/C/Data/ota_bmpiso.ota
-../../data/mmc/HarvesterTest/PNGtestimage.png /epoc32/WINSCW/C/Data/PNGtestimage.png
-../../data/mmc/HarvesterTest/PSRETRO.WMF /epoc32/WINSCW/C/Data/PSRETRO.WMF
-../../data/mmc/HarvesterTest/wbmp_skull.wbmp /epoc32/WINSCW/C/Data/wbmp_skull.wbmp
-../../data/mmc/HarvesterTest/Jpg.jpg /epoc32/WINSCW/C/Data/Jpg.jpg
-../../data/mmc/HarvesterTest/Animated.gif /epoc32/WINSCW/C/Data/Animated.gif
-../../data/mmc/HarvesterTest/Mbm.mbm /epoc32/WINSCW/C/Data/Mbm.mbm
-../../data/mmc/HarvesterTest/H263.3gp /epoc32/WINSCW/C/Data/H263.3gp
-../../data/mmc/HarvesterTest/MPEG4.mp4 /epoc32/WINSCW/C/Data/MPEG4.mp4
-../../data/mmc/HarvesterTest/MPEG4.3gp /epoc32/WINSCW/C/Data/MPEG4.3gp
-../../data/mmc/HarvesterTest/Temp1.jpg /epoc32/WINSCW/C/Data/Temp1.jpg
-../../data/mmc/HarvesterTest/Temp2.jpg /epoc32/WINSCW/C/Data/Temp2.jpg
-../../data/mmc/HarvesterTest/Temp3.jpg /epoc32/WINSCW/C/Data/Temp3.jpg
-../../data/mmc/HarvesterTest/00001.mp3 /epoc32/WINSCW/C/Data/00001.mp3
-
-
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/harvester_framework_api/tsrc/HarvesterPluginTest/inc/HarvesterPluginTest.h
--- a/mds_plat/harvester_framework_api/tsrc/HarvesterPluginTest/inc/HarvesterPluginTest.h Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,141 +0,0 @@
-/*
-* Copyright (c) 2002-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: ?Description
-*
-*/
-
-
-#ifndef HARVESTERPLUGINTEST_H
-#define HARVESTERPLUGINTEST_H
-
-// INCLUDES
-#include
-#include
-#include
-
-#include "contextengine.h"
-#include
-#include
-#include "mdeharvestersession.h"
-#include
-#include "harvesterplugininfo.h"
-
-// CONSTANTS
-
-_LIT( KBlacklistDatabaseName, "C:[200009f5]blacklistdb.sq" );
-
-// Logging path
-_LIT( KHarvesterPluginTestLogPath, "\\logs\\testframework\\HarvesterPluginTest\\" );
-// Log file
-_LIT( KHarvesterPluginTestLogFile, "HarvesterPluginTest.txt" );
-_LIT( KHarvesterPluginTestLogFileWithTitle, "HarvesterPluginTest_[%S].txt" );
-
-// FORWARD DECLARATIONS
-class CHarvesterPluginTest;
-class CHarvesterBlacklist;
-class CMdeObjectHandler;
-
-// CLASS DECLARATION
-NONSHARABLE_CLASS(CHarvesterPluginTest) : public CScriptBase,
- MMdESessionObserver,
- MHarvesterPluginObserver
-
- {
- public: // Constructors and destructor
-
- /**
- * Two-phased constructor.
- */
- static CHarvesterPluginTest* NewL( CTestModuleIf& aTestModuleIf );
-
- /**
- * Destructor.
- */
- virtual ~CHarvesterPluginTest();
-
- public: // Functions from base classes
-
- /**
- * From CScriptBase Runs a script line.
- * @since ?Series60_version
- * @param aItem Script line containing method name and parameters
- * @return Symbian OS error code
- */
- virtual TInt RunMethodL( CStifItemParser& aItem );
-
- private: // Functions from base classes
-
- void HandleSessionOpened(CMdESession& aSession, TInt aError);
- void HandleSessionError(CMdESession& aSession, TInt aError);
- void HarvestingCompleted( CHarvesterData* aHarvesterData );
-
- private:
-
- /**
- * C++ default constructor.
- */
- CHarvesterPluginTest( CTestModuleIf& aTestModuleIf );
-
- /**
- * By default Symbian 2nd phase constructor is private.
- */
- void ConstructL();
-
- /**
- * Frees all resources allocated from test methods.
- * @since ?Series60_version
- */
- void Delete();
-
- /**
- * Test methods are listed below.
- */
-
- virtual TInt BeginTestSessionL( CStifItemParser& aItem );
- virtual TInt EndTestSession( CStifItemParser& aItem );
- virtual TInt LoadPluginsL( CStifItemParser& aItem );
- virtual TInt TestFunctionsL( CStifItemParser& aItem );
-
- // helper methods
- TBool GetObjectDef(const TDesC& aUri, TDes& aObjectDef, TBool aCheck);
- TInt HarvestL( CHarvesterData* aHD );
- void AddNewPluginL( const TDesC8& aType, const TDesC8& aOpaque, TUid aPluginUid );
- CHarvesterPluginInfo* GetHPIFromFileNameL(const TDesC& aFileName);
- CHarvesterPluginInfo* GetFromNormalFileL( TDesC& aExt );
-
- public: // Data
- // ?one_line_short_description_of_data
- //?data_declaration;
-
- protected: // Data
- // ?one_line_short_description_of_data
- //?data_declaration;
-
- private: // Data
-
- CMdESession* iMdeSession;
- CMdEHarvesterSession* iSession;
-
- CContextEngine* iCtxEngine;
- CHarvesterBlacklist* iBlacklist;
- CMdeObjectHandler* iMdeObjectHandler;
-
- CHarvesterPlugin* iPlugin;
- RPointerArray iPluginInfoArray;
-
- };
-
-#endif // HARVESTERPLUGINTEST_H
-
-// End of File
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/harvester_framework_api/tsrc/HarvesterPluginTest/init/HarvesterPluginTest.ini
--- a/mds_plat/harvester_framework_api/tsrc/HarvesterPluginTest/init/HarvesterPluginTest.ini Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,81 +0,0 @@
-#
-# Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "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:
-#
-
-
-[Engine_Defaults]
-
-TestReportMode= FullReport # Possible values are: 'Empty', 'Summary', 'Environment',
- 'TestCases' or 'FullReport'
-
-CreateTestReport= YES # Possible values: YES or NO
-
-TestReportFilePath= C:\LOGS\TestFramework\
-TestReportFileName= HarvesterPluginTestLog
-
-TestReportFormat= TXT # Possible values: TXT or HTML
-TestReportOutput= FILE # Possible values: FILE or RDEBUG
-TestReportFileCreationMode= OVERWRITE # Possible values: OVERWRITE or APPEND
-
-DeviceResetDllName= StifResetForNokia.dll # e.g. 'StifHWResetStub.dll' for user specific reseting
-
-DisableMeasurement= stifmeasurementdisablenone # Possible values are:
- # 'stifmeasurementdisablenone', 'stifmeasurementdisableall'
- # 'stifmeasurementplugin01', 'stifmeasurementplugin02',
- # 'stifmeasurementplugin03', 'stifmeasurementplugin04',
- # 'stifmeasurementplugin05' or 'stifbappeaprofiler'
-
-Timeout= 600000 # Default timeout value for each test case. In milliseconds
-#UITestingSupport= YES # Possible values: YES or NO
-#SeparateProcesses= YES # Possible values: YES or NO (default: NO)
-[End_Defaults]
-
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-
-[New_Module]
-ModuleName= TestScripter
-TestCaseFile= c:\testframework\HarvesterPluginTest.cfg
-[End_Module]
-
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-
-[Logger_Defaults]
-
-#NOTE: If you want to set Logger using next setting(s) remove comment(s)'#'
-#NOTE: TestEngine and TestServer logging settings cannot change here
-
-CreateLogDirectories= YES # Possible values: YES or NO
-
-#EmulatorBasePath= C:\LOGS\TestFramework\
-#EmulatorFormat= HTML # Possible values: TXT or HTML
-#EmulatorOutput= FILE # Possible values: FILE or RDEBUG
-
-HardwareBasePath= C:\
-#HardwareFormat= HTML # Possible values: TXT or HTML
-#HardwareOutput= FILE # Possible values: FILE or RDEBUG
-
-#FileCreationMode= OVERWRITE # Possible values: OVERWRITE or APPEND
-
-#ThreadIdToLogFile= YES # Possible values: YES or NO
-#WithTimeStamp= YES # Possible values: YES or NO
-#WithLineBreak= YES # Possible values: YES or NO
-#WithEventRanking= YES # Possible values: YES or NO
-
-#FileUnicode= YES # Possible values: YES or NO
-AddTestCaseTitle= YES # Possible values: YES or NO
-[End_Logger_Defaults]
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-
-# End of file
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/harvester_framework_api/tsrc/HarvesterPluginTest/src/HarvesterPluginTest.cpp
--- a/mds_plat/harvester_framework_api/tsrc/HarvesterPluginTest/src/HarvesterPluginTest.cpp Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,131 +0,0 @@
-/*
-* Copyright (c) 2002-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: ?Description
-*
-*/
-
-
-// INCLUDE FILES
-#include
-#include "HarvesterPluginTest.h"
-#include
-
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CHarvesterPluginTest::CHarvesterPluginTest
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-//
-CHarvesterPluginTest::CHarvesterPluginTest(
- CTestModuleIf& aTestModuleIf ):
- CScriptBase( aTestModuleIf )
- {
- }
-
-// -----------------------------------------------------------------------------
-// CHarvesterPluginTest::ConstructL
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-//
-void CHarvesterPluginTest::ConstructL()
- {
- //Read logger settings to check whether test case name is to be
- //appended to log file name.
- RSettingServer settingServer;
- TInt ret = settingServer.Connect();
- if(ret != KErrNone)
- {
- User::Leave(ret);
- }
- // Struct to StifLogger settigs.
- TLoggerSettings loggerSettings;
- // Parse StifLogger defaults from STIF initialization file.
- ret = settingServer.GetLoggerSettings(loggerSettings);
- if(ret != KErrNone)
- {
- User::Leave(ret);
- }
- // Close Setting server session
- settingServer.Close();
-
- TFileName logFileName;
-
- if(loggerSettings.iAddTestCaseTitle)
- {
- TName title;
- TestModuleIf().GetTestCaseTitleL(title);
- logFileName.Format(KHarvesterPluginTestLogFileWithTitle, &title);
- }
- else
- {
- logFileName.Copy(KHarvesterPluginTestLogFile);
- }
-
- iLog = CStifLogger::NewL( KHarvesterPluginTestLogPath,
- logFileName,
- CStifLogger::ETxt,
- CStifLogger::EFile,
- EFalse );
- }
-
-// -----------------------------------------------------------------------------
-// CHarvesterPluginTest::NewL
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-//
-CHarvesterPluginTest* CHarvesterPluginTest::NewL(
- CTestModuleIf& aTestModuleIf )
- {
- CHarvesterPluginTest* self = new (ELeave) CHarvesterPluginTest( aTestModuleIf );
-
- CleanupStack::PushL( self );
- self->ConstructL();
- CleanupStack::Pop( self );
-
- return self;
-
- }
-
-// Destructor
-CHarvesterPluginTest::~CHarvesterPluginTest()
- {
-
- // Delete resources allocated from test methods
- Delete();
-
- // Delete logger
- delete iLog;
-
- }
-
-// ========================== OTHER EXPORTED FUNCTIONS =========================
-
-// -----------------------------------------------------------------------------
-// LibEntryL is a polymorphic Dll entry point.
-// Returns: CScriptBase: New CScriptBase derived object
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CScriptBase* LibEntryL(
- CTestModuleIf& aTestModuleIf ) // Backpointer to STIF Test Framework
- {
-
- return ( CScriptBase* ) CHarvesterPluginTest::NewL( aTestModuleIf );
-
- }
-
-
-// End of File
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/harvester_framework_api/tsrc/HarvesterPluginTest/src/HarvesterPluginTestBlocks.cpp
--- a/mds_plat/harvester_framework_api/tsrc/HarvesterPluginTest/src/HarvesterPluginTestBlocks.cpp Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,493 +0,0 @@
-/*
-* Copyright (c) 2002 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 FILES] - do not remove
-#include
-#include
-#include
-#include
-#include "HarvesterPluginTest.h"
-
-#include "mdsutils.h"
-#include "harvesterblacklist.h"
-#include "mdeobject.h"
-#include "mdeobjecthandler.h"
-
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CHarvesterPluginTest::Delete
-// Delete here all resources allocated and opened from test methods.
-// Called from destructor.
-// -----------------------------------------------------------------------------
-//
-void CHarvesterPluginTest::Delete()
- {
-
- }
-
-// -----------------------------------------------------------------------------
-// CHarvesterPluginTest::RunMethodL
-// Run specified method. Contains also table of test mothods and their names.
-// -----------------------------------------------------------------------------
-//
-TInt CHarvesterPluginTest::RunMethodL(
- CStifItemParser& aItem )
- {
-
- static TStifFunctionInfo const KFunctions[] =
- {
- // Copy this line for every implemented function.
- // First string is the function name used in TestScripter script file.
- // Second is the actual implementation member function.
-
- ENTRY( "BeginTestSession", CHarvesterPluginTest::BeginTestSessionL ),
- ENTRY( "EndTestSession", CHarvesterPluginTest::EndTestSession ),
- ENTRY( "LoadPlugins", CHarvesterPluginTest::LoadPluginsL ),
- ENTRY( "TestFunctions", CHarvesterPluginTest::TestFunctionsL ),
-
- };
-
- const TInt count = sizeof( KFunctions ) /
- sizeof( TStifFunctionInfo );
-
- return RunInternalL( KFunctions, count, aItem );
-
- }
-
-// -----------------------------------------------------------------------------
-// CHarvesterPluginTest::HandleSessionOpened
-// -----------------------------------------------------------------------------
-//
-void CHarvesterPluginTest::HandleSessionOpened( CMdESession& /*aClient*/, TInt aError )
- {
- _LIT( KMsg, "CallBck HandleSessionOpened - Error code : %d" );
- TBuf <100> msg;
- msg.Format(KMsg, aError);
- iLog->Log( msg );
- RDebug::Print(msg);
-
- TRAP_IGNORE( iMdeObjectHandler = CMdeObjectHandler::NewL( *iMdeSession ) );
-
- // session event
- TEventIf event( TEventIf::ESetEvent, _L("Session") );
- TestModuleIf().Event( event );
- }
-
-// -----------------------------------------------------------------------------
-// CHarvesterPluginTest::HandleSessionError
-// -----------------------------------------------------------------------------
-//
-void CHarvesterPluginTest::HandleSessionError( CMdESession& /*aClient*/, TInt aError )
- {
- _LIT( KMsg, "CallBck HandleSessionError - Error code : %d" );
- TBuf <100> msg;
- msg.Format(KMsg, aError);
- iLog->Log( msg );
- RDebug::Print(msg);
-
- // session event
- TEventIf event( TEventIf::ESetEvent, _L("Session") );
- TestModuleIf().Event( event );
- }
-
-// -----------------------------------------------------------------------------
-// CHarvesterPluginTest::HarvestingCompleted
-// -----------------------------------------------------------------------------
-//
-void CHarvesterPluginTest::HarvestingCompleted( CHarvesterData* /* aHarvesterData */ )
- {
- // harvest event
- TEventIf event( TEventIf::ESetEvent, _L("Harvest") );
- TestModuleIf().Event( event );
- }
-
-// -----------------------------------------------------------------------------
-// CHarvesterPluginTest::BeginTestSessionL
-// -----------------------------------------------------------------------------
-//
-TInt CHarvesterPluginTest::BeginTestSessionL( CStifItemParser& /* aItem */ )
- {
- TRAPD( error, iMdeSession = CMdESession::NewL( *this ) );
-
- iSession = CMdEHarvesterSession::NewL( *iMdeSession );
-
- iCtxEngine = NULL;
-
- iBlacklist = CHarvesterBlacklist::NewL();
-
- _LIT( KMsg, "Exit BeginTestSession - Error code : %d" );
- TBuf <100> msg;
- msg.Format(KMsg, error);
- iLog->Log( msg );
- RDebug::Print( msg );
-
- User::LeaveIfError( error );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CHarvesterPluginTest::EndTestSession
-// -----------------------------------------------------------------------------
-//
-TInt CHarvesterPluginTest::EndTestSession( CStifItemParser& /* aItem */ )
- {
- iPluginInfoArray.ResetAndDestroy();
- iPluginInfoArray.Close();
-
- REComSession::FinalClose();
-
- if ( iCtxEngine )
- {
- iCtxEngine->ReleaseInstance();
- iCtxEngine = NULL;
- }
-
- if ( iBlacklist )
- {
- iBlacklist->CloseDatabase();
- delete iBlacklist;
- }
-
- if ( iSession )
- {
- delete iSession;
- iSession = NULL;
- }
-
- if ( iMdeObjectHandler )
- {
- delete iMdeObjectHandler;
- iMdeObjectHandler = NULL;
- }
-
- if( iMdeSession )
- {
- delete iMdeSession;
- iMdeSession = NULL;
- }
-
- _LIT( KMsg, "Exit EndTestSession" );
- iLog->Log( KMsg );
- RDebug::Print(KMsg);
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CHarvesterPluginTest::LoadPluginsL
-// -----------------------------------------------------------------------------
-//
-TInt CHarvesterPluginTest::LoadPluginsL( CStifItemParser& /* aItem */ )
- {
- _LIT( KMsg1, "Enter LoadPlugins" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- RImplInfoPtrArray infoArray;
-
- TCleanupItem cleanupItem( MdsUtils::CleanupEComArray, &infoArray );
- CleanupStack::PushL( cleanupItem );
-
- CHarvesterPlugin::ListImplementationsL( infoArray );
- TInt count( 0 );
- count = infoArray.Count();
-
- if( count == 0 )
- {
- return KErrNotFound;
- }
-
- for ( TInt i=0; i < count; i++ )
- {
- // Parse the file extensions and resolve plug-in's uids from infoArray to iDataTypeArray
- TBufC8<256> type;
- TBufC8<256> opaque;
-
- type = infoArray[i]->DataType();
- opaque = infoArray[i]->OpaqueData();
- TUid implUID = infoArray[i]->ImplementationUid();
-
- AddNewPluginL(type, opaque, implUID);
- }
-
- CleanupStack::PopAndDestroy( &infoArray ); // infoArray, results in a call to CleanupEComArray
-
- _LIT( KMsg2, "Exit LoadPlugins" );
- iLog->Log( KMsg2 );
- RDebug::Print( KMsg2 );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CHarvesterPluginTest::TestFunctionsL
-// -----------------------------------------------------------------------------
-//
-TInt CHarvesterPluginTest::TestFunctionsL( CStifItemParser& aItem )
- {
- _LIT( KMsg1, "Enter TestFunctions" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- TPtrC inputFile;
- User::LeaveIfError( aItem.GetNextString( inputFile ) );
-
- iMdeSession->RemoveObjectL( inputFile );
-
- TBuf<100> aObjectDef;
-
- GetObjectDef( inputFile, aObjectDef, EFalse );
-
- // harvesterdata object
- HBufC* uriBuf = inputFile.AllocLC();
- CHarvesterData* data = CHarvesterData::NewL( uriBuf );
- data->SetPluginObserver( *this );
- CMdEObject* mdeObject = NULL;
- _LIT( string, "Image" );
- mdeObject = iMdeObjectHandler->GetMetadataObjectL( *data, string );
- data->SetMdeObject( mdeObject );
- CleanupStack::Pop( uriBuf );
-
- HarvestL( data );
-
- _LIT( KMsg2, "Exit TestFunctions" );
- iLog->Log( KMsg2 );
- RDebug::Print( KMsg2 );
-
- return KErrNone;
- }
-
-// ---------------------------------------------------------------------------
-// GetObjectDef
-// ---------------------------------------------------------------------------
-//
-TBool CHarvesterPluginTest::GetObjectDef(const TDesC& aUri, TDes& aObjectDef, TBool aCheck)
- {
- CHarvesterPluginInfo* hpi = NULL;
-
- TRAPD( err, hpi = GetHPIFromFileNameL(aUri) );
- if ( err != KErrNone )
- {
- aObjectDef.Zero();
- return EFalse;
- }
-
- if ( !hpi )
- {
- aObjectDef.Zero();
- }
- else
- {
- if( hpi->iObjectTypes.Count() > 1)
- {
- if( aCheck )
- {
- aObjectDef.Zero();
- return ETrue;
- }
-
- if ( ! hpi->iPlugin )
- {
- TRAPD( error, hpi->iPlugin = CHarvesterPlugin::NewL( hpi->iPluginUid ) );
- if( error )
- {
- aObjectDef.Zero();
- return EFalse;
- }
- else
- {
- hpi->iPlugin->SetQueue( hpi->iQueue );
- }
- }
- hpi->iPlugin->GetObjectType( aUri, aObjectDef );
- }
- else
- {
- aObjectDef.Copy( *(hpi->iObjectTypes[0]) );
- }
- }
-
- return EFalse;
- }
-
-// ---------------------------------------------------------------------------
-// HarvestL
-// ---------------------------------------------------------------------------
-//
-TInt CHarvesterPluginTest::HarvestL( CHarvesterData* aHD )
- {
- _LIT( KMsg1, "Enter HarvestL" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- CHarvesterPluginInfo* hpi = aHD->HarvesterPluginInfo();
-
- if ( !hpi )
- {
- hpi = GetHPIFromFileNameL( aHD->Uri() );
- }
-
- if ( hpi )
- {
- if ( ! hpi->iPlugin )
- {
- hpi->iPlugin = CHarvesterPlugin::NewL( hpi->iPluginUid );
- hpi->iPlugin->SetQueue( hpi->iQueue );
- hpi->iPlugin->SetBlacklist( *iBlacklist );
- }
-
- if( aHD->ObjectType() == EFastHarvest || aHD->Origin() == MdeConstants::Object::ECamera )
- {
- hpi->iQueue.Insert( aHD, 0 );
- }
- else
- {
- hpi->iQueue.AppendL( aHD );
- }
-
- hpi->iPlugin->StartHarvest();
-
- _LIT( KMsg2, "Exit HarvestL" );
- iLog->Log( KMsg2 );
- RDebug::Print( KMsg2 );
-
- return KErrNone;
- }
-
- return KErrNotFound;
- }
-
-// -----------------------------------------------------------------------------
-// AddNewPluginL
-// -----------------------------------------------------------------------------
-//
-void CHarvesterPluginTest::AddNewPluginL( const TDesC8& aType, const TDesC8& aOpaque, TUid aPluginUid )
- {
- CHarvesterPluginInfo* pluginInfo = new (ELeave) CHarvesterPluginInfo;
- CleanupStack::PushL( pluginInfo );
-
- // get file extensions
- TLex8 lex( aOpaque );
- while ( !lex.Eos() )
- {
- /* Tokenizing file extensions using TLex8 */
- lex.SkipSpaceAndMark();
-
- TPtrC8 extToken = lex.NextToken();
-
- HBufC* str = HBufC::NewLC( extToken.Length() );
- str->Des().Copy( extToken );
- pluginInfo->iExtensions.AppendL( str );
- CleanupStack::Pop( str );
- }
-
- // get object types
- TLex8 lexObjectTypes( aType );
- while ( !lexObjectTypes.Eos() )
- {
- /* Tokenizing object types using TLex8 */
- lexObjectTypes.SkipSpaceAndMark();
-
- TPtrC8 objectTypeToken = lexObjectTypes.NextToken();
-
- HBufC* str = HBufC::NewLC( objectTypeToken.Length() );
- str->Des().Copy( objectTypeToken );
- pluginInfo->iObjectTypes.AppendL( str );
- CleanupStack::Pop( str );
- }
-
- /* We set plugin as NULL - we only load them when needed */
- pluginInfo->iPlugin = NULL;
- pluginInfo->iPluginUid = aPluginUid;
- iPluginInfoArray.AppendL( pluginInfo );
- CleanupStack::Pop( pluginInfo );
- }
-
-// ---------------------------------------------------------------------------
-// GetHPIFromFileNameL
-// ---------------------------------------------------------------------------
-//
-CHarvesterPluginInfo* CHarvesterPluginTest::GetHPIFromFileNameL(const TDesC& aFileName)
- {
- _LIT( KMsg1, "Enter GetHPIFromFileNameL" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- TParsePtrC parser( aFileName );
-
- // without trailing dot "."
- TPtrC ptr = parser.Ext();
- if ( ptr.Length() > 1 )
- {
- ptr.Set( ptr.Mid( 1 ) );
- }
-
- _LIT( KMsg2, "Exit GetHPIFromFileNameL" );
- iLog->Log( KMsg2 );
- RDebug::Print( KMsg2 );
-
- return GetFromNormalFileL( ptr );
- }
-
-// ---------------------------------------------------------------------------
-// GetFromNormalFile
-// ---------------------------------------------------------------------------
-//
-CHarvesterPluginInfo* CHarvesterPluginTest::GetFromNormalFileL( TDesC& aExt )
- {
- _LIT( KMsg1, "Enter GetFromNormalFileL" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- CHarvesterPluginInfo* retVal = NULL;
-
- for ( TInt i = iPluginInfoArray.Count(); --i >= 0; )
- {
- CHarvesterPluginInfo* info = iPluginInfoArray[i];
- TBool found = EFalse;
-
- for ( TInt k = info->iExtensions.Count(); --k >= 0; )
- {
- TDesC* ext = info->iExtensions[k];
-
- // checking against supported plugin file extensions
- TInt result = ext->CompareF( aExt );
- if ( result == 0 )
- {
- retVal = info;
- found = ETrue;
- break;
- }
- }
- if ( found )
- {
- break;
- }
- }
-
- _LIT( KMsg2, "Exit GetFromNormalFileL" );
- iLog->Log( KMsg2 );
- RDebug::Print( KMsg2 );
-
- return retVal;
- }
-
-// [End of File] - Do not remove
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/harvester_framework_api/tsrc/MonitorPluginTest/Bmarm/MonitorPluginTestu.def
--- a/mds_plat/harvester_framework_api/tsrc/MonitorPluginTest/Bmarm/MonitorPluginTestu.def Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-EXPORTS
- LibEntryL__FR13CTestModuleIf @ 1 NONAME R3UNUSED ; LibEntryL(CTestModuleIf &)
-
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/harvester_framework_api/tsrc/MonitorPluginTest/Bwins/MonitorPluginTestu.def
--- a/mds_plat/harvester_framework_api/tsrc/MonitorPluginTest/Bwins/MonitorPluginTestu.def Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-EXPORTS
- ?LibEntryL@@YAPAVCScriptBase@@AAVCTestModuleIf@@@Z @ 1 NONAME ; class CScriptBase * __cdecl LibEntryL(class CTestModuleIf &)
-
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/harvester_framework_api/tsrc/MonitorPluginTest/conf/MonitorPluginTest.cfg
--- a/mds_plat/harvester_framework_api/tsrc/MonitorPluginTest/conf/MonitorPluginTest.cfg Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,81 +0,0 @@
-#
-# Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "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: Monitor Plugin API tests
-#
-
-// ---------------------------------------------------------------------------
-// Monitor Plugin API test cases
-// ---------------------------------------------------------------------------
-
-// These should be run in sequential mode if several cases are run at the same
-// time!
-
-[StifSettings]
-TestThreadStackSize= 32768
-TestThreadMinHeap= 4096
-TestThreadMaxHeap= 16777216
-[EndStifSettings]
-
-[Test]
-title Monitor Plugin Startup Shutdown
-timeout 60000
-create MonitorPluginTest test
-request Session
-test BeginMonitorSession
-wait Session
-test LoadPlugins
-test StartMonitoring
-test ActiveWait
-test StopMonitoring
-test EndMonitorSession
-delete test
-[Endtest]
-
-[Test]
-title Monitor Plugin Events
-timeout 60000
-create MonitorPluginTest test
-request Session
-test BeginMonitorSession
-wait Session
-test LoadPlugins
-test StartMonitoring
-request Monitor
-test CreateEvents
-test CreateEventsDelete
-wait Monitor
-test StopMonitoring
-test EndMonitorSession
-delete test
-[Endtest]
-
-[Test]
-title Monitor Events Pause Resume
-timeout 60000
-create MonitorPluginTest test
-request Session
-test BeginMonitorSession
-wait Session
-test LoadPlugins
-test StartMonitoring
-test CreateEvents
-test PauseMonitoring
-test ActiveWait
-test ResumeMonitoring
-test ActiveWait
-test ActiveWait
-test StopMonitoring
-test EndMonitorSession
-delete test
-[Endtest]
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/harvester_framework_api/tsrc/MonitorPluginTest/eabi/MonitorPluginTestu.def
--- a/mds_plat/harvester_framework_api/tsrc/MonitorPluginTest/eabi/MonitorPluginTestu.def Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-EXPORTS
- _Z9LibEntryLR13CTestModuleIf @ 1 NONAME
-
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/harvester_framework_api/tsrc/MonitorPluginTest/group/MonitorPluginTest.mmp
--- a/mds_plat/harvester_framework_api/tsrc/MonitorPluginTest/group/MonitorPluginTest.mmp Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-/*
-* Copyright (c) 2005-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: Project definition file
-*
-*/
-
-
-#include
-#include
-
-TARGET MonitorPluginTest.dll
-TARGETTYPE dll
-UID 0x1000008D 0x101FB3E3
-
-CAPABILITY ALL -TCB
-VENDORID VID_DEFAULT
-
-DEFFILE MonitorPluginTest.DEF
-
-SOURCEPATH ../src
-SOURCE MonitorPluginTest.cpp
-SOURCE MonitorPluginTestBlocks.cpp
-
-USERINCLUDE ../inc
-USERINCLUDE ../../../../../inc
-SYSTEMINCLUDE /epoc32/include/ecom
-
-MW_LAYER_SYSTEMINCLUDE
-
-LIBRARY euser.lib
-LIBRARY stiftestinterface.lib
-LIBRARY stiftestengine.lib
-LIBRARY ecom.lib
-LIBRARY harvesterdata.lib
-LIBRARY mdeclient.lib
-LIBRARY harvestercommon.lib
-LIBRARY monitorplugininterface.lib bafl.lib efsrv.lib
-
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/harvester_framework_api/tsrc/MonitorPluginTest/group/MonitorPluginTest.pkg
--- a/mds_plat/harvester_framework_api/tsrc/MonitorPluginTest/group/MonitorPluginTest.pkg Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-;
-; 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: Installation file for API test
-;
-
-; Languages
-&EN
-
-; Header
-#{"MonitorPluginTest"},(0x101FB3E3),1,0,0,TYPE=SA
-
-; Localised Vendor name
-%{"Nokia"}
-
-; Unique Vendor name
-:"Nokia"
-
-; Install files
-"\epoc32\release\armv5\urel\MonitorPluginTest.dll" - "c:\sys\bin\MonitorPluginTest.dll"
-"..\conf\MonitorPluginTest.cfg" - "c:\TestFramework\MonitorPluginTest.cfg"
-"..\init\MonitorPluginTest.ini" - "c:\TestFramework\MonitorPluginTest.ini"
-
-"..\..\data\mmc\HarvesterTest\Jpg.jpg" -"E:\testing\data\Jpg.jpg"
-"..\..\data\mmc\HarvesterTest\Animated.gif" -"E:\testing\data\Animated.gif"
-"..\..\data\mmc\HarvesterTest\Temp1.jpg" -"E:\testing\data\Temp1.jpg"
-"..\..\data\mmc\HarvesterTest\Temp2.jpg" -"E:\testing\data\Temp2.jpg"
-"..\..\data\mmc\HarvesterTest\Temp3.jpg" -"E:\testing\data\Temp3.jpg"
-"..\..\data\mmc\HarvesterTest\H263.3gp" -"E:\testing\data\H263.3gp"
-"..\..\data\mmc\HarvesterTest\bmp_burst.bmp" -"E:\testing\data\bmp_burst.bmp"
-"..\..\data\mmc\HarvesterTest\GIF87testimage.gif" -"E:\testing\data\GIF87testimage.gif"
-"..\..\data\mmc\HarvesterTest\gif89a_onemeg.gif" -"E:\testing\data\gif89a_onemeg.gif"
-"..\..\data\mmc\HarvesterTest\Liverpool.jpg" -"E:\testing\data\Liverpool.jpg"
-"..\..\data\mmc\HarvesterTest\MBMtestimage.mbm" -"E:\testing\data\MBMtestimage.mbm"
-"..\..\data\mmc\HarvesterTest\wbmp_skull.wbmp" -"E:\testing\data\wbmp_skull.wbmp"
-"..\..\data\mmc\HarvesterTest\ota_bmpiso.ota" -"E:\testing\data\ota_bmpiso.ota"
-"..\..\data\mmc\HarvesterTest\PNGtestimage.png" -"E:\testing\data\PNGtestimage.png"
-"..\..\data\mmc\HarvesterTest\G4.TIF" -"E:\testing\data\G4.TIF"
-"..\..\data\mmc\HarvesterTest\G31D.TIF" -"E:\testing\data\G31D.TIF"
-"..\..\data\mmc\HarvesterTest\PSRETRO.WMF" -"E:\testing\data\PSRETRO.WMF"
-"..\..\data\mmc\HarvesterTest\Animated.gif" -"E:\testing\data\Animated.gif"
-"..\..\data\mmc\HarvesterTest\Mbm.mbm" -"E:\testing\data\Mbm.mbm"
-"..\..\data\mmc\HarvesterTest\MPEG4.3gp" -"E:\testing\data\MPEG4.3gp"
-"..\..\data\mmc\HarvesterTest\MPEG4.mp4" -"E:\testing\data\MPEG4.mp4"
-"..\..\data\mmc\HarvesterTest\00001.mp3" -"E:\testing\data\00001.mp3"
-
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/harvester_framework_api/tsrc/MonitorPluginTest/group/bld.inf
--- a/mds_plat/harvester_framework_api/tsrc/MonitorPluginTest/group/bld.inf Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-/*
-* Copyright (c) 2005-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: Build information file
-*
-*/
-
-
-PRJ_PLATFORMS
- DEFAULT
-
-PRJ_EXPORTS
-
-PRJ_MMPFILES
-
-PRJ_TESTMMPFILES
-MonitorPluginTest.mmp
-
-PRJ_TESTEXPORTS
-
-../conf/MonitorPluginTest.cfg /epoc32/winscw/c/TestFramework/MonitorPluginTest.cfg
-../init/MonitorPluginTest.ini /epoc32/winscw/c/TestFramework/MonitorPluginTest.ini
-
-../../data/mmc/HarvesterTest/bmp_burst.bmp /epoc32/WINSCW/C/Data/bmp_burst.bmp
-../../data/mmc/HarvesterTest/G31D.TIF /epoc32/WINSCW/C/Data/G31D.TIF
-../../data/mmc/HarvesterTest/G4.TIF /epoc32/WINSCW/C/Data/G4.TIF
-../../data/mmc/HarvesterTest/GIF87testimage.gif /epoc32/WINSCW/C/Data/GIF87testimage.gif
-../../data/mmc/HarvesterTest/gif89a_onemeg.gif /epoc32/WINSCW/C/Data/gif89a_onemeg.gif
-../../data/mmc/HarvesterTest/Liverpool.jpg /epoc32/WINSCW/C/Data/Liverpool.jpg
-../../data/mmc/HarvesterTest/MBMtestimage.mbm /epoc32/WINSCW/C/Data/MBMtestimage.mbm
-../../data/mmc/HarvesterTest/ota_bmpiso.ota /epoc32/WINSCW/C/Data/ota_bmpiso.ota
-../../data/mmc/HarvesterTest/PNGtestimage.png /epoc32/WINSCW/C/Data/PNGtestimage.png
-../../data/mmc/HarvesterTest/PSRETRO.WMF /epoc32/WINSCW/C/Data/PSRETRO.WMF
-../../data/mmc/HarvesterTest/wbmp_skull.wbmp /epoc32/WINSCW/C/Data/wbmp_skull.wbmp
-../../data/mmc/HarvesterTest/Jpg.jpg /epoc32/WINSCW/C/Data/Jpg.jpg
-../../data/mmc/HarvesterTest/Animated.gif /epoc32/WINSCW/C/Data/Animated.gif
-../../data/mmc/HarvesterTest/Mbm.mbm /epoc32/WINSCW/C/Data/Mbm.mbm
-../../data/mmc/HarvesterTest/H263.3gp /epoc32/WINSCW/C/Data/H263.3gp
-../../data/mmc/HarvesterTest/MPEG4.mp4 /epoc32/WINSCW/C/Data/MPEG4.mp4
-../../data/mmc/HarvesterTest/MPEG4.3gp /epoc32/WINSCW/C/Data/MPEG4.3gp
-../../data/mmc/HarvesterTest/Temp1.jpg /epoc32/WINSCW/C/Data/Temp1.jpg
-../../data/mmc/HarvesterTest/Temp2.jpg /epoc32/WINSCW/C/Data/Temp2.jpg
-../../data/mmc/HarvesterTest/Temp3.jpg /epoc32/WINSCW/C/Data/Temp3.jpg
-../../data/mmc/HarvesterTest/00001.mp3 /epoc32/WINSCW/C/Data/00001.mp3
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/harvester_framework_api/tsrc/MonitorPluginTest/inc/MonitorPluginTest.h
--- a/mds_plat/harvester_framework_api/tsrc/MonitorPluginTest/inc/MonitorPluginTest.h Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,124 +0,0 @@
-/*
-* Copyright (c) 2002-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:
-*
-* ============================================================================
-*/
-
-
-#ifndef MONITORPLUGINTEST_H
-#define MONITORPLUGINTEST_H
-
-// INCLUDES
-#include
-#include
-#include
-
-//#include
-#include
-#include "mdeharvestersession.h"
-#include
-
-// CONSTANTS
-// Logging path
-_LIT( KMonitorPluginTestLogPath, "\\logs\\testframework\\MonitorPluginTest\\" );
-// Log file
-_LIT( KMonitorPluginTestLogFile, "MonitorPluginTest.txt" );
-_LIT( KMonitorPluginTestLogFileWithTitle, "MonitorPluginTest_[%S].txt" );
-
-
-// FORWARD DECLARATIONS
-class CMonitorPluginTest;
-
-// CLASS DECLARATION
-NONSHARABLE_CLASS(CMonitorPluginTest) : public CScriptBase,
- public MMonitorPluginObserver,
- public MMdESessionObserver
- {
- public: // Constructors and destructor
-
- /**
- * Two-phased constructor.
- */
- static CMonitorPluginTest* NewL( CTestModuleIf& aTestModuleIf );
-
- /**
- * Destructor.
- */
- virtual ~CMonitorPluginTest();
-
- public: // Functions from base classes
-
- /**
- * From CScriptBase Runs a script line.
- * @since ?Series60_version
- * @param aItem Script line containing method name and parameters
- * @return Symbian OS error code
- */
- virtual TInt RunMethodL( CStifItemParser& aItem );
-
- private: // Functions from base classes
-
- void MonitorEvent( CHarvesterData* aHarvesterData );
- void MonitorEvent( RPointerArray& aHDArray );
-
- void HandleSessionOpened(CMdESession& aClient, TInt aError);
- void HandleSessionError(CMdESession& aClient, TInt aError);
-
- private:
-
- /**
- * C++ default constructor.
- */
- CMonitorPluginTest( CTestModuleIf& aTestModuleIf );
-
- /**
- * By default Symbian 2nd phase constructor is private.
- */
- void ConstructL();
-
- /**
- * Frees all resources allocated from test methods.
- * @since ?Series60_version
- */
- void Delete();
-
- void ActiveWait2();
-
- /**
- * Test methods are listed below.
- */
-
- virtual TInt ActiveWait( CStifItemParser& aItem );
- virtual TInt BeginMonitorSessionL( CStifItemParser& aItem );
- virtual TInt EndMonitorSession( CStifItemParser& aItem );
- virtual TInt LoadPluginsL( CStifItemParser& aItem );
- virtual TInt StartMonitoring( CStifItemParser& aItem );
- virtual TInt PauseMonitoring( CStifItemParser& aItem );
- virtual TInt ResumeMonitoring( CStifItemParser& aItem );
- virtual TInt StopMonitoring( CStifItemParser& aItem );
- virtual TInt CreateEventsL( CStifItemParser& aItem );
- virtual TInt CreateEventsDeleteL( CStifItemParser& aItem );
-
- //[TestMethods] - Do not remove
-
- private: // Data
-
- RPointerArray iPluginArray;
- CMdESession* iMdEClient;
- };
-
-#endif // MONITORPLUGINTEST_H
-
-// End of File
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/harvester_framework_api/tsrc/MonitorPluginTest/init/MonitorPluginTest.ini
--- a/mds_plat/harvester_framework_api/tsrc/MonitorPluginTest/init/MonitorPluginTest.ini Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,81 +0,0 @@
-#
-# Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "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:
-#
-
-
-[Engine_Defaults]
-
-TestReportMode= FullReport # Possible values are: 'Empty', 'Summary', 'Environment',
- 'TestCases' or 'FullReport'
-
-CreateTestReport= YES # Possible values: YES or NO
-
-TestReportFilePath= C:\LOGS\TestFramework\
-TestReportFileName= MonitorPluginTestLog
-
-TestReportFormat= TXT # Possible values: TXT or HTML
-TestReportOutput= FILE # Possible values: FILE or RDEBUG
-TestReportFileCreationMode= OVERWRITE # Possible values: OVERWRITE or APPEND
-
-DeviceResetDllName= StifResetForNokia.dll # e.g. 'StifHWResetStub.dll' for user specific reseting
-
-DisableMeasurement= stifmeasurementdisablenone # Possible values are:
- # 'stifmeasurementdisablenone', 'stifmeasurementdisableall'
- # 'stifmeasurementplugin01', 'stifmeasurementplugin02',
- # 'stifmeasurementplugin03', 'stifmeasurementplugin04',
- # 'stifmeasurementplugin05' or 'stifbappeaprofiler'
-
-Timeout= 600000 # Default timeout value for each test case. In milliseconds
-#UITestingSupport= YES # Possible values: YES or NO
-#SeparateProcesses= YES # Possible values: YES or NO (default: NO)
-[End_Defaults]
-
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-
-[New_Module]
-ModuleName= TestScripter
-TestCaseFile= c:\testframework\MonitorPluginTest.cfg
-[End_Module]
-
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-
-[Logger_Defaults]
-
-#NOTE: If you want to set Logger using next setting(s) remove comment(s)'#'
-#NOTE: TestEngine and TestServer logging settings cannot change here
-
-CreateLogDirectories= YES # Possible values: YES or NO
-
-#EmulatorBasePath= C:\LOGS\TestFramework\
-#EmulatorFormat= HTML # Possible values: TXT or HTML
-#EmulatorOutput= FILE # Possible values: FILE or RDEBUG
-
-HardwareBasePath= C:\
-#HardwareFormat= HTML # Possible values: TXT or HTML
-#HardwareOutput= FILE # Possible values: FILE or RDEBUG
-
-#FileCreationMode= OVERWRITE # Possible values: OVERWRITE or APPEND
-
-#ThreadIdToLogFile= YES # Possible values: YES or NO
-#WithTimeStamp= YES # Possible values: YES or NO
-#WithLineBreak= YES # Possible values: YES or NO
-#WithEventRanking= YES # Possible values: YES or NO
-
-#FileUnicode= YES # Possible values: YES or NO
-AddTestCaseTitle= YES # Possible values: YES or NO
-[End_Logger_Defaults]
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-
-# End of file
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/harvester_framework_api/tsrc/MonitorPluginTest/src/MonitorPluginTest.cpp
--- a/mds_plat/harvester_framework_api/tsrc/MonitorPluginTest/src/MonitorPluginTest.cpp Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,132 +0,0 @@
-/*
-* Copyright (c) 2002-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: ?Description
-*
-*/
-
-
-// INCLUDE FILES
-#include
-#include "MonitorPluginTest.h"
-#include
-
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CMonitorPluginTest::CMonitorPluginTest
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-//
-CMonitorPluginTest::CMonitorPluginTest(
- CTestModuleIf& aTestModuleIf ):
- CScriptBase( aTestModuleIf )
- {
- }
-
-// -----------------------------------------------------------------------------
-// CMonitorPluginTest::ConstructL
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-//
-void CMonitorPluginTest::ConstructL()
- {
- //Read logger settings to check whether test case name is to be
- //appended to log file name.
- RSettingServer settingServer;
- TInt ret = settingServer.Connect();
- if(ret != KErrNone)
- {
- User::Leave(ret);
- }
- // Struct to StifLogger settigs.
- TLoggerSettings loggerSettings;
- // Parse StifLogger defaults from STIF initialization file.
- ret = settingServer.GetLoggerSettings(loggerSettings);
- if(ret != KErrNone)
- {
- User::Leave(ret);
- }
- // Close Setting server session
- settingServer.Close();
-
- TFileName logFileName;
-
- if(loggerSettings.iAddTestCaseTitle)
- {
- TName title;
- TestModuleIf().GetTestCaseTitleL(title);
- logFileName.Format(KMonitorPluginTestLogFileWithTitle, &title);
- }
- else
- {
- logFileName.Copy(KMonitorPluginTestLogFile);
- }
-
- iLog = CStifLogger::NewL( KMonitorPluginTestLogPath,
- logFileName,
- CStifLogger::ETxt,
- CStifLogger::EFile,
- EFalse );
-
- }
-
-// -----------------------------------------------------------------------------
-// CMonitorPluginTest::NewL
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-//
-CMonitorPluginTest* CMonitorPluginTest::NewL(
- CTestModuleIf& aTestModuleIf )
- {
- CMonitorPluginTest* self = new (ELeave) CMonitorPluginTest( aTestModuleIf );
-
- CleanupStack::PushL( self );
- self->ConstructL();
- CleanupStack::Pop( self );
-
- return self;
-
- }
-
-// Destructor
-CMonitorPluginTest::~CMonitorPluginTest()
- {
-
- // Delete resources allocated from test methods
- Delete();
-
- // Delete logger
- delete iLog;
-
- }
-
-// ========================== OTHER EXPORTED FUNCTIONS =========================
-
-// -----------------------------------------------------------------------------
-// LibEntryL is a polymorphic Dll entry point.
-// Returns: CScriptBase: New CScriptBase derived object
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CScriptBase* LibEntryL(
- CTestModuleIf& aTestModuleIf ) // Backpointer to STIF Test Framework
- {
-
- return ( CScriptBase* ) CMonitorPluginTest::NewL( aTestModuleIf );
-
- }
-
-
-// End of File
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/harvester_framework_api/tsrc/MonitorPluginTest/src/MonitorPluginTestBlocks.cpp
--- a/mds_plat/harvester_framework_api/tsrc/MonitorPluginTest/src/MonitorPluginTestBlocks.cpp Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,580 +0,0 @@
-/*
-* Copyright (c) 2002-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:
-*
-*/
-
-
-// [INCLUDE FILES] - do not remove
-#include
-#include
-#include
-#include
-#include
-#include
-#include "MonitorPluginTest.h"
-
-#include "mdsutils.h"
-
-
-_LIT( KFile1Src, "C:\\Data\\Jpg.jpg" );
-_LIT( KFile1Dst, "E:\\Images\\Jpg_copy.jpg" );
-_LIT( KFile1Dst2, "C:\\Data\\Images\\Pictures\\Jpg_copy2.jpg" );
-_LIT( KFile1Dst3, "C:\\Data\\Images\\Pictures\\Jpg_tmp.jpg" );
-_LIT( KFile1Dst4, "T:\\Images\\Jpg_copy.jpg" );
-
-_LIT( KFile2Src, "C:\\Data\\Animated.gif" );
-_LIT( KFile2Dst, "E:\\Images\\Animated_copy.gif" );
-_LIT( KFile2Dst2, "C:\\Data\\Images\\Pictures\\Animated_copy2.gif" );
-_LIT( KFile2Dst3, "C:\\Data\\Images\\Pictures\\Animated_tmp.gif" );
-_LIT( KFile2Dst4, "T:\\Images\\Animated_copy.gif" );
-
-_LIT( KFile3Src, "C:\\Data\\H263.3gp" );
-_LIT( KFile3Dst, "E:\\Videos\\H263_copy.3gp" );
-_LIT( KFile3Dst2, "C:\\Data\\H263_copy2.3gp" );
-_LIT( KFile3Dst3, "C:\\Data\\H263_tmp.3gp" );
-_LIT( KFile3Dst4, "T:\\Videos\\H263_copy.3gp" );
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CMonitorPluginTest::Delete
-// Delete here all resources allocated and opened from test methods.
-// Called from destructor.
-// -----------------------------------------------------------------------------
-//
-void CMonitorPluginTest::Delete()
- {
-
- }
-
-// -----------------------------------------------------------------------------
-// CMonitorPluginTest::RunMethodL
-// Run specified method. Contains also table of test mothods and their names.
-// -----------------------------------------------------------------------------
-//
-TInt CMonitorPluginTest::RunMethodL(
- CStifItemParser& aItem )
- {
- TestModuleIf().SetBehavior( CTestModuleIf::ETestLeaksHandles );
-
- static TStifFunctionInfo const KFunctions[] =
- {
- // Copy this line for every implemented function.
- // First string is the function name used in TestScripter script file.
- // Second is the actual implementation member function.
-
- ENTRY( "ActiveWait", CMonitorPluginTest::ActiveWait ),
- ENTRY( "BeginMonitorSession", CMonitorPluginTest::BeginMonitorSessionL ),
- ENTRY( "EndMonitorSession", CMonitorPluginTest::EndMonitorSession ),
- ENTRY( "LoadPlugins", CMonitorPluginTest::LoadPluginsL ),
- ENTRY( "StartMonitoring", CMonitorPluginTest::StartMonitoring ),
- ENTRY( "PauseMonitoring", CMonitorPluginTest::PauseMonitoring ),
- ENTRY( "ResumeMonitoring", CMonitorPluginTest::ResumeMonitoring ),
- ENTRY( "StopMonitoring", CMonitorPluginTest::StopMonitoring ),
- ENTRY( "CreateEvents", CMonitorPluginTest::CreateEventsL ),
- ENTRY( "CreateEventsDelete", CMonitorPluginTest::CreateEventsDeleteL ),
-
- };
-
- const TInt count = sizeof( KFunctions ) /
- sizeof( TStifFunctionInfo );
-
- return RunInternalL( KFunctions, count, aItem );
-
- }
-
-// -----------------------------------------------------------------------------
-// CMonitorPluginTest::MonitorEvent
-// -----------------------------------------------------------------------------
-//
-void CMonitorPluginTest::MonitorEvent( CHarvesterData* aHarvesterData )
- {
- _LIT( KMsg, "CallBck MonitorEvent");
- iLog->Log( KMsg );
- RDebug::Print( KMsg );
-
- switch ( aHarvesterData->EventType() )
- {
- case EHarvesterAdd:
- {
- _LIT( KAdded, "File added" );
- iLog->Log( KAdded );
- RDebug::Print( KAdded );
- }
- break;
-
- case EHarvesterEdit:
- {
- _LIT( KEdited, "File edited" );
- iLog->Log( KEdited );
- RDebug::Print( KEdited );
- }
- break;
-
- case EHarvesterDelete:
- {
- _LIT( KDeleted, "File deleted" );
- iLog->Log( KDeleted );
- RDebug::Print( KDeleted );
- }
- break;
-
- case EHarvesterUnknown:
- {
- _LIT( KUnknown, "Unknown event" );
- iLog->Log( KUnknown );
- RDebug::Print( KUnknown );
- }
- break;
- }
-
- // monitor event
- TEventIf event( TEventIf::ESetEvent, _L("Monitor") );
- TestModuleIf().Event( event );
- }
-
-// -----------------------------------------------------------------------------
-// CMonitorPluginTest::MonitorEvent
-// -----------------------------------------------------------------------------
-//
-void CMonitorPluginTest::MonitorEvent( RPointerArray& aHDArray )
- {
- _LIT( KMsg, "CallBck MonitorEvent");
- iLog->Log( KMsg );
- RDebug::Print( KMsg );
-
- for( TInt i = 0; i < aHDArray.Count(); i++ )
- {
- CHarvesterData* hd = aHDArray[i];
- switch ( hd->EventType() )
- {
- case EHarvesterAdd:
- {
- _LIT( KAdded, " Files added." );
- iLog->Log( KAdded );
- RDebug::Print( KAdded );
- }
- break;
-
- case EHarvesterEdit:
- {
- _LIT( KEdited, " Files edited." );
- iLog->Log( KEdited );
- RDebug::Print( KEdited );
- }
- break;
-
- case EHarvesterDelete:
- {
- _LIT( KDeleted, " Files deleted." );
- iLog->Log( KDeleted );
- RDebug::Print( KDeleted );
- }
- break;
-
- case EHarvesterUnknown:
- {
- _LIT( KUnknown, "Unknown event." );
- iLog->Log( KUnknown );
- RDebug::Print( KUnknown );
- }
- break;
- }
- }
-
- // monitor event
- TEventIf event( TEventIf::ESetEvent, _L("Monitor") );
- TestModuleIf().Event( event );
- }
-
-// -----------------------------------------------------------------------------
-// CMonitorPluginTest::HandleSessionOpened
-// -----------------------------------------------------------------------------
-//
-void CMonitorPluginTest::HandleSessionOpened( CMdESession& /*aClient*/, TInt aError )
- {
- _LIT( KMsg, "CallBck HandleSessionOpened - Error code : %d" );
- TBuf <100> msg;
- msg.Format(KMsg, aError);
- iLog->Log( msg );
- RDebug::Print(msg);
-
- // session event
- TEventIf event( TEventIf::ESetEvent, _L("Session") );
- TestModuleIf().Event( event );
- }
-
-// -----------------------------------------------------------------------------
-// CMonitorPluginTest::HandleSessionError
-// -----------------------------------------------------------------------------
-//
-void CMonitorPluginTest::HandleSessionError( CMdESession& /*aClient*/, TInt aError )
- {
- _LIT( KMsg, "CallBck HandleSessionError - Error code : %d" );
- TBuf <100> msg;
- msg.Format(KMsg, aError);
- iLog->Log( msg );
- RDebug::Print(msg);
-
- // session event
- TEventIf event( TEventIf::ESetEvent, _L("Session") );
- TestModuleIf().Event( event );
- }
-
-// -----------------------------------------------------------------------------
-// CMonitorPluginTest::ActiveWait
-// -----------------------------------------------------------------------------
-//
-TInt CMonitorPluginTest::ActiveWait( CStifItemParser& /* aItem */ )
- {
- _LIT( KMsg1, "Enter ActiveWait" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- // 2,5 seconds
- TTimeIntervalMicroSeconds32 timeout( 2500000 );
- RTimer timer;
- TRequestStatus status;
-
- timer.CreateLocal();
- timer.After(status,timeout);
-
- User::WaitForAnyRequest();
-
- timer.Close();
-
- _LIT( KMsg2, "Exit ActiveWait" );
- iLog->Log( KMsg2 );
- RDebug::Print( KMsg2 );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CMonitorPluginTest::ActiveWait
-// -----------------------------------------------------------------------------
-//
-void CMonitorPluginTest::ActiveWait2()
- {
- _LIT( KMsg1, "Enter ActiveWait2" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- // 2,5 seconds
- TTimeIntervalMicroSeconds32 timeout( 2500000 );
- RTimer timer;
- TRequestStatus status;
-
- timer.CreateLocal();
- timer.After(status,timeout);
-
- User::WaitForRequest( status);
-
- timer.Close();
-
- _LIT( KMsg2, "Exit ActiveWait2" );
- iLog->Log( KMsg2 );
- RDebug::Print( KMsg2 );
- }
-
-// -----------------------------------------------------------------------------
-// CMonitorPluginTest::BeginMonitorSessionL
-// -----------------------------------------------------------------------------
-//
-TInt CMonitorPluginTest::BeginMonitorSessionL( CStifItemParser& /* aItem */ )
- {
- iMdEClient = NULL;
- TRAPD( error, iMdEClient = CMdESession::NewL( *this ) );
-
- _LIT( KMsg, "Exit BeginMonitorSession - Error code : %d" );
- TBuf <100> msg;
- msg.Format( KMsg, error);
- iLog->Log( msg );
- RDebug::Print( msg );
-
- User::LeaveIfError( error );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CMonitorPluginTest::EndMonitorSession
-// -----------------------------------------------------------------------------
-//
-TInt CMonitorPluginTest::EndMonitorSession( CStifItemParser& /* aItem */ )
- {
- _LIT( KMsg1, "Enter EndMonitorSession" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- iPluginArray.ResetAndDestroy();
- iPluginArray.Close();
-
- if ( iMdEClient )
- {
- delete iMdEClient;
- iMdEClient = NULL;
- }
-
- REComSession::FinalClose();
-
- _LIT( KMsg2, "Exit EndMonitorSession" );
- iLog->Log( KMsg2 );
- RDebug::Print( KMsg2 );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CMonitorPluginTest::LoadPluginsL
-// -----------------------------------------------------------------------------
-//
-TInt CMonitorPluginTest::LoadPluginsL( CStifItemParser& /* aItem */ )
- {
- _LIT( KMsg1, "Enter LoadPlugins" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- RImplInfoPtrArray infoArray;
-
- TCleanupItem cleanupItem(MdsUtils::CleanupEComArray, &infoArray);
- CleanupStack::PushL(cleanupItem);
-
- CMonitorPlugin::ListImplementationsL(infoArray);
- TInt count( 0 );
- count = infoArray.Count();
-
- for (TInt i=0; i < count; i++)
- {
- TUid uid = infoArray[i]->ImplementationUid(); // Create the plug-ins
- iPluginArray.AppendL( CMonitorPlugin::NewL( uid ) ); // and add them to array
- }
-
- CleanupStack::PopAndDestroy(&infoArray); // infoArray, results in a call to CleanupEComArray
-
- if( iPluginArray.Count() == 0 )
- {
- return KErrNotFound;
- }
-
- _LIT( KMsg2, "Exit LoadPlugins" );
- iLog->Log( KMsg2 );
- RDebug::Print( KMsg2 );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CMonitorPluginTest::StartMonitoring
-// -----------------------------------------------------------------------------
-//
-TInt CMonitorPluginTest::StartMonitoring( CStifItemParser& /* aItem */ )
- {
- _LIT( KMsg1, "Enter StartMonitoring" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- TInt count( iPluginArray.Count() );
-
- for (TInt i=0; i < count; i++)
- {
- iPluginArray[i]->StartMonitoring( *this, iMdEClient, NULL, NULL );
- }
-
- _LIT( KMsg2, "Exit StartMonitoring" );
- iLog->Log( KMsg2 );
- RDebug::Print( KMsg2 );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CMonitorPluginTest::PauseMonitoring
-// -----------------------------------------------------------------------------
-//
-TInt CMonitorPluginTest::PauseMonitoring( CStifItemParser& /* aItem */ )
- {
- _LIT( KMsg1, "Enter PauseMonitoring" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- TInt count( iPluginArray.Count() );
-
- for (TInt i = 0; i < count; i++ )
- {
- iPluginArray[i]->PauseMonitoring();
- }
-
- _LIT( KMsg2, "Exit PauseMonitoring" );
- iLog->Log( KMsg2 );
- RDebug::Print( KMsg2 );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CMonitorPluginTest::ResumeMonitoring
-// -----------------------------------------------------------------------------
-//
-TInt CMonitorPluginTest::ResumeMonitoring( CStifItemParser& /* aItem */ )
- {
- _LIT( KMsg1, "Enter ResumeMonitoring" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- TInt count( iPluginArray.Count() );
-
- for (TInt i=0; i < count; i++)
- {
- iPluginArray[i]->ResumeMonitoring( *this, iMdEClient, NULL, NULL );
- }
-
- _LIT( KMsg2, "Exit ResumeMonitoring" );
- iLog->Log( KMsg2 );
- RDebug::Print( KMsg2 );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CMonitorPluginTest::StopMonitoring
-// -----------------------------------------------------------------------------
-//
-TInt CMonitorPluginTest::StopMonitoring( CStifItemParser& /* aItem */ )
- {
- _LIT( KMsg1, "Enter StopMonitoring" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- TInt count( iPluginArray.Count() );
-
- for (TInt i=0; i < count; i++)
- {
- iPluginArray[i]->StopMonitoring();
- }
-
- ActiveWait2();
-
- _LIT( KMsg2, "Exit StopMonitoring" );
- iLog->Log( KMsg2 );
- RDebug::Print( KMsg2 );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CMonitorPluginTest::CreateEvents
-// -----------------------------------------------------------------------------
-//
-TInt CMonitorPluginTest::CreateEventsL( CStifItemParser& /* aItem */ )
- {
- _LIT( KMsg1, "Enter CreateEvents" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- RFs fs;
- User::LeaveIfError( fs.Connect() );
-
- BaflUtils::CopyFile( fs, KFile1Src, KFile1Dst2 );
- BaflUtils::CopyFile( fs, KFile2Src, KFile2Dst2 );
- BaflUtils::CopyFile( fs, KFile3Src, KFile3Dst2 );
-
- fs.Rename( KFile1Dst2, KFile1Dst3 );
- fs.Rename( KFile2Dst2, KFile2Dst3 );
- fs.Rename( KFile3Dst2, KFile3Dst3 );
-
- fs.Replace( KFile1Dst3, KFile1Dst2 );
- fs.Replace( KFile2Dst3, KFile2Dst2 );
- fs.Replace( KFile3Dst3, KFile3Dst2 );
-
- // MMC stuff
- if( fs.IsValidDrive( EDriveE ) )
- {
- fs.RemountDrive( EDriveE, NULL ,80000000 );
-
- iMdEClient->RemoveObjectL( KFile1Dst );
- iMdEClient->RemoveObjectL( KFile2Dst );
- iMdEClient->RemoveObjectL( KFile3Dst );
- BaflUtils::DeleteFile( fs, KFile1Dst );
- BaflUtils::DeleteFile( fs, KFile2Dst );
- BaflUtils::DeleteFile( fs, KFile3Dst );
-
- BaflUtils::CopyFile( fs, KFile1Src, KFile1Dst );
- BaflUtils::CopyFile( fs, KFile2Src, KFile2Dst );
- BaflUtils::CopyFile( fs, KFile3Src, KFile3Dst );
- }
-
- if( fs.IsValidDrive( EDriveT ) )
- {
- fs.RemountDrive( EDriveT, NULL ,80000000 );
-
- iMdEClient->RemoveObjectL( KFile1Dst4 );
- iMdEClient->RemoveObjectL( KFile2Dst4 );
- iMdEClient->RemoveObjectL( KFile3Dst4 );
- BaflUtils::DeleteFile( fs, KFile1Dst4 );
- BaflUtils::DeleteFile( fs, KFile2Dst4 );
- BaflUtils::DeleteFile( fs, KFile3Dst4 );
-
- BaflUtils::CopyFile( fs, KFile1Src, KFile1Dst4 );
- BaflUtils::CopyFile( fs, KFile2Src, KFile2Dst4 );
- BaflUtils::CopyFile( fs, KFile3Src, KFile3Dst4 );
- }
-
- fs.Close();
-
- _LIT( KMsg2, "Exit CreateEvents" );
- iLog->Log( KMsg2 );
- RDebug::Print( KMsg2 );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CMonitorPluginTest::CreateEventsDelete
-// -----------------------------------------------------------------------------
-//
-TInt CMonitorPluginTest::CreateEventsDeleteL( CStifItemParser& /* aItem */ )
- {
- _LIT( KMsg1, "Enter CreateEventsDelete" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- RFs fs;
- User::LeaveIfError(fs.Connect());
-
- iMdEClient->RemoveObjectL( KFile1Src );
- iMdEClient->RemoveObjectL( KFile2Src );
- iMdEClient->RemoveObjectL( KFile3Src );
- iMdEClient->RemoveObjectL( KFile1Dst2 );
- iMdEClient->RemoveObjectL( KFile2Dst2 );
- iMdEClient->RemoveObjectL( KFile3Dst2 );
-
- BaflUtils::DeleteFile( fs, KFile1Dst2 );
- BaflUtils::DeleteFile( fs, KFile2Dst2 );
- BaflUtils::DeleteFile( fs, KFile3Dst2 );
- BaflUtils::DeleteFile( fs, KFile1Dst3 );
- BaflUtils::DeleteFile( fs, KFile2Dst3 );
- BaflUtils::DeleteFile( fs, KFile3Dst3 );
-
- fs.Close();
-
- _LIT( KMsg2, "Exit CreateEventsDelete" );
- iLog->Log( KMsg2 );
- RDebug::Print( KMsg2 );
-
- return KErrNone;
- }
-
-// [End of File] - Do not remove
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/harvester_framework_api/tsrc/data/mmc/HarvesterTest/00001.mp3
Binary file mds_plat/harvester_framework_api/tsrc/data/mmc/HarvesterTest/00001.mp3 has changed
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/harvester_framework_api/tsrc/data/mmc/HarvesterTest/Animated.gif
Binary file mds_plat/harvester_framework_api/tsrc/data/mmc/HarvesterTest/Animated.gif has changed
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/harvester_framework_api/tsrc/data/mmc/HarvesterTest/G31D.TIF
Binary file mds_plat/harvester_framework_api/tsrc/data/mmc/HarvesterTest/G31D.TIF has changed
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/harvester_framework_api/tsrc/data/mmc/HarvesterTest/G4.TIF
Binary file mds_plat/harvester_framework_api/tsrc/data/mmc/HarvesterTest/G4.TIF has changed
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/harvester_framework_api/tsrc/data/mmc/HarvesterTest/GIF87testimage.gif
Binary file mds_plat/harvester_framework_api/tsrc/data/mmc/HarvesterTest/GIF87testimage.gif has changed
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/harvester_framework_api/tsrc/data/mmc/HarvesterTest/H263.3gp
Binary file mds_plat/harvester_framework_api/tsrc/data/mmc/HarvesterTest/H263.3gp has changed
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/harvester_framework_api/tsrc/data/mmc/HarvesterTest/Jpg.jpg
Binary file mds_plat/harvester_framework_api/tsrc/data/mmc/HarvesterTest/Jpg.jpg has changed
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/harvester_framework_api/tsrc/data/mmc/HarvesterTest/Liverpool.jpg
Binary file mds_plat/harvester_framework_api/tsrc/data/mmc/HarvesterTest/Liverpool.jpg has changed
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/harvester_framework_api/tsrc/data/mmc/HarvesterTest/MBMtestimage.mbm
Binary file mds_plat/harvester_framework_api/tsrc/data/mmc/HarvesterTest/MBMtestimage.mbm has changed
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/harvester_framework_api/tsrc/data/mmc/HarvesterTest/MPEG4.3gp
Binary file mds_plat/harvester_framework_api/tsrc/data/mmc/HarvesterTest/MPEG4.3gp has changed
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/harvester_framework_api/tsrc/data/mmc/HarvesterTest/MPEG4.mp4
Binary file mds_plat/harvester_framework_api/tsrc/data/mmc/HarvesterTest/MPEG4.mp4 has changed
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/harvester_framework_api/tsrc/data/mmc/HarvesterTest/Mbm.mbm
Binary file mds_plat/harvester_framework_api/tsrc/data/mmc/HarvesterTest/Mbm.mbm has changed
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/harvester_framework_api/tsrc/data/mmc/HarvesterTest/PNGtestimage.png
Binary file mds_plat/harvester_framework_api/tsrc/data/mmc/HarvesterTest/PNGtestimage.png has changed
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/harvester_framework_api/tsrc/data/mmc/HarvesterTest/PSRETRO.WMF
Binary file mds_plat/harvester_framework_api/tsrc/data/mmc/HarvesterTest/PSRETRO.WMF has changed
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/harvester_framework_api/tsrc/data/mmc/HarvesterTest/Temp1.jpg
Binary file mds_plat/harvester_framework_api/tsrc/data/mmc/HarvesterTest/Temp1.jpg has changed
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/harvester_framework_api/tsrc/data/mmc/HarvesterTest/Temp2.jpg
Binary file mds_plat/harvester_framework_api/tsrc/data/mmc/HarvesterTest/Temp2.jpg has changed
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/harvester_framework_api/tsrc/data/mmc/HarvesterTest/Temp3.jpg
Binary file mds_plat/harvester_framework_api/tsrc/data/mmc/HarvesterTest/Temp3.jpg has changed
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/harvester_framework_api/tsrc/data/mmc/HarvesterTest/bmp_burst.bmp
Binary file mds_plat/harvester_framework_api/tsrc/data/mmc/HarvesterTest/bmp_burst.bmp has changed
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/harvester_framework_api/tsrc/data/mmc/HarvesterTest/corrupt.jpg
--- a/mds_plat/harvester_framework_api/tsrc/data/mmc/HarvesterTest/corrupt.jpg Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,94 +0,0 @@
-ZZZZ$Z$$$ZZ$$$$$77$777777777777777777777I77II7I?III?IIII???????+++????????++++++=++++++++++++++++++=++======+======+++++
-ZZZZZZZZ$$ZZ$77777777777III777777I7777IIIIIIIII??IIIIII???????++++???????++++++++++++?????++++++++++========+===~+=+++++
-ZZZZZZ$$$$$$77777$$77I77777777III77IIIIII7IIIII????II????I7$ZZZ$$7I???????++?+++++++++++++++++++++++==+=============++++
-$ZZ77$7$$$$$777777777777I7777IIII77I777III?III??????IDNNMNNNNNDDDNNNDDO7????+++++=++=++++++++=++++====+========~~===++++
-ZZ$$$7777$$$$$777777777777IIIIIIII7IIIIIIIIII?I??+IZNND8NNNMMMMNNNDDDNND8?+??+?++++++++++++++==+=+===++=======~~~====+++
-$$$$$$$$Z$$$$7777777777I7I?II??IIIIII?III???????$DMNN8O8NNNNNNNNMMMMND8DNMD$+++?++==++++++++=======~===========~~======+
-$$$$Z$$$$$$$7777I777IIIIII?IIIIIIIII?????+????ZNND8DDZZDDDDDDDNNNNNNMMMMNNNNNZ?++=====+++++++=====~~==~===~==~=~=~======
-$$$7$$$7$777III777IIIIIIIIIII??III??III???++?$MNNDDD8$O88DDDNMNNNNNNMMMMMMDNMMN7+=====+++++==========~~~~~~~~~~=~======+
-77777777777777IIIII7IIIII????????II?????++++$DN8Z7?+++=++???I$ODNNNMMMMMNNNNNMMM+=+===~==========~==~~~~~~~~~~~~=~======
-$$77777777777I77IIIIIIII????II?III?????++++I8N$I?+======++???I$O8DDNNNMMNNNMNMNMZ+=+==~===~~====~==~~~~~~~~~~~~~~~======
-$$77777777III77IIIIIIII??????I?I????+++++?I8NOI?=~~~~~~~~~==+?I7$ZDNNNNMMMMNNNMNMO+===~~===~~~~~~~~~~~~~~~~~~::~~=======
-$$$$$$77II77IIIIIIIIIII?????????????+++++7NM87+=~:~~:~~~~~~==++I7$8DNNNMNMMMMMNMNMO=~=======~~~~~~~:~~~~~~:::::::~~=====
-77777$$7IIII?II??II??????????++++??++===$NMNZI+=~~~~~~~~~~~==+?I7$OO8DNMNNNMNNMMNMM$==+++===~===~~~~~~~~:::::::::~~~====
-7II?I7I77III???+????++???????++????+==~+$DMD$I+=======~=====+???I7$ZO8DDNNMMNNMMMMMD???+++++++==~=~~~~=~~~~~:::::~~~==+=
-777I777$7II???????++++??????+++???++==+IONM8$I+============+++??II7$ZZODNNNMMMMMMMMM7?I??????+=====~~~~~~~~~~::::~~~===+
-$7777$$ZZ7I7I??++?I?++?++???+++++++===7$DNNO7I++===~~=======++++++?I7$Z8NNNNNMNMNMMM8I7IIII7I+=====~+=~~::::~~~::~~~===+
-ZZZOOZ8OO$7III?II77I?+++++++++=====+=?78DMMZI?=+===~=~=~==++=+++???II7Z8NMMMMMMMNMNMD7$$$I77I????+++?=~~~~~~~::::::~==++
-O8888ZZZ88Z$$$$7777$7?I7?++=+=++====+7$8NMMOI?????+=+===?7$7IIIII77$ZZODNNMMMMMMNNMNN$OZ$7IIII?I??++?+?+=~~:~~:::::===++
-O8DD8OOOOOOOZ$$$$$Z$$$Z$7I++++++====?$Z8MMM87?I77$I++++?$ZOZZZZOZ$OOOOO8NNMMMMMMNNNMMOZ$ZZ$$777I??+??+?+=~~:~~~::::~====
-DDDD88OOOZZZZOOOZZOOOOZ$ZZ7+?+=++=++IOO8DNMDDDI777$ZI+?ZDDZ7$OOO8DMNO$ZODMMMNNNNMMMNMDOZZZZZ$III?I7$7I??=~~~~~~~:~==++++
-888888888OOOO8OZO8OOOZO$7$Z+?+=+++??IZDNNMMOZDIZNDO7I=I8O$I?IOZZZZ???I7O8MMNNMMMMMMMMNOOZZZZZ7$$$77$77I++~:::::~:~====+?
-DD8D8O8OOO888OOOZ8D8O88ZZ8+???IZO$???ONNMMMZIIII$Z7?+=7ZZ7??I77$7I++?I7ODMMMMMMMMNNNMMO8OOOZ$7$$$77$777I?=~~~~~~~===+++?
-8D88OO88OOO8888OODD888OOO8OZ7$OO$8Z7ZO8NMMN7?+=====+?+I77I?=~~~~~=??I7Z8DMMMMNMMMMMNNMZZZZZ$$777$$$Z$$$7I+==~==~=====++?
-8DDDO88888888DDD8DD88DD8O888OZOZ$DO$OO8NMMM$?+====++++?II?+==~~~==?I7$Z8NMMMMNMMMMNNNMZZZZZZ$$Z$$$$ZZZ$7I?==========++??
-DD888D8OO8DDD8ODNDD88DDD8D8D8O8OODOO88DNNMM8I+=~==+++=?II?++====++I7$ZODNMMMNMMNMMNNNM77777I??I???????????++++++???????I
-NMMNNNNNDDDND8D88DD8DDDDDD8DD8D8D8DNNNNNNMMD7+++==++++II7I?++==++?7$ZO8NNMMMNNNMMMMMNN88OOOOO$$$$$$$7I??I???++??III7$$7I
-NMMNDDNNNDDDD88O88888D8DN8DDDDDDNNNMMNNNMMMMZ7++??I?=?777ZI++=+??I$ZOODNNMMMMMMMMMMMMNDD8O8OOOZZZZZZZ$ZZ$7I7777I7I7$$ZZZ
-NNNNNDDNNDDDNDNDD888DD88DDDDDDDDDNNNNNMMMMMMD$II?++?$8NMND7++??II7ZO88DNMMMMMMMMMMMMMMNDDD888OOOOOO8OZ$Z$$$ZZZ$$$$$$$$ZZ
-MMNMNDDNNNDDNDDDNDD8DD888D88DDDDNNNMNNNMMMMMNZ7II?==?NNN8ZI??III7$$ZO8DNMMMMMMMMMMMMMMN8OOOOOOOOZOOOZOZZZZOZZZZ$$$$$$ZZ$
-NNNMMNNDDNDDNDDDNND8DDDDDD88DDDDDNDNMMMMNMMMMO7I77?++I7$$77Z7IIII7ZZO8DNNMMMMMMMMMMMMNND888ZOOOZZZOOOOZZZZ$$77777$$ZZOO8
-MNNMNDDDNNNNNDDDDDD8DDNDDDDDDNNDNDDDNMMMNNMMMN7II7I?77$ZOOZ7I??II7ZO8DNNNMMMNNMMMMMMMNNN8OOZOZZZZZZZZZZZZ$$$$$$$$$$ZOOOO
-NMMNDNNNNNDDDDDDDNNNNNMNDDDNDNNDD88DNNNNMMMMMMO7I?++IZZZZZ$77II7$$O8DDNNMMMMMMMMMMMMMNND8OOOOZZZOOZZZZZZZZZZZZZOOOZZZZZO
-NMMNDNNNNNNDNDDDDNDNNNNNNNNDDDDDD88DNNMMMMMMMMNO$II??$$Z$77$777$ZZ8DDDNNMMMMMMMMMMMMMMDD8ZOO8OZZZ$ZZOOOOZZZZOOOOOOZOOZ$Z
-NMMNNNNNNNNNNNNNDNNDDDDDD8D88D8D88O8NDDNMMMMMMMMNO7?+===?I777$ZO88DDDNMMMMMMMMMMMMMMMMND8O$ZZZ$$$$$ZOZOOZZZ$$$Z$$ZZ$ZOZZ
-MNNMNNMNNNNNNNNNNNNNNNDDD888888888O8NNNMNNNMMNMMMMNOI++?I77$O88DDDDNNMMMMMMMMMMMMMMMMNNNDOZZZZ$$$$$$ZZZZOZ$$ZZOOO$$ZOZZO
-NNMMMNMMMDDNNNNNNNNNDNNDDDDD88O8OOZ$8NNNMMMMMMMMMMMMNZZOO88DDDDDDNMMMNNNMMMNMMMMMMMMNMNNDZOZO8ZOOZZZOOZO8O8OOOOO8OZZZZ$$
-MMMNNNMMNNNDNDNNNNNNNDNNDDDDDD88OZZ$OMNMMMMMMMMMMMMMMMMMMMNNNMMMMMNNNNNNNNNMMMMMMMMMMNNNND88O8OOOOOZOOOO8OZO888888OZZZO8
-NMNNNMNMMMNDNNNNNNNND88DOO8OOZOOZZZ$ZDNMMMMMMMMMMMMMMMMNNMMMMMMNNNNNNDNDDNNMMMNMMMMMMNMMND88OOZZZZZ$OOO88OO8888O8O888OOO
-MMMMMMMNMNNNNDDDDDDD8888D8OZZZZZZOZZO8NMMMMMMMMMMMMMMMN$ZO88DNNNDDD88OOO8DNNMMNMMMMNNNNNN8O8O8OOOO8OOOO8OZZZO88OOZOZZZO8
-MMMMMMMMMMNDNNNDD888OOO8OZ8OOOZOZZZZOOONMMNNMMMMMMMMMMMZI7$$OOO888OOZZZZZ8DNMNNNMMMMNNNMMDD8Z$77II7$77$$$$$$$77$7I??7$ZZ
-NNMMMMMMMNDDND88D888O8OO8O88OOOOOOOO888NMMMNMMMMMMMMMMMD7II77$ZZZZZZ$$77$Z8NNDNMNNMNDNNMMMN8DD8O8O8OZZ7I77Z$77777$$ZOZ7$
-NNNNNNNNNNNND88DNNDDNNNNNOOOOOOOZOZONDDMMMMMMMMMMMMMMMN8$7III777$$777I7I7$Z8NNNNNNNN88MMMMMNMND888DNZOO8DNZ77II777ZZ$7$O
-NNNNNNDNDDD88888D8DNNNNNMDD8O8DD8DNDNNMMMMMMMMMMMMMMMDOZ$7II?I7777IIIII?7$$ODNDDDDDN88MNNMMNNND8OO8NODD8DN8O7II77$Z$$7$O
-NNNNNNNNDDDDD888D8NDDDO8NMNMNNNMNNMMNNNMMMMMMMMMMMNDO7I?I????????I?++????I7Z8DDNN88N8DMNMNNMNDDNNNND88ZZOOZZ7II?IZ$ZZ7$$
-NNNNNNNNNDDDD8DDNNDDDND8NMMMMMMNMNNMMMMMMMMNMMMNNZ$$7???++?+????+++++++++?I$O8NDDZ8D8DNNNNMMNDD8OZZZ7III???III7ZZ$ZOZZZ8
-MMNDDNMMNNND8DNDNNNDD8DDNMNDNMMMMNMMMMMMMMMMMM8$7I???=++=++++++++==+==+++I7ZDDDDOZ8D8NNNNNNNNMND8888O7+?I?7$$77$$$$ZOOOO
-NMMNNNNMNNNDDDNDDDD8888NMMNDNMMMMMMMMMMMMMMMMMZIII++++++==+=+++++==+++????7Z888DOZ8DDNNNNNNNNMNND88D8$?IIII777$$Z$$$Z$$$
-NNNNNNMNNDDDNDDD8O8O8DDNMNNNNMMMMNNNMMMMMMMNNN7I?+++========++========++??I$8OO88O8DNMNNNNMDDNNMNDDDOO$I$7I??II??I777777
-NNNMNNNND8DDD8DDO8D8DNDNDDNNDDNMNNNMMMMMMMNNNOI+++++=~~=====+====~=====+?I$$8DO88O8NNMNNNDD88DDDNNNN8OO8Z$77Z7?7O777$O$$
-NDNNNDNNND8888O8OO8O8DDDNNDDDNNDNNMMMMMMNDDDO$?+==============~====+++++?I$8O888888MMMNN8ZZZ88DDNMMNND8Z$$IIIIII?IIII???
-NNNMNDMMNM8Z8$ZOOO8OODDDDD888DNNMMMMMMMM8OZZO7++======~~~=======~~==++?+?I$ZOO8D88DND888OZOZ7ZZZO8DNMMMND88888Z77777I?I?
-NNNNNDMMNMDDN$ZOZZOOZO88DN888DMMMMMMMMMMOZZ$$?=+===========~=====~===+++?I$ZOO8DDD8OOZ$$$7$$$8DDDDNMNNMMMD8O88OZ$$$OO77$
-NNNNNNMMNNNDNMN8OZZO88O8D88DNMMMMMMMMMMNZ7II?+==========~======~=~===++??7ZOO888O$7$$$$I?IIII$O8DNMMMMMMMMNDD8ODD88888DO
-DDNNDDNDDNNNNNNDNDOOOOOOO88MMMMMMMMMMMN8$III+===~=========~~=~~~==~==++?I$$ZZZZOOOZ7I?7$O888DNNNNNNMMMMMMMMNNDD88DNNDO$I
-NNNNDDDNNNDNNNNNN88DDD8OZ$MMMMMMMMMMMMND7?++=======+===~~~~~~~~=~~~~~=+??7$$ZOO$7$ZO8DDNNNMMMMMMMMMMMMMMMMMMMD88DDD8888D
-DNNNNNNNDDDDDNDDDDD888OZ$8MMMMMMMMMMMNDD87?++=~~=++++=~~~~~~~:~~~~~~===+?7ZZ$ZZODNNMNNDDNNNNMMMMMMMMMMMMMMMMMNMD8888DND8
-DNNNNNNNNND88D8888OZ$ZZZ8NMMMMMMMMMMNNDDDO$I?+===+?++==~~~~~~~~~~~~====?7$ZOO8DDNNNNDDMMMMMMMMMMMMMMMMMMMMMNNNMN888888D8
-NNDDND888OOO888OOOOO88DMMMMMMMMMMMMMNDD8DOOOD87I?I?+=~~~~~~=~~~~~===+I$ZOO8DNNMNNNNMMMMMMMMNMMMMMMMMMMMMMMMNMNMNDOOZOZO8
-NDND888O8888DO888DDDDMMMMMMMMMMMMMMNND88D8DD8888DDD8O7III?++=+==++I$$Z88ODMMNNNMMMMNNMNDNNNNMMMMMMMMMNMMMMMMMNNMMOOOZZ88
-NDDD8D8O8DDDD88888D8MMMMMMMMMMMMMMNDDDDDNNNDD8D8888OOOOOOOOO8OO8OZO8OODMD8NMMMMMMMMNNN8NNNNNMMMMMMMMMMMMMMMMMMMNMDDNDNDD
-NNDDDDDD8888OOZOOZZZMMMMMMMMMMMMMNDNDNNDMMD8DD8O8OO8D888888D888888ODMMNDNMNMMMMMMNNNN8NMNNNNMMMMMMMMMMMMMMMMMMMMNNDDDDD8
-MMNDDD888888O8OOOZ$$MMMMMMMMMMMMMNDDNNNDMMDDDNDD8OOO88888D8DDD8DD8DNNNNMMMMMMMMMNNNMD8NMDNNNMMNNDNNNMMMMMMMMMMMMNM8O88D8
-MMMNNNDDD8888888DDDDMMMMMMMMMMMMMNNNMNDNMNNMNMD8D88DDD88DND8NNNDDNDNMMMMMMMMMMMMNNNNDNNDDNN8OODNDDNDNNMMNMMMMNNNMMNOOO88
-MMMNNNNNNDNDDDDDD8DDMMMMMMMMMMMMMNNMMNMMMNMMMNDDDD8DD88NNMNMD8NNDNMMMMMMMMMMMMNNNMNNNMNND88O888NNNNNDNNMMMMMMMNMNNMDOZZZ
-MMMMMNNNNNNNNDDDDDDDMMMMMMMMMMMMMMMMMMMMNMMMMMNNNNNMNNNNMMMNNMNNMMMMMMMMMMMMMMMMMMMMMMDNND8O8D8N88DNNMMMMMMMNNNMMMMMNNND
-MMMMNNNDDNDNNDDDNNNMMMMMMMMMMMMMMMMMMMMMNMMMMNNNMNNMNNNNMNNNNNMNNMMMMMMMMMMMMMMMMMMMMNNNDDO888O888DNMMMMMMMMNNNNNMNMMMNN
-MMMNDD8D8888OOOO8DNNMMMMMMMMMMMMMMMMMMMMMMMMMMMMNMNMMMMMNNNMNNNMMMMNMMMMMMMMMMMMMMMMNDND888888DNDNMMMNMMMMMMMNNNNNNMMD88
-MMD8888OOOO88OO88DNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNNNNNNMMMMMMMMMMMMMMMMMMMMMMNDDDDD8ODDDNMMMMMMMMMMMMMNNNDNMMMMN88
-MD8D888888OOOOOO8NMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNNNMMMMMMMMMMMMMMMMMMMMMMNNNDNND888DMMMNMMMMMMMMMMMMNNNNNNNNMDO
-88DDD88888OOO888MMNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNMNNMMMMMMMMMMMMMMMMMMMMNMNNNNDDNNDNNNMMNMMMMMMMMMMMMMMNNNNNMNNMN8
-DDDDDDDDDD888DDNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNMMMMMMMMMMMMMMMMMMMMMMMNNNNDNNNNNMMMMMMMMMMMMMMMMMMMNNNNNNNMMNN
-NMMMMMMNNNNNNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNMMMMMMMMMMMMMNMMMMMMMMMMMMNNNNMMMNNNN
-MMMNNMNNNNNNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNNNMMNMMMMMMMMMMMMMMMMMMMMMMMNNNMMMMMMN
-NMMMMMNNNNMMMMMMMMMMMMMMMNNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNNMNNMMMMMMMMMMMMMMMMMMMMMMMMNNNNNNMMMN
-NMMMNNMMMMMMMMMMMMMMMMMMMNNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNMNNNMNNNMMMNNNM
-NNMMMMMMMMMMMMMMMMMMMMNNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNMMMMNMMMMMMMMMMMMMMMNNMMNNMMMNNNN
-NMMMMMMMMMMMMMMMMMMMMMMMNNNMMMMMMMMMMMMMMMMMMMMMMMMMMNNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNMMMMMNMMMMMMNNN
-NMMMMMMMMMMMMMMMMNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNNMMMNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNMMMMMMMMMMMMNMMNMMMMNN
-NMMNNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNNNMMMMMMMMMMMMMMMNNMNN
-NMMMNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNNMMMMMMMMMMMMMMMMMMMNN
-NMMMMMMMMMMMMMMNNMMMNDDDNMMMMMMMMNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNNMMNMNNMNM
-MMMMMMMMMMMMMNNND88NMMMMNDDMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNNNNNNNMMMMNN
-NMMMMMMMMMMNNNNNDDMMDDDNNNNNNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNNMMMMMMMMMNMMNNNMNNNNNNNNN
-MMMMMMMMMMMMMMNNNMNODNND88NODD8DMNMND8OODDNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNNNNNNNNNMNNN
-NMMMMMMMMMMMMMDDNDOOMMND8N8DDODMN8O$III77$Z8DMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNNNNMNNNNNNMM
-NMMMMMMMMMMMMN8NDNNNNDONMNNO8MDZ8IIIIIII77$$$7ZODNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNNMNNMNNN
-MMMMMMMMMMMMMNMDDMNMODMM8DNMMNOD$777IIII777777$$$$77$DMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNNNNNMMNNMNN
-NMMMMMMMMMMMMNDNMNN8MMMNMNMNMD88$$777777777777777$$77$$8NMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNNNNNMMMNNNNN
-NMMMMMMMMMMMMMMMMMDNNMMNMDMNMNNDZ$$$$$$$$7777777777$$$$$ZZZZNMMMMMMNNMMMMMMMMMMMMMMMMMMMMMMMNMMMMMMMMMMMMMMMMNNNMNNNNNNN
-NMMMMMMMMMMMMMMMMNNNMMNNNDMMNNM8ZZZZZ$$Z$$777777$$77$$$$77$$Z8NMMMMMNMMMMMMMMMMMMMMMMMMMMMMNMMNMMMMMMMMNMMMMNNNNNNNNMMNN
-NNNMMMMMMMMMMMMMMMMMMMNMMMMMNNMND8888OOZZ$$$$$$7777777777777$$ZO88MNMNMMMMMMMMNNNDD8O8NNMMNNNMMMNMMMMMMNNMNNMNNNNNNNNNNN
-NMMMMMMMMMMMMMMMMMMMMMMMMMMMMNMMMDDNDD88ZZZ$$$$$7$$$$77$ZZ$7III$8NDNNMN8ZO8O88NMND888NNND8O88NNMMMMMMMMNMMNNNNNNNNNNNNNN
-NNNNMMMMMMMMMMMMMMMMMMMMMMNMMMMMMMMMMNN8ZZZZZ$$$$Z$$$$$ZODD8777$7$D88D8OZZO8DD8O88DND88DNNNNNNNMMMMMMMMMMMNMMNMNNNMMMNNN
-NMNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMD888OOZZZZZ$$ZZZZ$$ZZ8NNOZ$$$$DDDDDNDOODDDDDDDDDDD8DNNDNNNNNMMMMMMMMMMMMMNNNNNNNMMNN
\ No newline at end of file
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/harvester_framework_api/tsrc/data/mmc/HarvesterTest/gif89a_onemeg.gif
Binary file mds_plat/harvester_framework_api/tsrc/data/mmc/HarvesterTest/gif89a_onemeg.gif has changed
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/harvester_framework_api/tsrc/data/mmc/HarvesterTest/ota_bmpiso.ota
Binary file mds_plat/harvester_framework_api/tsrc/data/mmc/HarvesterTest/ota_bmpiso.ota has changed
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/harvester_framework_api/tsrc/data/mmc/HarvesterTest/wbmp_skull.wbmp
Binary file mds_plat/harvester_framework_api/tsrc/data/mmc/HarvesterTest/wbmp_skull.wbmp has changed
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/harvester_framework_api/tsrc/group/bld.inf
--- a/mds_plat/harvester_framework_api/tsrc/group/bld.inf Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,65 +0,0 @@
-/*
-* Copyright (c) 2005-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: Build information file
-*
-*/
-
-PRJ_PLATFORMS
- DEFAULT
-
-PRJ_EXPORTS
-
-PRJ_MMPFILES
-
-PRJ_TESTMMPFILES
-../ComposerPluginTest/group/ComposerPluginTest.mmp
-../HarvesterClientTest/group/HarvesterClientTestScripter.mmp
-../HarvesterDataTest/group/HarvesterDataTest.mmp
-../HarvesterPluginTest/group/HarvesterPluginTest.mmp
-../MonitorPluginTest/group/MonitorPluginTest.mmp
-
-PRJ_TESTEXPORTS
-../conf/ComposerPluginTest.cfg /epoc32/winscw/c/TestFramework/ComposerPluginTest.cfg
-../conf/HarvesterClientTestScripter.cfg /epoc32/winscw/c/TestFramework/HarvesterClientTestScripter.cfg
-../conf/HarvesterDataTest.cfg /epoc32/winscw/c/TestFramework/HarvesterDataTest.cfg
-../conf/HarvesterPluginTest.cfg /epoc32/winscw/c/TestFramework/HarvesterPluginTest.cfg
-../conf/MonitorPluginTest.cfg /epoc32/winscw/c/TestFramework/MonitorPluginTest.cfg
-
-../init/ComposerPluginTest.ini /epoc32/winscw/c/TestFramework/ComposerPluginTest.ini
-../init/HarvesterClientTestScripter.ini /epoc32/winscw/c/TestFramework/HarvesterClientTestScripter.ini
-../init/HarvesterDataTest.ini /epoc32/winscw/c/TestFramework/HarvesterDataTest.ini
-../init/HarvesterPluginTest.ini /epoc32/winscw/c/TestFramework/HarvesterPluginTest.ini
-../init/MonitorPluginTest.ini /epoc32/winscw/c/TestFramework/MonitorPluginTest.ini
-
-../data/mmc/HarvesterTest/bmp_burst.bmp /epoc32/WINSCW/C/Data/bmp_burst.bmp
-../data/mmc/HarvesterTest/G31D.TIF /epoc32/WINSCW/C/Data/G31D.TIF
-../data/mmc/HarvesterTest/G4.TIF /epoc32/WINSCW/C/Data/G4.TIF
-../data/mmc/HarvesterTest/GIF87testimage.gif /epoc32/WINSCW/C/Data/GIF87testimage.gif
-../data/mmc/HarvesterTest/gif89a_onemeg.gif /epoc32/WINSCW/C/Data/gif89a_onemeg.gif
-../data/mmc/HarvesterTest/Liverpool.jpg /epoc32/WINSCW/C/Data/Liverpool.jpg
-../data/mmc/HarvesterTest/MBMtestimage.mbm /epoc32/WINSCW/C/Data/MBMtestimage.mbm
-../data/mmc/HarvesterTest/ota_bmpiso.ota /epoc32/WINSCW/C/Data/ota_bmpiso.ota
-../data/mmc/HarvesterTest/PNGtestimage.png /epoc32/WINSCW/C/Data/PNGtestimage.png
-../data/mmc/HarvesterTest/PSRETRO.WMF /epoc32/WINSCW/C/Data/PSRETRO.WMF
-../data/mmc/HarvesterTest/wbmp_skull.wbmp /epoc32/WINSCW/C/Data/wbmp_skull.wbmp
-../data/mmc/HarvesterTest/Jpg.jpg /epoc32/WINSCW/C/Data/Jpg.jpg
-../data/mmc/HarvesterTest/Animated.gif /epoc32/WINSCW/C/Data/Animated.gif
-../data/mmc/HarvesterTest/Mbm.mbm /epoc32/WINSCW/C/Data/Mbm.mbm
-../data/mmc/HarvesterTest/H263.3gp /epoc32/WINSCW/C/Data/H263.3gp
-../data/mmc/HarvesterTest/MPEG4.mp4 /epoc32/WINSCW/C/Data/MPEG4.mp4
-../data/mmc/HarvesterTest/MPEG4.3gp /epoc32/WINSCW/C/Data/MPEG4.3gp
-../data/mmc/HarvesterTest/Temp1.jpg /epoc32/WINSCW/C/Data/Temp1.jpg
-../data/mmc/HarvesterTest/Temp2.jpg /epoc32/WINSCW/C/Data/Temp2.jpg
-../data/mmc/HarvesterTest/Temp3.jpg /epoc32/WINSCW/C/Data/Temp3.jpg
-../data/mmc/HarvesterTest/00001.mp3 /epoc32/WINSCW/C/Data/00001.mp3
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/location_manager_api/group/bld.inf
--- a/mds_plat/location_manager_api/group/bld.inf Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-/*
-* Copyright (c) 2005-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: Build information file
-*
-*/
-
-#include
-#include "../../../locationmanager/inc/locplatsupport.mmh"
-
-PRJ_PLATFORMS
- DEFAULT
-
-PRJ_EXPORTS
-../inc/rlocationtrail.h MW_LAYER_PLATFORM_EXPORT_PATH(rlocationtrail.h)
-../inc/rlocationmanager.h MW_LAYER_PLATFORM_EXPORT_PATH(rlocationmanager.h)
-../inc/locationtrailpskeys.h MW_LAYER_PLATFORM_EXPORT_PATH(locationtrailpskeys.h)
-../inc/rtracklog.h MW_LAYER_PLATFORM_EXPORT_PATH(rtracklog.h)
-../inc/rlocationobjectmanipulator.h MW_LAYER_PLATFORM_EXPORT_PATH(rlocationobjectmanipulator.h)
-../inc/locationdatatype.h MW_LAYER_PLATFORM_EXPORT_PATH(locationdatatype.h)
-../inc/locationeventdef.h MW_LAYER_PLATFORM_EXPORT_PATH(locationeventdef.h)
-../inc/geotagobserver.h MW_LAYER_PLATFORM_EXPORT_PATH(geotagobserver.h)
-../inc/rlocationgeotagger.h MW_LAYER_PLATFORM_EXPORT_PATH(rlocationgeotagger.h)
-../inc/geotagger.h MW_LAYER_PLATFORM_EXPORT_PATH(geotagger.h)
-../inc/reversegeocoderplugin.h MW_LAYER_PLATFORM_EXPORT_PATH(reversegeocoderplugin.h)
-../inc/reversegeocoderplugin.inl MW_LAYER_PLATFORM_EXPORT_PATH(reversegeocoderplugin.inl)
-
-PRJ_MMPFILES
-
-PRJ_TESTMMPFILES
-
-PRJ_TESTEXPORTS
-
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/location_manager_api/inc/geotagger.h
--- a/mds_plat/location_manager_api/inc/geotagger.h Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,60 +0,0 @@
-/*
-* 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: A class responsible for geotagging of media files in background.
-*
-*/
-
-#ifndef GEOTAGGER_H_
-#define GEOTAGGER_H_
-
-#include
-#include
-#include
-#include
-
-
-/**
- * GeoTagger converts a given cell ID(CGI Info) to geo-coordinates.
- * Does reverse geocoding to get country and city name.
- * Creates country and city tag for image/video files.
- * @since S60 9.2
- */
-
-NONSHARABLE_CLASS(CGeoTagger) : public CBase
- {
-public:
- /**
- * 2-phased constructor.
- */
- IMPORT_C static CGeoTagger* NewL(MGeoTaggerObserver* aObserver, CMdESession* aMdeSession = NULL );
-
-public: //exported API
- /**
- * Harvests location tags.
- * @param aObserver, observer for geotagging.
- * @return None.
- */
- virtual void CreateGeoTagsL( const TConnectionOption = ESilent ) = 0;
-
- /**
- * Is there any untagged photos with location info?.
- * @return None.
- */
- virtual void PendingGeoTagsL( TBool aTagInProgress ) = 0;
- };
-
-#endif // GEOTAGGER_H_
-
-// End of file.
-
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/location_manager_api/inc/geotagobserver.h
--- a/mds_plat/location_manager_api/inc/geotagobserver.h Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,79 +0,0 @@
-/*
-* 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: A class responsible for geotagging of media files in background.
-*
-*/
-
-#ifndef GEOTAGOBSERVER_H_
-#define GEOTAGOBSERVER_H_
-
-#include
-#include
-#include
-
-enum TConnectionOption
- {
- ESilent=0,
- EInteractive
- };
-
-typedef enum
- {
- EGeoTaggingPending = 0x01,
- EGeoTaggingGoingOn,
- EGeoTagCmpt
- }TGeoTaggingSatus;
-
-
-class MGeoTaggerObserver
- {
-public:
- /**
- * This method is used for notifying completion of geotagging
- */
- virtual void GeoTaggingCompleted( const TInt aError ) = 0;
-
- /**
- * This method is used for notifying completion of query for pending geo tags
- */
- virtual void PendingGeoTagReqComplete( const TInt aError ) = 0;
-
- /*
- * Get registrer network country code
- *
- * @return current register n/w info
- */
- virtual RMobilePhone::TMobilePhoneNetworkInfoV2& GetCurrentRegisterNw() = 0;
-
- /*
- * UE is registered to home network?
- *
- * @return ETrue if UE is registered at home network else EFalse
- */
- virtual TBool IsRegisteredAtHomeNetwork() = 0;
-
- /*
- * Get home network country code
- * @param aHomeNwInfoAvailableFlag ETrue if home n/w info available else EFalse
- * @return user home n/w info
- */
- virtual const RMobilePhone::TMobilePhoneNetworkInfoV1&
- GetHomeNetworkInfo(TBool& aHomeNwInfoAvailableFlag) = 0;
-
- };
-
-
-#endif // GEOTAGOBSERVER_H_
-
-// End of file.
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/location_manager_api/inc/locationdatatype.h
--- a/mds_plat/location_manager_api/inc/locationdatatype.h Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-/*
-* 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:
-*
-*/
-#ifndef LOCATIONDATATYPE_H_
-#define LOCATIONDATATYPE_H_
-
-#include
-#include
-
-const TInt KMaxCountryName = 128;
-typedef TBuf TCountryName;
-/*
- * TLocationData encapsulates all location data.
- */
-struct TLocationData
- {
- TPosition iPosition;
- CTelephony::TNetworkInfoV1 iNetworkInfo;
- TCourse iCourse;
- TCountryName iCountry;
- TUint iSatellites;
- TReal32 iQuality;
- };
-
-#endif /*LOCATIONDATATYPE_H_*/
-
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/location_manager_api/inc/locationeventdef.h
--- a/mds_plat/location_manager_api/inc/locationeventdef.h Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-/*
-* Copyright (c) 2006-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: Definition file for Location Manager.
-*
-*/
-
-#ifndef __LOCATIONEVENTDEF_H__
-#define __LOCATIONEVENTDEF_H__
-
-enum TEventTypes
- {
- EStarted = 0,
- EStopped,
- ESignalChanged
- };
-
-#endif // __LOCATIONEVENTDEF_H__
-
-// End of file.
-
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/location_manager_api/inc/locationtrailpskeys.h
--- a/mds_plat/location_manager_api/inc/locationtrailpskeys.h Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +0,0 @@
-/*
-* Copyright (c) 2006-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: Definition file for Location Trail PS keys.
-*
-*/
-
-#ifndef __LOCATIONTRAILPSKEYS_H__
-#define __LOCATIONTRAILPSKEYS_H__
-
-const TUid KPSUidLocationTrail = { 0x200071BE };
-
-/**
- * Used by location trail, indicating location trail state changes.
- *
- * Possible values:
- * 0: Location trail stopped.
- * 1: Location trail started, waiting for valid GPS data.
- * 2: Location trail started, searching GPS device.
- * 3: Location trail started.
- */
-const TUint32 KLocationTrailState = 0x00000001;
-
-
-#endif // __LOCATIONTRAILPSKEYS_H__
-
-// End of file.
-
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/location_manager_api/inc/reversegeocoderplugin.h
--- a/mds_plat/location_manager_api/inc/reversegeocoderplugin.h Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,209 +0,0 @@
-/*
-* 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: The header file for ReverseGeoCoderPlugin that creates the ReverseGeocoder
-*
-*/
-
-
-#ifndef __REVERSEGEOCODERPLUGIN_H__
-#define __REVERSEGEOCODERPLUGIN_H__
-
-// INCLUDES
-
-#include
-#include
-#include
-#include
-#include
-
-const TUid KReversegeocodeInterfaceUid = {0x2002DD13};
-
-
-/*
- * Data class to get the address details. An handle to this type will be given to the
- * user through MReverseGeocodeObserver::ReverseGeocodeComplete callback, through which
- * user can retrieve the address details using the following interfaces.
- *
- **/
-class MAddressInfo
- {
- public:
- /*
- * Gets the reference to the country name. Scope of this returned reference is limited to
- * this perticular call. User has to store it for their further processing.
- *
- * @return reference to the String which holds the Country Name.
- */
- virtual TDesC& GetCountryName()= 0;
-
- /*
- * Gets the reference to the State. Scope of this returned reference is limited to
- * this perticular call. User has to store it for their further processing.
- *
- * @return reference to the String which holds the State name.
- */
- virtual TDesC& GetState()= 0;
-
- /*
- * Gets the reference to the City. Scope of this returned reference is limited to
- * this perticular call. User has to store it for their further processing.
- *
- * @return reference to the String which holds the City Name.
- */
- virtual TDesC& GetCity()= 0;
-
- /*
- * Gets the reference to the District name. Scope of this returned reference is limited to
- * this perticular call. User has to store it for their further processing.
- *
- * @return reference to the String which holds the District Name.
- */
- virtual TDesC& GetDistrict()= 0;
-
- /*
- * Gets the reference to the postal code. Scope of this returned reference is limited to
- * this perticular call. User has to store it for their further processing.
- *
- * @return reference to the String which holds the postal code.
- */
- virtual TDesC& GetPincode()= 0;
-
- /*
- * Gets the reference to the thoroughfare name. Scope of this returned reference is limited to
- * this perticular call. User has to store it for their further processing.
- *
- * @return reference to the String which holds the thoroughfare name.
- */
- virtual TDesC& GetThoroughfareName()= 0;
-
- /*
- * Gets the reference to the thoroughfare number. Scope of this returned reference is limited to
- * this perticular call. User has to store it for their further processing.
- *
- * @return reference to the String which holds the thoroughfare number.
- */
- virtual TDesC& GetThoroughfareNumber() = 0;
- };
-/*
- * Observer class which exposes callbacks to notify the completion of reversegeocoding event.
- *
- **/
-class MReverseGeocodeObserver
- {
- public:
- /*
- * Callback function which notifys the completion of reverse geocode event. This signals the completion
- * of the asynchronous function CReverseGeoCode::GetAddressByCoordinate.
- *
- * @param aErrorcode Error status KErrNone in case of success or other system specific errorcodes
- * in case of failures.
- *
- * @param aAddressInfo refrence to the address stucture, through which user can access the
- * address information.
- */
-
- virtual void ReverseGeocodeComplete( TInt& aErrorcode, MAddressInfo& aAddressInfo ) =0;
-
- /*
- * Get registrer network country code
- *
- * @return current register n/w info
- */
- virtual RMobilePhone::TMobilePhoneNetworkInfoV2& GetCurrentRegisterNw() = 0;
-
-
- /*
- * UE is registered to home network?
- *
- * @return ETrue if UE is registered at home network else EFalse
- */
- virtual TBool IsRegisteredAtHomeNetwork() = 0;
-
- /*
- * Get home network country code
- * @param aHomeNwInfoAvailableFlag ETrue if home n/w info available else EFalse
- * @return user home n/w info
- */
- virtual const RMobilePhone::TMobilePhoneNetworkInfoV1&
- GetHomeNetworkInfo(TBool& aHomeNwInfoAvailableFlag) = 0;
- };
-
-
-/**
- * CReverseGeoCoderPlugin
- *
- * An implementation of the CReverseGeoCoderPlugin definition.
- * Encapsulates the reverse goecoding functionality
- * This is concrete class, instance of which
- * ECOM framework gives to ECOM clients.
- */
-class CReverseGeoCoderPlugin : public CBase
- {
-public:
-
- /**
- * Create instance of concrete implementation.
- * @return: Instance of this class.
- */
- static CReverseGeoCoderPlugin* NewL();
-
-
- /**
- * Destructor.
- */
- virtual ~CReverseGeoCoderPlugin();
-
-
-public:
-
- /**
- * Creates the instance of Reverse Geocoder
- *
- */
- virtual void CreateReverseGeoCoderL() = 0;
-
- /**
- * Initializes the ReverseGeoCodeObserver
- * @param: aObserver The observer class instance that is to be notified when reverse geocoding completes
- *
- */
- virtual void AddObserverL(MReverseGeocodeObserver& aObserver)=0;
-
- /**
- * A wrapper API to fetch the address from geocoordinates
- * Internally calls the ReverseGeoCoder
- * @param aLocality A TLocality object that contains the geocoordinate information
- * @param aOption Indicates if the connection is silent connection or not
- *
- */
- virtual void GetAddressByCoordinateL( TLocality aLocality,const TConnectionOption aOption )=0;
-
- /**
- * Wrapper API to check if the ReverseGeoCoder allows a silent connection
- * @return:TBool Indicates if a silent connection is allowed
- *
- */
- virtual TBool SilentConnectionAllowed() = 0;
-
-private:
-
- TUid iDtorKey;
-
- };
-#include "reversegeocoderplugin.inl"
-
-#endif //__REVERSEGEOCODERPLUGIN_H__
-
-//End of file
-
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/location_manager_api/inc/reversegeocoderplugin.inl
--- a/mds_plat/location_manager_api/inc/reversegeocoderplugin.inl Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,66 +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 is partial interface implementation which is
-* used by plugins.
-*
-*/
-
-
-
-// INCLUDE FILES
-
-#include // declares E-com framework classes
-
-
-// -----------------------------------------------------------------------------
-// CReverseGeoCoderPlugin::~CReverseGeoCoderPlugin()
-// Destroys the plugin implementation
-// -----------------------------------------------------------------------------
-//
-inline CReverseGeoCoderPlugin::~CReverseGeoCoderPlugin()
-{
- REComSession::DestroyedImplementation( iDtorKey );
-}
-
-
-// -----------------------------------------------------------------------------
-// CReverseGeoCoderPlugin::NewL()
-// Creates the instance of CReverseGeoCoderPlugin concrete implementation.
-// -----------------------------------------------------------------------------
-//
-inline CReverseGeoCoderPlugin* CReverseGeoCoderPlugin::NewL()
-{
- RImplInfoPtrArray aImplInfoArray;
- REComSession::ListImplementationsL(KReversegeocodeInterfaceUid, aImplInfoArray);
-
- TInt count = aImplInfoArray.Count();
-
- if(!count)
- {
- /* No implementations found for the reverse geocoding functionality */
- User::Leave(KErrNotFound);
- }
-
- /* One or more implementations found. Choose the first one */
- const CImplementationInformation* plugin = aImplInfoArray[0];
- TUid pluginId = plugin->ImplementationUid();
-
- CReverseGeoCoderPlugin* self = reinterpret_cast(
- REComSession::CreateImplementationL(
- pluginId, _FOFF( CReverseGeoCoderPlugin,iDtorKey ) ) );
-
- return self;
-}
-
-// End of file
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/location_manager_api/inc/rlocationgeotagger.h
--- a/mds_plat/location_manager_api/inc/rlocationgeotagger.h Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,81 +0,0 @@
-/*
-* Copyright (c) 2006-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: An interface to Location Trail.
-*
-*/
-
-#ifndef R_RLOCATIONGEOTAGGER_H
-#define R_RLOCATIONGEOTAGGER_H
-
-#include
-#include
-#include
-#include
-#include
-#include
-
-
-/**
- * RLocationManager class is used for creating a Location Manager session.
- * Location Manager is used to start and stop the location trail, retrieve
- * location information and write the location information to images.
- *
- * @lib LocationManager.lib
- * @since S60 9.2
- */
-NONSHARABLE_CLASS( RLocationGeoTagger ) : public RLocationManager
- {
-public:
-
-public:
- IMPORT_C RLocationGeoTagger();
-
- IMPORT_C ~RLocationGeoTagger();
-
-
- /**
- * Is there any geo tag pending state. (Asynchronous call)
- * @param aStatus - request status.
- * @param aTagPendingFlag - tag pending flag (ETrue if few entry is yet to be tagged else EFalse)
- * @return None
- */
- IMPORT_C void GeoTagStaus( TRequestStatus& aStatus,
- TGeoTaggingSatus& aTagPendingFlag );
-
- /**
- * Cancel tag pending request
- * @return None
- */
- IMPORT_C void CancelTagPendingRequest();
-
- /**
- * Cancel geo tagging request
- * @return None
- */
- IMPORT_C void CancelGeoTaggingRequest();
-
- /**
- * Start geo tagging.
- * @param aConnectionOption - connection option (ESilent/EInteractive).
- * @return None
- */
- IMPORT_C void StartGeoTagging(TRequestStatus& aStatus, const TConnectionOption aConnectionOption );
-
-private:
- TPckg *iTagPendingData;
- };
-
-#endif // R_RLOCATIONGEOTAGGER_H
-
-//End of File
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/location_manager_api/inc/rlocationmanager.h
--- a/mds_plat/location_manager_api/inc/rlocationmanager.h Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,72 +0,0 @@
-/*
-* Copyright (c) 2006-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: An interface to Location Manager
-*
-*/
-
-#ifndef R_RLOCATIONMANAGER_H
-#define R_RLOCATIONMANAGER_H
-
-#include
-#include
-#include
-
-/**
- * Base class for Location Manager client interfaces.
- * @lib LocationManager.lib
- * @since S60 3.1
- */
-NONSHARABLE_CLASS( RLocationManager ) : public RSessionBase
- {
-public:
-
- /**
- * C++ default constructor.
- * @since S60 3.1
- */
- IMPORT_C RLocationManager();
-
- /**
- * Creates new session to Location Manager Server.
- * @since S60 3.1
- * @param None.
- * @return KErrNone if successful.
- */
- IMPORT_C TInt Connect();
-
- /**
- * Closes the connection with Location Manager Server
- * @since S60 3.1
- * @param None.
- */
- IMPORT_C void Close();
-
-private:
- /**
- * Returns the version of Location Manager.
- */
- TVersion Version() const;
-
-protected:
- /**
- * Completes an asynchronous request with an error code.
- * @param aError Symbian error code
- */
- void CompleteRequest(TRequestStatus& aStatus, TInt aError);
-
- };
-
-#endif // R_RLOCATIONMANAGER_H
-
-//End of File
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/location_manager_api/inc/rlocationobjectmanipulator.h
--- a/mds_plat/location_manager_api/inc/rlocationobjectmanipulator.h Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,106 +0,0 @@
-/*
-* Copyright (c) 2006-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: An interface to Location Object Manipulator.
-*
-*/
-
-#ifndef R_RLOCATIONOBJECTMANIPULATOR_H
-#define R_RLOCATIONOBJECTMANIPULATOR_H
-
-#include
-#include
-#include
-#include
-
-#include "mdccommon.h"
-
-/**
- * RLocationObjectManipulator class is used to create, edit, copy and delete
- * location context objects and tags and relationships between them
- * and media items in the MdE database.
- *
- * @lib LocationManager.lib
- * @since S60 3.2
- */
-NONSHARABLE_CLASS( RLocationObjectManipulator ) : public RLocationManager
- {
-
-public:
- /**
- * Creates a new location object in MdE database with given
- * location data. Relationship is created between the location
- * object and objects whose ID is given in the ID array.
- * @since S60 3.2
- * @param aLocationData, Location data consist info for GPS
- * and network data
- * @param aObjectId, Create relationships with location data and
- * given media object ID
- * @return KErrNone if successful, otherwise one of the other
- * system-wide error codes.
- */
- IMPORT_C TInt CreateLocationObject( TLocationData& aLocationData,
- TItemId aObjectId );
-
- /**
- * Creates a new location object in MdE database.
- * Relationship is created between the location objects whose ID is given.
- * Location data is taken from location trail.
- * @since S60 3.2
- * @param aObjectId, Create relationships with location data and
- * given media object ID
- * @return KErrNone if successful, otherwise one of the other
- * system-wide error codes.
- */
- IMPORT_C TInt LocationSnapshot( TItemId aObjectId );
-
- /**
- * Deletes the relationship between an object and
- * the location context object associated with it.
- * @since S60 3.2
- * @param aObjId, Remove relationship from given media object ID
- * @return KErrNone if successful, otherwise one of the other
- * system-wide error codes.
- */
- IMPORT_C TInt RemoveLocationObject( TItemId aObjId );
-
- /**
- * Copies location data of a media object to one or more
- * media objects. If the target media object doesn’t have
- * a location object associated to it, one will be created.
- * @since S60 3.2
- * @param aSourceId, source media object ID
- * @param aTargetIds, target media object ID
- * @param aStatus Asynchronous request status
- */
- IMPORT_C void CopyLocationData (TItemId aSourceId,
- RArray& aTargetIds,
- TRequestStatus& aStatus);
- /**
- * Copies location data of a media object to one or more
- * media objects. If the target media object doesn’t have
- * a location object associated to it, one will be created.
- * @since S60 3.2
- * @param aSourceURI, source media object URI
- * @param aTargetURIs, target media object URI
- * @param aStatus Asynchronous request status
- */
- IMPORT_C void CopyLocationData (TDesC& aSourceURI,
- RPointerArray& aTargetURIs,
- TRequestStatus& aStatus);
- };
-
-
-#endif // R_RLOCATIONOBJECTMANIPULATOR_H
-
-//End of File
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/location_manager_api/inc/rlocationtrail.h
--- a/mds_plat/location_manager_api/inc/rlocationtrail.h Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,158 +0,0 @@
-/*
-* Copyright (c) 2006-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: An interface to Location Trail.
-*
-*/
-
-#ifndef R_RLOCATIONTRAIL_H
-#define R_RLOCATIONTRAIL_H
-
-#include
-#include
-#include
-#include
-#include
-
-typedef TPckg TLocalityPckg;
-
-/**
- * RLocationManager class is used for creating a Location Manager session.
- * Location Manager is used to start and stop the location trail, retrieve
- * location information and write the location information to images.
- *
- * @lib LocationManager.lib
- * @since S60 3.1
- */
-NONSHARABLE_CLASS( RLocationTrail ) : public RLocationManager
- {
-public:
- /**
- * Location trail states.
- */
- enum TTrailState
- {
- ETrailStopped,
- EWaitingGPSData,
- ESearchingGPS,
- ETrailStarted,
- ETrailStopping,
- ETrailStarting
- };
- enum TTrailCaptureSetting
- {
- EOff,
- ECaptureNetworkInfo,
- ECaptureAll
- };
-
-public:
- IMPORT_C RLocationTrail();
-
- IMPORT_C ~RLocationTrail();
-
- /**
- * Starts recording location information to location trail.
- * @since S60 3.2
- * @param aState, an enumeration of ECaptureNetworkInfo
- * (only cell ID stored) and ECaptureAll
- * (GPS coordinates and cell ID stored).
- * @return KErrNone if successful, otherwise one of the other
- * system-wide error codes.
- */
- IMPORT_C TInt StartLocationTrail(TTrailCaptureSetting aState);
-
- /**
- * Stops recording location information to location trail.
- * @since S60 3.1
- * @param None.
- * @return KErrNone if successful, otherwise one of the other
- * system-wide error codes.
- */
- IMPORT_C TInt StopLocationTrail();
-
- /**
- * Retuns the current state of the location trail.
- * @since S60 3.1
- * @param aState, The state of the trail is returned.
- * @return KErrNone if successful, otherwise one of the other
- * system-wide error codes.
- */
- IMPORT_C TInt GetLocationTrailState( TTrailState& aState );
-
- /**
- * Get notification when the location trail state changes.
- * @since S60 3.1
- * @param aStatus, The request status.
- * @return None.
- */
- IMPORT_C void NotifyLocationTrailStateChange( TRequestStatus& aStatus );
-
- /**
- * Cancel notification request for the location trail state change.
- * @since S60 3.1
- * @param None.
- * @return None.
- */
- IMPORT_C void CancelNotificationRequest();
-
- /**
- * Get location by time stamp. If the TLocality for given time stamp is
- * found from the trail, it is returned even if the data in it wouldn't
- * be valid.
- * @since S60 3.1
- * @param aTimeStamp, Time stamp to get corresponding location.
- * @param aPosition, Position value returned.
- * @param aNetworkInfo, Network value returned.
- * @param aState, State of the trail at given time.
- * @return KErrNone if successful, otherwise one of the other
- * system-wide error codes.
- */
- IMPORT_C TInt RetrieveLocation( const TTime& aTimeStamp,
- TLocationData& aLocationData,
- TTrailState& aState );
-
- /**
- * Retrieve current location. If request is completed successfully, the
- * result is returned via the aLocationInfo and aNetworkInfo arguments.
- * The function is asynchronous, because it may take
- * several minutes to get location information.
- * @since S60 3.2
- * @param aStatus, The request status.
- * @param aLocationData, locationData encapsulates all location data
- * @return None.
- */
- IMPORT_C void CurrentLocation( TRequestStatus& aStatus,
- TLocationData& aLocationData);
-
- /**
- * Cancel asynchronous location request.
- * @since S60 3.1
- * @param None.
- * @return None.
- */
- IMPORT_C void CancelLocationRequest();
-
- /**
- * Get current trail capture setting.
- * @return EOff, ECaptureNetworkInfo or ECaptureAll
- */
- IMPORT_C TInt GetTrailCaptureSetting( TTrailCaptureSetting& aCaptureSetting );
-
-private:
- TPckg* iCurrentLocData;
- };
-
-#endif // R_RLOCATIONTRAIL_H
-
-//End of File
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/location_manager_api/inc/rtracklog.h
--- a/mds_plat/location_manager_api/inc/rtracklog.h Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,199 +0,0 @@
-/*
-* Copyright (c) 2006-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: An interface to Track Log.
-*
-*/
-
-#ifndef RTRACKLOG_H_
-#define RTRACKLOG_H_
-
-#include
-#include
-#include
-
-// forward declaration
-class MTrackLogObserver;
-class CTrackLogObserverAO;
-
-/*
- * TrackLog API is used to start, stop and delete track-logs,
- * to get track-log status and to get track-log in GPX format.
- *
- * @lib LocationManager.lib
- * @since S60 3.2
- */
-NONSHARABLE_CLASS( RTrackLog ) : public RLocationManager
-{
-
-public:
- IMPORT_C RTrackLog();
-
- /**
- * Starts track-log recording. Also starts location trail recording
- * if it is not already running.
- * @since S60 3.2
- * @param None.
- * @return KErrNone if successful, otherwise one of the other
- * system-wide error codes.
- */
- IMPORT_C TInt StartTrackLog();
-
- /**
- * Stops track-log recording.
- * @since S60 3.2
- * @param None.
- * @return None.
- */
- IMPORT_C void StopTrackLog();
-
- /**
- * Gets the status of track-log recording and GPS signal quality.
- * @since S60 3.2
- * @param aRecording, indicating track log recording status
- * @param aFixQuality, GPS signal quality
- * @return KErrNone if successful, otherwise one of the other
- * system-wide error codes.
- */
- IMPORT_C TInt GetStatus(TBool& aRecording, TPositionSatelliteInfo& aFixQuality);
-
- /**
- * Deletes a track-log file
- * @since S60 3.2
- * @param aUri, Track log URI
- * @return KErrNone if successful, otherwise one of the other
- * system-wide error codes.
- */
- IMPORT_C TInt DeleteTrackLog(TDesC& aUri);
-
- /**
- * Returns a boolean indicating track-log recording status.
- * @since S60 3.2
- * @param None.
- * @return KErrNone if successful, otherwise one of the other
- * system-wide error codes.
- */
- IMPORT_C TBool IsRecording();
-
- /**
- * Registers a new track-log observer.
- * @since S60 3.2
- * @param aObserver, observer which is added.
- * @return KErrNone if successful, otherwise one of the other
- * system-wide error codes.
- */
- IMPORT_C TInt AddObserver(MTrackLogObserver* aObserver );
-
- /**
- * Removes a registered track-log observer.
- * @since S60 3.2
- * @param aObserver, observer which is removed.
- * @return KErrNone if successful, otherwise one of the other
- * system-wide error codes.
- */
- IMPORT_C TInt RemoveObserver(MTrackLogObserver* aObserver);
-
- /**
- * Returns the name of the current track-log file.
- * @since S60 3.2
- * @param aTrackLogName, track log file name
- * @return KErrNone if successful, otherwise one of the other
- * system-wide error codes.
- */
- IMPORT_C TInt TrackLogName(TDes& aTrackLogName);
-
- /**
- * Overrides inherited class close.
- * Close observers array and calls main class close.
- * @since S60 3.2
- * @param None.
- * @return None.
- */
- IMPORT_C void Close();
-
-public:
-
- /**
- * @param aStatus, the request status of the active object
- * @return None.
- */
- void SendNotifyRequest( TRequestStatus& aStatus );
-
- /**
- * Notifies of an event in tracklog. The event can be of type EStarted/EStopped/ESignalChanged.
- * @param aError error code
- * @return None.
- */
- void TrackLogEvent( TInt aError );
-
-
-private:
- /**
- * Array of observers
- */
- RPointerArray iObservers;
-
- TBool iSubscribed;
- /**
- * An active object that observes tracklog events (starting/stopping/GPS fix quality changes).
- */
- CTrackLogObserverAO* iTrackLogObserverAO;
-
- TPositionSatelliteInfo iFixQuality;
- TBool iRecording;
- TEventTypes iEventType;
- TPckg iWrapQuality;
- TPckg iWrapRec;
- TPckg iWrapEventType;
-};
-
-/**
- * Track log Observer interface class for receiving track-log events.
- */
-class MTrackLogObserver
-{
-
-public:
- /**
- * Called to notify the observer that the
- * Track-log recording has started.
- *
- * @param aError, KErrNone if successful, otherwise one of the other
- * system-wide error codes.
- * @return None.
- */
- virtual void TrackLogStarted(TInt aError) = 0;
-
- /**
- * Called to notify the observer that the
- * Track-log recording was stopped.
- *
- * @param aError, KErrNone if successful, otherwise one of the other
- * system-wide error codes.
- * @return None.
- */
- virtual void TrackLogStopped(TInt aError) = 0;
-
- /**
- * Called to notify the observer that the
- * GPS fix quality has changed.
- *
- * @param aFixQuality, GPS signal quality
- * @param aTrackingActive, Is Tracking active
- * @return None.
- */
- virtual void GPSFixQualityChanged(TPositionSatelliteInfo& aFixQuality, TBool& aTrackingActive) = 0;
-
-private:
-};
-#endif /*RTRACKLOG_H_*/
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/location_manager_api/location_manager_api.metaxml
--- a/mds_plat/location_manager_api/location_manager_api.metaxml Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
-
-
-location_manager_api
-location manager api
-c++
-locationmanager
-
-
-
-
-no
-no
-
-
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/location_manager_api/tsrc/Bmarm/LocationManagerTestScripteru.def
--- a/mds_plat/location_manager_api/tsrc/Bmarm/LocationManagerTestScripteru.def Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-EXPORTS
- LibEntryL__FR13CTestModuleIf @ 1 NONAME R3UNUSED ; LibEntryL(CTestModuleIf &)
-
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/location_manager_api/tsrc/Bwins/LocationManagerTestScripteru.def
--- a/mds_plat/location_manager_api/tsrc/Bwins/LocationManagerTestScripteru.def Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-EXPORTS
- ?LibEntryL@@YAPAVCScriptBase@@AAVCTestModuleIf@@@Z @ 1 NONAME ; class CScriptBase * __cdecl LibEntryL(class CTestModuleIf &)
-
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/location_manager_api/tsrc/conf/LocationManagerTestScripter.cfg
--- a/mds_plat/location_manager_api/tsrc/conf/LocationManagerTestScripter.cfg Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,272 +0,0 @@
-#
-# Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "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: Location Manager API tests
-#
-
-// ---------------------------------------------------------------------------
-// Location Manager API test cases
-// ---------------------------------------------------------------------------
-
-// These should be run in sequential mode if several cases are run at the same
-// time!
-
-[StifSettings]
-TestThreadStackSize= 32768
-TestThreadMinHeap= 4096
-TestThreadMaxHeap= 16777216
-[EndStifSettings]
-
-[Test]
-title Location Manager Connect Disconnect
-timeout 60000
-create LocationManagerTestScripter test
-test Connect
-test Close
-delete test
-[Endtest]
-
-[Test]
-title Location Trail Connect Disconnect
-timeout 60000
-create LocationManagerTestScripter test
-test TrailConnect
-test TrailClose
-delete test
-[Endtest]
-
-[Test]
-title Start-Stop Location Trail
-timeout 60000
-create LocationManagerTestScripter test
-test TrailConnect
-test StartTrailTests
-test TrailClose
-delete test
-[Endtest]
-
-[Test]
-title Get Location Trail State
-timeout 60000
-create LocationManagerTestScripter test
-test TrailConnect
-test StartTrail
-test GetTrailState
-test StopTrail
-test TrailClose
-delete test
-[Endtest]
-
-[Test]
-title Location Trail Notification Basic Test
-timeout 60000
-create LocationManagerTestScripter test
-test TrailConnect
-test StartTrail
-test LocationTrailNotifyTest
-test StopTrail
-test TrailClose
-delete test
-[Endtest]
-
-[Test]
-title Retrieve Location Basic Test
-timeout 60000
-create LocationManagerTestScripter test
-test TrailConnect
-test StartTrail
-test RetrieveLocation
-test StopTrail
-test TrailClose
-delete test
-[Endtest]
-
-[Test]
-title Current Location Basic Test
-timeout 60000
-create LocationManagerTestScripter test
-test TrailConnect
-test StartTrail
-test CurrentLocation
-test StopTrail
-test TrailClose
-delete test
-[Endtest]
-
-[Test]
-title Create Location Object Manipulator
-timeout 60000
-create LocationManagerTestScripter test
-request Session
-test PrepareSession
-wait Session
-test TearDownOM
-delete test
-[Endtest]
-
-[Test]
-title Create Location Object
-timeout 60000
-create LocationManagerTestScripter test
-request Session
-test PrepareSession
-wait Session
-test SetupOM
-test TearDownOM
-delete test
-[Endtest]
-
-[Test]
-title Location Snapshot
-timeout 60000
-create LocationManagerTestScripter test
-request Session
-test PrepareSession
-wait Session
-test SetupOM
-test TearDownOM
-delete test
-[Endtest]
-
-[Test]
-title Remove Location Object
-timeout 60000
-create LocationManagerTestScripter test
-request Session
-test PrepareSession
-wait Session
-test SetupOM
-test TearDownOM
-delete test
-[Endtest]
-
-[Test]
-title Copy By ID
-timeout 60000
-create LocationManagerTestScripter test
-request Session
-test PrepareSession
-wait Session
-test SetupOM
-test CopyByID
-test CloseOM
-test CopyByIDDisco
-test TearDownOM
-delete test
-[Endtest]
-
-[Test]
-title Copy By URI
-timeout 60000
-create LocationManagerTestScripter test
-request Session
-test PrepareSession
-wait Session
-test SetupOM
-test CopyByURI
-test CloseOM
-test CopyByURIDisco
-test TearDownOM
-delete test
-[Endtest]
-
-[Test]
-title Tracklog Connect Disconnect
-timeout 60000
-create LocationManagerTestScripter test
-test SetupTrackLog
-test TearDownTrackLog
-delete test
-[Endtest]
-
-[Test]
-title Start Stop Tracklog Recording
-timeout 80000
-create LocationManagerTestScripter test
-test SetupTrackLog
-test AddObserver
-request Recording
-test StartTrackLog
-wait Recording
-test Recording
-request StopRecording
-test StopTrackLog
-wait StopRecording
-test NotRecording
-test RemoveObserver
-test TearDownTrackLog
-delete test
-[Endtest]
-
-[Test]
-title Tracklog Observer test
-timeout 60000
-create LocationManagerTestScripter test
-test SetupTrackLog
-test AddObserver
-test AddObserver
-test AddObserver
-test RemoveObserver
-test RemoveObserver
-test TearDownTrackLog
-delete test
-[Endtest]
-
-[Test]
-title Start Stop Tracklog Recording 2
-timeout 240000
-create LocationManagerTestScripter test
-test SetupTrackLog
-test AddObserver
-request Recording
-test StartTrackLog
-wait Recording
-test Recording
-test GetFile
-test GetStatus
-request StopRecording
-test StopTrackLog
-wait StopRecording
-test NotRecording
-test DeleteFile
-test GetStatus2
-test RemoveObserver
-test TearDownTrackLog
-delete test
-[Endtest]
-
-[Test]
-title Tracklog Crash Test
-timeout 60000
-create LocationManagerTestScripter test
-test SetupTrackLog
-test AddObserver
-request Recording
-test StartTrackLog
-wait Recording
-test CrashLocationManager
-test RemoveObserver
-test TearDownTrackLog
-delete test
-create LocationManagerTestScripter test2
-test2 SetupTrackLog
-test2 AddObserver
-request Recording
-test2 StartTrackLog
-wait Recording
-test2 StopTrackLog
-test2 RemoveObserver
-test2 TearDownTrackLog
-delete test2
-[Endtest]
-
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/location_manager_api/tsrc/conf/LocationManagerTestScripter_reverse_geocode.cfg
--- a/mds_plat/location_manager_api/tsrc/conf/LocationManagerTestScripter_reverse_geocode.cfg Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,345 +0,0 @@
-#
-# Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "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: Location Manager API tests
-#
-
-// ---------------------------------------------------------------------------
-// Location Manager API test cases
-// ---------------------------------------------------------------------------
-
-// These should be run in sequential mode if several cases are run at the same
-// time!
-
-[StifSettings]
-TestThreadStackSize= 32768
-TestThreadMinHeap= 4096
-TestThreadMaxHeap= 16777216
-[EndStifSettings]
-
-[Test]
-title Location Manager Connect Disconnect
-timeout 60000
-create LocationManagerTestScripter test
-test Connect
-test Close
-delete test
-[Endtest]
-
-[Test]
-title Location Trail Connect Disconnect
-timeout 60000
-create LocationManagerTestScripter test
-test TrailConnect
-test TrailClose
-delete test
-[Endtest]
-
-[Test]
-title Start-Stop Location Trail
-timeout 60000
-create LocationManagerTestScripter test
-test TrailConnect
-test StartTrailTests
-test TrailClose
-delete test
-[Endtest]
-
-[Test]
-title Get Location Trail State
-timeout 60000
-create LocationManagerTestScripter test
-test TrailConnect
-test StartTrail
-test GetTrailState
-test StopTrail
-test TrailClose
-delete test
-[Endtest]
-
-[Test]
-title Location Trail Notification Basic Test
-timeout 60000
-create LocationManagerTestScripter test
-test TrailConnect
-test StartTrail
-test LocationTrailNotifyTest
-test StopTrail
-test TrailClose
-delete test
-[Endtest]
-
-[Test]
-title Retrieve Location Basic Test
-timeout 60000
-create LocationManagerTestScripter test
-test TrailConnect
-test StartTrail
-test RetrieveLocation
-test StopTrail
-test TrailClose
-delete test
-[Endtest]
-
-[Test]
-title Current Location Basic Test
-timeout 60000
-create LocationManagerTestScripter test
-test TrailConnect
-test StartTrail
-test CurrentLocation
-test StopTrail
-test TrailClose
-delete test
-[Endtest]
-
-[Test]
-title Create Location Object Manipulator
-timeout 60000
-create LocationManagerTestScripter test
-request Session
-test PrepareSession
-wait Session
-test TearDownOM
-delete test
-[Endtest]
-
-[Test]
-title Create Location Object
-timeout 60000
-create LocationManagerTestScripter test
-request Session
-test PrepareSession
-wait Session
-test SetupOM
-test TearDownOM
-delete test
-[Endtest]
-
-[Test]
-title Location Snapshot
-timeout 60000
-create LocationManagerTestScripter test
-request Session
-test PrepareSession
-wait Session
-test SetupOM
-test TearDownOM
-delete test
-[Endtest]
-
-[Test]
-title Remove Location Object
-timeout 60000
-create LocationManagerTestScripter test
-request Session
-test PrepareSession
-wait Session
-test SetupOM
-test TearDownOM
-delete test
-[Endtest]
-
-[Test]
-title Copy By ID
-timeout 60000
-create LocationManagerTestScripter test
-request Session
-test PrepareSession
-wait Session
-test SetupOM
-test CopyByID
-test CloseOM
-test CopyByIDDisco
-test TearDownOM
-delete test
-[Endtest]
-
-[Test]
-title Copy By URI
-timeout 60000
-create LocationManagerTestScripter test
-request Session
-test PrepareSession
-wait Session
-test SetupOM
-test CopyByURI
-test CloseOM
-test CopyByURIDisco
-test TearDownOM
-delete test
-[Endtest]
-
-[Test]
-title Tracklog Connect Disconnect
-timeout 60000
-create LocationManagerTestScripter test
-test SetupTrackLog
-test TearDownTrackLog
-delete test
-[Endtest]
-
-[Test]
-title Start Stop Tracklog Recording
-timeout 80000
-create LocationManagerTestScripter test
-test SetupTrackLog
-test AddObserver
-request Recording
-test StartTrackLog
-wait Recording
-test Recording
-request StopRecording
-test StopTrackLog
-wait StopRecording
-test NotRecording
-test RemoveObserver
-test TearDownTrackLog
-delete test
-[Endtest]
-
-[Test]
-title Tracklog Observer test
-timeout 60000
-create LocationManagerTestScripter test
-test SetupTrackLog
-test AddObserver
-test AddObserver
-test AddObserver
-test RemoveObserver
-test RemoveObserver
-test TearDownTrackLog
-delete test
-[Endtest]
-
-[Test]
-title Start Stop Tracklog Recording 2
-timeout 240000
-create LocationManagerTestScripter test
-test SetupTrackLog
-test AddObserver
-request Recording
-test StartTrackLog
-wait Recording
-test Recording
-test GetFile
-test GetStatus
-request StopRecording
-test StopTrackLog
-wait StopRecording
-test NotRecording
-test DeleteFile
-test GetStatus2
-test RemoveObserver
-test TearDownTrackLog
-delete test
-[Endtest]
-
-[Test]
-title Tracklog Crash Test
-timeout 60000
-create LocationManagerTestScripter test
-test SetupTrackLog
-test AddObserver
-request Recording
-test StartTrackLog
-wait Recording
-test CrashLocationManager
-test RemoveObserver
-test TearDownTrackLog
-delete test
-create LocationManagerTestScripter test2
-test2 SetupTrackLog
-test2 AddObserver
-request Recording
-test2 StartTrackLog
-wait Recording
-test2 StopTrackLog
-test2 RemoveObserver
-test2 TearDownTrackLog
-delete test2
-[Endtest]
-
-[Test]
-title StartGeoTagging Test
-create LocationManagerTestScripter test
-#test ConnectGeoTaggerL
-test StartGeoTaggingL
-test CloseGeoTaggerL
-delete test
-[Endtest]
-
-
-[Test]
-title TagComplete Status for GeoTagged Photos
-create LocationManagerTestScripter test
-test ConnectGeoTaggerL
-test TestGeoTagCompleteStatusL 0
-test CloseGeoTaggerL
-delete test
-[Endtest]
-
-[Test]
-title TagPending Status for GeoTagged Photos
-create LocationManagerTestScripter test
-test ConnectGeoTaggerL
-test TestGeoTagPendingStatusL 0
-test CloseGeoTaggerL
-delete test
-[Endtest]
-
-[Test]
-title TagGoingOn Status for GeoTagged Photos
-create LocationManagerTestScripter test
-test ConnectGeoTaggerL
-test TestGeoTagGoingOnStatusL 0
-test CloseGeoTaggerL
-delete test
-[Endtest]
-
-
-[Test]
-title TagComplete Status for NonGeoTagged Photos
-create LocationManagerTestScripter test
-test ConnectGeoTaggerL
-test TestGeoTagCompleteStatusL 1
-test CloseGeoTaggerL
-delete test
-[Endtest]
-
-[Test]
-title TagPending Status for NonGeoTagged Photos
-create LocationManagerTestScripter test
-test ConnectGeoTaggerL
-test TestGeoTagPendingStatusL 1
-test CloseGeoTaggerL
-delete test
-[Endtest]
-
-[Test]
-title TagGoingOn Status for NonGeoTagged Photos
-create LocationManagerTestScripter test
-test ConnectGeoTaggerL
-test TestGeoTagGoingOnStatusL 1
-test CloseGeoTaggerL
-delete test
-[Endtest]
-
-[Test]
-title CancelGeoTagging
-create LocationManagerTestScripter test
-test ConnectGeoTaggerL
-test CancelGeoTaggingL
-test CloseGeoTaggerL
-delete test
-[Endtest]
\ No newline at end of file
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/location_manager_api/tsrc/eabi/LocationManagerTestScripteru.def
--- a/mds_plat/location_manager_api/tsrc/eabi/LocationManagerTestScripteru.def Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-EXPORTS
- _Z9LibEntryLR13CTestModuleIf @ 1 NONAME
-
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/location_manager_api/tsrc/group/LocationManagerTestScripter.mmp
--- a/mds_plat/location_manager_api/tsrc/group/LocationManagerTestScripter.mmp Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,60 +0,0 @@
-/*
-* Copyright (c) 2005-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: Project definition file
-*
-*/
-
-
-#include
-#include
-#include "../../../../locationmanager/inc/locplatsupport.mmh"
-
-TARGET LocationManagerTestScripter.dll
-TARGETTYPE dll
-UID 0x1000008D 0x101FB3E3
-
-CAPABILITY ALL -TCB
-VENDORID VID_DEFAULT
-
-DEFFILE LocationManagerTestScripter.def
-
-#ifdef _LOC_REVERSEGEOCODE
-MACRO LOC_REVERSEGEOCODE
-#endif
-
-SOURCEPATH ../src
-SOURCE LocationManagerTestScripter.cpp
-SOURCE LocationManagerTestScripterBlocks.cpp
-SOURCE RTrackLogTest.cpp
-SOURCE RLocationObjectManipulatorTest.cpp
-
-USERINCLUDE ../inc
-USERINCLUDE ../../../../locationmanager/inc
-USERINCLUDE ../../../../locationmanager/server/inc
-USERINCLUDE ../../../../locationmanager/locationtrail/inc
-USERINCLUDE ../../../../inc
-USERINCLUDE ../../../../mds_plat/location_manager_api/inc
-USERINCLUDE ../../../../metadataengine/server/inc
-
-MW_LAYER_SYSTEMINCLUDE
-
-LIBRARY euser.lib
-LIBRARY stiftestinterface.lib
-LIBRARY stiftestengine.lib
-LIBRARY locationmanager.lib
-LIBRARY mdeclient.lib
-LIBRARY mdccommon.lib
-LIBRARY etel3rdparty.lib
-LIBRARY lbs.lib
-
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/location_manager_api/tsrc/group/LocationManagerTestScripter.pkg
--- a/mds_plat/location_manager_api/tsrc/group/LocationManagerTestScripter.pkg Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-;
-; 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: Installation file for API test
-;
-
-; Languages
-&EN
-
-; Header
-#{"LocationManagerTest"},(0x101FB3E3),1,0,0,TYPE=SA
-
-; Localised Vendor name
-%{"Nokia"}
-
-; Unique Vendor name
-:"Nokia"
-
-; Install files
-"\epoc32\release\armv5\urel\LocationManagerTestScripter.dll" - "c:\sys\bin\LocationManagerTestScripter.dll"
-"..\conf\LocationManagerTestScripter.cfg" - "c:\TestFramework\LocationManagerTestScripter.cfg"
-"..\init\LocationManagerTestScripter.ini" - "c:\TestFramework\LocationManagerTestScripter.ini"
-
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/location_manager_api/tsrc/group/bld.inf
--- a/mds_plat/location_manager_api/tsrc/group/bld.inf Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-/*
-* Copyright (c) 2005-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: Build information file
-*
-*/
-
-#include "../../../../locationmanager/inc/locplatsupport.mmh"
-
-PRJ_PLATFORMS
- DEFAULT
-
-PRJ_EXPORTS
-
-PRJ_MMPFILES
-
-PRJ_TESTMMPFILES
-LocationManagerTestScripter.mmp
-
-PRJ_TESTEXPORTS
-#ifdef _LOC_REVERSEGEOCODE
-../conf/LocationManagerTestScripter_reverse_geocode.cfg /epoc32/winscw/c/TestFramework/LocationManagerTestScripter.cfg
-#else
-../conf/LocationManagerTestScripter.cfg /epoc32/winscw/c/TestFramework/LocationManagerTestScripter.cfg
-#endif
-
-../init/LocationManagerTestScripter.ini /epoc32/winscw/c/TestFramework/LocationManagerTestScripter.ini
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/location_manager_api/tsrc/inc/LocationManagerTestScripter.h
--- a/mds_plat/location_manager_api/tsrc/inc/LocationManagerTestScripter.h Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,183 +0,0 @@
-/*
-* Copyright (c) 2002-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:
-*
-*/
-
-
-#ifndef LOCATIONMANAGERTESTSCRIPTER_H
-#define LOCATIONMANAGERTESTSCRIPTER_H
-
-// INCLUDES
-#include
-#include
-#include
-#include
-#include
-#include
-#include "locationmanagerdefs.h"
-#include "rlocationobjectmanipulator.h"
-#include "mdccommon.h"
-#include "mdesession.h"
-
-#ifdef LOC_REVERSEGEOCODE
-#include "rlocationgeotagger.h"
-#endif //LOC_REVERSEGEOCODE
-
-// CONSTANTS
-// Logging path
-_LIT( KLocationManagerTestScripterLogPath, "\\logs\\testframework\\LocationManagerTestScripter\\" );
-// Log file
-_LIT( KLocationManagerTestScripterLogFile, "LocationManagerTestScripter.txt" );
-_LIT( KLocationManagerTestScripterLogFileWithTitle, "LocationManagerTestScripter_[%S].txt" );
-
-
-// FORWARD DECLARATIONS
-class CMdEObject;
-class CLocationManagerTestScripter;
-
-
-// CLASS DECLARATION
-NONSHARABLE_CLASS(CLocationManagerTestScripter) : public CScriptBase,
- public MTrackLogObserver,
- public MMdESessionObserver
- {
- public: // Constructors and destructor
-
- /**
- * Two-phased constructor.
- */
- static CLocationManagerTestScripter* NewL( CTestModuleIf& aTestModuleIf );
-
- /**
- * Destructor.
- */
- virtual ~CLocationManagerTestScripter();
-
- public: // Functions from base classes
-
- /**
- * From CScriptBase Runs a script line.
- * @since ?Series60_version
- * @param aItem Script line containing method name and parameters
- * @return Symbian OS error code
- */
- virtual TInt RunMethodL( CStifItemParser& aItem );
-
- public: // From MdESessionObserver
- virtual void HandleSessionOpened(CMdESession& aSession, TInt aError);
- virtual void HandleSessionError(CMdESession& aSession, TInt aError);
-
- virtual void GPSFixQualityChanged(TPositionSatelliteInfo& aFixQuality,
- TBool& aTrackingActive );
-
- private:
-
- /**
- * C++ default constructor.
- */
- CLocationManagerTestScripter( CTestModuleIf& aTestModuleIf );
-
- /**
- * By default Symbian 2nd phase constructor is private.
- */
- void ConstructL();
-
- /**
- * Frees all resources allocated from test methods.
- */
- void Delete();
-
- CMdEObject* CreateMetadataObjectL();
- void TestLocationData( TLocationData& aLocationData );
-
- TInt PrepareSessionL( CStifItemParser& aItem );
- TInt SetupOML( CStifItemParser& aItem );
- TInt LocationSnapshotL( CStifItemParser& aItem );
- TInt RemoveLocationObjectL( CStifItemParser& aItem );
- TInt TearDownOML( CStifItemParser& aItem );
- TInt CloseOML( CStifItemParser& aItem );
- virtual TInt RLocationObjectManipulatorTest_CopyByIDL( CStifItemParser& aItem );
- virtual TInt RLocationObjectManipulatorTest_CopyByURIL( CStifItemParser& aItem );
- TInt RLocationObjectManipulatorTest_CopyByURI_DisconnectedL( CStifItemParser& aItem );
- TInt RLocationObjectManipulatorTest_CopyByID_DisconnectedL( CStifItemParser& aItem );
-
- virtual TInt ConnectL( CStifItemParser& aItem );
- virtual TInt CloseL( CStifItemParser& aItem );
- virtual TInt TrailConnectL( CStifItemParser& aItem );
- virtual TInt TrailCloseL( CStifItemParser& aItem );
- virtual TInt StartTrailL( CStifItemParser& aItem );
- virtual TInt StopTrailL( CStifItemParser& aItem );
- virtual TInt StartTrailTestsL( CStifItemParser& aItem );
- virtual TInt GetTrailStateL( CStifItemParser& aItem );
- virtual TInt LocationTrailNotifyTestL( CStifItemParser& aItem );
- virtual TInt RetrieveLocationL( CStifItemParser& aItem );
- virtual TInt CurrentLocationL( CStifItemParser& aItem );
-
- TInt SetupTrackLogL( CStifItemParser& aItem );
- TInt TearDownTrackLog( CStifItemParser& aItem );
- TInt RTrackLogTest_AddObserverL( CStifItemParser& aItem );
- TInt RTrackLogTest_RemoveObserverL( CStifItemParser& aItem );
- virtual TInt RTrackLogTest_StartTrackLogL( CStifItemParser& aItem );
- virtual TInt RTrackLogTest_RecordingL( CStifItemParser& aItem );
- virtual TInt RTrackLogTest_StopTrackLogL( CStifItemParser& aItem );
- virtual TInt RTrackLogTest_NotRecordingL( CStifItemParser& aItem );
- TInt CrashLocationManagerL( CStifItemParser& aItem );
- TInt GetFileL( CStifItemParser& aItem );
- TInt DeleteFileL( CStifItemParser& aItem );
- TInt GetStatusL( CStifItemParser& aItem );
- TInt GetStatus2L( CStifItemParser& aItem );
- //ADD NEW METHOD DEC HERE
- //[TestMethods] - Do not remove
-
-#ifdef LOC_REVERSEGEOCODE
- TInt ConnectGeoTaggerL( CStifItemParser& /*aItem*/ );
- TInt CloseGeoTaggerL( CStifItemParser& /*aItem*/ );
- TInt StartGeoTaggingL( CStifItemParser& aItem );
-
- TInt TestGeoTagCompleteStatusL( CStifItemParser& aItem );
- TInt TestGeoTagPendingStatusL( CStifItemParser& aItem );
- TInt TestGeoTagGoingOnStatusL( CStifItemParser& aItem );
-
- TInt CancelGeoTaggingL( CStifItemParser& aItem ) ;
-#endif //LOC_REVERSEGEOCODE
-
- public: // From MTrackLogObserver
- void TrackLogStarted(TInt aError);
- void TrackLogStopped(TInt aError);
-
- private: // Data
-
- RLocationManager iLocationManager;
- RLocationTrail iLocationTrail;
-
- TBool iRunning;
- RTrackLog iTrackLog;
- RLocationObjectManipulator iOM;
-
- CMdEObject* iSourceObject;
- CMdEObject* iTargetObject;
- CMdESession* iMdeSession;
-
- CActiveSchedulerWait* iASW;
-
-#ifdef LOC_REVERSEGEOCODE
- RLocationGeoTagger iLocationGeoTagger;
- TBool iLocGeoTaggerConnected;
-#endif //LOC_REVERSEGEOCODE
- };
-
-#endif // LOCATIONMANAGERTESTSCRIPTER_H
-
-// End of File
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/location_manager_api/tsrc/init/LocationManagerTestScripter.ini
--- a/mds_plat/location_manager_api/tsrc/init/LocationManagerTestScripter.ini Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,81 +0,0 @@
-#
-# Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "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:
-#
-
-
-[Engine_Defaults]
-
-TestReportMode= FullReport # Possible values are: 'Empty', 'Summary', 'Environment',
- 'TestCases' or 'FullReport'
-
-CreateTestReport= YES # Possible values: YES or NO
-
-TestReportFilePath= C:\LOGS\TestFramework\
-TestReportFileName= LocationManagerTestScripterLog
-
-TestReportFormat= TXT # Possible values: TXT or HTML
-TestReportOutput= FILE # Possible values: FILE or RDEBUG
-TestReportFileCreationMode= OVERWRITE # Possible values: OVERWRITE or APPEND
-
-DeviceResetDllName= StifResetForNokia.dll # e.g. 'StifHWResetStub.dll' for user specific reseting
-
-DisableMeasurement= stifmeasurementdisablenone # Possible values are:
- # 'stifmeasurementdisablenone', 'stifmeasurementdisableall'
- # 'stifmeasurementplugin01', 'stifmeasurementplugin02',
- # 'stifmeasurementplugin03', 'stifmeasurementplugin04',
- # 'stifmeasurementplugin05' or 'stifbappeaprofiler'
-
-Timeout= 600000 # Default timeout value for each test case. In milliseconds
-#UITestingSupport= YES # Possible values: YES or NO
-#SeparateProcesses= YES # Possible values: YES or NO (default: NO)
-[End_Defaults]
-
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-
-[New_Module]
-ModuleName= TestScripter
-TestCaseFile= c:\testframework\LocationManagerTestScripter.cfg
-[End_Module]
-
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-
-[Logger_Defaults]
-
-#NOTE: If you want to set Logger using next setting(s) remove comment(s)'#'
-#NOTE: TestEngine and TestServer logging settings cannot change here
-
-CreateLogDirectories= YES # Possible values: YES or NO
-
-#EmulatorBasePath= C:\LOGS\TestFramework\
-#EmulatorFormat= HTML # Possible values: TXT or HTML
-#EmulatorOutput= FILE # Possible values: FILE or RDEBUG
-
-HardwareBasePath= C:\
-#HardwareFormat= HTML # Possible values: TXT or HTML
-#HardwareOutput= FILE # Possible values: FILE or RDEBUG
-
-#FileCreationMode= OVERWRITE # Possible values: OVERWRITE or APPEND
-
-#ThreadIdToLogFile= YES # Possible values: YES or NO
-#WithTimeStamp= YES # Possible values: YES or NO
-#WithLineBreak= YES # Possible values: YES or NO
-#WithEventRanking= YES # Possible values: YES or NO
-
-#FileUnicode= YES # Possible values: YES or NO
-AddTestCaseTitle= YES # Possible values: YES or NO
-[End_Logger_Defaults]
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-
-# End of file
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/location_manager_api/tsrc/src/LocationManagerTestScripter.cpp
--- a/mds_plat/location_manager_api/tsrc/src/LocationManagerTestScripter.cpp Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,137 +0,0 @@
-/*
-* Copyright (c) 2002-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: ?Description
-*
-*/
-
-
-// INCLUDE FILES
-#include
-#include "LocationManagerTestScripter.h"
-#include
-
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CLocationManagerTestScripter::CLocationManagerTestScripter
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-//
-CLocationManagerTestScripter::CLocationManagerTestScripter(
- CTestModuleIf& aTestModuleIf ):
- CScriptBase( aTestModuleIf )
- {
- }
-
-// -----------------------------------------------------------------------------
-// CLocationManagerTestScripter::ConstructL
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-//
-void CLocationManagerTestScripter::ConstructL()
- {
-
-#ifdef LOC_REVERSEGEOCODE
- iLocGeoTaggerConnected = EFalse;
-#endif //LOC_REVERSEGEOCODE
-
- //Read logger settings to check whether test case name is to be
- //appended to log file name.
- RSettingServer settingServer;
- TInt ret = settingServer.Connect();
- if(ret != KErrNone)
- {
- User::Leave(ret);
- }
- // Struct to StifLogger settigs.
- TLoggerSettings loggerSettings;
- // Parse StifLogger defaults from STIF initialization file.
- ret = settingServer.GetLoggerSettings(loggerSettings);
- if(ret != KErrNone)
- {
- User::Leave(ret);
- }
- // Close Setting server session
- settingServer.Close();
-
- TFileName logFileName;
-
- if(loggerSettings.iAddTestCaseTitle)
- {
- TName title;
- TestModuleIf().GetTestCaseTitleL(title);
- logFileName.Format(KLocationManagerTestScripterLogFileWithTitle, &title);
- }
- else
- {
- logFileName.Copy(KLocationManagerTestScripterLogFile);
- }
-
- iLog = CStifLogger::NewL( KLocationManagerTestScripterLogPath,
- logFileName,
- CStifLogger::ETxt,
- CStifLogger::EFile,
- EFalse );
-
- }
-
-// -----------------------------------------------------------------------------
-// CLocationManagerTestScripter::NewL
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-//
-CLocationManagerTestScripter* CLocationManagerTestScripter::NewL(
- CTestModuleIf& aTestModuleIf )
- {
- CLocationManagerTestScripter* self = new (ELeave) CLocationManagerTestScripter( aTestModuleIf );
-
- CleanupStack::PushL( self );
- self->ConstructL();
- CleanupStack::Pop( self );
-
- return self;
-
- }
-
-// Destructor
-CLocationManagerTestScripter::~CLocationManagerTestScripter()
- {
-
- // Delete resources allocated from test methods
- Delete();
-
- // Delete logger
- delete iLog;
-
- }
-
-// ========================== OTHER EXPORTED FUNCTIONS =========================
-
-// -----------------------------------------------------------------------------
-// LibEntryL is a polymorphic Dll entry point.
-// Returns: CScriptBase: New CScriptBase derived object
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CScriptBase* LibEntryL(
- CTestModuleIf& aTestModuleIf ) // Backpointer to STIF Test Framework
- {
-
- return ( CScriptBase* ) CLocationManagerTestScripter::NewL( aTestModuleIf );
-
- }
-
-
-// End of File
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/location_manager_api/tsrc/src/LocationManagerTestScripterBlocks.cpp
--- a/mds_plat/location_manager_api/tsrc/src/LocationManagerTestScripterBlocks.cpp Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,354 +0,0 @@
-/*
-* Copyright (c) 2002-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: ?Description
-*
-*/
-
-
-// [INCLUDE FILES] - do not remove
-#include
-#include
-#include
-#include "LocationManagerTestScripter.h"
-
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CLocationManagerTestScripter::Delete
-// Delete here all resources allocated and opened from test methods.
-// Called from destructor.
-// -----------------------------------------------------------------------------
-//
-void CLocationManagerTestScripter::Delete()
- {
-
- }
-
-// -----------------------------------------------------------------------------
-// CLocationManagerTestScripter::RunMethodL
-// Run specified method. Contains also table of test mothods and their names.
-// -----------------------------------------------------------------------------
-//
-TInt CLocationManagerTestScripter::RunMethodL(
- CStifItemParser& aItem )
- {
-
- TestModuleIf().SetBehavior( CTestModuleIf::ETestLeaksRequests );
-
- static TStifFunctionInfo const KFunctions[] =
- {
- // Copy this line for every implemented function.
- // First string is the function name used in TestScripter script file.
- // Second is the actual implementation member function.
- ENTRY( "Connect", CLocationManagerTestScripter::ConnectL ),
- ENTRY( "Close", CLocationManagerTestScripter::CloseL ),
- ENTRY( "TrailConnect", CLocationManagerTestScripter::TrailConnectL ),
- ENTRY( "TrailClose", CLocationManagerTestScripter::TrailCloseL ),
- ENTRY( "StartTrail", CLocationManagerTestScripter::StartTrailL ),
- ENTRY( "StopTrail", CLocationManagerTestScripter::StopTrailL ),
- ENTRY( "StartTrailTests", CLocationManagerTestScripter::StartTrailTestsL ),
- ENTRY( "GetTrailState", CLocationManagerTestScripter::GetTrailStateL ),
- ENTRY( "LocationTrailNotifyTest", CLocationManagerTestScripter::LocationTrailNotifyTestL ),
- ENTRY( "RetrieveLocation", CLocationManagerTestScripter::RetrieveLocationL ),
- ENTRY( "CurrentLocation", CLocationManagerTestScripter::CurrentLocationL ),
-
- ENTRY( "PrepareSession", CLocationManagerTestScripter::PrepareSessionL ),
- ENTRY( "SetupOM", CLocationManagerTestScripter::SetupOML ),
- ENTRY( "LocationSnapshot", CLocationManagerTestScripter::LocationSnapshotL ),
- ENTRY( "RemoveLocationObject", CLocationManagerTestScripter::RemoveLocationObjectL ),
- ENTRY( "TearDownOM", CLocationManagerTestScripter::TearDownOML ),
- ENTRY( "CloseOM", CLocationManagerTestScripter::CloseOML ),
- ENTRY( "CopyByID", CLocationManagerTestScripter::RLocationObjectManipulatorTest_CopyByIDL ),
- ENTRY( "CopyByURI", CLocationManagerTestScripter::RLocationObjectManipulatorTest_CopyByURIL ),
- ENTRY( "CopyByIDDisco", CLocationManagerTestScripter::RLocationObjectManipulatorTest_CopyByID_DisconnectedL),
- ENTRY( "CopyByURIDisco", CLocationManagerTestScripter::RLocationObjectManipulatorTest_CopyByURI_DisconnectedL),
-
- ENTRY( "SetupTrackLog", CLocationManagerTestScripter::SetupTrackLogL ),
- ENTRY( "TearDownTrackLog", CLocationManagerTestScripter::TearDownTrackLog ),
- ENTRY( "AddObserver", CLocationManagerTestScripter::RTrackLogTest_AddObserverL ),
- ENTRY( "RemoveObserver", CLocationManagerTestScripter::RTrackLogTest_RemoveObserverL ),
- ENTRY( "StartTrackLog", CLocationManagerTestScripter::RTrackLogTest_StartTrackLogL ),
- ENTRY( "Recording", CLocationManagerTestScripter::RTrackLogTest_RecordingL ),
- ENTRY( "StopTrackLog", CLocationManagerTestScripter::RTrackLogTest_StopTrackLogL ),
- ENTRY( "NotRecording", CLocationManagerTestScripter::RTrackLogTest_NotRecordingL ),
- ENTRY( "CrashLocationManager" , CLocationManagerTestScripter::CrashLocationManagerL ),
- ENTRY( "GetFile" , CLocationManagerTestScripter::GetFileL ),
- ENTRY( "DeleteFile" , CLocationManagerTestScripter::DeleteFileL ),
- ENTRY( "GetStatus" , CLocationManagerTestScripter::GetStatusL ),
- ENTRY( "GetStatus2" , CLocationManagerTestScripter::GetStatus2L )
-
-#ifdef LOC_REVERSEGEOCODE
- ,ENTRY( "ConnectGeoTaggerL", CLocationManagerTestScripter::ConnectGeoTaggerL )
- ,ENTRY( "CloseGeoTaggerL", CLocationManagerTestScripter::CloseGeoTaggerL )
- ,ENTRY( "StartGeoTaggingL", CLocationManagerTestScripter::StartGeoTaggingL )
- ,ENTRY( "TestGeoTagCompleteStatusL", CLocationManagerTestScripter::TestGeoTagCompleteStatusL )
- ,ENTRY( "TestGeoTagPendingStatusL", CLocationManagerTestScripter::TestGeoTagPendingStatusL )
- ,ENTRY( "TestGeoTagGoingOnStatusL", CLocationManagerTestScripter::TestGeoTagGoingOnStatusL )
- ,ENTRY( "CancelGeoTaggingL", CLocationManagerTestScripter::CancelGeoTaggingL )
-#endif //LOC_REVERSEGEOCODE
- };
-
- const TInt count = sizeof( KFunctions ) /
- sizeof( TStifFunctionInfo );
-
- return RunInternalL( KFunctions, count, aItem );
-
- }
-
-// -----------------------------------------------------------------------------
-// CLocationManagerTestScripter::Connect
-// -----------------------------------------------------------------------------
-//
-TInt CLocationManagerTestScripter::ConnectL( CStifItemParser& /* aItem */ )
- {
- _LIT( KMsg1, "ConnectL" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- User::LeaveIfError( iLocationManager.Connect() );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CLocationManagerTestScripter::Close
-// -----------------------------------------------------------------------------
-//
-TInt CLocationManagerTestScripter::CloseL( CStifItemParser& /* aItem */ )
- {
- _LIT( KMsg1, "CloseL" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- iLocationManager.Close();
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CLocationManagerTestScripter::Connect
-// -----------------------------------------------------------------------------
-//
-TInt CLocationManagerTestScripter::TrailConnectL( CStifItemParser& /* aItem */ )
- {
- _LIT( KMsg1, "ConnectL" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- User::LeaveIfError( iLocationTrail.Connect() );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CLocationManagerTestScripter::Close
-// -----------------------------------------------------------------------------
-//
-TInt CLocationManagerTestScripter::TrailCloseL( CStifItemParser& /* aItem */ )
- {
- _LIT( KMsg1, "CloseL" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- iLocationTrail.Close();
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CLocationManagerTestScripter::StartTrailL
-// -----------------------------------------------------------------------------
-//
-TInt CLocationManagerTestScripter::StartTrailL( CStifItemParser& /* aItem */ )
- {
- _LIT( KMsg1, "StopTrailL" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- TInt error = iLocationTrail.StartLocationTrail( RLocationTrail::ECaptureAll );
- User::LeaveIfError( error );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CLocationManagerTestScripter::StopTrailL
-// -----------------------------------------------------------------------------
-//
-TInt CLocationManagerTestScripter::StopTrailL( CStifItemParser& /* aItem */ )
- {
- _LIT( KMsg1, "StopTrailL" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- User::LeaveIfError( iLocationTrail.StopLocationTrail() );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CLocationManagerTestScripter::StartTrailTestsL
-// -----------------------------------------------------------------------------
-//
-TInt CLocationManagerTestScripter::StartTrailTestsL( CStifItemParser& /* aItem */ )
- {
- _LIT( KMsg1, "StartTrailTestsL" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- TInt error( KErrNone );
-
- error = iLocationTrail.StartLocationTrail( RLocationTrail::EOff );
- if( error != KErrArgument )
- {
- User::LeaveIfError( error );
- }
- RLocationTrail::TTrailCaptureSetting setting;
- User::LeaveIfError( iLocationTrail.GetTrailCaptureSetting( setting ) );
- if( setting != RLocationTrail::EOff )
- {
- return KErrUnknown;
- }
-
- _LIT( KMsg2, "StartTrailTestsL, test 1 - Error code : %d" );
- TBuf <100> msg;
- msg.Format( KMsg2, error );
- iLog->Log( msg );
- RDebug::Print( msg );
-
- User::LeaveIfError( iLocationTrail.StopLocationTrail() );
-
- error = iLocationTrail.StartLocationTrail( RLocationTrail::ECaptureNetworkInfo );
- User::LeaveIfError( error );
- User::LeaveIfError( iLocationTrail.GetTrailCaptureSetting( setting ) );
- if( setting != RLocationTrail::ECaptureNetworkInfo )
- {
- return KErrUnknown;
- }
-
- _LIT( KMsg3, "StartTrailTestsL, test 2 - Error code : %d" );
- msg.Format( KMsg3, error );
- iLog->Log( msg );
- RDebug::Print( msg );
-
- User::LeaveIfError( iLocationTrail.StopLocationTrail() );
-
- error = iLocationTrail.StartLocationTrail( RLocationTrail::ECaptureAll );
- User::LeaveIfError( error );
- User::LeaveIfError( iLocationTrail.GetTrailCaptureSetting( setting ) );
- if( setting != RLocationTrail::ECaptureAll )
- {
- return KErrUnknown;
- }
-
- _LIT( KMsg4, "StartTrailTestsL, test 2 - Error code : %d" );
- msg.Format( KMsg4, error );
- iLog->Log( msg );
- RDebug::Print( msg );
-
- User::LeaveIfError( iLocationTrail.StopLocationTrail() );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CLocationManagerTestScripter::GetTrailStateL
-// -----------------------------------------------------------------------------
-//
-TInt CLocationManagerTestScripter::GetTrailStateL( CStifItemParser& /*aItem*/ )
- {
- _LIT( KMsg1, "GetTrailStateL" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- RLocationTrail::TTrailState state;
- iLocationTrail.GetLocationTrailState( state );
- if( state != RLocationTrail::ETrailStarting )
- {
- return KErrUnknown;
- }
-
- _LIT( KMsg, "GetTrailStateL - state : %d" );
- TBuf <100> msg;
- msg.Format( KMsg, state );
- iLog->Log( msg );
- RDebug::Print( msg );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CLocationManagerTestScripter::LocationTrailNotifyTestL
-// -----------------------------------------------------------------------------
-//
-TInt CLocationManagerTestScripter::LocationTrailNotifyTestL( CStifItemParser& /*aItem*/ )
- {
- _LIT( KMsg1, "LocationTrailNotifyTestL" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- TRequestStatus status;
- iLocationTrail.NotifyLocationTrailStateChange( status );
- iLocationTrail.CancelNotificationRequest();
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CLocationManagerTestScripter::RetrieveLocationL
-// -----------------------------------------------------------------------------
-//
-TInt CLocationManagerTestScripter::RetrieveLocationL( CStifItemParser& /*aItem*/ )
- {
- _LIT( KMsg1, "RetrieveLocationL" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- TTime time;
- time.UniversalTime();
-
- TLocationData data;
- RLocationTrail::TTrailState state;
-
- TInt error = iLocationTrail.RetrieveLocation( time, data, state );
-
- _LIT( KMsg, "RetrieveLocationL - error : %d" );
- TBuf <100> msg;
- msg.Format( KMsg, error );
- iLog->Log( msg );
- RDebug::Print( msg );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CLocationManagerTestScripter::CurrentLocationL
-// -----------------------------------------------------------------------------
-//
-TInt CLocationManagerTestScripter::CurrentLocationL( CStifItemParser& /*aItem*/ )
- {
- _LIT( KMsg1, "CurrentLocationL" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- TRequestStatus status;
- TLocationData data;
- iLocationTrail.CurrentLocation( status, data );
- iLocationTrail.CancelLocationRequest();
-
- return KErrNone;
- }
-
-// [End of File] - Do not remove
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/location_manager_api/tsrc/src/RLocationObjectManipulatorTest.cpp
--- a/mds_plat/location_manager_api/tsrc/src/RLocationObjectManipulatorTest.cpp Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,545 +0,0 @@
-/*
-* 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:
-*
-*/
-#include "LocationManagerTestScripter.h"
-#include "mdeobject.h"
-#include "mdenamespacedef.h"
-#include "mdeobjectdef.h"
-#include "mdepropertydef.h"
-#include "mdeconstants.h"
-#include "locationdatatype.h"
-#include "mdsutils.h"
-#include
-#include
-#include
-#include
-#include
-
-using namespace MdeConstants;
-
-TInt CLocationManagerTestScripter::PrepareSessionL( CStifItemParser& /*aItem*/ )
- {
- _LIT( KMsg1, "PrepareSessionL" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- User::LeaveIfError( iOM.Connect() );
- iMdeSession = CMdESession::NewL( *this );
-
- return KErrNone;
- }
-
-TInt CLocationManagerTestScripter::SetupOML( CStifItemParser& /*aItem*/ )
- {
- _LIT( KMsg1, "Enter SetupOM" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- iSourceObject = CreateMetadataObjectL();
- TLocationData locationData;
- TestLocationData( locationData );
- TInt error( KErrNone );
- error = iOM.CreateLocationObject( locationData, iSourceObject->Id() );
- if( error != KErrNone )
- {
- return error;
- }
- iTargetObject = CreateMetadataObjectL();
-
- _LIT( KMsg2, "Exit SetupOM" );
- iLog->Log( KMsg2 );
- RDebug::Print( KMsg2 );
-
- return KErrNone;
- }
-
-TInt CLocationManagerTestScripter::LocationSnapshotL( CStifItemParser& /*aItem*/ )
- {
- _LIT( KMsg1, "Enter LocationSnapshotL" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- iSourceObject = CreateMetadataObjectL();
- TInt error( KErrNone );
- error = iOM.LocationSnapshot( iSourceObject->Id() );
-
- _LIT( KMsg2, "Exit LocationSnapshotL" );
- iLog->Log( KMsg2 );
- RDebug::Print( KMsg2 );
-
- return error;
- }
-
-TInt CLocationManagerTestScripter::RemoveLocationObjectL( CStifItemParser& /*aItem*/ )
- {
- _LIT( KMsg1, "Enter RemoveLocationObjectL" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- TInt error( KErrNone );
- error = iOM.RemoveLocationObject( iSourceObject->Id() );
-
- _LIT( KMsg2, "Exit RemoveLocationObjectL" );
- iLog->Log( KMsg2 );
- RDebug::Print( KMsg2 );
-
- return error;
- }
-
-TInt CLocationManagerTestScripter::TearDownOML( CStifItemParser& /*aItem*/ )
- {
- _LIT( KMsg1, "Enter TearDownOM" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- iOM.Close();
-
- if( iSourceObject && iMdeSession )
- {
- TRAP_IGNORE( iMdeSession->RemoveObjectL( iSourceObject->Id() ) );
- }
- delete iSourceObject;
- iSourceObject = NULL;
- if( iTargetObject && iMdeSession )
- {
- TRAP_IGNORE( iMdeSession->RemoveObjectL( iTargetObject->Id() ) );
- }
- delete iTargetObject;
- iTargetObject = NULL;
- delete iMdeSession;
- iMdeSession = NULL;
-
- _LIT( KMsg2, "Exit TearDownOM" );
- iLog->Log( KMsg2 );
- RDebug::Print( KMsg2 );
-
- return KErrNone;
- }
-
-TInt CLocationManagerTestScripter::CloseOML( CStifItemParser& /*aItem*/ )
- {
- _LIT( KMsg1, "CloseOML" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- iOM.Close();
-
- return KErrNone;
- }
-
-TInt CLocationManagerTestScripter::RLocationObjectManipulatorTest_CopyByIDL( CStifItemParser& /*aItem*/ )
- {
- _LIT( KMsg1, "Enter RLocationObjectManipulatorTest_CopyByIDL" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- TRequestStatus status = KRequestPending;
- RArray items;
- items.Append( iTargetObject->Id() );
- iOM.CopyLocationData( iSourceObject->Id(), items, status );
- User::WaitForRequest( status );
- TL( status.Int() == KErrNone );
-
- status = KRequestPending;
- iOM.CopyLocationData( TItemId(12345678), items, status );
- User::WaitForRequest( status );
- TL( status.Int() == KErrNotFound );
-
- items.Reset();
- items.Append(TItemId(12345678));
- status = KRequestPending;
- iOM.CopyLocationData( iSourceObject->Id(), items, status );
- User::WaitForRequest( status );
- TL( status.Int() == KErrNotFound );
-
- status = KRequestPending;
- iOM.CopyLocationData( TItemId(12345678), items, status );
- User::WaitForRequest( status );
- TL( status.Int() == KErrNotFound );
-
- items.Close();
-
- _LIT( KMsg2, "Exit RLocationObjectManipulatorTest_CopyByIDL" );
- iLog->Log( KMsg2 );
- RDebug::Print( KMsg2 );
-
- return KErrNone;
- }
-
-TInt CLocationManagerTestScripter::RLocationObjectManipulatorTest_CopyByURIL( CStifItemParser& /*aItem*/ )
- {
- _LIT(KURIThatDoesNotExist, "qwerty");
-
- TRequestStatus status = KRequestPending;
- RPointerArray items;
- items.AppendL( &iTargetObject->Uri() );
- TBuf<256> source( iSourceObject->Uri() );
- iOM.CopyLocationData( source, items, status );
- User::WaitForRequest( status );
- TL( status.Int() == KErrNone );
-
- source.Copy( KURIThatDoesNotExist );
- status = KRequestPending;
- iOM.CopyLocationData( source, items, status );
- User::WaitForRequest( status );
- TL( status.Int() == KErrNotFound );
-
- items.Reset();
- HBufC* nouri = source.AllocL();
- items.Append( nouri );
- source.Copy( iSourceObject->Uri() );
- status = KRequestPending;
- iOM.CopyLocationData( source, items, status );
- User::WaitForRequest( status );
- TL( status.Int() == KErrNotFound );
-
- status = KRequestPending;
- source.Copy( KURIThatDoesNotExist );
- iOM.CopyLocationData( source, items, status );
- User::WaitForRequest( status );
- TL( status.Int() == KErrNotFound );
-
- items.ResetAndDestroy();
-
- return KErrNone;
- }
-
-TInt CLocationManagerTestScripter::RLocationObjectManipulatorTest_CopyByID_DisconnectedL(
- CStifItemParser& /*aItem*/ )
- {
- TRequestStatus status = KRequestPending;
- RArray items;
- items.Append( 97976479 );
- iOM.CopyLocationData( iSourceObject->Id(), items, status );
- User::WaitForRequest( status );
- TL( status.Int() == KErrDisconnected );
-
- return KErrNone;
- }
-
-TInt CLocationManagerTestScripter::RLocationObjectManipulatorTest_CopyByURI_DisconnectedL(
- CStifItemParser& /*aItem*/ )
- {
- _LIT(KURIThatDoesNotExist, "notexistinganywhere");
-
- TRequestStatus status = KRequestPending;
- RPointerArray items;
- items.AppendL( &KURIThatDoesNotExist );
- TBuf<256> source( iSourceObject->Uri() );
- iOM.CopyLocationData( source, items, status );
- User::WaitForRequest( status );
- TL( status.Int() == KErrDisconnected );
-
- return KErrNone;
- }
-
-CMdEObject* CLocationManagerTestScripter::CreateMetadataObjectL( )
- {
- CMdENamespaceDef& namespaceDef = iMdeSession->GetDefaultNamespaceDefL();
- CMdEObjectDef& objectDef = namespaceDef.GetObjectDefL( Image::KImageObject );
- CMdEObject *obj = iMdeSession->NewObjectLC( objectDef, Object::KAutomaticUri );
-
- // required object properties
- CMdEPropertyDef& creationDef = objectDef.GetPropertyDefL( Object::KCreationDateProperty );
- CMdEPropertyDef& modifiedDef = objectDef.GetPropertyDefL( Object::KLastModifiedDateProperty );
- CMdEPropertyDef& sizeDef = objectDef.GetPropertyDefL( Object::KSizeProperty );
- CMdEPropertyDef& itemTypeDef = objectDef.GetPropertyDefL( Object::KItemTypeProperty );
-
- TTime timestamp( 0 );
- timestamp.UniversalTime();
-
- // required object properties
- obj->AddTimePropertyL( creationDef, timestamp );
- obj->AddTimePropertyL( modifiedDef, timestamp );
- obj->AddUint32PropertyL( sizeDef, 0 ); // always zero size for location objects
- obj->AddTextPropertyL( itemTypeDef, Location::KLocationItemType );
-
- iMdeSession->AddObjectL( *obj );
- CMdEObject* obj2 = iMdeSession->GetObjectL( obj->Id() );
- CleanupStack::Pop( obj );
-
- return obj2;
- }
-
-void CLocationManagerTestScripter::HandleSessionOpened(CMdESession& /*aSession*/, TInt aError)
- {
- _LIT( KMsg, "CallBck HandleSessionOpened - Error code : %d" );
- TBuf <100> msg;
- msg.Format(KMsg, aError);
- iLog->Log( msg );
- RDebug::Print(msg);
-
- // session event
- TEventIf event( TEventIf::ESetEvent, _L("Session") );
- TestModuleIf().Event( event );
- }
-
-void CLocationManagerTestScripter::HandleSessionError(CMdESession& /*aSession*/, TInt aError)
- {
- _LIT( KMsg, "CallBck HandleSessionError - Error code : %d" );
- TBuf <100> msg;
- msg.Format(KMsg, aError);
- iLog->Log( msg );
- RDebug::Print(msg);
-
- // session event
- TEventIf event( TEventIf::ESetEvent, _L("Session") );
- TestModuleIf().Event( event );
- }
-
-void CLocationManagerTestScripter::TestLocationData( TLocationData& aLocationData )
- {
- _LIT( temp, "XXX" );
- TBuf<3> countryTxt( temp );
-
- TPosition testLocality;
- testLocality.SetCoordinate( (TReal64)Math::Random()/KMaxTUint*180.0, (TReal64)Math::Random()/KMaxTUint*90.0, 10.0 );
- testLocality.SetAccuracy( 2.0, 2.0 );
-
- CTelephony::TNetworkInfoV1 networkInfo;
- networkInfo.iAccess = CTelephony::ENetworkAccessGsm;
- networkInfo.iAreaKnown = ETrue;
- networkInfo.iBandInfo = CTelephony::E800BandA;
- networkInfo.iCellId = 1;
- networkInfo.iLocationAreaCode = 1;
- networkInfo.iMode = CTelephony::ENetworkModeGsm;
- networkInfo.iStatus = CTelephony::ENetworkStatusCurrent;
- networkInfo.iCountryCode = countryTxt;
- networkInfo.iNetworkId = countryTxt;
-
- TCourse kurssi;
- kurssi.SetCourse( 1.0 );
- kurssi.SetCourseAccuracy( 1.0 );
- kurssi.SetHeading( 10.0 );
- kurssi.SetSpeed( 10.0 );
-
- aLocationData.iPosition = testLocality;
- aLocationData.iCountry = countryTxt;
- aLocationData.iNetworkInfo = networkInfo;
- aLocationData.iSatellites = 4;
- aLocationData.iCourse = kurssi;
- aLocationData.iQuality = 1;
- }
-
-
-#ifdef LOC_REVERSEGEOCODE
-TInt CLocationManagerTestScripter::ConnectGeoTaggerL( CStifItemParser& /*aItem*/ )
- {
- _LIT( KMsg1, "ConnectGeoTaggerL" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- if(!iLocGeoTaggerConnected)
- {
- User::LeaveIfError( iLocationGeoTagger.Connect() );
- }
-
- iLocGeoTaggerConnected = ETrue;
- return KErrNone;
- }
-
-TInt CLocationManagerTestScripter::CloseGeoTaggerL( CStifItemParser& /*aItem*/ )
- {
- _LIT( KMsg1, "CloseGeoTaggerL" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- iLocationGeoTagger.Close() ;
- iLocGeoTaggerConnected = EFalse;
-
- return KErrNone;
- }
-
-
-TInt CLocationManagerTestScripter::StartGeoTaggingL( CStifItemParser& /*aItem*/ )
- {
- _LIT( KMsg1, "Enter StartGeoTagging" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- //rav
-
- if(!iLocGeoTaggerConnected)
- {
- User::LeaveIfError( iLocationGeoTagger.Connect() );
- }
-
- iLocGeoTaggerConnected = ETrue;
-
-
-
- TRequestStatus status(KRequestPending);
- TConnectionOption conOption(ESilent);
- iLocationGeoTagger.StartGeoTagging(status,conOption);
- User::WaitForRequest( status );
-
- _LIT( KMsg3, " status.Int() =%d" );
- iLog->Log( KMsg3,status.Int() );
-
- TL( status.Int() == KErrNone );
-
-
- _LIT( KMsg2, "Exit StartGeoTagging" );
- iLog->Log( KMsg2 );
- RDebug::Print( KMsg2 );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CLocationManagerTestScripter::TestGeoTagCompleteStatusL
-// -----------------------------------------------------------------------------
-//
-TInt CLocationManagerTestScripter::TestGeoTagCompleteStatusL( CStifItemParser& /*aItem*/)
- {
- _LIT( KMsg1, "TestGeoTagCompleteStatusL enter" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- TRequestStatus status = KRequestPending;
- TGeoTaggingSatus tagPendingFlag = EGeoTaggingPending;
- iLocationGeoTagger.GeoTagStaus( status, tagPendingFlag );
-
- User::WaitForRequest( status );
-
- TL(status.Int() == KErrNone);
-
- TL(tagPendingFlag == EGeoTagCmpt);
-
- _LIT( KMsg2, "TestGeoTagCompleteStatusL exit" );
- iLog->Log( KMsg2 );
- RDebug::Print( KMsg2 );
-
- return KErrNone;
- }
-
-
-// -----------------------------------------------------------------------------
-// CLocationManagerTestScripter::TestGeoTagPendingStatusL
-// -----------------------------------------------------------------------------
-//
-TInt CLocationManagerTestScripter::TestGeoTagPendingStatusL( CStifItemParser& aItem )
- {
- _LIT( KMsg1, "TestGeoTagPendingStatusL enter" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- TInt fntype;
- aItem.GetNextInt(fntype);
-
- TRequestStatus status = KRequestPending;
- TGeoTaggingSatus tagPendingFlag = EGeoTagCmpt;
- iLocationGeoTagger.GeoTagStaus( status, tagPendingFlag );
-
- User::WaitForRequest( status );
-
- TL(status.Int() == KErrNone);
-
- if(fntype == 0 )
- {
- //for geotagged photos the tag status will be pending
- TL(tagPendingFlag == EGeoTaggingPending);
- }
- else
- {
- //for geotagged photos the tag status will be pending
- TL(tagPendingFlag == EGeoTagCmpt);
- }
-
- _LIT( KMsg2, "TestGeoTagPendingStatusL exit" );
- iLog->Log( KMsg2 );
- RDebug::Print( KMsg2 );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CLocationManagerTestScripter::TestGeoTagGoingOnStatusL
-// -----------------------------------------------------------------------------
-//
-TInt CLocationManagerTestScripter::TestGeoTagGoingOnStatusL( CStifItemParser& aItem )
- {
- _LIT( KMsg1, "TestGeoTagGoingOnStatusL enter" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- TInt fntype;
- aItem.GetNextInt(fntype);
-
-
- TRequestStatus status = KRequestPending;
- TGeoTaggingSatus tagPendingFlag = EGeoTagCmpt;
- iLocationGeoTagger.GeoTagStaus( status, tagPendingFlag );
-
- User::WaitForRequest( status );
-
- TL(status.Int() == KErrNone);
-
- if(fntype == 0 )
- {
- if(tagPendingFlag == EGeoTaggingPending)
- {
- TConnectionOption conOption(ESilent);
- status = KRequestPending;
- iLocationGeoTagger.StartGeoTagging(status,conOption);
- iLocationGeoTagger.GeoTagStaus( status, tagPendingFlag );
-
- TL(tagPendingFlag == EGeoTaggingGoingOn);
-
- User::WaitForRequest( status );
-
- TL(status.Int() == KErrNone);
- }
- }
- else
- {
- TL(tagPendingFlag == EGeoTagCmpt);
- }
-
- _LIT( KMsg2, "TestGeoTagGoingOnStatusL exit" );
- iLog->Log( KMsg2 );
- RDebug::Print( KMsg2 );
-
- return KErrNone;
- }
-
-
-TInt CLocationManagerTestScripter::CancelGeoTaggingL( CStifItemParser& /*aItem*/ )
- {
- _LIT( KMsg1, "Enter CancelGeoTaggingL" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- TRequestStatus status(KRequestPending);
- TConnectionOption conOption(ESilent);
- iLocationGeoTagger.StartGeoTagging(status,conOption);
- iLocationGeoTagger.CancelGeoTaggingRequest();
-
- User::WaitForRequest( status );
-
- TL(status.Int() == KErrNone);
-
-
- _LIT( KMsg2, "CancelGeoTaggingL exit" );
- iLog->Log( KMsg2 );
- RDebug::Print( KMsg2 );
-
- return KErrNone;
-
- }
-#endif //LOC_REVERSEGEOCODE
-
- // End of file
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/location_manager_api/tsrc/src/RTrackLogTest.cpp
--- a/mds_plat/location_manager_api/tsrc/src/RTrackLogTest.cpp Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,253 +0,0 @@
-/*
-* 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:
-*
-*/
-
-#include "LocationManagerTestScripter.h"
-#include "mdsutils.h"
-#include
-#include
-#include
-#include
-#include
-#include
-
-TInt CLocationManagerTestScripter::SetupTrackLogL( CStifItemParser& /*aItem*/ )
- {
- _LIT( KMsg1, "SetupTrackLog" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- User::LeaveIfError( iTrackLog.Connect() );
-
- return KErrNone;
- }
-
-TInt CLocationManagerTestScripter::TearDownTrackLog( CStifItemParser& /*aItem*/ )
- {
- _LIT( KMsg1, "TearDownTrackLog" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- if ( iTrackLog.IsRecording() )
- {
- iTrackLog.StopTrackLog();
- }
-
- iTrackLog.Close();
-
- return KErrNone;
- }
-
-TInt CLocationManagerTestScripter::RTrackLogTest_AddObserverL( CStifItemParser& /*aItem*/ )
- {
- _LIT( KMsg1, "RTrackLogTest_AddObserver" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- TInt error( KErrNone );
- error = iTrackLog.AddObserver( this );
- if( error != KErrNone && error != KErrAlreadyExists )
- {
- return error;
- }
-
- return KErrNone;
- }
-
-TInt CLocationManagerTestScripter::RTrackLogTest_RemoveObserverL( CStifItemParser& /*aItem*/ )
- {
- _LIT( KMsg1, "RTrackLogTest_RemoveObserver" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- TInt error( KErrNone );
- error = iTrackLog.RemoveObserver( this );
- if( error != KErrNone && error != KErrNotFound )
- {
- return error;
- }
-
- return KErrNone;
- }
-
-void CLocationManagerTestScripter::TrackLogStarted(TInt aError)
- {
- _LIT( KMsg, "CallBck HandleSessionOpened - Error code : %d" );
- TBuf <100> msg;
- msg.Format(KMsg, aError);
- iLog->Log( msg );
- RDebug::Print(msg);
-
- // session event
- TEventIf event( TEventIf::ESetEvent, _L("Recording") );
- TestModuleIf().Event( event );
- }
-
-void CLocationManagerTestScripter::TrackLogStopped(TInt aError)
- {
- _LIT( KMsg, "CallBck HandleSessionOpened - Error code : %d" );
- TBuf <100> msg;
- msg.Format(KMsg, aError);
- iLog->Log( msg );
- RDebug::Print(msg);
-
- // session event
- TEventIf event( TEventIf::ESetEvent, _L("StopRecording") );
- TestModuleIf().Event( event );
- }
-
-void CLocationManagerTestScripter::GPSFixQualityChanged(TPositionSatelliteInfo& /*aFixQuality*/,
- TBool& /*aTrackingActive*/ )
- {
- _LIT( KMsg1, "CallBck GPSFixQualityChanged" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
- }
-
-TInt CLocationManagerTestScripter::RTrackLogTest_StartTrackLogL( CStifItemParser& /*aItem*/ )
- {
- _LIT( KMsg1, "RTrackLogTest_StartTrackLogL" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- User::LeaveIfError( iTrackLog.StartTrackLog() );
-
- return KErrNone;
- }
-
-TInt CLocationManagerTestScripter::RTrackLogTest_RecordingL( CStifItemParser& /*aItem*/ )
- {
- _LIT( KMsg1, "RTrackLogTest_RecordingL" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- if ( !iTrackLog.IsRecording() )
- {
- return KErrUnknown;
- }
-
- return KErrNone;
- }
-
-TInt CLocationManagerTestScripter::RTrackLogTest_StopTrackLogL( CStifItemParser& /*aItem*/ )
- {
- _LIT( KMsg1, "RTrackLogTest_StopTrackLogL" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- iTrackLog.StopTrackLog();
-
- return KErrNone;
- }
-
-TInt CLocationManagerTestScripter::RTrackLogTest_NotRecordingL( CStifItemParser& /*aItem*/ )
- {
- _LIT( KMsg1, "RTrackLogTest_NotRecordingL" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- if ( iTrackLog.IsRecording() )
- {
- return KErrUnknown;
- }
-
- return KErrNone;
- }
-
-TInt CLocationManagerTestScripter::CrashLocationManagerL( CStifItemParser& /*aItem*/ )
- {
- _LIT( name, "LocationManagerServ*" );
- TFindProcess findProcess( name );
-
- RProcess locManProcess;
- TFullName result;
- findProcess.Next( result );
- User::LeaveIfError( locManProcess.Open( findProcess ) );
- locManProcess.Kill( KErrNone );
- locManProcess.Close();
-
- return KErrNone;
- }
-
-TInt CLocationManagerTestScripter::GetFileL( CStifItemParser& /*aItem*/ )
- {
- _LIT( KMsg1, "GetFileL" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- TFileName name;
- User::LeaveIfError( iTrackLog.TrackLogName( name ) );
- if( name.Length() <= 0 )
- {
- return KErrNotFound;
- }
-
- return KErrNone;
- }
-
-TInt CLocationManagerTestScripter::DeleteFileL( CStifItemParser& /*aItem*/ )
- {
- _LIT( KMsg1, "DeleteFileL" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- TFileName name;
- TInt error( KErrNone );
- error = iTrackLog.TrackLogName( name );
- if( error != KErrNotFound )
- {
- return KErrUnknown;
- }
- error = iTrackLog.DeleteTrackLog( name );
- if( error != KErrNone )
- {
- return error;
- }
-
- return KErrNone;
- }
-
-TInt CLocationManagerTestScripter::GetStatusL( CStifItemParser& /*aItem*/ )
- {
- _LIT( KMsg1, "GetStatusL" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- TPositionSatelliteInfo info;
- TBool recording;
- User::LeaveIfError( iTrackLog.GetStatus( recording, info ) );
-
- return KErrNone;
- }
-
-TInt CLocationManagerTestScripter::GetStatus2L( CStifItemParser& /*aItem*/ )
- {
- _LIT( KMsg1, "GetStatusL" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- TPositionSatelliteInfo info;
- TBool recording;
- User::LeaveIfError( iTrackLog.GetStatus( recording, info ) );
- if( recording )
- {
- return KErrUnknown;
- }
-
- return KErrNone;
- }
-
-// End of file
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/metadata_engine_api/group/bld.inf
--- a/mds_plat/metadata_engine_api/group/bld.inf Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,68 +0,0 @@
-/*
-* Copyright (c) 2005-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: Build information file
-*
-*/
-
-
-#include
-
-PRJ_PLATFORMS
- DEFAULT
-
-PRJ_EXPORTS
-../inc/mdccommon.h MW_LAYER_PLATFORM_EXPORT_PATH(mdccommon.h)
-../inc/mdeerror.h MW_LAYER_PLATFORM_EXPORT_PATH(mdeerror.h)
-../inc/mdeinternalerror.h MW_LAYER_PLATFORM_EXPORT_PATH(mdeinternalerror.h)
-../inc/mdedatabuffer.h MW_LAYER_PLATFORM_EXPORT_PATH(mdedatabuffer.h)
-../inc/mdequery.h MW_LAYER_PLATFORM_EXPORT_PATH(mdequery.h)
-../inc/mdesession.h MW_LAYER_PLATFORM_EXPORT_PATH(mdesession.h)
-../inc/mdeboolpropertycondition.h MW_LAYER_PLATFORM_EXPORT_PATH(mdeboolpropertycondition.h)
-../inc/mdecondition.h MW_LAYER_PLATFORM_EXPORT_PATH(mdecondition.h)
-../inc/mdeconstants.h MW_LAYER_PLATFORM_EXPORT_PATH(mdeconstants.h)
-../inc/mdeevent.h MW_LAYER_PLATFORM_EXPORT_PATH(mdeevent.h)
-../inc/mdeeventcondition.h MW_LAYER_PLATFORM_EXPORT_PATH(mdeeventcondition.h)
-../inc/mdeeventdef.h MW_LAYER_PLATFORM_EXPORT_PATH(mdeeventdef.h)
-../inc/mdeeventquery.h MW_LAYER_PLATFORM_EXPORT_PATH(mdeeventquery.h)
-../inc/mdeinstanceitem.h MW_LAYER_PLATFORM_EXPORT_PATH(mdeinstanceitem.h)
-../inc/mdeitem.h MW_LAYER_PLATFORM_EXPORT_PATH(mdeitem.h)
-../inc/mdelogiccondition.h MW_LAYER_PLATFORM_EXPORT_PATH(mdelogiccondition.h)
-../inc/mdenamespacedef.h MW_LAYER_PLATFORM_EXPORT_PATH(mdenamespacedef.h)
-../inc/mdeobject.h MW_LAYER_PLATFORM_EXPORT_PATH(mdeobject.h)
-../inc/mdeobjectcondition.h MW_LAYER_PLATFORM_EXPORT_PATH(mdeobjectcondition.h)
-../inc/mdeobjectdef.h MW_LAYER_PLATFORM_EXPORT_PATH(mdeobjectdef.h)
-../inc/mdeobjectquery.h MW_LAYER_PLATFORM_EXPORT_PATH(mdeobjectquery.h)
-../inc/mdeorderrule.h MW_LAYER_PLATFORM_EXPORT_PATH(mdeorderrule.h)
-../inc/mdeproperty.h MW_LAYER_PLATFORM_EXPORT_PATH(mdeproperty.h)
-../inc/mdepropertycondition.h MW_LAYER_PLATFORM_EXPORT_PATH(mdepropertycondition.h)
-../inc/mdepropertydef.h MW_LAYER_PLATFORM_EXPORT_PATH(mdepropertydef.h)
-../inc/mderange.h MW_LAYER_PLATFORM_EXPORT_PATH(mderange.h)
-../inc/mderange.inl MW_LAYER_PLATFORM_EXPORT_PATH(mderange.inl)
-../inc/mderangepropertycondition.h MW_LAYER_PLATFORM_EXPORT_PATH(mderangepropertycondition.h)
-../inc/mderelation.h MW_LAYER_PLATFORM_EXPORT_PATH(mderelation.h)
-../inc/mderelationcondition.h MW_LAYER_PLATFORM_EXPORT_PATH(mderelationcondition.h)
-../inc/mderelationdef.h MW_LAYER_PLATFORM_EXPORT_PATH(mderelationdef.h)
-../inc/mderelationquery.h MW_LAYER_PLATFORM_EXPORT_PATH(mderelationquery.h)
-../inc/mdetextpropertycondition.h MW_LAYER_PLATFORM_EXPORT_PATH(mdetextpropertycondition.h)
-../inc/mdetextproperty.h MW_LAYER_PLATFORM_EXPORT_PATH(mdetextproperty.h)
-../inc/mdetextproperty.inl MW_LAYER_PLATFORM_EXPORT_PATH(mdetextproperty.inl)
-../inc/mdenumberproperty.h MW_LAYER_PLATFORM_EXPORT_PATH(mdenumberproperty.h)
-../inc/mdenumberproperty.inl MW_LAYER_PLATFORM_EXPORT_PATH(mdenumberproperty.inl)
-../inc/mdeversioncenrepkey.h MW_LAYER_PLATFORM_EXPORT_PATH(mdeversioncenrepkey.h)
-
-PRJ_MMPFILES
-
-PRJ_TESTMMPFILES
-
-PRJ_TESTEXPORTS
diff -r 87e65c44ff3a -r fe894bb075c2 mds_plat/metadata_engine_api/inc/mdccommon.h
--- a/mds_plat/metadata_engine_api/inc/mdccommon.h Fri Sep 03 10:57:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,385 +0,0 @@
-/*
-* Copyright (c) 2002-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: Common message definitions and utilities
-*
-*/
-
-#ifndef __MDCCOMMON_H__
-#define __MDCCOMMON_H__
-
-// INCLUDE FILES
-#include