notes/notesui/notesappcontroller/src/notesappcontrollerifimpl.cpp
branchRCL_3
changeset 65 12af337248b1
equal deleted inserted replaced
60:96907930389d 65:12af337248b1
       
     1 /*
       
     2 * Copyright (c) 2009 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 * This file contains the NotesAppControllerIfImpl class definition.
       
    16 *
       
    17 */
       
    18 
       
    19 // User includes
       
    20 #include "notesappcontrollerifimpl.h"
       
    21 #include "notesmodelhandler.h"
       
    22 #include "notesappcontroller.h"
       
    23 #include "notesviewmanager.h"
       
    24 #include "OstTraceDefinitions.h"
       
    25 #ifdef OST_TRACE_COMPILER_IN_USE
       
    26 #include "notesappcontrollerifimplTraces.h"
       
    27 #endif
       
    28 
       
    29 
       
    30 /*!
       
    31 	\class NotesAppControllerIfImpl
       
    32 
       
    33 	This class implements the NotesAppControllerIf interface which is used
       
    34 	by the views and other componets to access the services of
       
    35 	notesviewmanager and notesmodelhandler.
       
    36  */
       
    37 
       
    38 /*!
       
    39 	Constructor.
       
    40 
       
    41 	\param controller Pointer to an object of NotesAppController.
       
    42 	\param parent QObject pointer.
       
    43  */
       
    44 NotesAppControllerIfImpl::NotesAppControllerIfImpl(
       
    45 		NotesAppController *controller, QObject *parent)
       
    46 :QObject(controller),
       
    47  mAppController(controller)
       
    48 {
       
    49 	OstTraceFunctionEntry0( NOTESAPPCONTROLLERIFIMPL_NOTESAPPCONTROLLERIFIMPL_ENTRY );
       
    50 	Q_UNUSED(parent);
       
    51 	OstTraceFunctionExit0( NOTESAPPCONTROLLERIFIMPL_NOTESAPPCONTROLLERIFIMPL_EXIT );
       
    52 }
       
    53 
       
    54 /*!
       
    55 	Destructor.
       
    56  */
       
    57 NotesAppControllerIfImpl::~NotesAppControllerIfImpl()
       
    58 {
       
    59 	OstTraceFunctionEntry0( DUP1_NOTESAPPCONTROLLERIFIMPL_NOTESAPPCONTROLLERIFIMPL_ENTRY );
       
    60 	// Nothing yet.
       
    61 	OstTraceFunctionExit0( DUP1_NOTESAPPCONTROLLERIFIMPL_NOTESAPPCONTROLLERIFIMPL_EXIT );
       
    62 }
       
    63 
       
    64 /*!
       
    65 	From NotesAppControllerIf.
       
    66 	Returns a pointer to agendautil object.
       
    67 
       
    68 	\return AgendaUtil* Pointer to agendautil object.
       
    69 	\sa NotesAppControllerIf
       
    70  */
       
    71 AgendaUtil *NotesAppControllerIfImpl::agendaUtil()
       
    72 {
       
    73 	OstTraceFunctionEntry0( NOTESAPPCONTROLLERIFIMPL_AGENDAUTIL_ENTRY );
       
    74 	return mAppController->mNotesModelHandler->agendaInterface();
       
    75 }
       
    76 
       
    77 /*!
       
    78 	From NotesAppControllerIf.
       
    79 	Returns a pointer to notesmodel object.
       
    80 
       
    81 	\return NotesModel* Pointer to notesmodel object.
       
    82 	\sa NotesAppControllerIf
       
    83  */
       
    84 NotesModel *NotesAppControllerIfImpl::notesModel()
       
    85 {
       
    86 	OstTraceFunctionEntry0( NOTESAPPCONTROLLERIFIMPL_NOTESMODEL_ENTRY );
       
    87 	return mAppController->mNotesModelHandler->notesModel();
       
    88 }
       
    89 
       
    90 /*!
       
    91 	From NotesAppControllerIf.
       
    92 	Issues a request to NotesViewManager to switch to a given view.
       
    93 
       
    94 	\param viewId The id of the view to be switched to.
       
    95 	\sa NotesAppControllerIf
       
    96  */
       
    97 void NotesAppControllerIfImpl::switchToView(NotesNamespace::NotesViewIds viewId)
       
    98 {
       
    99 	OstTraceFunctionEntry0( NOTESAPPCONTROLLERIFIMPL_SWITCHTOVIEW_ENTRY );
       
   100 	mAppController->mViewManager->switchToView(viewId);
       
   101 	OstTraceFunctionExit0( NOTESAPPCONTROLLERIFIMPL_SWITCHTOVIEW_EXIT );
       
   102 }
       
   103 
       
   104 // End of file	--Don't remove this.