|
1 /* |
|
2 * Copyright (c) 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: Implementation of collection manager API for external use |
|
15 * |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef __GLXCOLLECTIONMANAGERAO_H__ |
|
21 #define __GLXCOLLECTIONMANAGERAO_H__ |
|
22 |
|
23 #include <e32base.h> |
|
24 #include <glxcollectionmanager.h> |
|
25 #include <StifLogger.h> |
|
26 #include <StifItemParser.h> |
|
27 |
|
28 #include <e32def.h> |
|
29 #include <glxcollectioninfo.h> |
|
30 #include <TestScripterInternal.h> |
|
31 #include <StifTestModule.h> |
|
32 #include <TestclassAssert.h> |
|
33 |
|
34 // @todo: Documentation to be done |
|
35 |
|
36 // Observer CLASS DECLARATION |
|
37 class MObserver |
|
38 { |
|
39 public : |
|
40 virtual void RequestComplete(TInt aError) = 0 ; |
|
41 }; |
|
42 |
|
43 class TElement |
|
44 { |
|
45 public : |
|
46 TElement(); |
|
47 public : |
|
48 TBuf<256> iData; |
|
49 }; |
|
50 |
|
51 |
|
52 |
|
53 class CGlxCollectionManagerAO : public CActive |
|
54 { |
|
55 public: |
|
56 enum TRequestType {EAddToCollectionL,EAddToCollectionL2,ECollectionInfo,ECancel} ; |
|
57 |
|
58 public: |
|
59 |
|
60 static CGlxCollectionManagerAO* NewL(MObserver& aObserver); |
|
61 ~CGlxCollectionManagerAO(); |
|
62 void TestingFunc(CStifItemParser& aItem); |
|
63 void AddToCollectionTestL(); |
|
64 void TestCollectionInfoL(); |
|
65 void TestCancel(); |
|
66 |
|
67 public: // from CActive |
|
68 |
|
69 void RunL(); |
|
70 void DoCancel(); |
|
71 TInt RunError(TInt aError) ; |
|
72 |
|
73 |
|
74 private: |
|
75 CGlxCollectionManagerAO(MObserver& aObserver); |
|
76 void ConstructL(); |
|
77 void ParseUserInput(CArrayFixFlat<TElement>* aArray); |
|
78 |
|
79 private: |
|
80 |
|
81 MObserver& iObserver; |
|
82 CGlxCollectionManager* iCollectionManager; |
|
83 CArrayFixFlat<TElement>* fixflat; |
|
84 CGlxCollectionInfo* iCollectionInfo; |
|
85 CGlxCollectionManager::TCollection iCollection; |
|
86 TUint32 iCollectionId; |
|
87 }; |
|
88 |
|
89 |
|
90 #endif // __GLXCOLLECTIONMANAGERAO_H__ |