|
1 /* |
|
2 * Copyright (c) 2008 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 |
|
20 |
|
21 #ifndef __CREATORBROWSER_H__ |
|
22 #define __CREATORBROWSER_H__ |
|
23 |
|
24 #include "creator_model.h" |
|
25 #include "creator_modulebase.h" |
|
26 |
|
27 #include <e32base.h> |
|
28 #include <FavouritesItem.h> |
|
29 #include <FavouritesDb.h> |
|
30 #include <FavouritesFile.h> |
|
31 |
|
32 |
|
33 |
|
34 class CCreatorEngine; |
|
35 class CBrowserParameters; |
|
36 |
|
37 |
|
38 class CCreatorBrowser : public CBase, public MCreatorModuleBase |
|
39 { |
|
40 public: |
|
41 static CCreatorBrowser* NewL(CCreatorEngine* aEngine); |
|
42 static CCreatorBrowser* NewLC(CCreatorEngine* aEngine); |
|
43 ~CCreatorBrowser(); |
|
44 |
|
45 private: |
|
46 CCreatorBrowser(); |
|
47 void ConstructL(CCreatorEngine* aEngine); // from MCreatorModuleBase |
|
48 |
|
49 public: |
|
50 TBool AskDataFromUserL(TInt aCommand, TInt& aNumberOfEntries); // from MCreatorModuleBase |
|
51 TInt CreateBookmarkEntryL(CBrowserParameters *aParameters); |
|
52 TInt CreateBookmarkFolderEntryL(CBrowserParameters *aParameters); |
|
53 TInt CreateSavedDeckEntryL(CBrowserParameters *aParameters); |
|
54 TInt CreateSavedDeckFolderEntryL(CBrowserParameters *aParameters); |
|
55 |
|
56 void DeleteAllL(); |
|
57 void DeleteAllCreatedByCreatorL(); |
|
58 |
|
59 void DeleteAllBookmarksL(); |
|
60 void DeleteAllBookmarksCreatedByCreatorL(); |
|
61 void DeleteAllBookmarkFoldersL(); |
|
62 void DeleteAllBookmarkFoldersCreatedByCreatorL(); |
|
63 void DeleteAllSavedPagesL(); |
|
64 void DeleteAllSavedPagesCreatedByCreatorL(); |
|
65 void DeleteAllSavedPageFoldersL(); |
|
66 void DeleteAllSavedPageFoldersCreatedByCreatorL(); |
|
67 |
|
68 private: |
|
69 void DeleteAllItemsL( const TDesC& aDbName, CFavouritesItem::TType aTypeFilter, TBool aOnlyCreatedWithCreator, RArray<TInt>& aEntryIds, const TUid aDictUid ); |
|
70 |
|
71 |
|
72 |
|
73 private: |
|
74 CBrowserParameters* iParameters; |
|
75 RArray<TInt> iBmEntryIds; |
|
76 RArray<TInt> iBmFEntryIds; |
|
77 RArray<TInt> iSpEntryIds; |
|
78 RArray<TInt> iSpFEntryIds; |
|
79 public: |
|
80 }; |
|
81 |
|
82 |
|
83 class CBrowserParameters : public CCreatorModuleBaseParameters |
|
84 { |
|
85 public: |
|
86 HBufC* iBookmarkName; |
|
87 HBufC* iBookmarkAddress; |
|
88 TFavouritesWapAp iBookmarkAccessPoint; |
|
89 HBufC* iBookmarkUsername; |
|
90 HBufC* iBookmarkPassword; |
|
91 |
|
92 HBufC* iBookmarkFolderName; |
|
93 |
|
94 HBufC* iSavedDeckLinkName; |
|
95 HBufC* iSavedDeckLocalAddress; |
|
96 |
|
97 HBufC* iSavedDeckFolderName; |
|
98 |
|
99 public: |
|
100 CBrowserParameters(); |
|
101 ~CBrowserParameters(); |
|
102 }; |
|
103 |
|
104 |
|
105 |
|
106 #endif // __CREATORBROWSER_H__ |