30
|
1 |
/*
|
|
2 |
* Copyright (c) 2010 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 |
#ifndef HSCONTENTCOTROLLER_H
|
|
19 |
#define HSCONTENTCOTROLLER_H
|
|
20 |
|
|
21 |
// System includes
|
|
22 |
#include <e32base.h>
|
|
23 |
|
|
24 |
// Forward declarations
|
|
25 |
class CHsContentInfo;
|
|
26 |
class CHsContentInfoArray;
|
|
27 |
|
|
28 |
// Constants
|
|
29 |
|
|
30 |
/**
|
|
31 |
* Unable to add widget because active page is full.
|
|
32 |
* No widgets can be added to this page before removing some first.
|
|
33 |
*/
|
|
34 |
const TInt KHsErrorViewFull = -87001;
|
|
35 |
|
|
36 |
/**
|
|
37 |
* Unable to add this widget because the maximum instance count
|
|
38 |
* per page will exceed
|
|
39 |
*/
|
|
40 |
const TInt KHsErrorMaxInstanceCountExceeded = -87002;
|
|
41 |
|
|
42 |
/**
|
|
43 |
* Unable to add widget because widget is too large to fit.
|
|
44 |
* A smaller widget might fit though.
|
|
45 |
*/
|
|
46 |
const TInt KHsErrorDoesNotFit = -87003;
|
|
47 |
|
|
48 |
|
|
49 |
|
|
50 |
/**
|
|
51 |
* Content controller interface defining the interface to modify
|
|
52 |
* Home screen content.
|
|
53 |
*
|
|
54 |
* @since S60 v5.2
|
|
55 |
*/
|
|
56 |
class MHsContentController
|
|
57 |
{
|
|
58 |
public:
|
|
59 |
/**
|
|
60 |
* Returns the list of available Home screen widgets
|
|
61 |
*
|
|
62 |
* @since S60 v5.2
|
|
63 |
* @param aArray List of widgets
|
|
64 |
* @return KErrNone on success, any of system wide error codes
|
|
65 |
*/
|
|
66 |
virtual TInt WidgetListL( CHsContentInfoArray& aArray ) = 0;
|
|
67 |
|
|
68 |
/**
|
|
69 |
* Returns the list of Home screen widgets included in an application
|
|
70 |
* configuration or a view
|
|
71 |
*
|
|
72 |
* @since S60 v5.2
|
|
73 |
* @param aInfo Content info defining the application configuration
|
|
74 |
* or the view which widget list is requested
|
|
75 |
* @param aArray List of widgets
|
|
76 |
* @return KErrNone on success, any of system wide error codes
|
|
77 |
*/
|
|
78 |
virtual TInt WidgetListL( CHsContentInfo& aInfo, CHsContentInfoArray& aArray ) = 0;
|
|
79 |
|
|
80 |
/**
|
|
81 |
* Returns the list of available Home screen views
|
|
82 |
*
|
|
83 |
* @since S60 v5.2
|
|
84 |
* @param aArray List of views
|
|
85 |
* @return KErrNone on success, any of system wide error codes
|
|
86 |
*/
|
|
87 |
virtual TInt ViewListL( CHsContentInfoArray& aArray ) = 0;
|
|
88 |
|
|
89 |
/**
|
|
90 |
* Returns the list of available Home screen views included in an
|
|
91 |
* application configuration
|
|
92 |
*
|
|
93 |
* @since S60 v5.2
|
|
94 |
* @param aInfo Content info defining the application configuration
|
|
95 |
* @param aArray List of views
|
|
96 |
* @return KErrNone on success, any of system wide error codes
|
|
97 |
*/
|
|
98 |
virtual TInt ViewListL( CHsContentInfo& aInfo, CHsContentInfoArray& aArray ) = 0;
|
|
99 |
|
|
100 |
/**
|
|
101 |
* Returns the list of available Home screen application configurations
|
|
102 |
*
|
|
103 |
* @since S60 v5.2
|
|
104 |
* @param aArray List of application configurations
|
|
105 |
* @return KErrNone on success, any of system wide error codes
|
|
106 |
*/
|
|
107 |
virtual TInt AppListL( CHsContentInfoArray& aArray ) = 0;
|
|
108 |
|
|
109 |
/**
|
|
110 |
* Adds a widget to the active Home screen view.
|
|
111 |
*
|
|
112 |
* @since S60 v5.2
|
|
113 |
* @param aInfo Widget request to be added
|
|
114 |
* @return KErrNone on success, any of system wide error codes,
|
|
115 |
* KHsErrorViewFull, KHsErrorMaxInstanceCountExceeded or
|
|
116 |
* KHsErrorDoesNotFit
|
|
117 |
*/
|
|
118 |
virtual TInt AddWidgetL( CHsContentInfo& aInfo ) = 0;
|
|
119 |
|
|
120 |
/**
|
|
121 |
* Removes a widget from the configuration.
|
|
122 |
*
|
|
123 |
* @since S60 v5.2
|
|
124 |
* @param aInfo Widget request to be removed
|
|
125 |
* @return KErrNone on success, any of system wide error codes
|
|
126 |
*/
|
|
127 |
virtual TInt RemoveWidgetL( CHsContentInfo& aInfo ) = 0;
|
|
128 |
|
|
129 |
/**
|
|
130 |
* Adds a view to the active Home screen application configuration.
|
|
131 |
*
|
|
132 |
* @since S60 v5.2
|
|
133 |
* @param aInfo View request to be added
|
|
134 |
* @return KErrNone on success, any of system wide error codes
|
|
135 |
*/
|
|
136 |
virtual TInt AddViewL( CHsContentInfo& aInfo ) = 0;
|
|
137 |
|
|
138 |
/**
|
|
139 |
* Removes a view from the configuration.
|
|
140 |
*
|
|
141 |
* @since S60 v5.2
|
|
142 |
* @param aInfo View request to be removed
|
|
143 |
* @return KErrNone on success, any of system wide error codes
|
|
144 |
*/
|
|
145 |
virtual TInt RemoveViewL( CHsContentInfo& aInfo ) = 0;
|
|
146 |
|
|
147 |
/**
|
|
148 |
* Activates the Home screen view
|
|
149 |
*
|
|
150 |
* @since S60 v5.2
|
|
151 |
* @param aInfo View request to be activated
|
|
152 |
* @return KErrNone on success, any of system wide error codes
|
|
153 |
*/
|
|
154 |
virtual TInt ActivateViewL( CHsContentInfo& aInfo ) = 0;
|
|
155 |
|
|
156 |
/**
|
|
157 |
* Activates the Home screen application configuration
|
|
158 |
*
|
|
159 |
* @since S60 v5.2
|
|
160 |
* @param aInfo Application configuration request to be activated
|
|
161 |
* @return KErrNone on success, any of system wide error codes
|
|
162 |
*/
|
|
163 |
virtual TInt ActivateAppL( CHsContentInfo& aInfo ) = 0;
|
|
164 |
|
|
165 |
/**
|
|
166 |
* Returns the active Home screen view
|
|
167 |
*
|
|
168 |
* @since S60 v5.2
|
|
169 |
* @param aInfo Active view
|
|
170 |
* @return KErrNone on success, any of system wide error codes
|
|
171 |
*/
|
|
172 |
virtual TInt ActiveViewL( CHsContentInfo& aInfo ) = 0;
|
|
173 |
|
|
174 |
/**
|
|
175 |
* Returns the active Home screen application configuration
|
|
176 |
*
|
|
177 |
* @since S60 v5.2
|
|
178 |
* @param aInfo Active application configuration
|
|
179 |
* @return KErrNone on success, any of system wide error codes
|
|
180 |
*/
|
|
181 |
virtual TInt ActiveAppL( CHsContentInfo& aInfo ) = 0;
|
|
182 |
|
|
183 |
};
|
|
184 |
|
|
185 |
|
|
186 |
#endif // HSCONTENTCOTROLLER_H
|
|
187 |
|
|
188 |
// End of file
|