calendarui/controller/src/calenservicesimpl.cpp
changeset 18 c198609911f9
parent 0 f979ecb2b13e
child 51 0b38fc5b94c6
equal deleted inserted replaced
0:f979ecb2b13e 18:c198609911f9
    13 *
    13 *
    14 * Description:  Implementation of Calendar services
    14 * Description:  Implementation of Calendar services
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 #include <gulicon.h>
    18 // System includes
    19 #include <calcalendarinfo.h>
    19 #include <agendautil.h>
    20 #include <mcalenpreview.h>
    20 #include <hbwidget.h>
    21 
    21 
    22 #include "calenglobaldata.h"
       
    23 #include "calendarui_debug.h"
    22 #include "calendarui_debug.h"
    24 #include "calenservicesimpl.h"
    23 #include "calenservicesimpl.h"
    25 #include "calencontroller.h"
    24 #include "calencontroller.h"
    26 #include "calenviewmanager.h"
    25 #include "calenviewmanager.h"
    27 #include "calenicons.h"
    26 
    28 #include "calenattachmentmodel.h"
    27 
    29 
    28 
    30 // ----------------------------------------------------------------------------
    29 // ----------------------------------------------------------------------------
    31 // CCalenServicesImpl::NewL
    30 // CalenServicesImpl::NewL
    32 // Two phased constructor.
    31 // Two phased constructor.
    33 // Taking the command range start and end points
    32 // Taking the command range start and end points
    34 // (other items were commented in a header).
    33 // (other items were commented in a header).
    35 // ----------------------------------------------------------------------------
    34 // ----------------------------------------------------------------------------
    36 //
    35 //
    37 CCalenServicesImpl* CCalenServicesImpl::NewL( TInt aCommandRangeStart,
    36 CalenServicesImpl* CalenServicesImpl::NewL( TInt aCommandRangeStart,
    38                                                                   TInt aCommandRangeEnd )
    37                                                                   TInt aCommandRangeEnd )
    39     {
    38     {
    40     TRACE_ENTRY_POINT;
    39     TRACE_ENTRY_POINT;
    41     CCalenServicesImpl* self = new( ELeave ) CCalenServicesImpl(
    40     CalenServicesImpl* self = new( ELeave ) CalenServicesImpl(
    42                                        aCommandRangeStart, aCommandRangeEnd );
    41                                        aCommandRangeStart, aCommandRangeEnd );
    43 
    42 
    44     CleanupStack::PushL( self );
    43     CleanupStack::PushL( self );
    45     self->ConstructL();
    44     self->ConstructL();
    46     CleanupStack::Pop( self );
    45     CleanupStack::Pop( self );
    48     TRACE_EXIT_POINT;
    47     TRACE_EXIT_POINT;
    49     return self;
    48     return self;
    50     }
    49     }
    51 
    50 
    52 // ----------------------------------------------------------------------------
    51 // ----------------------------------------------------------------------------
    53 // CCalenServicesImpl::NewL
    52 // CalenServicesImpl::NewL
    54 // 1st phase of construction.
    53 // 1st phase of construction.
    55 // (other items were commented in a header).
    54 // (other items were commented in a header).
    56 // ----------------------------------------------------------------------------
    55 // ----------------------------------------------------------------------------
    57 //
    56 //
    58 CCalenServicesImpl* CCalenServicesImpl::NewL()
    57 CalenServicesImpl* CalenServicesImpl::NewL()
    59     {
    58     {
    60     TRACE_ENTRY_POINT;
    59     TRACE_ENTRY_POINT;
    61     CCalenServicesImpl* self = new( ELeave ) CCalenServicesImpl( 0, 0 );
    60     CalenServicesImpl* self = new( ELeave ) CalenServicesImpl( 0, 0 );
    62 
    61 
    63     CleanupStack::PushL( self );
    62     CleanupStack::PushL( self );
    64     self->ConstructL();
    63     self->ConstructL();
    65     CleanupStack::Pop( self );
    64     CleanupStack::Pop( self );
    66 
    65 
    67     TRACE_EXIT_POINT;
    66     TRACE_EXIT_POINT;
    68     return self;
    67     return self;
    69     }
    68     }
    70 
    69 
    71 // ----------------------------------------------------------------------------
    70 // ----------------------------------------------------------------------------
    72 // CCalenServicesImpl::CCalenServicesImpl
    71 // CalenServicesImpl::CalenServicesImpl
    73 // C++ constructor.
    72 // C++ constructor.
    74 // (other items were commented in a header).
    73 // (other items were commented in a header).
    75 // ----------------------------------------------------------------------------
    74 // ----------------------------------------------------------------------------
    76 //
    75 //
    77 CCalenServicesImpl::CCalenServicesImpl( TInt aCommandRangeStart,
    76 CalenServicesImpl::CalenServicesImpl( TInt aCommandRangeStart,
    78                                                         TInt aCommandRangeEnd )
    77                                                         TInt aCommandRangeEnd )
    79     : iCommandRangeStart( aCommandRangeStart ),
    78     : iCommandRangeStart( aCommandRangeStart ),
    80       iCommandRangeEnd( aCommandRangeEnd )
    79       iCommandRangeEnd( aCommandRangeEnd )
    81     {
    80     {
    82     TRACE_ENTRY_POINT;
    81     TRACE_ENTRY_POINT;
    83     TRACE_EXIT_POINT;
    82     TRACE_EXIT_POINT;
    84     }
    83     }
    85 
    84 
    86 // ----------------------------------------------------------------------------
    85 // ----------------------------------------------------------------------------
    87 // CCalenServicesImpl::ConstructL
    86 // CalenServicesImpl::ConstructL
    88 // 2nd phase of construction.
    87 // 2nd phase of construction.
    89 // (other items were commented in a header).
    88 // (other items were commented in a header).
    90 // ----------------------------------------------------------------------------
    89 // ----------------------------------------------------------------------------
    91 //
    90 //
    92 void CCalenServicesImpl::ConstructL()
    91 void CalenServicesImpl::ConstructL()
    93     {
    92     {
    94     TRACE_ENTRY_POINT;
    93     TRACE_ENTRY_POINT;
    95 
    94 
    96     iGlobalData = CCalenGlobalData::InstanceL();
       
    97     iController = CCalenController::InstanceL();
    95     iController = CCalenController::InstanceL();
    98 
    96 
    99     TRACE_EXIT_POINT;
    97     TRACE_EXIT_POINT;
   100     }
    98     }
   101 
    99 
   102 // ----------------------------------------------------------------------------
   100 // ----------------------------------------------------------------------------
   103 // CCalenServicesImpl::Release
   101 // CalenServicesImpl::Release
   104 // Performs cleanup of this object.
   102 // Performs cleanup of this object.
   105 // (other items were commented in a header).
   103 // (other items were commented in a header).
   106 // ----------------------------------------------------------------------------
   104 // ----------------------------------------------------------------------------
   107 //
   105 //
   108 void CCalenServicesImpl::Release()
   106 void CalenServicesImpl::Release()
   109     {
   107     {
   110     TRACE_ENTRY_POINT;
   108     TRACE_ENTRY_POINT;
   111 
       
   112     if( iGlobalData )
       
   113         {
       
   114         iGlobalData->Release();
       
   115         }
       
   116 
   109 
   117     if( iController )
   110     if( iController )
   118         {
   111         {
   119         iController->Release();
   112         iController->Release();
   120         }
   113         }  
   121 
   114     
   122     delete this;
   115     delete this;
   123 
   116 
   124     TRACE_EXIT_POINT;
   117     TRACE_EXIT_POINT;
   125     }
   118     }
   126 
   119 
   127 // ----------------------------------------------------------------------------
   120 // ----------------------------------------------------------------------------
   128 // CCalenServicesImpl::SessionL
   121 // CalenServicesImpl::SessionL
   129 // Retrieve the calendar session currently in use by Calendar
   122 // Retrieve the calendar session currently in use by Calendar
   130 // (other items were commented in a header).
   123 // (other items were commented in a header).
   131 // ----------------------------------------------------------------------------
   124 // ----------------------------------------------------------------------------
   132 //
   125 //
   133 CCalSession& CCalenServicesImpl::SessionL()
   126 HbMainWindow& CalenServicesImpl::MainWindow()
   134     {
   127     {
   135     TRACE_ENTRY_POINT;
   128 	TRACE_ENTRY_POINT;
   136 
   129     ASSERT( iController ); // Make sure ConstructL has been called.
   137     ASSERT( iGlobalData && iController ); // Make sure ConstructL has been called.
   130 	TRACE_EXIT_POINT;
   138 
   131     return iController->MainWindow();
   139     TRACE_EXIT_POINT;
   132     }
   140     return iGlobalData->CalSessionL();
   133 
   141     }
   134 // ----------------------------------------------------------------------------
   142 
   135 // CalenServicesImpl::RegisterForNotificationsL
   143 // ----------------------------------------------------------------------------
       
   144 // CCalenServicesImpl::EntryViewL
       
   145 // Retrieve the calendar entry view currently in use by Calendar
       
   146 // (other items were commented in a header).
       
   147 // ----------------------------------------------------------------------------
       
   148 //
       
   149 CCalEntryView* CCalenServicesImpl::EntryViewL()
       
   150     {
       
   151     TRACE_ENTRY_POINT;
       
   152 
       
   153     ASSERT( iGlobalData && iController ); // Make sure ConstructL has been called.
       
   154 
       
   155     TRACE_EXIT_POINT;
       
   156     return iGlobalData->EntryViewL();
       
   157     }
       
   158 
       
   159 // ----------------------------------------------------------------------------
       
   160 // CCalenServicesImpl::InstanceViewL
       
   161 // Retrieve the calendar instance view currently in use by Calendar
       
   162 // (other items were commented in a header).
       
   163 // ----------------------------------------------------------------------------
       
   164 //
       
   165 CCalInstanceView* CCalenServicesImpl::InstanceViewL()
       
   166     {
       
   167     TRACE_ENTRY_POINT;
       
   168 
       
   169     ASSERT( iGlobalData && iController ); // Make sure ConstructL has been called.
       
   170 
       
   171     TRACE_EXIT_POINT;
       
   172     return iGlobalData->InstanceViewL();
       
   173     }
       
   174 
       
   175 // ----------------------------------------------------------------------------
       
   176 // CCalenServicesImpl::InterimUtilsL()
       
   177 // Retrieve interimutils from globaldata
       
   178 // (other items were commented in a header).
       
   179 // ----------------------------------------------------------------------------
       
   180 //
       
   181 CCalenInterimUtils2& CCalenServicesImpl::InterimUtilsL()
       
   182     {
       
   183     TRACE_ENTRY_POINT;
       
   184     TRACE_EXIT_POINT;
       
   185     return iGlobalData->InterimUtilsL();
       
   186     }
       
   187 
       
   188 // ----------------------------------------------------------------------------
       
   189 // CCalenServicesImpl::RegisterForNotificationsL
       
   190 // Register for notification of Calendar event
   136 // Register for notification of Calendar event
   191 // (other items were commented in a header).
   137 // (other items were commented in a header).
   192 // ----------------------------------------------------------------------------
   138 // ----------------------------------------------------------------------------
   193 //
   139 //
   194 void CCalenServicesImpl::RegisterForNotificationsL( MCalenNotificationHandler* aHandler,
   140 void CalenServicesImpl::RegisterForNotificationsL( MCalenNotificationHandler* aHandler,
   195                                                             TCalenNotification aNotification )
   141                                                             TCalenNotification aNotification )
   196     {
   142     {
   197     TRACE_ENTRY_POINT;
   143     TRACE_ENTRY_POINT;
   198 
   144 
   199     ASSERT( iGlobalData && iController ); // Make sure ConstructL has been called.
   145     ASSERT( iController ); // Make sure ConstructL has been called.
   200     iController->RegisterForNotificationsL( aHandler, aNotification );
   146     iController->RegisterForNotificationsL( aHandler, aNotification );
   201 
   147 
   202     TRACE_EXIT_POINT;
   148     TRACE_EXIT_POINT;
   203     }
   149     }
   204 
   150 
   205 // ----------------------------------------------------------------------------
   151 // ----------------------------------------------------------------------------
   206 // CCalenServicesImpl::RegisterForNotificationsL
   152 // CalenServicesImpl::RegisterForNotificationsL
   207 // Register for array notifications of Calendar events
   153 // Register for array notifications of Calendar events
   208 // (other items were commented in a header).
   154 // (other items were commented in a header).
   209 // ----------------------------------------------------------------------------
   155 // ----------------------------------------------------------------------------
   210 //
   156 //
   211 void CCalenServicesImpl::RegisterForNotificationsL( MCalenNotificationHandler* aHandler,
   157 void CalenServicesImpl::RegisterForNotificationsL( MCalenNotificationHandler* aHandler,
   212                                                             RArray<TCalenNotification>& aNotifications )
   158                                                             RArray<TCalenNotification>& aNotifications )
   213     {
   159     {
   214     TRACE_ENTRY_POINT;
   160     TRACE_ENTRY_POINT;
   215 
   161 
   216     ASSERT( iGlobalData && iController ); // Make sure ConstructL has been called.
   162     ASSERT( iController ); // Make sure ConstructL has been called.
   217     iController->RegisterForNotificationsL( aHandler, aNotifications );
   163     iController->RegisterForNotificationsL( aHandler, aNotifications );
   218 
   164 
   219     TRACE_EXIT_POINT;
   165     TRACE_EXIT_POINT;
   220     }
   166     }
   221 
   167 
   222 // ----------------------------------------------------------------------------
   168 // ----------------------------------------------------------------------------
   223 // CCalenServicesImpl::CancelNotifications
   169 // CalenServicesImpl::CancelNotifications
   224 // Cancel notifications of Calendar events
   170 // Cancel notifications of Calendar events
   225 // (other items were commented in a header).
   171 // (other items were commented in a header).
   226 // ----------------------------------------------------------------------------
   172 // ----------------------------------------------------------------------------
   227 //
   173 //
   228 void CCalenServicesImpl::CancelNotifications( MCalenNotificationHandler* aHandler )
   174 void CalenServicesImpl::CancelNotifications( MCalenNotificationHandler* aHandler )
   229     {
   175     {
   230     TRACE_ENTRY_POINT;
   176     TRACE_ENTRY_POINT;
   231 
   177 
   232     ASSERT( iGlobalData && iController ); // Make sure ConstructL has been called.
   178     ASSERT( iController ); // Make sure ConstructL has been called.
   233     iController->CancelNotifications( aHandler );
   179     iController->CancelNotifications( aHandler );
   234 
   180 
   235     TRACE_EXIT_POINT;
   181     TRACE_EXIT_POINT;
   236     }
   182     }
   237 
   183 
   238 // ----------------------------------------------------------------------------
   184 // ----------------------------------------------------------------------------
   239 // CCalenServicesImpl::IssueCommandL
   185 // CalenServicesImpl::IssueCommandL
   240 // Issue a command to be handled by Calendar or a customization
   186 // Issue a command to be handled by Calendar or a customization
   241 // (other items were commented in a header).
   187 // (other items were commented in a header).
   242 // ----------------------------------------------------------------------------
   188 // ----------------------------------------------------------------------------
   243 //
   189 //
   244 TBool CCalenServicesImpl::IssueCommandL( TInt aCommand )
   190 TBool CalenServicesImpl::IssueCommandL( TInt aCommand )
   245     {
   191     {
   246     TRACE_ENTRY_POINT;
   192     TRACE_ENTRY_POINT;
   247     ASSERT( iGlobalData && iController ); // Make sure ConstructL has been called.
   193     ASSERT( iController ); // Make sure ConstructL has been called.
   248 
   194 
   249     TRACE_EXIT_POINT;
   195     TRACE_EXIT_POINT;
   250     return iController->IssueCommandL( aCommand );
   196     return iController->IssueCommandL( aCommand );
   251     }
   197     }
   252 
   198 
   253 // ----------------------------------------------------------------------------
   199 // ----------------------------------------------------------------------------
   254 // CCalenServicesImpl::IssueNotificationL
   200 // CalenServicesImpl::IssueNotificationL
   255 // Issue a notification to Calendar, which will be broadcast synchronously
   201 // Issue a notification to Calendar, which will be broadcast synchronously
   256 // to all registered notification handlers
   202 // to all registered notification handlers
   257 // (other items were commented in a header).
   203 // (other items were commented in a header).
   258 // ----------------------------------------------------------------------------
   204 // ----------------------------------------------------------------------------
   259 //
   205 //
   260 void CCalenServicesImpl::IssueNotificationL( TCalenNotification aNotification )
   206 void CalenServicesImpl::IssueNotificationL( TCalenNotification aNotification )
   261     {
   207     {
   262     TRACE_ENTRY_POINT;
   208     TRACE_ENTRY_POINT;
   263 
   209 
   264     ASSERT( iGlobalData && iController ); // Make sure ConstructL has been called.
   210     ASSERT( iController ); // Make sure ConstructL has been called.
   265     iController->BroadcastNotification( aNotification );
   211     iController->BroadcastNotification( aNotification );
   266 
   212 
   267     TRACE_EXIT_POINT;
   213     TRACE_EXIT_POINT;
   268     }
   214     }
   269 
   215 
   270 // ----------------------------------------------------------------------------
   216 // ----------------------------------------------------------------------------
   271 // CCalenServicesImpl::Context
   217 // CalenServicesImpl::RequestActivationL
       
   218 // Request activation of a specific view
       
   219 // (other items were commented in a header).
       
   220 // ----------------------------------------------------------------------------
       
   221 //
       
   222 void CalenServicesImpl::RequestActivationL( const TVwsViewId& /*aViewId*/ )
       
   223     {
       
   224     //ASSERT( iGlobalData && iController ); // Make sure ConstructL has been called.
       
   225    // iController->RequestActivationL( aViewId );
       
   226     }
       
   227 
       
   228 // ----------------------------------------------------------------------------
       
   229 // CalenServicesImpl::ActivationNotificationL
       
   230 // Notify Calendar that a specific view has been activated
       
   231 // (other items were commented in a header).
       
   232 // ----------------------------------------------------------------------------
       
   233 //
       
   234 void CalenServicesImpl::ActivationNotificationL( const TVwsViewId& /*aViewId*/ )
       
   235     {
       
   236     //ASSERT( iGlobalData && iController ); // Make sure ConstructL has been called.
       
   237     }
       
   238 
       
   239 // ----------------------------------------------------------------------------
       
   240 // CalenServicesImpl::Context
   272 // Returns the context.
   241 // Returns the context.
   273 // (other items were commented in a header).
   242 // (other items were commented in a header).
   274 // ----------------------------------------------------------------------------
   243 // ----------------------------------------------------------------------------
   275 //
   244 //
   276 MCalenContext& CCalenServicesImpl::Context()
   245 MCalenContext& CalenServicesImpl::Context()
   277     {
   246     {
   278     TRACE_ENTRY_POINT;
   247 	TRACE_ENTRY_POINT;
   279 
   248     ASSERT( iController ); // Make sure ConstructL has been called.
   280     ASSERT( iGlobalData && iController ); // Make sure ConstructL has been called.
   249     TRACE_EXIT_POINT;
   281 
   250     return iController->context();
   282     TRACE_EXIT_POINT;
   251     }
   283     return iGlobalData->Context();
   252 
   284     }
   253 // ----------------------------------------------------------------------------
   285 
   254 // CCalenServicesImpl::Infobar
   286 // ----------------------------------------------------------------------------
   255 // Descriptor passed to plugins to get customised info bar text
   287 // CCalenServicesImpl::RequestActivationL
   256 // (other items were commented in a header).
   288 // Request activation of a specific view
   257 // ----------------------------------------------------------------------------
   289 // (other items were commented in a header).
   258 //
   290 // ----------------------------------------------------------------------------
   259 HbWidget* CalenServicesImpl::Infobar( )
   291 //
   260     {    
   292 void CCalenServicesImpl::RequestActivationL( const TVwsViewId& aViewId )
   261     TRACE_ENTRY_POINT;
   293     {
   262 
   294     TRACE_ENTRY_POINT;
   263     TRACE_EXIT_POINT;
   295 
   264     return iController->Infobar();
   296     ASSERT( iGlobalData && iController ); // Make sure ConstructL has been called.
   265     }
   297     iController->RequestActivationL( aViewId );
   266 // ----------------------------------------------------------------------------
   298 
   267 // CCalenServicesImpl::InfobarTextL
   299     TRACE_EXIT_POINT;
   268 // @returns info bar text
   300     }
   269 // (other items were commented in a header).
   301 
   270 // ----------------------------------------------------------------------------
   302 // ----------------------------------------------------------------------------
   271 //
   303 // CCalenServicesImpl::ActivationNotificationL
   272 QString* CalenServicesImpl::InfobarTextL()
   304 // Notify Calendar that a specific view has been activated
   273     {
   305 // (other items were commented in a header).
   274     TRACE_ENTRY_POINT;
   306 // ----------------------------------------------------------------------------
   275 
   307 //
   276     TRACE_EXIT_POINT;
   308 void CCalenServicesImpl::ActivationNotificationL( const TVwsViewId& /*aViewId*/ )
   277     return iController->InfobarTextL();
   309     {
   278     }
   310     TRACE_ENTRY_POINT;
   279 // ----------------------------------------------------------------------------
   311 
   280 // CalenServicesImpl::GetCommandRange
   312     ASSERT( iGlobalData && iController ); // Make sure ConstructL has been called.
       
   313 
       
   314     TRACE_EXIT_POINT;
       
   315     }
       
   316 
       
   317 // ----------------------------------------------------------------------------
       
   318 // CCalenServicesImpl::OfferMenuPaneL
       
   319 // Offers the menu pane to plugins for customisation
       
   320 // (other items were commented in a header).
       
   321 // ----------------------------------------------------------------------------
       
   322 //
       
   323 void CCalenServicesImpl::OfferMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane )
       
   324     {
       
   325     TRACE_ENTRY_POINT;
       
   326 
       
   327     iController->OfferMenuPaneL( aResourceId, aMenuPane );
       
   328 
       
   329     TRACE_EXIT_POINT;
       
   330     }
       
   331 
       
   332 // ----------------------------------------------------------------------------
       
   333 // CCalenServicesImpl::GetCommandRange
       
   334 // Returns the assigned command range
   281 // Returns the assigned command range
   335 // (other items were commented in a header).
   282 // (other items were commented in a header).
   336 // ----------------------------------------------------------------------------
   283 // ----------------------------------------------------------------------------
   337 //
   284 //
   338 void CCalenServicesImpl::GetCommandRange( TInt& aCommandRangeStart, 
   285 void CalenServicesImpl::GetCommandRange( TInt& aCommandRangeStart, 
   339         TInt& aCommandRangeEnd ) const
   286                                                               TInt& aCommandRangeEnd ) const
   340     {
   287     {
   341     TRACE_ENTRY_POINT;
   288     TRACE_ENTRY_POINT;
   342 
   289 
   343     aCommandRangeStart = iCommandRangeStart;
   290     aCommandRangeStart = iCommandRangeStart;
   344     aCommandRangeEnd = iCommandRangeEnd;
   291     aCommandRangeEnd = iCommandRangeEnd;
   345 
   292 
   346     TRACE_EXIT_POINT;
   293     TRACE_EXIT_POINT;
   347     }
   294     }
   348 
   295 // ----------------------------------------------------------------------------
   349 // ----------------------------------------------------------------------------
   296 // CalenServicesImpl::OfferMenu
   350 // CCalenServicesImpl::Infobar
   297 // Offers the menu to plugins for customisation
   351 // Descriptor passed to plugins to get customised info bar text
   298 // (other items were commented in a header).
   352 // (other items were commented in a header).
   299 // ----------------------------------------------------------------------------
   353 // ----------------------------------------------------------------------------
   300 //
   354 //
   301 void CalenServicesImpl::OfferMenu(HbMenu* aHbMenu )
   355 CCoeControl* CCalenServicesImpl::Infobar(const TRect& aRect )
   302     {
   356     {
   303     TRACE_ENTRY_POINT;
   357     TRACE_ENTRY_POINT;
   304 
   358 
   305     iController->OfferMenu(aHbMenu);
   359     TRACE_EXIT_POINT;
   306 
   360     return iController->Infobar( aRect );
   307     TRACE_EXIT_POINT;
   361     }
   308     }
   362 
   309 
   363 // ----------------------------------------------------------------------------
   310 // ----------------------------------------------------------------------------
   364 // CCalenServicesImpl::Infobar
   311 // CalenServicesImpl::agendaInterface
   365 // Returns the customized text from plugin
   312 // returns the interface to the agenda database
   366 // (other items were commented in a header).
   313 // (other items were commented in a header).
   367 // ----------------------------------------------------------------------------
   314 // ----------------------------------------------------------------------------
   368 //
   315 //
   369 const TDesC& CCalenServicesImpl::Infobar()
   316 AgendaUtil* CalenServicesImpl::agendaInterface()
   370     {
   317     {
   371     TRACE_ENTRY_POINT;
   318     TRACE_ENTRY_POINT;
   372     TRACE_EXIT_POINT;
   319     TRACE_EXIT_POINT;
   373     return iController->Infobar();
       
   374     }
       
   375 
       
   376 // ----------------------------------------------------------------------------
       
   377 // CCalenServicesImpl::CustomPreviewPaneL
       
   378 // Returns the customized Preview pane
       
   379 // (other items were commented in a header).
       
   380 // ----------------------------------------------------------------------------
       
   381 //
       
   382 MCalenPreview* CCalenServicesImpl::CustomPreviewPaneL( TRect& aRect )
       
   383 	{
       
   384     TRACE_ENTRY_POINT;
       
   385     TRACE_EXIT_POINT;
       
   386     return iController->CustomPreviewPaneL( aRect );	
       
   387 	}
       
   388 
       
   389 // ----------------------------------------------------------------------------
       
   390 // CCalenServicesImpl::PreviewPane
       
   391 // Descriptor passed to plugins to get customised info bar text
       
   392 // (other items were commented in a header).
       
   393 // ----------------------------------------------------------------------------
       
   394 //
       
   395 CCoeControl* CCalenServicesImpl::PreviewPane( TRect& aRect )
       
   396     {
       
   397     TRACE_ENTRY_POINT;
       
   398 
       
   399     TRACE_EXIT_POINT;
       
   400     return iController->PreviewPane( aRect );
       
   401     }
       
   402 
       
   403 // ----------------------------------------------------------------------------
       
   404 // CCalenServicesImpl::ToolbarOrNull
       
   405 // Provides access to the calendar toolbar if one is available
       
   406 // ----------------------------------------------------------------------------
       
   407 MCalenToolbar* CCalenServicesImpl::ToolbarOrNull()
       
   408     {
       
   409     TRACE_ENTRY_POINT;
       
   410 
       
   411     TRACE_EXIT_POINT;
       
   412     return iController->ViewManager().ToolbarOrNull();
       
   413     }
       
   414     
   320     
   415 // ----------------------------------------------------------------------------
   321     return iController->agendaInterface();
   416 // CCalenServicesImpl::GetIconL
   322     
   417 // Get icon of specific type
   323     }
   418 // (other items were commented in a header).
   324 
   419 // ----------------------------------------------------------------------------
   325 // ----------------------------------------------------------------------------
   420 //
   326 // CalenServicesImpl::getFirstView
   421 CGulIcon* CCalenServicesImpl::GetIconL( MCalenServices::TCalenIcons aIndex )
   327 // returns the first view with which calendar has been launched
   422     {
   328 // (other items were commented in a header).
   423     TRACE_ENTRY_POINT;
   329 // ----------------------------------------------------------------------------
   424 
   330 //
   425     TRACE_EXIT_POINT;
   331 int CalenServicesImpl::getFirstView()
   426     return iController->GetIconL( aIndex );
   332 {
   427     }
   333 	TRACE_ENTRY_POINT;
   428 
   334 	TRACE_EXIT_POINT;
   429 // ----------------------------------------------------------------------------
   335 	
   430 // CCalenServicesImpl::QueueKeyEvent
   336 	return iController->getFirstView();
   431 // Queue key events
   337 }
   432 // (other items were commented in a header).
       
   433 // ----------------------------------------------------------------------------
       
   434 //
       
   435 TBool CCalenServicesImpl::QueueKeyEvent( const TKeyEvent& aEvent, 
       
   436                                                            TEventCode aType )
       
   437     {
       
   438     TRACE_ENTRY_POINT;
       
   439 
       
   440     TRACE_EXIT_POINT;
       
   441     return iGlobalData->QueueKeyEvent( aEvent, aType );
       
   442     }
       
   443 
       
   444 // ----------------------------------------------------------------------------
       
   445 // CCalenServicesImpl::GetQueuedKeyEventL
       
   446 // Get queued key events
       
   447 // (other items were commented in a header).
       
   448 // ----------------------------------------------------------------------------
       
   449 //    
       
   450 TBool CCalenServicesImpl::GetQueuedKeyEvent( TKeyEvent& aEvent, 
       
   451                                                                   TEventCode& aType )
       
   452     {
       
   453     TRACE_ENTRY_POINT;
       
   454 
       
   455     TRACE_EXIT_POINT;
       
   456     return iGlobalData->GetQueuedKeyEvent( aEvent, aType );
       
   457     }
       
   458 
       
   459 // ----------------------------------------------------------------------------
       
   460 // CCalenServicesImpl::ResetKeyEventQueue
       
   461 // reset key event queue
       
   462 // (other items were commented in a header).
       
   463 // ----------------------------------------------------------------------------
       
   464 //    
       
   465 void CCalenServicesImpl::ResetKeyEventQueue()
       
   466     {
       
   467     TRACE_ENTRY_POINT;
       
   468 
       
   469     iGlobalData->ResetKeyEventQueue();
       
   470 
       
   471     TRACE_EXIT_POINT;
       
   472     }
       
   473 
       
   474 // ----------------------------------------------------------------------------
       
   475 // CCalenController::MissedAlarmStore
       
   476 // Returns a reference to the Missed Alarm Store
       
   477 // ----------------------------------------------------------------------------
       
   478 CMissedAlarmStore* CCalenServicesImpl::MissedAlarmStore()
       
   479     {
       
   480     TRACE_ENTRY_POINT;
       
   481     TRACE_EXIT_POINT;
       
   482     return iController->MissedAlarmStore();
       
   483     }
       
   484 
       
   485 // ----------------------------------------------------------------------------
       
   486 // CCalenServicesImpl::GetMissedAlarmsList
       
   487 // Get missed alarms list
       
   488 // ----------------------------------------------------------------------------
       
   489 void CCalenServicesImpl::GetMissedAlarmsList(RArray<TCalenInstanceId>& aMissedAlarmsList)
       
   490     {
       
   491     TRACE_ENTRY_POINT;
       
   492     TRACE_EXIT_POINT;
       
   493     return iController->GetMissedAlarmsList(aMissedAlarmsList);
       
   494     }
       
   495 
       
   496 // ----------------------------------------------------------------------------
       
   497 // CCalenServicesImpl::GetAttachmentData
       
   498 // returns ref of CCalenAttachmentModel
       
   499 // (other items were commented in a header).
       
   500 // ----------------------------------------------------------------------------
       
   501 // 
       
   502 CCalenAttachmentModel* CCalenServicesImpl::GetAttachmentData()
       
   503     {
       
   504     TRACE_ENTRY_POINT;
       
   505     TRACE_EXIT_POINT;
       
   506     return &iController->AttachmentData();
       
   507     }
       
   508 
       
   509 // ----------------------------------------------------------------------------
       
   510 // CCalenServicesImpl::SessionL
       
   511 // Retrieve the calendar session currently in use by Calendar
       
   512 // (other items were commented in a header).
       
   513 // ----------------------------------------------------------------------------
       
   514 //
       
   515 CCalSession& CCalenServicesImpl::SessionL(const TDesC& aCalendar )
       
   516     {
       
   517     TRACE_ENTRY_POINT;
       
   518 
       
   519     ASSERT( iGlobalData && iController ); // Make sure ConstructL has been called.
       
   520 
       
   521     TRACE_EXIT_POINT;
       
   522     return iGlobalData->CalSessionL(aCalendar);
       
   523     }
       
   524 
       
   525 // ----------------------------------------------------------------------------
       
   526 // CCalenServicesImpl::EntryViewL
       
   527 // Retrieve the calendar entry view currently in use by Calendar
       
   528 // (other items were commented in a header).
       
   529 // ----------------------------------------------------------------------------
       
   530 //
       
   531 CCalEntryView* CCalenServicesImpl::EntryViewL(const  TCalCollectionId aCollectionId )
       
   532     {
       
   533     TRACE_ENTRY_POINT;
       
   534 
       
   535     ASSERT( iGlobalData && iController ); // Make sure ConstructL has been called.
       
   536 
       
   537     TRACE_EXIT_POINT;
       
   538     return iGlobalData->EntryViewL(aCollectionId);
       
   539     }
       
   540 
       
   541 // ----------------------------------------------------------------------------
       
   542 // CCalenServicesImpl::InstanceViewL
       
   543 // Retrieve the calendar instance view currently in use by Calendar
       
   544 // (other items were commented in a header).
       
   545 // ----------------------------------------------------------------------------
       
   546 //
       
   547 CCalInstanceView* CCalenServicesImpl::InstanceViewL(
       
   548                                         const RArray<TInt>& aCollectionIds)
       
   549     {
       
   550     TRACE_ENTRY_POINT;
       
   551 
       
   552     ASSERT( iGlobalData && iController ); // Make sure ConstructL has been called.
       
   553 
       
   554     TRACE_EXIT_POINT;
       
   555     return iGlobalData->InstanceViewL(aCollectionIds);
       
   556     }
       
   557 
       
   558 // -----------------------------------------------------------------------------
       
   559 // CCalenGlobalData::GetAllCalendarInfoL
       
   560 // Get all available calendar info
       
   561 // -----------------------------------------------------------------------------
       
   562 //
       
   563 void CCalenServicesImpl::GetAllCalendarInfoL(
       
   564         RPointerArray<CCalCalendarInfo>& aCalendarInfoList )
       
   565     {
       
   566     TRACE_ENTRY_POINT;
       
   567     ASSERT( iGlobalData && iController ); // Make sure ConstructL has been called.
       
   568     iGlobalData->GetAllCalendarInfoL(aCalendarInfoList);
       
   569     TRACE_EXIT_POINT;
       
   570     }
       
   571 
       
   572 // -----------------------------------------------------------------------------
       
   573 // CCalenGlobalData::GetCalFileNameForCollectionId
       
   574 // Get calendar file name for the given collection id
       
   575 // -----------------------------------------------------------------------------
       
   576 //
       
   577 const TDesC& CCalenServicesImpl::GetCalFileNameForCollectionId(
       
   578         const TCalCollectionId aCollectionId)
       
   579     {
       
   580     TRACE_ENTRY_POINT;
       
   581     ASSERT( iGlobalData && iController ); // Make sure ConstructL has been called.
       
   582     TRACE_EXIT_POINT;
       
   583     return iGlobalData->GetCalFileNameForCollectionId(aCollectionId);
       
   584     }
       
   585 
   338 
   586 // End of file
   339 // End of file