|
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 "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: DM Idle SoftKey Adapter |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef __IdleSoftkeysWebTargetManager_H__ |
|
20 #define __IdleSoftkeysWebTargetManager_H__ |
|
21 |
|
22 |
|
23 // symbian |
|
24 #include <e32base.h> |
|
25 #include <smldmadapter.h> |
|
26 // s60 |
|
27 #include <favouritesdb.h> // Favourites Database |
|
28 |
|
29 class CUiSettingsUtil; |
|
30 |
|
31 class CIdleSoftkeysWebTargetManager : public CBase |
|
32 { |
|
33 public: |
|
34 |
|
35 CIdleSoftkeysWebTargetManager::CIdleSoftkeysWebTargetManager( |
|
36 MSmlDmCallback *& aCallBack, |
|
37 RFavouritesDb & aFavDbSrv ); |
|
38 |
|
39 ~CIdleSoftkeysWebTargetManager(); |
|
40 |
|
41 // |
|
42 // Webtargets |
|
43 // |
|
44 TInt ListWebTargetsL ( CBufFlat &aList ); |
|
45 |
|
46 void CheckWebTargetsL ( ); |
|
47 |
|
48 #ifdef ISADAPTER_USE_CAPTION_IN_WEBTARGET_NAME |
|
49 HBufC8* GenerateNodeNameL ( TInt aIndex ); |
|
50 #endif |
|
51 |
|
52 HBufC8* GenerateNodeNameL ( TInt aIndex, const TDesC8 &aPrefix ); |
|
53 |
|
54 HBufC8* GenerateNodeNameL ( const TDesC8 &aText ); |
|
55 |
|
56 TInt RenameL ( |
|
57 const TDesC8& aURI, |
|
58 const TDesC8& aLUID, |
|
59 const TDesC8& aNewURI |
|
60 ); |
|
61 |
|
62 TInt GetTargetFromNodeNameL ( |
|
63 const TDesC8& aURI, |
|
64 TInt &aIndex |
|
65 ); |
|
66 |
|
67 TInt GetTargetFromNodeNameL ( |
|
68 const TDesC8& aURI, |
|
69 CFavouritesItem &aItem, |
|
70 TInt &aIndex |
|
71 ); |
|
72 |
|
73 void PrepareItemL ( |
|
74 const TDesC8& aURI, |
|
75 CFavouritesItem &aItem, |
|
76 TInt &aIndex |
|
77 ); |
|
78 |
|
79 void ReleaseItemL ( |
|
80 CFavouritesItem &aItem, |
|
81 TBool aUpdate=ETrue |
|
82 ); |
|
83 |
|
84 void SetCaptionL ( |
|
85 const TDesC8& aURI, |
|
86 const TDesC8& aCaption |
|
87 ); |
|
88 |
|
89 void FindWapApL ( |
|
90 const TDesC8& aURI, |
|
91 TInt &aWapAp |
|
92 ); |
|
93 |
|
94 |
|
95 // |
|
96 // URI mapping database ( Webtarget node name / LUID ) |
|
97 // |
|
98 TInt UpdateLUIDDatabaseL ( |
|
99 const TDesC8& aURI, |
|
100 const TDesC8& aLUID, |
|
101 TInt &aIndex |
|
102 ); |
|
103 |
|
104 TInt FindLUIDByURIL ( |
|
105 const TDesC8& aURI, |
|
106 TDes8& aLUID, |
|
107 TInt &aIndex |
|
108 ); |
|
109 |
|
110 TInt FindURIByLUIDL ( |
|
111 TDes8& aURI, |
|
112 const TDesC8& aLUID, |
|
113 TInt &aIndex |
|
114 ); |
|
115 |
|
116 TInt CheckLUIDDatabaseL ( |
|
117 TBool aCleanDatabase=ETrue |
|
118 ); |
|
119 |
|
120 private: |
|
121 |
|
122 TBool iUiSettingsNotInitialized; |
|
123 MSmlDmCallback* &iCallBack; |
|
124 RFavouritesDb &iFavDb; |
|
125 CUiSettingsUtil *iUiSettings; |
|
126 }; |
|
127 |
|
128 #endif //#ifndef __IdleSoftkeysWebTargetManager_H__ |