|
1 /* |
|
2 * Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CONTEXTENGINEPLUGINTEST_H |
|
20 #define CONTEXTENGINEPLUGINTEST_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <StifLogger.h> |
|
24 #include <TestScripterInternal.h> |
|
25 #include <StifTestModule.h> |
|
26 #include <mediacollectionmanager.h> |
|
27 |
|
28 // Logging path |
|
29 _LIT( KCollectionManagerTestLogPath, "\\logs\\testframework\\CollectionManagerTest\\" ); |
|
30 // Log file |
|
31 _LIT( KCollectionManagerTestLogFile, "CollectionManagerTest.txt" ); |
|
32 _LIT( KCollectionManagerTestLogFileWithTitle, "CollectionManagerTest_[%S].txt" ); |
|
33 |
|
34 // FORWARD DECLARATIONS |
|
35 class CCollectionManagerTest; |
|
36 |
|
37 // CLASS DECLARATION |
|
38 NONSHARABLE_CLASS(CCollectionManagerTest) : public CScriptBase, |
|
39 public MMediaCollectionObserver |
|
40 |
|
41 { |
|
42 public: // Constructors and destructor |
|
43 |
|
44 /** |
|
45 * Two-phased constructor. |
|
46 */ |
|
47 static CCollectionManagerTest* NewL( CTestModuleIf& aTestModuleIf ); |
|
48 |
|
49 /** |
|
50 * Destructor. |
|
51 */ |
|
52 virtual ~CCollectionManagerTest(); |
|
53 |
|
54 public: // Functions from base classes |
|
55 |
|
56 virtual TInt RunMethodL( CStifItemParser& aItem ); |
|
57 |
|
58 void CollectionChangedL( const TArray<TInt>& aCollectionIdArray ); |
|
59 void CollectionManagerErrorL( TInt aError ); |
|
60 |
|
61 private: |
|
62 |
|
63 /** |
|
64 * C++ default constructor. |
|
65 */ |
|
66 CCollectionManagerTest( CTestModuleIf& aTestModuleIf ); |
|
67 |
|
68 /** |
|
69 * By default Symbian 2nd phase constructor is private. |
|
70 */ |
|
71 void ConstructL(); |
|
72 |
|
73 /** |
|
74 * Frees all resources allocated from test methods. |
|
75 */ |
|
76 void Delete(); |
|
77 |
|
78 /** |
|
79 * Test methods are listed below. |
|
80 */ |
|
81 |
|
82 // engine |
|
83 virtual TInt CreateCollectionManagerL( CStifItemParser& aItem ); |
|
84 virtual TInt GetCollectionInfosL( CStifItemParser& aItem ); |
|
85 virtual TInt CollectionInfoByIdL( CStifItemParser& aItem ); |
|
86 virtual TInt CreateCollectionL( CStifItemParser& aItem ); |
|
87 virtual TInt DeleteCollectionL( CStifItemParser& aItem ); |
|
88 virtual TInt RenameCollectionL( CStifItemParser& aItem ); |
|
89 virtual TInt AddToCollectionL( CStifItemParser& aItem ); |
|
90 virtual TInt RemoveFromCollectionL( CStifItemParser& aItem ); |
|
91 virtual TInt RemoveFromAllCollectionsL( CStifItemParser& aItem ); |
|
92 virtual TInt GetCollectionItemArrayL( CStifItemParser& aItem ); |
|
93 virtual TInt GetCollectionIdByItemL( CStifItemParser& aItem ); |
|
94 virtual TInt AddCollectionObserverL( CStifItemParser& aItem ); |
|
95 virtual TInt RemoveCollectionObserverL( CStifItemParser& aItem ); |
|
96 virtual TInt GetDriveByIdL( CStifItemParser& aItem ); |
|
97 virtual TInt EndTestSessionL( CStifItemParser& aItem ); |
|
98 |
|
99 private: // Data |
|
100 |
|
101 MMediaCollectionManager* iCollectionManager; |
|
102 |
|
103 }; |
|
104 |
|
105 #endif // CONTEXTENGINEPLUGINTEST_H |
|
106 |
|
107 // End of File |