author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Wed, 13 Oct 2010 14:30:35 +0300 | |
branch | RCL_3 |
changeset 86 | ed599363c2d7 |
parent 66 | bd7edf625bdd |
permissions | -rw-r--r-- |
0
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1 |
/* |
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2 |
* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). |
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3 |
* All rights reserved. |
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4 |
* This component and the accompanying materials are made available |
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5 |
* under the terms of "Eclipse Public License v1.0" |
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
6 |
* which accompanies this distribution, and is available |
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html". |
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
8 |
* |
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
9 |
* Initial Contributors: |
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
10 |
* Nokia Corporation - initial contribution. |
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
11 |
* |
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
12 |
* Contributors: |
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
13 |
* |
66 | 14 |
* Description: Calendar controller |
0
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
15 |
* |
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
16 |
*/ |
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
17 |
|
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
18 |
|
66 | 19 |
|
0
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
20 |
#ifndef CALENCONTROLLER_H |
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
21 |
#define CALENCONTROLLER_H |
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
22 |
|
66 | 23 |
// INCLUDES |
24 |
#include <e32base.h> // CAsyncCallBack |
|
25 |
#include <vwsdef.h> // TVwsViewId |
|
26 |
#include <apadef.h> // TApaCommand |
|
27 |
#include <calencommands.hrh> // Calendar commands |
|
28 |
#include <caleninstanceid.h> // TCalenInstanceId |
|
29 |
#include <calennotificationhandler.h> // TCalenNotification |
|
30 |
#include <calenservices.h> |
|
31 |
class MCalenPreview; |
|
32 |
#include "calenglobaldata.h" // TCalenContext |
|
0
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
33 |
#include "calenservicesfactory.h" // MCalenServicesFactory |
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
34 |
|
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
35 |
// FORWARD DECLARATIONS |
66 | 36 |
class CCalenActionUi; |
37 |
class CCalenNotifier; |
|
38 |
class CCalenViewManager; |
|
39 |
class CCalenAlarmManager; |
|
40 |
class CCalenView; |
|
41 |
class CAknViewAppUi; |
|
65
12af337248b1
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
27
diff
changeset
|
42 |
class CCalenStateMachine; |
66 | 43 |
class CCalenCmdLineLauncher; |
44 |
class CCalenCustomisationManager; |
|
45 |
class CEikMenuPane; |
|
46 |
class CCoeControl; |
|
47 |
class CCalenViewInfo; |
|
48 |
class CCalenSetting; |
|
49 |
class CCalenServicesImpl; |
|
65
12af337248b1
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
27
diff
changeset
|
50 |
class MCalenCommandHandler; |
66 | 51 |
class TCalenCommand; |
52 |
class CMissedAlarmStore; |
|
53 |
class CCalenMultipleDbManager; |
|
54 |
class CCalenInfo; |
|
55 |
class CCalenAttachmentModel; |
|
0
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
56 |
|
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
57 |
// CLASS DEFINITIONS |
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
58 |
|
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
59 |
/** |
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
60 |
* The controller handles events from the rest of Calendar and delegates |
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
61 |
* them to the appropriate place (i.e. the action ui classes). |
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
62 |
*/ |
66 | 63 |
class CCalenController : public CBase, |
64 |
public MCalenServicesFactory |
|
0
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
65 |
{ |
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
66 |
public: // Construction and destruction |
66 | 67 |
/** |
68 |
* Symbian 1st phase constructor |
|
69 |
* @param aAppUi A reference to the CAknViewAppUi |
|
70 |
* @return self pointer to CCalenController |
|
71 |
*/ |
|
72 |
IMPORT_C static CCalenController* NewL( CAknViewAppUi& aAppUi ); |
|
73 |
||
74 |
/** |
|
75 |
* Constructs CCalenController with existing CAknViewAppUi. If the |
|
76 |
* controller has been previously initialized with the same CAknViewAppUi, |
|
77 |
* the existing instance will be returned. |
|
78 |
* @param aAppUi Reference to CAknViewAppUi |
|
79 |
* @return CCalenController pointer |
|
80 |
*/ |
|
81 |
IMPORT_C static CCalenController* InstanceL(); |
|
65
12af337248b1
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
27
diff
changeset
|
82 |
|
66 | 83 |
/** |
84 |
* CCalenController is a reference counting singleton. Call Release() |
|
85 |
* when you are done with it, it will clean itself when it needs to |
|
86 |
*/ |
|
87 |
IMPORT_C void Release(); |
|
0
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
88 |
|
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
89 |
public: // New functions |
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
90 |
/** |
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
91 |
* Adds the passed command to the command queue. Command are handled |
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
92 |
* asynchronously in HandleCommandL |
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
93 |
* @param aCommand Command that is passed in. |
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
94 |
* @return EFalse if the passed command is not in the issuers command range |
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
95 |
* ETrue otherwise |
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
96 |
*/ |
66 | 97 |
IMPORT_C TBool IssueCommandL( TInt aCommand ); |
98 |
||
99 |
/** |
|
0
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
100 |
* Passes the notification to the calendar notifier. The notification will be |
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
101 |
* broadcast to all observers |
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
102 |
* @param aNotification Notification to be broadcast |
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
103 |
*/ |
66 | 104 |
IMPORT_C void BroadcastNotification( TCalenNotification aNotification ); |
0
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
105 |
|
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
106 |
/** |
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
107 |
* Register the passed notification handler with the calendar notifier |
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
108 |
* @param aHandler Notification handler |
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
109 |
* @param aNotification Notification that handler wants to be notified |
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
110 |
*/ |
66 | 111 |
IMPORT_C void RegisterForNotificationsL( MCalenNotificationHandler* aHandler, |
0
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
112 |
TCalenNotification aNotification ); |
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
113 |
|
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
114 |
|
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
115 |
/** |
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
116 |
* Register the passed notification handler with the calendar notifier |
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
117 |
* @param aHandler Notification handler |
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
118 |
* @param aNotifications Array of Notifications that handler wants to be notified |
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
119 |
*/ |
66 | 120 |
IMPORT_C void RegisterForNotificationsL( MCalenNotificationHandler* aHandler, |
0
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
121 |
RArray<TCalenNotification>& aNotifications ); |
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
122 |
|
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
123 |
/** |
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
124 |
* Unregister the passed handler with the notifier |
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
125 |
* @param aHandler Notification handler |
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
126 |
*/ |
66 | 127 |
IMPORT_C void CancelNotifications( MCalenNotificationHandler* aHandler ); |
128 |
||
129 |
/** |
|
130 |
* Process comamndline parameters |
|
131 |
* @param aCommand Not in use in this case |
|
132 |
* @param aDocumentName Not in use in this case |
|
133 |
* @param aTail Descriptor contains the command |
|
0
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
134 |
*/ |
66 | 135 |
IMPORT_C void ProcessCommandParametersL( TApaCommand aCommand, |
136 |
TFileName& aDocumentName, |
|
137 |
const TDesC8& aTail ); |
|
138 |
/** |
|
139 |
* Offer the menu pane to Plugins to customisation |
|
140 |
* @param aMenuPane Where the customisation apply to |
|
141 |
*/ |
|
142 |
IMPORT_C void OfferMenuPaneL( TInt aResourceId, |
|
143 |
CEikMenuPane* aMenuPane ); |
|
144 |
||
145 |
/** |
|
146 |
* Get infobar based on the available area for infobar |
|
147 |
* @param aRect The available area for Infobar |
|
148 |
* @return pointer to a Infobar control |
|
149 |
*/ |
|
150 |
IMPORT_C CCoeControl* Infobar( const TRect& aRect ); |
|
151 |
||
0
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
152 |
/** |
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
153 |
* Get infobar based on the available area for infobar |
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
154 |
* @param aRect The available area for Infobar |
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
155 |
* @return pointer to a Infobar control |
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
156 |
*/ |
66 | 157 |
IMPORT_C const TDesC& Infobar(); |
158 |
||
159 |
/** |
|
160 |
* Get preview pane based on the available area |
|
161 |
* @param aRect The available area for preview pane |
|
162 |
* @return pointer to a preview pane control |
|
163 |
*/ |
|
164 |
IMPORT_C CCoeControl* PreviewPane( TRect& aRect ); |
|
65
12af337248b1
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
27
diff
changeset
|
165 |
|
66 | 166 |
/** |
167 |
* Releases all plugins, should only be called when |
|
168 |
* the application is exiting. |
|
0
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
169 |
*/ |
66 | 170 |
IMPORT_C void ReleaseCustomisations(); |
0
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
171 |
|
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
172 |
/** |
66 | 173 |
* From MCalenServicesFactory |
0
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
174 |
*/ |
66 | 175 |
IMPORT_C MCalenServices* NewServicesL(); |
176 |
||
177 |
/* |
|
178 |
* Get custom preview pane to replace the native one. |
|
179 |
* @param aRect TRect of preview pane area. |
|
180 |
* @return MCalenPreview* pointer to MCalenPreview class |
|
0
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
181 |
*/ |
66 | 182 |
IMPORT_C MCalenPreview* CustomPreviewPaneL( TRect& aRect ); |
0
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
183 |
|
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
184 |
public: // public but not exported |
66 | 185 |
/** |
186 |
* Get reference to the CCalenNotiffier |
|
187 |
*/ |
|
188 |
CCalenNotifier& Notifier(); |
|
0
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
189 |
|
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
190 |
/** |
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
191 |
* Get a command handler for a specific command |
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
192 |
* @param aCommand Command to find a command handler for |
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
193 |
*/ |
66 | 194 |
MCalenCommandHandler* GetCommandHandlerL( TInt aCommand ); |
195 |
||
196 |
/** |
|
197 |
* Request activation of a specific view |
|
198 |
* @param aViewId View id |
|
199 |
*/ |
|
200 |
void RequestActivationL( const TVwsViewId& aViewId ); |
|
201 |
||
202 |
/** |
|
203 |
* Get customisationmanager |
|
204 |
* @return reference to CCalenCustomisationManager |
|
205 |
*/ |
|
206 |
CCalenCustomisationManager& CustomisationManager(); |
|
207 |
||
0
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
208 |
/** |
65
12af337248b1
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
27
diff
changeset
|
209 |
* Get viewmanager |
66 | 210 |
* @return reference to CCalenViewManager |
0
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
211 |
*/ |
66 | 212 |
CCalenViewManager& ViewManager(); |
0
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
213 |
|
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
214 |
/** |
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
215 |
* Get services |
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
216 |
* @return reference to controller's services object |
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
217 |
*/ |
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
218 |
MCalenServices& Services(); |
66 | 219 |
|
0
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
220 |
/** |
66 | 221 |
* Checks to see if the system time was changed while Calendar was |
222 |
* not running, potentially causing alarms to be missed |
|
0
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
223 |
*/ |
66 | 224 |
void HandleSystemTimeChangeL(); |
0
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
225 |
|
66 | 226 |
/** |
227 |
* Check for faster app flag |
|
0
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
228 |
*/ |
66 | 229 |
TBool IsFasterAppFlagEnabled(); |
230 |
||
231 |
/** |
|
232 |
* Set faster app flag |
|
233 |
*/ |
|
234 |
void SetFasterAppFlag( TBool aFlag ); |
|
0
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
235 |
|
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
236 |
/** |
66 | 237 |
* Get Missed alarm store |
238 |
* @return reference to Missed alarm store |
|
239 |
*/ |
|
240 |
CMissedAlarmStore* MissedAlarmStore(); |
|
241 |
||
242 |
/** |
|
243 |
* Get missed alarms list |
|
244 |
* @return list of missed alarms |
|
245 |
*/ |
|
246 |
void GetMissedAlarmsList(RArray<TCalenInstanceId>& aMissedAlarmList); |
|
247 |
||
248 |
/** |
|
249 |
* returns a reference to the calendar settings |
|
250 |
*/ |
|
251 |
CCalenSetting& Settings(); |
|
252 |
||
253 |
/** |
|
254 |
* Get calendar icon of specific type |
|
255 |
* @return CGulIcon* |
|
256 |
*/ |
|
257 |
CGulIcon* GetIconL(MCalenServices::TCalenIcons aIndex, const TInt aViewId = 0 ); |
|
258 |
||
259 |
/* Get multipledb manager |
|
260 |
* @return reference to CCalenMultipleDbManager |
|
261 |
*/ |
|
262 |
CCalenMultipleDbManager& MultipleDbManager(); |
|
263 |
||
264 |
/* |
|
265 |
* Get all active collection id |
|
266 |
* @param aCollectionIds array for collection on return |
|
267 |
* @return void |
|
268 |
*/ |
|
269 |
void GetActiveCollectionidsL(RArray<TInt>& aCollectionIds); |
|
270 |
||
271 |
/* |
|
272 |
* Form calendar name based dbid for eg:for |
|
273 |
* c:Calendar append dbid 1 as c:Calendar1 |
|
274 |
* @return HBufC* calendar name ownership return to caller. |
|
275 |
* @param TInt aDbId db id for which calendar name should be formed. |
|
0
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
276 |
*/ |
66 | 277 |
HBufC* GetCalendarNameFromDbIdL(const TInt aDbId); |
278 |
||
279 |
||
280 |
/** |
|
281 |
* Get State Machine |
|
282 |
* @return reference to CCalenStateMachine |
|
283 |
*/ |
|
284 |
CCalenStateMachine& StateMachine(); |
|
0
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
285 |
|
66 | 286 |
/** |
287 |
* Get action ui |
|
288 |
* |
|
289 |
* @return reference to CCalenActionUi |
|
290 |
*/ |
|
291 |
CCalenAttachmentModel& AttachmentData(); |
|
292 |
||
293 |
/** |
|
294 |
* Function to tell whether editor is active or not |
|
295 |
* @return ETrue if editor is active else EFalse |
|
296 |
*/ |
|
297 |
TBool IsEditorActive(); |
|
298 |
||
299 |
/** |
|
300 |
* @brief adds a new calendar info to the calendar file |
|
301 |
* |
|
302 |
* @param aCalendarInfo meatadata to be set to calendar file |
|
303 |
*/ |
|
304 |
void AddCalendarL(CCalCalendarInfo* aCalendarInfo); |
|
305 |
||
306 |
/** |
|
307 |
* @brief removes a calendar |
|
308 |
* |
|
309 |
* @param aCalendarFileName name of the calendar file to be deleted |
|
310 |
*/ |
|
311 |
void RemoveCalendarL(const TDesC& aCalendarFileName); |
|
312 |
||
313 |
/** |
|
314 |
* @brief removes all dead calendars from the file system. |
|
315 |
*/ |
|
316 |
void RemoveDeadCalendarsL(); |
|
317 |
||
318 |
/** |
|
319 |
* @brief updates a calendar file with new metadata |
|
320 |
* |
|
321 |
* @param aCalendarInfo updated metadata to be set to calendar file |
|
322 |
*/ |
|
323 |
void UpdateCalendarL(CCalCalendarInfo* aCalendarInfo); |
|
0
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
324 |
|
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
325 |
/** |
66 | 326 |
* @brief get all available calendar info |
327 |
* |
|
328 |
* @param aCalendarInfoList reference to the calendar info list |
|
329 |
*/ |
|
330 |
void GetAllCalendarInfoL( |
|
331 |
RPointerArray<CCalCalendarInfo>& aCalendarInfoList ); |
|
332 |
||
333 |
/** |
|
334 |
* @brief sets the flag if the calendar application is launched |
|
335 |
* from external application. |
|
336 |
* |
|
337 |
* @param aFlag The flag to be set. |
|
338 |
*/ |
|
339 |
void SetLaunchFromExternalApp( TBool aFlag ); |
|
340 |
||
341 |
/** |
|
342 |
* @brief Checks whether the calendar application is launched |
|
343 |
* from external application. |
|
344 |
* |
|
345 |
* @return ETrue If the calendar application is launched from |
|
346 |
* external application else EFalse. |
|
347 |
*/ |
|
348 |
TBool IsLaunchFromExternalApp(); |
|
349 |
||
350 |
private: // Construction and destruction |
|
351 |
/** |
|
352 |
* C++ constructor |
|
353 |
*/ |
|
354 |
CCalenController( CAknViewAppUi& aAppUi ); |
|
355 |
||
356 |
/** |
|
357 |
* Symbian 2nd phase constructor |
|
358 |
*/ |
|
359 |
void ConstructL(); |
|
360 |
||
361 |
/** |
|
362 |
* destructor |
|
363 |
*/ |
|
364 |
~CCalenController(); |
|
365 |
||
366 |
private: // New functions |
|
0
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
367 |
/** |
66 | 368 |
* Leaving form of HandleCommandL |
369 |
* @param aCommand Command to be handled |
|
370 |
*/ |
|
371 |
void HandleCommandL( TCalenCommand& aCommand ); |
|
372 |
||
373 |
/** |
|
374 |
* Displays an information note if the system time changed |
|
375 |
* while Calendar was inactive |
|
376 |
* @param aResourceId resource id for information note |
|
377 |
*/ |
|
378 |
void ShowSystemChangeInfoNoteL( TInt aResourceId ); |
|
379 |
||
380 |
/** |
|
381 |
* This function is called when a System time is changed. |
|
382 |
* only at the startup |
|
383 |
* @param aThisPtr Specified to be TCallBack() |
|
384 |
* @return EFalse |
|
385 |
*/ |
|
386 |
static TInt SystemTimeChangeCallback(TAny* aThisPtr); |
|
387 |
||
388 |
public: |
|
389 |
/** |
|
390 |
* Check system time change at startup |
|
391 |
*/ |
|
392 |
void CheckSystemTimeAtStartUpL(); |
|
0
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
393 |
|
66 | 394 |
/** |
395 |
* Returns a reference to the appui |
|
396 |
*/ |
|
397 |
CAknViewAppUi& AppUi(); |
|
398 |
||
399 |
/** |
|
400 |
* Set the iIsExitOnDialogClose flag status from command line launcher. |
|
401 |
* @param aFlag , Sets the status |
|
402 |
*/ |
|
403 |
void SetExitOnDialogFlag( TBool aFlag ); //updateflag |
|
404 |
||
405 |
/** |
|
406 |
* Get the iIsExitOnDialogClose flag status from command line launcher. |
|
407 |
* @return TBool, Status of the flag. |
|
408 |
*/ |
|
409 |
TBool GetExitOnDialogFlag(); // getflagstatus |
|
410 |
||
0
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
411 |
private: // Data |
66 | 412 |
CAknViewAppUi& iAppUi; // Calendar AppUi |
413 |
CCalenActionUi* iActionUi; // Default internal command handling |
|
414 |
CCalenNotifier* iNotifier; // Broadcasts calendar events |
|
415 |
CCalenViewManager* iViewManager;// Activate / deactivate views |
|
416 |
CCalenGlobalData* iGlobalData; // Calendar Global Data |
|
417 |
CCalenSetting* iSetting; // Calendar settings |
|
418 |
CCalenServicesImpl* iServices; // Services. |
|
419 |
CCalenAlarmManager* iAlarmManager; //Alarm Manager. |
|
420 |
CCalenMultipleDbManager* iMultipleDbmanager; //Multiple calendar |
|
421 |
CCalenAttachmentModel* iAttachmentData; |
|
422 |
TInt iRefCount; // Reference counting singleton |
|
423 |
||
424 |
// Handles the cmd line launching of calendar |
|
425 |
CCalenCmdLineLauncher* iCmdLineLauncher; |
|
426 |
// Manages any customisation plugins |
|
427 |
CCalenCustomisationManager* iCustomisationManager; |
|
65
12af337248b1
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
27
diff
changeset
|
428 |
CCalenStateMachine* iStateMachine; |
66 | 429 |
|
0
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
430 |
// Start point of the next command range |
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
431 |
// to be assigned to a services instance. |
66 | 432 |
TInt iNextServicesCommandBase; |
433 |
TInt iResourceFileOffset; |
|
434 |
CAsyncCallBack* iSystemTimeChangedMsgDelayer; |
|
435 |
TBool iFasterApp; |
|
436 |
TBool iLaunchFromExternalApp; |
|
0
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
437 |
}; |
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
438 |
|
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
439 |
#endif // CALENCONTROLLER_H |
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
440 |
|
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
441 |
// End of file |