author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Tue, 24 Nov 2009 08:56:33 +0200 | |
changeset 33 | 50974a8b132e |
parent 19 | 989d2f495d90 |
permissions | -rw-r--r-- |
19 | 1 |
/* |
2 |
* Copyright (c) 2002 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 the License "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: ?Description |
|
15 |
* |
|
16 |
*/ |
|
17 |
||
18 |
||
19 |
||
20 |
||
21 |
#ifndef CLMCATEGORIESTEST_H |
|
22 |
#define CLMCATEGORIESTEST_H |
|
23 |
||
24 |
// INCLUDES |
|
25 |
#include <StifLogger.h> |
|
26 |
#include <TestScripterInternal.h> |
|
27 |
#include <StifTestModule.h> |
|
28 |
#include <EPos_HPosLmDatabaseInfo.h> |
|
29 |
#include <EPos_CPosLmDatabaseManager.h> |
|
33
50974a8b132e
Revision: 200945
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
30 |
#include <EPos_Landmarks.h> |
19 | 31 |
#include <EPos_CPosLandmarkCategory.h> |
32 |
#include <EPos_CPosLmCatNameCriteria.h> |
|
33
50974a8b132e
Revision: 200945
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
33 |
#include <EPos_CPosLmCategoryManager.h> |
50974a8b132e
Revision: 200945
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
34 |
#include <EPos_CPosLandmarkDatabase.h> |
19 | 35 |
#include "landmarkservice.h" |
36 |
#include "mlandmarkobserver.h" |
|
37 |
||
38 |
_LIT( KClmcategoriestestLogPath, "\\logs\\testframework\\Clmcategoriestest\\" ); |
|
39 |
_LIT( KClmcategoriestestLogFile, "Clmcategoriestest.txt" ); |
|
40 |
||
41 |
class CClmcategoriestest; |
|
42 |
||
43 |
||
44 |
/** |
|
45 |
* CClmcategoriestest test class for STIF Test Framework TestScripter. |
|
46 |
* ?other_description_lines |
|
47 |
* |
|
48 |
* @lib ?library |
|
49 |
* @since ?Series60_version |
|
50 |
*/ |
|
51 |
NONSHARABLE_CLASS(CClmcategoriestest) : public CScriptBase, public MLandmarkObserver |
|
52 |
{ |
|
53 |
public: // Constructors and destructor |
|
54 |
||
55 |
/** |
|
56 |
* Two-phased constructor. |
|
57 |
*/ |
|
58 |
static CClmcategoriestest* NewL( CTestModuleIf& aTestModuleIf ); |
|
59 |
||
60 |
/** |
|
61 |
* Destructor. |
|
62 |
*/ |
|
63 |
virtual ~CClmcategoriestest(); |
|
64 |
||
65 |
public: // Functions from base classes |
|
66 |
||
67 |
/** |
|
68 |
* From CScriptBase Runs a script line. |
|
69 |
* @since ?Series60_version |
|
70 |
* @param aItem Script line containing method name and parameters |
|
71 |
* @return Symbian OS error code |
|
72 |
*/ |
|
73 |
virtual TInt RunMethodL( CStifItemParser& aItem ); |
|
74 |
||
75 |
private: |
|
76 |
||
77 |
/** |
|
78 |
* C++ default constructor. |
|
79 |
*/ |
|
80 |
CClmcategoriestest( CTestModuleIf& aTestModuleIf ); |
|
81 |
||
82 |
/** |
|
83 |
* By default Symbian 2nd phase constructor is private. |
|
84 |
*/ |
|
85 |
void ConstructL(); |
|
86 |
||
87 |
/** |
|
88 |
* Frees all resources allocated from test methods. |
|
89 |
* @since ?Series60_version |
|
90 |
*/ |
|
91 |
void Delete(); |
|
92 |
||
93 |
/** |
|
94 |
* Test methods are listed below. |
|
95 |
*/ |
|
96 |
virtual TInt GetlistAsyncTest1(CStifItemParser &aItem ); |
|
97 |
virtual TInt GetlistAsyncTest2(CStifItemParser &aItem ); |
|
98 |
virtual TInt CategoryGetlistSync(CStifItemParser &aItem ); |
|
99 |
virtual TInt AddCategoryL(CStifItemParser &aItem ); |
|
100 |
virtual TInt UpdateCategoryL(CStifItemParser &aItem ); |
|
101 |
virtual TInt RemoveCategoryL(CStifItemParser &aItem ); |
|
102 |
virtual TInt LinkCategoryL(CStifItemParser &aItem ); |
|
103 |
virtual TInt UnLinkCategoryL(CStifItemParser &aItem ); |
|
104 |
||
105 |
public: // Data |
|
106 |
||
107 |
protected: // Data |
|
108 |
// MLandmarkObserver callback for catetories getlist iterator. |
|
109 |
void HandleCategoryItemsL( CPosLmItemIterator* aIterator, |
|
110 |
TInt32 aTransactionId, TInt aError, const TDesC& aDatabaseUri ); |
|
111 |
// MLandmarkObserver callback for Landmarks getlist iterator. |
|
112 |
void HandleLandmarkItemsL( CPosLmItemIterator* aIterator, |
|
113 |
TInt32 aTransactionId, TInt aError, const TDesC& aDatabaseUri ); |
|
114 |
||
115 |
private: // Data |
|
116 |
enum TestCaseId |
|
117 |
{ |
|
118 |
ECategoryGetlist1=0, |
|
119 |
ECategoryGetlist2, |
|
120 |
}; |
|
121 |
||
122 |
void CreateCategories (); |
|
123 |
void RemoveAllCategories ( CPosLmCategoryManager* aHandle ); |
|
124 |
||
125 |
public: // Friend classes |
|
126 |
//?friend_class_declaration; |
|
127 |
protected: // Friend classes |
|
128 |
//?friend_class_declaration; |
|
129 |
private: // Friend classes |
|
130 |
CPosLmDatabaseManager* iDatabaseManager; |
|
131 |
CPosLandmarkDatabase* iDefaultLmHandle; |
|
132 |
CPosLmCategoryManager* iDefaultCategoryHandle; |
|
133 |
||
134 |
TInt iTestCaseId; |
|
135 |
TInt iResult; |
|
136 |
}; |
|
137 |
||
138 |
#endif // CLMCATEGORIESTEST_H |
|
139 |
||
140 |
// End of File |